create widget, with optional id
adds child, returns added item
animates window; interval is time left from previous draw, in hnsecs (1/10000 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 child by index
find child by id, returns null if not found
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
searches children for first focusable item, returns null if not found
override to handle check changes
override to handle focus changes
request redraw
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
process key event, return true if event is processed.
process mouse event; return true if event is processed by widget.
removes child by ID, returns removed item
removes child, returns removed item
request relayout of widget and its children
sets focus to this widget or suitable focusable child, returns previously focused widget
returns alignment (combined vertical and horizontal)
sets alignment (combined vertical and horizontal)
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
returns true if widget is focusable and visible
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
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
returns font weight
set font weight for widget - override one from style
returns vertical alignment
returns current height of widget in pixels
returns widget id, null if not set
set widget id
returns layout height options (WRAP_CONTENT, FILL_PARENT, or some constant value)
sets layout height options (WRAP_CONTENT, FILL_PARENT, or some constant value)
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)
returns layout width options (WRAP_CONTENT, FILL_PARENT, or some constant value)
sets layout width options (WRAP_CONTENT, FILL_PARENT, or some constant value)
returns widget rectangle left position
get margins (between widget bounds and its background)
set margins for widget - override one from style
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
get padding (between background bounds and content of widget)
set padding for widget - override one from style
sets parent for widget
returns parent widget, null for top level widget
returns widget rectangle
remove state flags (set of flags from State enum)
add state flags (set of flags from State enum)
widget state (set of flags from State enum)
set new 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).
returns widget style id, null if not set
set widget style id
returns widget content text (override to support this)
sets widget content text (override to support this)
sets widget content text (override to support this)
get text color (ARGB 32 bit value)
set text color (ARGB 32 bit value)
returns widget rectangle top position
mouse movement processing flag (when true, widget will change Hover state while mouse is moving)
set new trackHover flag value (when true, widget will change Hover state while mouse is moving)
returns horizontal alignment
returns widget visibility (Visible, Invisible, Gone)
sets widget visibility (Visible, Invisible, Gone)
returns true if this widget and all its parents are visible
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?
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))
focus state change event listener (bool delegate(Widget, bool))