class GUI::Display
- GUI::Display
- GUI::Component
- Reference
- Object
Overview
The top-most Component
in the component hierarchy.
The display manages input events, and solves the layout constraints.
Defined in:
display.crConstructors
Instance Method Summary
-
#add(block : Layout::Block)
Adds a component to the hierarchy
-
#build
Loads all of the constraints from every component in this hierarchy into the solver.
-
#height=(size)
Changes the height of the display
-
#on_input(event : InputEvent)
Executed on the "input" event.
-
#solve
Calculates the layout dimensions.
- #trigger_input(tick : RenderLoop::Tick, input : RenderLoop::Input)
-
#width=(size)
Changes the width of the display
Instance methods inherited from class GUI::Component
animator : GUI::Animator
animator,
build(display : Component)
build,
children : Array(GUI::Component)
children,
children=(children : Array(GUI::Component))
children=,
color : GUI::Color
color,
color=(color : GUI::Color)
color=,
each(&block : Component -> )
each,
each_constraint(&block : Kiwi::Constraint -> )
each_constraint,
intersects_point?(x, y) : Bool
intersects_point?,
on_hover(event : HoverEvent)on_hover(&block : HoverEvent -> ) on_hover, on_input(event : InputEvent)
on_input(&block : InputEvent -> ) on_input, on_key_down(event : KeyDownEvent)
on_key_down(&block : KeyDownEvent -> ) on_key_down, on_key_up(event : KeyUpEvent)
on_key_up(&block : KeyUpEvent -> ) on_key_up, on_mouse_down(event : MouseDownEvent)
on_mouse_down(&block : MouseDownEvent -> ) on_mouse_down, on_mouse_in(event : MouseInEvent)
on_mouse_in(&block : MouseInEvent -> ) on_mouse_in, on_mouse_out(event : MouseOutEvent)
on_mouse_out(&block : MouseOutEvent -> ) on_mouse_out, on_mouse_up(event : MouseUpEvent)
on_mouse_up(&block : MouseUpEvent -> ) on_mouse_up, transformation(viewport_height vh, viewport_width vw) transformation
Constructor methods inherited from class GUI::Component
new(label : String)new new
Constructor Detail
Instance Method Detail
def build
#
Loads all of the constraints from every component in this hierarchy into the solver. This should only be ran once.
def on_input(event : InputEvent)
#
Description copied from class GUI::Component
Executed on the "input" event.