Interface ClickableObject
access this type via: ui.ClickableObject (provides, requires or uses)
--- extends:GraphicsObject
A graphical entity that can be clicked on (e.g. with a mouse) triggering click events to any registered listeners.
Transfer fields
bool disabled
Events
click()
contextMenuOn(ContextMenuSpec menu)
contextMenuOff()
requestFocus()
Functions
void setDisabled(bool d)
Rect getBounds()
void click(int x, int y, int button)
void contextClick(MenuItem item)
void setFocus()
HotKey[] recvFocus()
void loseFocus()
void hotKeyClick(HotKey k)
Transfer fields
disabled
Events
click This application-level event is fired when a user clicks on this object.
contextMenuOn This windowing event is intended for the windowing system only, and is fired when the object requests a context menu to be displayed.
contextMenuOff This windowing event is intended for the windowing system only, and is fired when the object requests a context menu to be hidden.
requestFocus This windowing event is intended for the windowing system only, and is fired when the object requests focus.
void setDisabled(bool d)
Set whether this interact-able graphics entity is disabled (graphics entities are enabled by default).
Rect getBounds()
Get the bounding rectangle for mouse click hit detection by the windowing system.
void click(int x, int y, int button)
This function is called when the object receives a mouse click from the windowing system.
void contextClick(MenuItem item)
This function is called by the windowing system when a context menu item is clicked on.
void setFocus()
This function can be called by an application to set this object as the one with focus.
HotKey[] recvFocus()
This function is called by the windowing system when the object is being given focus. The function can return an array of hotkeys that will be tracked by the windowing system.
void loseFocus()
This function is called by the windowing system when the object is no longer given focus.
void hotKeyClick(HotKey k)
This function is called by the windowing system when a hot key returned by recvFocus() is pressed.