Play 'round
|
The base class of all components who want to deal with all user interaction. More...
#include <Widget.h>
Public Member Functions | |
virtual bool | onMouseDown (int button, float x, float y) |
virtual bool | onMouseUp (int button, float x, float y) |
virtual bool | onMouseMove (float x, float y) |
virtual bool | onMouseOver (float x, float y) |
virtual void | draw ()=0 |
virtual Widget * | hitTest (float x, float y) |
virtual void | setParent (Widget *parent) |
virtual void | setNetwork (Network *network) |
virtual void | addChild (Widget *child) |
virtual Widget * | removeChild (Widget *child) |
virtual void | setUuid (const char *) |
virtual const char * | getUuid () const |
virtual void | toOutboundPacketStream (osc::OutboundPacketStream &) const |
virtual std::vector< Widget * > * | getChildren () |
virtual Widget * | getParent () |
virtual std::string | toString () |
virtual Widget * | getEngine () |
Static Public Member Functions | |
static WidgetMap * | getAll () |
static Widget * | getSelected () |
static void | setSelected (Widget *) |
Select the specific widget. | |
Protected Member Functions | |
virtual bool | handleDraw (float x, float y) |
The draw event called when the user drags from this widget. | |
virtual bool | handleDrawEnd (float x, float y) |
The last draw event called when the user finishes dragging. | |
virtual bool | handleSelect (float x, float y, bool=false) |
Called when the user click on the widget. | |
virtual bool | handleHover (float x, float y) |
Called when the user's mouse is hovering on the widget. | |
virtual void | drawChildren () |
Protected Attributes | |
std::vector< Widget * > | m_children |
Widget * | m_parent |
Widget * | m_engine |
Widget * | m_mouseDownOn |
bool | m_fLeftButtonDown |
bool | m_fRightButtonDown |
Point2D | m_mouseDownPos |
Point2D | m_drawStartPos |
std::string | m_uuid |
Static Protected Attributes | |
static Network * | s_network |
The base class of all components who want to deal with all user interaction.