Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::Widget Class Reference

Interface for 2D or 3D objects that experience standard virtual world events and are rendered. More...

#include <Widget.h>

Inherits G3D::ReferenceCountedObject.

Inherited by G3D::GConsole, G3D::GuiWindow, G3D::Manipulator, and G3D::WidgetManager.

List of all members.

Public Types

typedef ReferenceCountedPointer<
class Widget
Ref

Public Member Functions

virtual void fireEvent (const GEvent &event)
virtual bool onEvent (const GEvent &event)=0
virtual void onLogic ()=0
virtual void onNetwork ()=0
virtual void onPose (Array< PosedModel::Ref > &posedArray, Array< PosedModel2DRef > &posed2DArray)=0
virtual void onSimulation (RealTime rdt, SimTime sdt, SimTime idt)=0
virtual void onUserInput (UserInput *ui)=0
void ReferenceCountedObject_zeroWeakPointers ()
virtual void setManager (WidgetManager *m)
virtual GWindowwindow () const

Public Attributes

AtomicInt32 ReferenceCountedObject_refCount
_WeakPtrLinkedListReferenceCountedObject_weakPointer

Protected Member Functions

 Widget ()

Protected Attributes

WidgetManagerm_manager


Detailed Description

Interface for 2D or 3D objects that experience standard virtual world events and are rendered.

Widget is an interface for "widget"-like objects. You could think of it as a bare-bones scene graph.

Modules are objects like the G3D::FirstPersonController, G3D::GConsole, and debug text overlay that need to receive almost the same set of events (onXXX methods) as GApp and that you would like to be called from the corresponding methods of a GApp. They are a way to break large pieces of functionality for UI and debugging off so that they can be mixed and matched.

BETA API Likely to receive incompatible changes in future releases.


Member Typedef Documentation


Constructor & Destructor Documentation

G3D::Widget::Widget (  )  [inline, protected]


Member Function Documentation

virtual void G3D::Widget::fireEvent ( const GEvent event  )  [virtual]

Fire an event on the containing window.

Reimplemented in G3D::WidgetManager.

virtual bool G3D::Widget::onEvent ( const GEvent event  )  [pure virtual]

Returning true consumes the event and prevents other GModules from seeing it.

Motion events (GEventType::MOUSEMOTION, GEventType::JOYHATMOTION, JGEventType::OYBALLMOTION, and GEventType::JOYAXISMOTION) cannot be cancelled.

Implemented in G3D::CameraControlWindow, G3D::DeveloperWindow, G3D::FirstPersonManipulator, G3D::GConsole, G3D::GuiWindow, G3D::ThirdPersonManipulator, G3D::UprightSplineManipulator, and G3D::WidgetManager.

virtual void G3D::Widget::onLogic (  )  [pure virtual]

virtual void G3D::Widget::onNetwork (  )  [pure virtual]

virtual void G3D::Widget::onPose ( Array< PosedModel::Ref > &  posedArray,
Array< PosedModel2DRef > &  posed2DArray 
) [pure virtual]

Appends a posed model for this object to the array, if it has a graphic representation.

The posed model appended is allowed to reference the agent and is allowed to mutate if the agent is mutated.

Implemented in G3D::FirstPersonManipulator, G3D::GConsole, G3D::ThirdPersonManipulator, and G3D::WidgetManager.

virtual void G3D::Widget::onSimulation ( RealTime  rdt,
SimTime  sdt,
SimTime  idt 
) [pure virtual]

void G3D::ReferenceCountedObject::ReferenceCountedObject_zeroWeakPointers (  )  [inline, inherited]

Automatically called immediately before the object is deleted.

This is not called from the destructor because it needs to be invoked before the subclass destructor.

virtual void G3D::Widget::setManager ( WidgetManager m  )  [inline, virtual]

Called by the WidgetManager when this module is added to it.

The argument may be NULL

Reimplemented in G3D::DeveloperWindow.

virtual GWindow* G3D::Widget::window (  )  const [virtual]

Returns the operating system window that is currently rendering this Widget.

Reimplemented in G3D::WidgetManager.


Member Data Documentation

The manager, set by setManager().

This cannot be a reference counted pointer because that would create a cycle between the Widget and its manager.

The long name is to keep this from accidentally conflicting with a subclass's variable name.

Do not use or explicitly manipulate this value--its type may change in the future and is not part of the supported API.

Linked list of all weak pointers that reference this (some may be on the stack!).

Do not use or explicitly manipulate this value.


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:48 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo