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()
clickMulti(MultiClickData d)
contextMenuOn(ContextMenuSpec menu)
contextMenuOff()
setHotKeys()
requestFocus()
Functions
void setDisabled(bool d)
Rect getBounds()
void click(int x, int y, int button)
void clickMulti(int x, int y, int button, int clicks)
void contextClick(MenuItem item)
void setFocus()
bool recvFocus()
HotKey[] getHotKeys()
void loseFocus()
void hotKeyClick(HotKey k)
Transfer fields
disabled
Events
click This application-level event is fired when a user clicks on this object.
clickMulti This application-level event is fired when a user clicks on this object.
contextMenuOn This event is intended for the windowing system only, and is fired when the object requests a context menu to be displayed.
contextMenuOff This event is intended for the windowing system only, and is fired when the object requests a context menu to be hidden.
setHotKeys This event is intended for the windowing system only, and is fired when the object is changing its hot key list.
requestFocus This 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 clickMulti(int x, int y, int button, int clicks)
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.
bool recvFocus()
This function is called by the windowing system when the object is being given focus. The function returns true or false depending on whether it not it is focusable.
HotKey[] getHotKeys()
This function is called by the windowing system to check which hotkeys the object has. It is always called immediately after recvFocus(), and may be called at other times.
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.