Logo


search API (or start typing anywhere)


Canvas

mint.Canvas

A canvas is a root object in mint. It requires a rendering instance, and handles all incoming events, propagating them to the children. Additional Signals: none


classextends mint.Control
meta: @:directlyUsed, @:allow(mint.render.Renderer)


   

Members


focus_invalid
focus_invalid : Bool
Whether or not the current focus needs refreshing.
oncapturedchange
oncapturedchange : mint.core.Signal<>
An event for when the captured state changes
onfocusedchange
onfocusedchange : mint.core.Signal<>
An event for when the focused state changes
onmarkedchange
onmarkedchange : mint.core.Signal<>
An event for when the marked state changes

Properties


captured
captured : mint.Control
The current modal control, null if none focused
focused : mint.Control
The current focused control, null if none marked
marked : mint.Control
The current marked control, null if none

Methods


bring_to_front
bring_to_front(control:mint.Control) : Void

keydown

keydown(e:mint.types.KeyEvent) : Void

keyup

keyup(e:mint.types.KeyEvent) : Void

mousedown

mousedown(e:mint.types.MouseEvent) : Void

mousemove

mousemove(e:mint.types.MouseEvent) : Void

mouseup

mouseup(e:mint.types.MouseEvent) : Void

mousewheel

mousewheel(e:mint.types.MouseEvent) : Void

new

new(_options:mint.CanvasOptions) : Void

textinput

textinput(e:mint.types.TextEvent) : Void

topmost_at_point

topmost_at_point(_x:Float, _y:Float) : mint.Control
Get the top most control under the given point, or null if there is none (or is the canvas itself)

update

update(dt:Float) : Void