GUIGraphics.WindowListener

Undocumented in source.

Constructors

this
this(GUIGraphics outer)
Undocumented in source.

Members

Functions

getDirtyRectangle
box2i getDirtyRectangle()

Returns areas affected by updates.

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.
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)

An image you have to draw to, or return that nothing has changed. The location of this image is given before-hand by onResized. recomputeDirtyAreas() MUST have been called before. The pixel format cannot change over the lifetime of the window.

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 be 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.

getDirtyRectangle
box2i getDirtyRectangle()
onMouseCaptureCancelled
void onMouseCaptureCancelled()

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

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.

Meta