empty parameter list constructor - for usage by factory
create with ID parameter
adds child, returns added item
adds child, returns added item
helper function to add onCheckChangeListener in method chain
helper function to add onCheckChangeListener in method chain
helper function to add onFocusChangeListener in method chain
animates window; interval is time left from previous draw, in hnsecs (1/10000000 of second)
Applies alignment for content of size sz - set rectangle rc to aligned value of content inside of initial value of rc.
Helper function: applies margins to rectangle
Helper function: applies padding to rectangle
returns true if widget can show popup menu (e.g. by mouse right click at point x,y)
cancel timer - pass value returned from setTimer() as timerId parameter
returns child by index
find child of specified type T by id, returns null if not found or cannot be converted to type T
returns index of widget in child list, -1 if passed widget is not a child of this widget
compare widget id with specified value, returs true if matches
will be called from window once tooltip request timer expired; if null is returned, popup will not be shown; you can change alignment and position of popup here
call to dispatch action
draws focus rectangle, if enabled in styles
execute delegate later in UI thread if this widget will be still available (can be used to modify UI from background thread, or just to postpone execution of action)
sets layoutWidth=FILL_PARENT
sets layoutWidth=FILL_PARENT and layoutHeight=FILL_PARENT
sets layoutHeight=FILL_PARENT
searches children for first focusable item, returns null if not found
map key to action
find nearest parent of this widget with focusGroup flag, returns topmost parent if no focusGroup flag set to any of parents.
returns mouse cursor type for widget
override to handle specific actions
called when state of action assigned on widget is changed
override to handle specific actions state (e.g. change enabled state for supported actions)
override to handle check changes
override to handle focus changes
override to handle font changes
inserts child at given index, returns inserted item
request redraw
override to change popup menu items state
returns true if item is child of this widget (when deepSearch == true - returns true if item is this widget or one of children inside children tree).
returns true if point is inside of this widget
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).
helper function for implement measure() when widget's content dimensions are known
Draw widget at its position to buffer
handle custom event
process key event, return true if event is processed.
process mouse event; return true if event is processed by widget.
handle theme change: e.g. reload some themed resources
handle timer; return true to repeat timer event after next interval, false cancel timer
removes child, returns removed item
removes child by ID, returns removed item
removes child, returns removed item
set action update request flag, will be cleared after redraw
request relayout of widget and its children
schedule tooltip
set string property value, for ML loaders
set double property value, for ML loaders
set string property value, for ML loaders
sets focus to this widget or suitable focusable child, returns previously focused widget
set int property value, for ML loaders
set Rect property value, for ML loaders
StringListValue list values
set string property value, for ML loaders
set new timer to call onTimer() after specified interval (for recurred notifications, return true from onTimer)
UIString list values
set string property value, for ML loaders
shows popup menu at (x,y)
Shows system virtual keyabord where applicable
call to update state for action (if action is assigned for widget)
ask for update state of some action (unles force=true, checks window flag actionsUpdateRequested), returns true if action state is changed
apply enabled, visibile and checked state for this widget from action's state
action to emit on click
action to emit on click
action to emit on click
returns alignment (combined vertical and horizontal)
sets alignment (combined vertical and horizontal)
widget drawing alpha value (0=opaque .. 255=transparent)
set widget drawing alpha value (0=opaque .. 255=transparent)
returns true is widget is being animated - need to call animate() and redraw
returns background color
set background color for widget - override one from style
set background color for widget - from string like "#5599CC" or "white"
background drawable
background drawable
background image id
background image id
returns true if widget is focusable and visible and enabled
when true, control supports Checked state
get checked state
set checked state
returns number of children of this widget
when true, user can click this control, and get onClick listeners called
return true if state has State.Enabled flag set
change enabled state
set focus group flag for container widget
When focus group is set for some parent widget, focus from one of containing widgets can be moved using keyboard only to one of other widgets containing in it and cannot bypass bounds of focusGroup.
returns colors to draw focus rectangle (one for solid, two for vertical gradient) or null if no focus rect should be drawn for style
whether widget can be focused
returns font set for widget using style or set manually
returns font face
set font face for widget - override one from style
returns font family
set font family for widget - override one from style
returns font style (italic/normal)
set font style (italic/normal) for widget - override one from style
returns font size in pixels
set font size for widget - override one from style
set font weight for widget - override one from style
returns font weight
returns vertical alignment
returns true if widget has tooltip to show
returns current height of widget in pixels
returns widget id, null if not set
set widget id
for debug purposes - number of created widget objects, not yet destroyed
sets layout height options (WRAP_CONTENT, FILL_PARENT, or some constant value)
returns layout height options (WRAP_CONTENT, FILL_PARENT, some constant value or percent but only for one widget in layout)
returns layout weight (while resizing to fill parent, widget will be resized proportionally to this value)
sets layout weight (while resizing to fill parent, widget will be resized proportionally to this value)
sets layout width options (WRAP_CONTENT, FILL_PARENT, or some constant value)
returns layout width options (WRAP_CONTENT, FILL_PARENT, some constant value or percent but only for one widget in layout)
returns widget rectangle left position
set margins for widget with the same value for left, top, right, bottom - override one from style
set margins for widget - override one from style
get margins (between widget bounds and its background)
returns max height constraint (SIZE_UNSPECIFIED if no constraint set)
set max height constraint (SIZE_UNSPECIFIED for no constraint)
returns max width constraint (SIZE_UNSPECIFIED if no constraint set)
set max width constraint (SIZE_UNSPECIFIED for no constraint)
returns measured height (calculated during measure() call)
returns measured width (calculated during measure() call)
returns min height constraint
set max height constraint (0 for no constraint)
returns min width constraint
set max width constraint (0 for no constraint)
returns true if redraw is required for widget and its children
returns true if layout is required for widget and its children
enforces widget's own style - allows override some of style properties
set padding for widget to the same value for left, top, right, bottom - override one from style
set padding for widget - override one from style
get padding (between background bounds and content of widget)
returns parent widget, null for top level widget
sets parent for widget
returns widget rectangle
remove state flags (set of flags from State enum)
add state flags (set of flags from State enum)
set new widget state (set of flags from State enum)
widget state (set of flags from State enum)
returns style for current widget state
accessor to style - by lookup in theme by styleId (if style id is not set, theme base style will be used).
accessor to style - by lookup in theme by styleId (if style id is not set, theme base style will be used).
set widget style id
returns widget style id, null if not set
tab order - hint for focus movement using Tab/Shift+Tab
sets widget content text (override to support this)
sets widget content text (override to support this)
returns widget content text (override to support this)
set text color for widget - from string like "#5599CC" or "white"
set text color (ARGB 32 bit value)
get text color (ARGB 32 bit value)
set text flags (bit set of TextFlag enum values)
get text flags (bit set of TextFlag enum values)
tooltip text - when not empty, widget will show tooltips automatically; for advanced tooltips - override hasTooltip and createTooltip
tooltip text - when not empty, widget will show tooltips automatically; for advanced tooltips - override hasTooltip and createTooltip
tooltip text - when not empty, widget will show tooltips automatically; for advanced tooltips - override hasTooltip and createTooltip
returns widget rectangle top position
set new trackHover flag value (when true, widget will change Hover state while mouse is moving)
mouse movement processing flag (when true, widget will change Hover state while mouse is moving)
returns horizontal alignment
sets widget visibility (Visible, Invisible, Gone)
returns widget visibility (Visible, Invisible, Gone)
returns true if this widget and all its parents are visible
override and return true to track key events even when not focused
returns current width of widget in pixels
returns window (if widget or its parent is attached to window)
sets window (to be used for top level widget from Window implementation). TODO: hide it from API?
Applies alignment for content of size sz - set rectangle rc to aligned value of content inside of initial value of rc.
widget id
height measured by measure()
width measured by measure()
true to force redraw
true to force layout
own copy of style - to override some of style properties, null of no properties overriden
parent widget
current widget position, set by layout()
widget state (set of flags from State enum)
style id to lookup style in theme
does widget need to track mouse Hover
widget visibility: either Visible, Invisible, Gone
window (to be used for top level widgets only!)
checked state change event listener (bool delegate(Widget, bool))
on click event listener (bool delegate(Widget))
On double click event listener (bool delegate(Widget))
focus state change event listener (bool delegate(Widget, bool))
key event listener (bool delegate(Widget, KeyEvent)) - return true if event is processed by handler
action by key lookup handler
mouse event listener (bool delegate(Widget, MouseEvent)) - return true if event is processed by handler
action handlers
Base class for all widgets.