-
Notifications
You must be signed in to change notification settings - Fork 8
UI Library API
Signature | Return Type | Description |
---|---|---|
create( ancestor:Entity, condition:Function($EntityType)->Logical, [all=false:Logical] ) | ConditionalEntityCollector<<$EntityType>> |
Name | Type | Description |
---|---|---|
all | Logical | |
ancestor | Entity | |
condition | Function($EntityType)->Logical |
Signature | Return Type | Description |
---|---|---|
description() | String | |
on_use() | $EntityType[] | |
on_end_use( list:$EntityType[] ) | ||
operator==( other:ConditionalEntityCollector<<$EntityType>> ) | Logical | |
print_to( buffer:PrintWriter ) | ||
to<<Object>>() | Boxed<<ConditionalEntityCollector<<$EntityType>>>> | |
to<<String>>() | String |
extends Object
incorporates Poolable
Signature | Return Type | Description |
---|---|---|
add( drawable:Drawable2D ) | ||
add( region:IntBox ) | ||
clear() | ||
count() | Int | |
on_return_to_pool() | ||
on_use() | IntBox[] | |
on_end_use( list:IntBox[] ) |
extends DirtyRegionTracker
Name | Type | Description |
---|---|---|
dirty_bounds | IntBox? |
Signature | Return Type | Description |
---|---|---|
add( drawable:Drawable2D ) | ||
add( region:IntBox ) | ||
clear() | ||
count() | Int | |
on_use() | IntBox[] |
extends Entity
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
init() | ||
init( bounds:IntBox ) | ||
init( content:Entity ) | ||
init( size:IntXY ) | ||
after_draw() | ||
after_resize() | ||
alignment() | Anchor | |
bounds() | IntBox | |
clip() | IntBox? | |
contains( drawable:Drawable2D ) | Logical | |
contains( e:PointerEvent ) | Logical | |
contains( pos:IntXY ) | Logical | |
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
display_bounds() | IntBox | |
display_position() | IntXY | |
draw() | ||
draw_children() |
Overridden in UIComponent. Each UIComponent (including UI) manages drawing all of its descendants down to and including other UIComponent objects but not descending into them. In other words, each UIComponent draws its own descendants. |
|
find( pos:IntXY ) | Drawable2D | Find the last child that contains 'pos'. |
font() | UIFont | |
has_weight() | Logical | |
needs_redraw() | Logical | |
on_draw() | ||
on_prepare_layout() | ||
on_resize() | ||
on_update_layout() | ||
on_resize( callback:Function(Drawable2D) ) | ||
parent_drawable() | Drawable2D | |
request_layout() | ||
request_redraw() | ||
save_display_state() | ||
set_alignment( value:Anchor ) | ||
set_anchor( value:Anchor ) | ||
set_bounds( bounds:IntBox ) | ||
set_clip( clip_bounds:IntBox? ) | ||
set_draw_order( new_draw_order:Int ) | ||
set_fixed_height( h:Int ) | ||
set_fixed_size( new_fixed_size:IntXY ) | ||
set_fixed_width( w:Int ) | ||
set_font( value:UIFont ) | ||
set_height( value:Int ) | ||
set_rotation( value:Radians ) | ||
set_rotation( value:XYZ ) | ||
set_size( value:IntXY ) | ||
set_structure_modified( setting:Logical ) | ||
set_weight( value:XY ) | ||
set_width( value:Int ) | ||
size() | IntXY | |
update_display_state() | ||
update( bounds:IntBox ) | ||
weight() | XY |
extends DynamicProperty
Name | Type | Description |
---|---|---|
next | DynamicProperty | |
value | Anchor |
Signature | Return Type | Description |
---|---|---|
init( value:Anchor ) | ||
alignment() | Anchor? | |
set_alignment( value:Anchor ) |
extends Object
Signature | Return Type | Description |
---|---|---|
alignment( entity:Drawable2D ) | Anchor | |
font( entity:Drawable2D ) | UIFont | |
has_weight( entity:Drawable2D ) | Logical | |
on_resize( entity:Drawable2D ) | ||
set_alignment( entity:Drawable2D, value:Anchor ) | ||
set_font( entity:Drawable2D, value:UIFont ) | ||
set_on_resize( entity:Drawable2D, fn:Function(Drawable2D) ) | ||
set_weight( entity:Drawable2D, value:XY ) | ||
weight( entity:Drawable2D ) | XY |
extends Object
Name | Type | Description |
---|---|---|
next | DynamicProperty |
Signature | Return Type | Description |
---|---|---|
alignment() | Anchor? | |
font() | UIFont? | |
has_weight() | Logical | |
on_resize( entity:Drawable2D ) | ||
set_alignment( value:Anchor ) | ||
set_font( value:UIFont ) | ||
set_on_resize( fn:Function(Drawable2D) ) | ||
set_weight( value:XY ) | ||
weight() | XY |
extends DynamicProperty
Name | Type | Description |
---|---|---|
next | DynamicProperty | |
value | UIFont |
Signature | Return Type | Description |
---|---|---|
init( value:UIFont ) | ||
font() | UIFont? | |
set_font( value:UIFont ) |
extends DynamicProperty
Name | Type | Description |
---|---|---|
fn | Function(Drawable2D) | |
next | DynamicProperty |
Signature | Return Type | Description |
---|---|---|
init( fn:Function(Drawable2D) ) | ||
on_resize( entity:Drawable2D ) | ||
set_on_resize( fn:Function(Drawable2D) ) |
extends DynamicProperty
Name | Type | Description |
---|---|---|
next | DynamicProperty | |
value | XY |
Signature | Return Type | Description |
---|---|---|
init( value:XY ) | ||
has_weight() | Logical | |
set_weight( value:XY ) | ||
weight() | XY |
extends Node<<Entity>>
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
first_child | Entity | |
last_child | Entity | |
name | String | |
next | Entity | |
parent | Entity | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
init() | ||
init( content:Entity ) | ||
after_update() | ||
after( e:KeyEvent ) | ||
after( e:PointerEvent ) | ||
after( e:ScrollEvent ) | ||
after( e:TextEvent ) | ||
capture_keyboard_focus() | Logical | |
capture_pointer_focus() | Logical | |
clip_content() | Logical | |
collect<<$EntityType>>( &all ) | EntityCollector<<$EntityType>> |
Returns an EntityCollector that can be 'use'd to obtain a list of descendent entities that are instanceOf $EntityType. Parents will be placed in the list ahead of children. Entities that are instanceOf UIComponent are collected but are not recursed into unless the &all flag is used. USAGE e.g. use drawables = view.collect<<Drawable2D>> forEach (drawable in drawables) ... endUse |
collect<<$EntityType>>( condition:Function($EntityType)->Logical, &all ) | ConditionalEntityCollector<<$EntityType>> | |
collect_children<<$EntityType>>( list:$EntityType[], &all ) | ||
collect_children<<$EntityType>>( list:$EntityType[], condition:Function($EntityType)->Logical, &all ) | ||
dead() | Logical | |
destroy() | ||
die() | ||
dispatch( e:KeyEvent ) | Send input events to children in reverse order because the top layer comes last | |
dispatch( e:PointerEvent ) | Send input events to children in reverse order because the top layer comes last | |
dispatch( e:ScrollEvent ) | Send input events to children in reverse order because the top layer comes last | |
dispatch( e:TextEvent ) | Send input events to children in reverse order because the top layer comes last | |
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
first_child<<$OfType>>() | $OfType | |
get( name:String ) | Entity | |
handle( e:KeyEvent ) | ||
handle( e:PointerEvent ) | ||
handle( e:ScrollEvent ) | ||
handle( e:TextEvent ) | ||
has_keyboard_focus() | Logical | |
has_pointer_focus() | Logical | |
hidden() | Logical | |
hide() | ||
initialized() | Logical | |
input_disabled() | Logical | |
is_fixed_height() | Logical | |
is_fixed_width() | Logical | |
is_shrink_to_fit_height() | Logical | |
is_shrink_to_fit_width() | Logical | |
is_ui_component() | Logical | |
name() | String | |
needs_layout() | Logical | |
needs_redraw() | Logical | |
on_destroy() | ||
on_init() | ||
on_release_keyboard_focus() | ||
on_release_pointer_focus() | ||
on_update() | ||
on( e:KeyEvent ) | ||
on( e:PointerEvent ) | ||
on( e:ScrollEvent ) | ||
on( e:TextEvent ) | ||
release_keyboard_focus() | ||
release_pointer_focus() | ||
set_clip_content( setting:Logical ) | ||
set_dead( setting:Logical ) | ||
set_hidden( setting:Logical ) | ||
set_initialized( setting:Logical ) | ||
set_input_disabled( setting:Logical ) | ||
set_is_fixed_height( setting:Logical ) | ||
set_is_fixed_width( setting:Logical ) | ||
set_is_shrink_to_fit_height( setting:Logical ) | ||
set_is_shrink_to_fit_width( setting:Logical ) | ||
set_needs_layout( setting:Logical ) | ||
set_needs_redraw( setting:Logical ) | ||
set_visible( setting:Logical ) | ||
show() | ||
update() | ||
visible() | Logical |
Signature | Return Type | Description |
---|---|---|
create( ancestor:Entity, [all=false:Logical] ) | EntityCollector<<$EntityType>> |
Name | Type | Description |
---|---|---|
all | Logical | |
ancestor | Entity |
Signature | Return Type | Description |
---|---|---|
description() | String | |
on_use() | $EntityType[] | |
on_end_use( list:$EntityType[] ) | ||
operator==( other:EntityCollector<<$EntityType>> ) | Logical | |
print_to( buffer:PrintWriter ) | ||
to<<Object>>() | Boxed<<EntityCollector<<$EntityType>>>> | |
to<<String>>() | String |
extends Object
Name | Type | Description |
---|---|---|
is_consumed | Logical | |
refcount | Int | |
timestamp | Int |
Signature | Return Type | Description |
---|---|---|
init( [timestamp=System.execution_time_ms:Int] ) | ||
init( existing:Event ) | ||
cloned() | Event | |
consume() | ||
release() | ||
retain() |
extends Event
Name | Type | Description |
---|---|---|
is_consumed | Logical | |
is_press | Logical | |
is_repeat | Logical | |
keycode | Int | if keycode == Keycode.UNICODE then 'syscode' contains unicode value |
modifier_key_state | Int | |
refcount | Int | |
syscode | Int | |
timestamp | Int |
Signature | Return Type | Description |
---|---|---|
init( keycode:Int, syscode:Int, [is_press=false:Logical], [is_repeat=false:Logical], [modifier_key_state=Keyboard.modifier_key_state:Int] ) | ||
cloned() | KeyEvent | |
is_alt_pressed() | Logical | |
is_control_pressed() | Logical | |
is_os_pressed() | Logical | |
is_release() | Logical | |
is_shift_pressed() | Logical | |
is_press( _keycode:Int ) | Logical | |
is_release( _keycode:Int ) | Logical | |
is_repeat( _keycode:Int ) | Logical | |
release() | ||
to<<String>>() | String | |
unicode() | Character |
extends Event
Name | Type | Description |
---|---|---|
cancelled | Logical | When a touch event in progress is interrupted then a RELEASE event is sent with .cancelled==true. |
delta | IntXY | |
index | Int | |
is_consumed | Logical | |
position | IntXY | |
refcount | Int | |
timestamp | Int | |
type | Int |
Signature | Return Type | Description |
---|---|---|
init( existing:PointerEvent ) | ||
init( type:Int, position:IntXY, delta:IntXY, index:Int, [cancelled=false:Logical] ) | ||
cloned() | PointerEvent | |
is_drag_move() | Logical | |
is_drag_start() | Logical | |
is_drag_stop() | Logical | |
is_move() | Logical | |
is_press() | Logical | |
is_press_left() | Logical | |
is_press_middle() | Logical | |
is_press_right() | Logical | |
is_release() | Logical | |
is_release_left() | Logical | |
is_release_middle() | Logical | |
is_release_right() | Logical | |
is_press( button_index:Int ) | Logical | |
is_release( button_index:Int ) | Logical | |
operator+( offset:IntXY ) | PointerEvent | |
operator-( offset:IntXY ) | PointerEvent | |
release() | ||
to<<String>>() | String |
extends Event
Name | Type | Description |
---|---|---|
delta | IntXY | |
density | Int | |
in_progress | Logical | macOS: in_progress means that either the finger is still resting on the Magic Mouse/trackpad or that a "momentum scroll" is active. Either way scroll events are guaranteed to continue to be received until one where 'in_progress' is false. |
is_consumed | Logical | |
is_momentum | Logical | |
precise | Logical | True for Apple Magic Mouse and Trackpad, AKA supports gestures and momentum. If this is true then is_progress and is_momentum are valid (and vice versa). |
refcount | Int | |
timestamp | Int |
Signature | Return Type | Description |
---|---|---|
init( delta:IntXY, [precise=false:Logical], [in_progress=false:Logical], [is_momentum=false:Logical], [density=1:Int] ) | ||
cloned() | ScrollEvent | |
release() | ||
to<<String>>() | String |
extends Object
macOS with Magic Mouse or trackpad: - Tracks 0.25 seconds of continuous-gesture scroll data and accelerates
the scroll deltas to allow behavior similar to built-in OS scrolling.
Other OS or input device: - Scales each scroll delta by 'base_scale' with no acceleration.
Name | Type | Description |
---|---|---|
acceleration_x | Real | |
acceleration_y | Real | |
base_scale | Int | |
delta | IntXY | |
history_x | ScrollEvent[] | |
history_y | ScrollEvent[] |
Signature | Return Type | Description |
---|---|---|
init( [base_scale=5:Int] ) | ||
add( e:ScrollEvent ) | IntXY | Returns the scaled or accelerated scroll-delta. |
extends Event
Name | Type | Description |
---|---|---|
character | Character | |
is_consumed | Logical | |
refcount | Int | |
text | String | |
timestamp | Int |
Signature | Return Type | Description |
---|---|---|
init( character:Character, text:String ) | ||
cloned() | TextEvent | |
count() | Int | |
operator==( ch:Character ) | Logical | |
operator==( value:String ) | Logical | |
release() | ||
text() | String | |
to<<String>>() | String |
extends Object
Name | Type | Description |
---|---|---|
key_pressed | Logical[] |
Signature | Return Type | Description |
---|---|---|
clear_pressed_keys() | Clears the key_pressed array - used when window focus is lost and regained | |
is_alt_pressed() | Logical | |
is_control_pressed() | Logical | |
is_os_pressed() | Logical | |
is_shift_pressed() | Logical | |
is_key_pressed( keycode:Int ) | Logical | |
modifier_key_state() | Int |
extends Object
Name | Type | Description |
---|---|---|
shifted_keycode_to_unicode | String | |
unicode_to_keycode | Int[] | |
unicode_to_shift_state | Logical[] | |
unshifted_keycode_to_unicode | String |
Signature | Return Type | Description |
---|---|---|
keycode_to_unicode( keycode:Int, [is_shift_pressed=false:Logical] ) | Character | |
unicode_to_keycode( unicode:Character ) | (Int,Logical) | keycode, is_shifted |
Name | Type | Description |
---|---|---|
anchor | Anchor | |
display_position | IntXY | |
rotation | XYZ | |
size | IntXY | |
z | Int |
Signature | Return Type | Description |
---|---|---|
description() | String | |
display_bounds() | IntBox | |
operator==( other:Placement2D ) | Logical | |
print_to( buffer:PrintWriter ) | ||
to<<Object>>() | Boxed<<Placement2D>> | |
to<<String>>() | String |
extends Object
Name | Type | Description |
---|---|---|
position | IntXY? | of most recently active press (may be still active) |
positions | IntXY[] | of active presses |
Signature | Return Type | Description |
---|---|---|
closest_pointer_index( pos:IntXY ) | Int? | |
on( e:PointerEvent ) | ||
press_count() | Int |
extends UILayout
Name | Type | Description |
---|---|---|
active | UI |
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
clip | IntBox? | |
count | Int | |
default_font | UIFont | |
dirty_region_tracker | DirtyRegionTracker | |
draw_order | Int | |
dt | Real | |
first_child | Entity | |
keyboard_focus | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
pointer_focus | Entity | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
activate() | ||
clear() | ||
clear_focus() | ||
clip() | IntBox? | |
contains( pos:IntXY ) | Logical | |
default_font() | UIFont | |
dirty_region_tracker() | DirtyRegionTracker | |
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
drag_threshold() | Int | |
draw() | ||
handle( e:KeyEvent ) | ||
handle( e:PointerEvent ) | ||
handle( e:ScrollEvent ) | ||
handle( e:TextEvent ) | ||
init_object() | ||
needs_redraw() | Logical | |
release_keyboard_focus() | ||
release_pointer_focus() | ||
request_redraw() | ||
request_redraw( bounds:IntBox ) | ||
set_bounds( value:IntBox ) | ||
set_clip( clip:IntBox? ) | ||
update() | Must update before layout so that new components created in update() can be measured in update_layout() | |
update_display_state() | ||
update_layout() |
extends UIComponent
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
bottom | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
left | Int | |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
right | Int | |
structure_modified | Logical | |
top | Int |
Signature | Return Type | Description |
---|---|---|
init( content:Entity, left:Int, top:Int, right:Int, bottom:Int ) | ||
init( content:Entity, size:Int ) | ||
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
measure_height( container_height:Int? ) | Int? | |
measure_width( container_width:Int? ) | Int? | |
update_layout_height( container_height:Int ) | ||
update_layout_placement( container:IntBox ) | ||
update_layout_width( container_width:Int ) |
extends Drawable2D
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
after_prepare_layout() | ||
after_update_layout() | ||
can_split_h( max_width:Int ) | Logical | |
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
draw_children() | Each UIComponent (including UI) manages drawing all of its descendants down to and including other UIComponent objects but not descending into them. In other words, each UIComponent draws its own descendants. | |
expand_to_fill() | ||
expand_to_fill_height() | ||
expand_to_fill_width() | ||
init_object() | ||
is_br() | Logical | |
is_expand_to_fill_height() | Logical | |
is_expand_to_fill_width() | Logical | |
is_ui_component() | Logical | |
measure_content_height( subcomponents:UIComponent[] ) | Int? | |
measure_content_width( subcomponents:UIComponent[] ) | Int? | |
measure_height( container_height:Int? ) | Int? | |
measure_width( container_width:Int? ) | Int? | |
operator+( rhs:UIComponent ) | UIComponent | |
operator/( rhs:UIComponent ) | UIComponent | |
operator|( rhs:UIComponent ) | UIComponent | |
prepare_layout() | ||
shrink_to_fit() | ||
shrink_to_fit_height() | ||
shrink_to_fit_width() | ||
split_after( i:Int ) | UIComponent | |
split_h( [max_width=null:Int?] ) | UIComponent | |
text_content() | String | |
update_layout() | Normally called on the top-level UI but can also be called on a nested component such as a UIScrollView. | |
update_layout_height( container_height:Int ) | ||
update_layout_placement( container:IntBox ) | ||
update_layout_width( container_width:Int ) | ||
update_subcomponent_heights( subcomponents:UIComponent[], container_height:Int ) | ||
update_subcomponent_placement( container:IntBox ) | ||
update_subcomponent_placement( subcomponents:UIComponent[], container:IntBox ) | ||
update_subcomponent_widths( subcomponents:UIComponent[], container_width:Int ) |
extends UIFlowLayout
incorporates PrintWriter, BufferedPrintWriter<<$buffer>>
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
content_height | Int | |
count | Int | |
cur_group | Entity | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
line_spacing | Int | Extra pixels between lines |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical | |
text_buffer | String |
Signature | Return Type | Description |
---|---|---|
init() | ||
init( component:UIComponent ) | ||
init( text:String ) | ||
add( component:Entity ) | ||
begin_new_group() | ||
close() | ||
create_text( text:String ) | UIComponent | |
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
flush() | ||
flush( buffer:String ) | ||
indent() | Int | |
prepare_layout() | ||
print( value:Byte ) | ||
print( value:Character ) | ||
print( value:Int32 ) | ||
print( value:Int64 ) | ||
print( value:Logical ) | ||
print( value:Object ) | ||
print( value:Real64 ) | ||
print( value:Real64, decimal_places:Int32 ) | ||
print( value:String ) | ||
println() | ||
println( value:Byte ) | ||
println( value:Character ) | ||
println( value:Int32 ) | ||
println( value:Int64 ) | ||
println( value:Logical ) | ||
println( value:Object ) | ||
println( value:Real64 ) | ||
println( value:Real64, decimal_places:Int32 ) | ||
println( value:String ) | ||
set_font( new_font:UIFont ) | ||
set_indent( new_indent:Int ) | ||
update_subcomponent_widths( subcomponents:UIComponent[], container_width:Int ) |
extends UIComponent
Signature | Return Type | Description |
---|---|---|
h() | UIFiller | |
v() | UIFiller |
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) |
extends UILayout
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
content_height | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
line_spacing | Int | Extra pixels between lines |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
init_object() | ||
justify( subcomponents:UIComponent[], i1:Int, i2:Int, max_width:Int ) | ||
measure_height( container_height:Int? ) | Int? | |
update_subcomponent_heights( subcomponents:UIComponent[], container_height:Int ) | ||
update_subcomponent_placement( subcomponents:UIComponent[], container:IntBox ) | ||
update_subcomponent_widths( subcomponents:UIComponent[], container_width:Int ) |
extends Object
Name | Type | Description |
---|---|---|
name | String |
Signature | Return Type | Description |
---|---|---|
init( existing:UIFont ) | ||
init( name:String ) | ||
cloned() | UIFont | |
draw( text:String, bounds:IntBox, [anchor=Anchor.CENTER:Anchor] ) | ||
draw( text:String, container:UIComponent ) | ||
draw( text:String, position:IntXY ) | ||
draw( text:String, position:IntXY, anchor:Anchor ) | ||
height() | Int | |
measure( ch:Character ) | XY | |
measure( text:String, [i1=0:Int], [count=-1:Int] ) | XY |
extends UIHorizontalLayout
Special subclass for operator overrides
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
operator+( rhs:UIComponent ) | UIComponent |
extends UILayout
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
measure_content_height( subcomponents:UIComponent[] ) | Int? | |
measure_content_width( subcomponents:UIComponent[] ) | Int? | |
update_subcomponent_placement( subcomponents:UIComponent[], container:IntBox ) | ||
update_subcomponent_widths( subcomponents:UIComponent[], container_width:Int ) |
extends UIComponent
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical | |
text | String |
Signature | Return Type | Description |
---|---|---|
init( text:String, [alignment=Anchor.CENTER:Anchor] ) | ||
init( text:String, font:UIFont, [alignment=Anchor.CENTER:Anchor] ) | ||
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
measure_height( container_height:Int? ) | Int? | |
measure_width( container_width:Int? ) | Int? | |
on_draw() |
extends UIComponent
Signature | Return Type | Description |
---|---|---|
flow() | UIFlowLayout | |
flow( content:UIComponent ) | UIFlowLayout | |
flow( size:IntXY ) | UIFlowLayout | |
h() | UIHorizontalLayout | |
h( content:UIComponent ) | UIHorizontalLayout | |
h( size:IntXY ) | UIHorizontalLayout | |
list() | UIList | |
list( content:UIComponent ) | UIList | |
list( size:IntXY ) | UIList | |
stack() | UIStackLayout | |
stack( content:UIComponent ) | UIStackLayout | |
stack( size:IntXY ) | UIStackLayout | |
table() | UITableLayout | |
table( columns:Int, rows:Int ) | UITableLayout | |
table( size:IntXY ) | UITableLayout | |
v() | UIVerticalLayout | |
v( content:UIComponent ) | UIVerticalLayout | |
v( size:IntXY ) | UIVerticalLayout |
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) |
extends UILayout
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
init_object() | ||
measure_content_height( subcomponents:UIComponent[] ) | Int? | |
update_subcomponent_heights( subcomponents:UIComponent[], container_height:Int ) | ||
update_subcomponent_placement( subcomponents:UIComponent[], container:IntBox ) |
extends UILayout
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
content_offset | XY | |
controller | UIScrollViewController | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_content_offset | XY | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
init() | ||
init( content:UIComponent ) | ||
init( content:UIComponent, controller:UIScrollViewController ) | ||
after_prepare_layout() | ||
after_update() | ||
bottom_offset() | Int | Result will be negative or zero. |
content_height() | Int | |
create_controller() | UIScrollViewController | |
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
handle( e:PointerEvent ) | ||
needs_redraw() | Logical | |
on_prepare_layout() | ||
on_update() | ||
on_update_layout() | ||
on( e:ScrollEvent ) | ||
on_select( e_press:PointerEvent, e_release:PointerEvent ) | UIScrollView consumes any original press event in preparation for dragging. If a release comes without turning into a drag, this pair of press/release events should be dispatched to the appropriate subcomponent. | |
on_select_background( position:IntXY ) | ||
save_display_state() | ||
scroll_to_bottom() | ||
scroll_to_top() | ||
scroll_to( content_offset:IntXY ) | ||
scroll_to( vertical_offset:Int ) | ||
set_content_offset( content_offset:XY ) | ||
set_content_offset( offset:Real ) | ||
top_offset() | Int | |
update_subcomponent_placement( subcomponents:UIComponent[], container:IntBox ) |
extends UIScrollViewController
Name | Type | Description |
---|---|---|
active_scroll | Logical | |
allow_momentum_scroll | Logical | |
allow_overscroll | Logical | |
clamp_to_bounds | Logical | |
decay | XY | |
drag_delta | IntXY | |
drag_deltas | IntXY[] | |
drag_pos | IntXY | |
drag_start | IntXY | |
drag_time | Timer | |
is_dragging | Logical | |
is_pressed | Logical | |
is_scrolling_to_bottom | Logical | |
is_scrolling_to_top | Logical | |
scroll_rate | ScrollRate | |
scrolling_to | XY? | |
tracks_bottom | Logical | |
velocity | XY | |
view | UIScrollView |
Signature | Return Type | Description |
---|---|---|
after_update_layout() | ||
default_scroll_rate() | Int | |
on_prepare_layout() | ||
on_update() | ||
on_update_tick() | ||
on( e:PointerEvent ) | ||
on( e:ScrollEvent ) | ||
scroll_to_bottom() | ||
scroll_to_top() | ||
scroll( delta:IntXY, &clamp ) | ||
scroll_to( content_offset:IntXY ) | ||
set_content_offset( new_offset:XY, clamp:Logical ) |
extends Object
Name | Type | Description |
---|---|---|
view | UIScrollView |
Signature | Return Type | Description |
---|---|---|
init( view:UIScrollView ) | ||
after_prepare_layout() | ||
after_update() | ||
after_update_layout() | ||
content_offset() | XY | |
on_prepare_layout() | ||
on_update() | ||
on_update_layout() | ||
on( e:PointerEvent ) | ||
on( e:ScrollEvent ) | ||
scroll_to_bottom() | ||
scroll_to_top() | ||
scroll_to( new_offset:IntXY ) | ||
set_content_offset( new_offset:XY ) |
extends UIComponent
Signature | Return Type | Description |
---|---|---|
h( width:Int ) | UISpacer | |
v( height:Int ) | UISpacer |
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) |
extends UIStackLayout
Special subclass for operator overrides
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
operator|( rhs:UIComponent ) | UIComponent |
extends UILayout
Base class UIComponent implements stack layout, so this class just formalizes that inherited functionality as a UILayout.
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) |
extends Object
Name | Type | Description |
---|---|---|
fixed_width | Int? | |
weight | Real | |
width | Int | computed |
extends UIComponent
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) |
extends UILayout
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
cell_span | IntXY[] | |
columns | UITableColumnInfo[] | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
is_adding | Logical | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
next_empty | Int | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
rows | UITableRowInfo[] | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
init() | ||
init( column_count:Int, row_count:Int ) | ||
init( size:IntXY ) | ||
add_row() | ||
add( component:Entity ) | ||
add( component:Entity, span:IntXY ) | ||
column( i:Int ) | UITableColumnInfo | |
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
draw_children() | ||
get( i:Int, j:Int ) | UIComponent | |
index_of( i:Int, j:Int ) | Int? | |
measure_content_height( subcomponents:UIComponent[] ) | Int? | |
measure_content_width( subcomponents:UIComponent[] ) | Int? | |
measure_height( container_height:Int? ) | Int? | |
measure_width( container_width:Int? ) | Int? | |
resize( new_columns:Int, new_rows:Int ) | ||
row( j:Int ) | UITableRowInfo | |
set( i:Int, j:Int, component:UIComponent ) | ||
set( i:Int, j:Int, component:UIComponent, span:IntXY ) | ||
set_span( i:Int, j:Int, new_span:IntXY ) | ||
span( i:Int, j:Int ) | IntXY | |
update_subcomponent_heights( subcomponents:UIComponent[], container_height:Int ) | ||
update_subcomponent_placement( subcomponents:UIComponent[], container:IntBox ) | ||
update_subcomponent_widths( subcomponents:UIComponent[], container_width:Int ) |
extends Object
Name | Type | Description |
---|---|---|
fixed_height | Int? | |
height | Int | |
weight | Real |
extends UIComponent
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical | |
text | String |
Signature | Return Type | Description |
---|---|---|
init( text:String ) | ||
init( text:String, font:UIFont ) | ||
can_split_h( max_width:Int ) | Logical | |
create_text( text:String ) | UIComponent | |
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
is_br() | Logical | |
on_draw() | ||
on_prepare_layout() | ||
split_after( i:Int ) | UIComponent | |
split_h( [max_width=null:Int?] ) | UIComponent | |
text_content() | String |
extends UIVerticalLayout
Special subclass for operator overrides
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
operator/( rhs:UIComponent ) | UIComponent |
extends UILayout
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical |
Signature | Return Type | Description |
---|---|---|
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
measure_content_height( subcomponents:UIComponent[] ) | Int? | |
measure_content_width( subcomponents:UIComponent[] ) | Int? | |
update_subcomponent_heights( subcomponents:UIComponent[], container_height:Int ) | ||
update_subcomponent_placement( subcomponents:UIComponent[], container:IntBox ) |
extends UIComponent
Name | Type | Description |
---|---|---|
actions | Action | |
attributes | Int | |
count | Int | |
draw_order | Int | |
first_child | Entity | |
last_child | Entity | |
last_placement | Placement2D | for dirty rectangle tracking |
name | String | |
next | Entity | |
on_select_callback | Function() | |
parent | Entity | |
placement | Placement2D | |
position | IntXY | |
properties | DynamicProperty | |
structure_modified | Logical | |
widget_state | UIWidgetState |
Signature | Return Type | Description |
---|---|---|
init() | ||
init( component:UIComponent ) | ||
init( label:String ) | ||
init( label:String, font:UIFont ) | ||
init( size:IntXY ) | ||
dispatch_on<<$VisitorType>>( visitor:$VisitorType ) | Entity | |
dispatch_on_visit<<$VisitorType>>( visitor:$VisitorType ) | ||
handle_select() | ||
is_disabled() | Logical | |
is_idle() | Logical | |
is_pressed() | Logical | |
is_targeted() | Logical | |
on_select() | ||
on( e:PointerEvent ) | ||
on_select( on_select_callback:Function() ) | ||
release_pointer_focus() | ||
set_disabled( setting:Logical ) | ||
set_is_visible( setting:Logical ) | ||
set_on_select( on_select_callback:Function() ) |
Category | Value | Description |
---|---|---|
IDLE | 0 | |
TARGETED | 1 | |
PRESSED | 2 | |
DISABLED | 3 |
Name | Type | Description |
---|---|---|
categories | UIWidgetState[] |
Signature | Return Type | Description |
---|---|---|
create( name:String ) | UIWidgetState | |
create( value:Int ) | UIWidgetState |
Name | Type | Description |
---|---|---|
value | Int |
Signature | Return Type | Description |
---|---|---|
description() | String | |
name() | String | |
operator?() | Logical | |
operator==( other:UIWidgetState ) | Logical | |
print_to( buffer:PrintWriter ) | ||
to<<Int>>() | Int | |
to<<Object>>() | Object | |
to<<String>>() | String |