get widget text
set text to show
set text to show
set text resource ID to show
widget id
current widget position, set by layout()
widget visibility: either Visible, Invisible, Gone
style id to lookup style in theme
own copy of style - to override some of style properties, null of no properties overriden
widget state (set of flags from State enum)
width measured by measure()
height measured by measure()
true to force layout
true to force redraw
parent widget
window (to be used for top level widgets only!)
does widget need to track mouse Hover
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)
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 style for current widget state
enforces widget's own style - allows override some of style properties
returns widget id, null if not set
set widget id
compare widget id with specified value, returs true if matches
widget state (set of flags from State enum)
override to handle focus changes
override to handle check changes
set new widget state (set of flags from State enum)
add state flags (set of flags from State enum)
remove state flags (set of flags from State enum)
returns widget style id, null if not set
set widget style id
get margins (between widget bounds and its background)
set margins for widget - override one from style
get padding (between background bounds and content of widget)
set padding for widget - override one from style
returns background color
set background color for widget - override one from style
get text color (ARGB 32 bit value)
set text color (ARGB 32 bit value)
returns font face
set font face for widget - override one from style
returns font style (italic/normal)
set font style (italic/normal) for widget - override one from style
returns font weight
set font weight for widget - override one from style
returns font size in pixels
set font size for widget - override one from style
returns font family
set font family for widget - override one from style
returns alignment (combined vertical and horizontal)
sets alignment (combined vertical and horizontal)
returns horizontal alignment
returns vertical alignment
returns font set for widget using style or set manually
returns widget content text (override to support this)
sets widget content text (override to support this)
sets widget content text (override to support this)
returns true if layout is required for widget and its children
returns true if redraw is required for widget and its children
returns true is widget is being animated - need to call animate() and redraw
animates window; interval is time left from previous draw, in hnsecs (1/10000 of second)
returns measured width (calculated during measure() call)
returns measured height (calculated during measure() call)
returns current width of widget in pixels
returns current height of widget in pixels
returns widget rectangle top position
returns widget rectangle left position
returns widget rectangle
returns min width constraint
returns max width constraint (SIZE_UNSPECIFIED if no constraint set)
returns min height constraint
returns max height constraint (SIZE_UNSPECIFIED if no constraint set)
set max width constraint (SIZE_UNSPECIFIED for no constraint)
set max width constraint (0 for no constraint)
set max height constraint (SIZE_UNSPECIFIED for no constraint)
set max height constraint (0 for no constraint)
returns layout width options (WRAP_CONTENT, FILL_PARENT, or some constant value)
returns 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 width options (WRAP_CONTENT, FILL_PARENT, or some constant value)
sets layout height options (WRAP_CONTENT, FILL_PARENT, or some constant value)
sets layout weight (while resizing to fill parent, widget will be resized proportionally to this value)
returns widget visibility (Visible, Invisible, Gone)
sets widget visibility (Visible, Invisible, Gone)
returns true if point is inside of this widget
return true if state has State.Enabled flag set
change enabled state
when true, user can click this control, and get onClick listeners called
when true, control supports Checked state
get checked state
set checked state
returns true if this widget and all its parents are visible
returns true if widget is focusable and visible
sets focus to this widget or suitable focusable child, returns previously focused widget
searches children for first focusable item, returns null if not found
process key event, return true if event is processed.
process mouse event; return true if event is processed by widget.
on click event listener (bool delegate(Widget))
checked state change event listener (bool delegate(Widget, bool))
focus state change event listener (bool delegate(Widget, bool))
request relayout of widget and its children
request redraw
helper function for implement measure() when widget's content dimensions are known
Measure widget according to desired width and height constraints. (Step 1 of two phase layout).
Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).
Draw widget at its position to buffer
Helper function: applies margins to rectangle
Helper function: applies padding to rectangle
Applies alignment for content of size sz - set rectangle rc to aligned value of content inside of initial value of rc.
returns number of children of this widget
returns child by index
adds child, returns added item
removes child, returns removed item
removes child by ID, returns removed item
returns index of widget in child list, -1 if passed widget is not a child of this widget
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).
find child by id, returns null if not found
returns parent widget, null for top level widget
sets parent for widget
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?
static text widget