WindowContent

An interface that objects placed in Window must inherit. Some handlers return true if event was handled.

Members

Functions

draw
void draw(Window )

Be called when needRedraw is true.

handleKey
bool handleKey(Key , KeyState )

Be called when key is pressed, repeated or released.

handleMouseButton
bool handleMouseButton(MouseButton , bool , vec2 )

Be called when mouse button is clicked.

handleMouseEnter
bool handleMouseEnter(bool , vec2 )

Be called with true when cursor is entered.

handleMouseMove
bool handleMouseMove(vec2 )

Be called when cursor is moved.

handleMouseScroll
bool handleMouseScroll(vec2 , vec2 )

Be called when mouse wheel is rotated.

handleTextInput
bool handleTextInput(dchar )

Be called when focused and text was inputted.

layout
void layout(vec2i )

Be called with size of Window when needLayout is true.

requestRedraw
void requestRedraw()

Sets the content redraw next frame.

Properties

cursor
const(g4d.Cursor) cursor [@property getter]

Current cursor.

needLayout
bool needLayout [@property getter]

Checks if the contents need window size.

needRedraw
bool needRedraw [@property getter]

Checks if the contents need redrawing.

Meta