Class UbuntuUI
Class defined in:core.js:27
UbuntuUI is the critical Ubuntu HTML5 framework class. You need to construct an UbuntuUI object and initialize it to have an Ubuntu HTML5 app. You then use this object to access Ubuntu HTML5 objects (and object methods) that correspond to the Ubuntu HTML5 DOM elements.
Note: The UbuntuUI object is "UI" in all API doc examples.
UbuntuUI
(
)
core.js:27
Example
var UI = new UbuntuUI();
window.onload = function () {
UI.init();
UI.pagestack.push('pageid');
[...]
};
Button
button
( id
)
core.js:476
Gets an Ubuntu Button object
Parameters:-
id
<ID>- The element's id attribute
Returns: <Button>
- The Button with the specified id
Dialog
dialog
( id
)
core.js:502
Gets an Ubuntu Dialog object
Parameters:-
id
<ID>- The element's id attribute
Returns: <Dialog>
- The Dialog with the specified id
Element
element
(
)
core.js:589
Gets the DOM element from a given selector
Returns: <Element>
- The DOM element Gets the HTML element associated with an Ubuntu HTML5 JavaScript object
Header
header
( id
)
core.js:531
Gets an Ubuntu Header object
Parameters:-
id
<ID>- The element's id attribute
Returns: <Header>
- The Header with the specified id
List
list
( selector
)
core.js:559
Gets an Ubuntu List
Parameters:-
selector
<Selector>- A selector that JavaScript querySelector method understands
Returns: <List>
OptionSelector
optionselector
( id, expanded, multiSelection
)
core.js:573
Gets an Ubuntu Option Selector
Parameters:-
id
<ID>- The element's id attribute
-
expanded
<Boolean>- Specifies whether the list is always expanded
-
multiSelection
<Boolean>- If multiple choice selection is enabled the list is always expanded.
Returns: <OptionSelector>
Page
page
( id
)
core.js:434
Gets an Ubuntu Page object
Parameters:-
id
<ID>- The element's id attribute
Returns: <Page>
- The Page with the specified id
Pagestack
pagestack
(
)
core.js:599
Gets this UbuntuUI's single Pagestack object
Returns: <Pagestack>
- The Pagestack
Popover
popover
( el, id
)
core.js:516
Gets an Ubuntu Popover object
Parameters:-
el
<Element>- The element to which the Popover's position is relative
-
id
<ID>- The element's id attribute
Returns: <Popover>
- The Popover with the specified id
Progress
progress
( id
)
core.js:490
Gets an Ubuntu Progress object
Parameters:-
id
<ID>- The element's id attribute
Returns: <Progress>
- The Progress with the specified id
Shape
shape
( id
)
core.js:462
Gets an Ubuntu Shape object
Parameters:-
id
<ID>- The element's id attribute
Returns: <Shape>
- The Shape with the specified id
Tab
tab
( id
)
core.js:448
Gets an Ubuntu Tab object
Parameters:-
id
<ID>- The element's id attribute
Returns: <Tab>
- The Tab with the specified id
Toolbar
toolbar
( id
)
core.js:545
Gets an Ubuntu Toolbar object
Parameters:-
id
<ID>- The element's id attribute
Returns: <Toolbar>
- The Toolbar with the specified id