VRG3D::Widget Class Reference

#include <Widget.H>

List of all members.

Public Member Functions

 Widget (WidgetMgrRef widgetMgr)
virtual ~Widget ()
virtual bool canReleaseFocus ()
virtual bool pointerOverWidget (Vector3 pointerPosRoomSpace)
virtual void activate ()
virtual void deactivate ()
virtual void processEvent (EventRef events, Array< EventRef > &generatedEvents)
virtual void doGraphics (RenderDevice *rd)
bool isActive ()

Protected Attributes

bool _isActive
WidgetMgrRef _widgetMgr

Detailed Description

Base class for 3DUI widgets. When using with the WidgetMgr, only one widget can be active at a time. Widgets can be menus that activate automatically when a pointer hovers over them, or they can be activated explicitly in a program, for example to start up a dialog box. For all the widgets in the WidgetMgr, the doGraphics() routines are called each frame. The doUserInput routine is only called for the active widget. Subclasses should add themselves to the WidgetMgr in their constructors, and override some or all of the virtual functions below to draw themselves, respond to input, etc..

Constructor & Destructor Documentation

VRG3D::Widget::Widget WidgetMgrRef  widgetMgr  )  [inline]

virtual VRG3D::Widget::~Widget  )  [inline, virtual]

Member Function Documentation

virtual void VRG3D::Widget::activate  )  [inline, virtual]

virtual bool VRG3D::Widget::canReleaseFocus  )  [inline, virtual]

Should return true, unless the widget is in a state, like the middle of interacting with a menu, that should not be interrupted by another widget taking over the input focus.

virtual void VRG3D::Widget::deactivate  )  [inline, virtual]

virtual void VRG3D::Widget::doGraphics RenderDevice *  rd  )  [inline, virtual]

bool VRG3D::Widget::isActive  )  [inline]

virtual bool VRG3D::Widget::pointerOverWidget Vector3  pointerPosRoomSpace  )  [inline, virtual]

This is only used for widgets, like Menus, that are registered with the HCIMgr to be activated when the pointer moves over them. Should return true if the pointer position passed in is over the location of the widget. If the subclass widget is not going to be activated when the pointer moves over it, then you don't need to reimplement this.

virtual void VRG3D::Widget::processEvent EventRef  events,
Array< EventRef > &  generatedEvents
[inline, virtual]

Member Data Documentation

bool VRG3D::Widget::_isActive [protected]

WidgetMgrRef VRG3D::Widget::_widgetMgr [protected]

The documentation for this class was generated from the following file:
Generated on Mon Nov 20 23:11:03 2006 for VRG3D-UI by  doxygen 1.4.6