GUIGraphics.WindowListener

Undocumented in source.

Constructors

this
this(GUIGraphics outer)
Undocumented in source.

Members

Functions

getDirtyRectangle
box2i getDirtyRectangle()

Returns areas affected by updates.

getMouseCursor
MouseCursor getMouseCursor()
Undocumented in source. Be warned that the author may not have intended to support it.
onAnimate
void onAnimate(double dt, double time)
Undocumented in source. Be warned that the author may not have intended to support it.
onDraw
void onDraw(WindowPixelFormat pf)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyDown
bool onKeyDown(Key key)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyUp
bool onKeyUp(Key key)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseCaptureCancelled
void onMouseCaptureCancelled()
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseClick
bool onMouseClick(int x, int y, MouseButton mb, bool isDoubleClick, MouseState mstate)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseExitedWindow
void onMouseExitedWindow()
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseMove
void onMouseMove(int x, int y, int dx, int dy, MouseState mstate)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseRelease
bool onMouseRelease(int x, int y, MouseButton mb, MouseState mstate)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseWheel
bool onMouseWheel(int x, int y, int wheelDeltaX, int wheelDeltaY, MouseState mstate)
Undocumented in source. Be warned that the author may not have intended to support it.
onResized
ImageRef!RGBA onResized(int width, int height)
Undocumented in source. Be warned that the author may not have intended to support it.
recomputeDirtyAreas
void recomputeDirtyAreas()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

outer
GUIGraphics outer;
Undocumented in source.

Inherited Members

From IWindowListener

onMouseClick
bool onMouseClick(int x, int y, MouseButton mb, bool isDoubleClick, MouseState mstate)

Called on mouse click.

onMouseRelease
bool onMouseRelease(int x, int y, MouseButton mb, MouseState mstate)

Called on mouse button release

onMouseWheel
bool onMouseWheel(int x, int y, int wheelDeltaX, int wheelDeltaY, MouseState mstate)

Called on mouse wheel movement

onMouseMove
void onMouseMove(int x, int y, int dx, int dy, MouseState mstate)

Called on mouse movement (might not be within the window)

onKeyDown
bool onKeyDown(Key key)

Called on keyboard press.

onKeyUp
bool onKeyUp(Key up)

Called on keyboard release.

onDraw
void onDraw(WindowPixelFormat pf)

Render the window in software in the buffer previously returned by onResized. At the end of this function, the whole buffer should be a valid, coherent UI.

onResized
ImageRef!RGBA onResized(int width, int height)

The drawing area size has changed. Always called at least once before onDraw.

recomputeDirtyAreas
void recomputeDirtyAreas()

Recompute internally what needs be done for the next onDraw. This function MUST have been called before calling onDraw and getDirtyRectangle. This method exists to allow the Window to recompute these draw lists less. And because cache invalidation was easier on user code than internally in the UI. Important: once you've called recomputeDirtyAreas() you COMMIT to redraw the corresponding area given by getDirtyRectangle(). IMPORTANT: Two calls to recomputeDirtyAreas() will not yield the same area. VERY IMPORTANT: See the above note about concurrent calls.

getDirtyRectangle
box2i getDirtyRectangle()
onMouseCaptureCancelled
void onMouseCaptureCancelled()

Called whenever mouse capture was canceled (ALT + TAB, SetForegroundWindow...)

onMouseExitedWindow
void onMouseExitedWindow()

Called whenever mouse exited the window (but a capture could still be in action).

onAnimate
void onAnimate(double dt, double time)

Must be called periodically (ideally 60 times per second but this is not mandatory). time must refer to the window creation time. dt and time are expressed in seconds (not milliseconds).

getMouseCursor
MouseCursor getMouseCursor()

Must be called to get the current mouse cursor state for the plugin

Meta