dtABC::Widget Class Reference

Widget class to handle all dtCore rendering for the application. More...

#include <widget.h>

Inheritance diagram for dtABC::Widget:

dtABC::BaseABC dtCore::Base

List of all members.

Public Member Functions

 Widget (const std::string &name="Widget")
virtual void Config (const WinData *data=NULL)
 configure the internal components and set system to render in a given window.
virtual void Quit (void)
 Quit the application (call's system quit).
virtual void SetPath (std::string path)
 Set the data path to use.

Static Public Attributes

static const char * msgRedraw = "redraw"
 Message strings (out going).
static const char * msgStopped = "stopped"
static const char * msgStep = "step"
 Message strings (in comming).
static const char * msgMouseEvent = "mouse_event"
static const char * msgKeyboardEvent = "keyboard_event"
static const char * msgResize = "resize"
static const char * msgAddDrawable = "adddrawable"
static const char * msgSetPath = "setpath"
static const char * msgWindowData = "windata"
static const char * msgQuit = "quit"

Protected Member Functions

virtual ~Widget ()
virtual void PreFrame (const double deltaFrameTime)
 Override for PreFrame.
virtual void Frame (const double deltaFrameTime)
 Override for Frame.
virtual void PostFrame (const double deltaFrameTime)
 Override for PostFrame.
virtual void OnMessage (dtCore::Base::MessageData *data)
 BaseABC override to receive messages.

Protected Attributes

bool mIsInitialized
 have we been fully initialized yet


Detailed Description

Widget class to handle all dtCore rendering for the application.

The Widget class is a dtCore::Base class object which receives window events from it's derived classes and performs all dtCore rendering. It communicats with it's derived class strictly through the sig-slot mechanisms.

The Widget class, in essence, replaces the dtABC::Application class, allowing single frame cycle steps instead of a run-loop. Every time Widget::Step() is called, another frame cycle advances. This allows the frame cycles to be embedded into a windowing system's idle event handling loop.


Constructor & Destructor Documentation

Widget::Widget ( const std::string &  name = "Widget"  ) 

Widget::~Widget (  )  [protected, virtual]


Member Function Documentation

void Widget::Config ( const WinData data = NULL  )  [virtual]

configure the internal components and set system to render in a given window.

Parameters:
data the window handle and size

void Widget::Quit ( void   )  [virtual]

Quit the application (call's system quit).

Reimplemented from dtABC::BaseABC.

void Widget::SetPath ( std::string  path  )  [virtual]

Set the data path to use.

void Widget::PreFrame ( const double  deltaFrameTime  )  [protected, virtual]

Override for PreFrame.

Implements dtABC::BaseABC.

void Widget::Frame ( const double  deltaFrameTime  )  [protected, virtual]

Override for Frame.

Implements dtABC::BaseABC.

void Widget::PostFrame ( const double  deltaFrameTime  )  [protected, virtual]

Override for PostFrame.

Implements dtABC::BaseABC.

void Widget::OnMessage ( dtCore::Base::MessageData data  )  [protected, virtual]

BaseABC override to receive messages.

This method should be called from derived classes

Reimplemented from dtABC::BaseABC.


Member Data Documentation

const char * Widget::msgRedraw = "redraw" [static]

Message strings (out going).

static member variables

const char * Widget::msgStopped = "stopped" [static]

const char * Widget::msgStep = "step" [static]

Message strings (in comming).

const char * Widget::msgMouseEvent = "mouse_event" [static]

const char * Widget::msgKeyboardEvent = "keyboard_event" [static]

const char * Widget::msgResize = "resize" [static]

const char * Widget::msgAddDrawable = "adddrawable" [static]

const char * Widget::msgSetPath = "setpath" [static]

const char * Widget::msgWindowData = "windata" [static]

const char * Widget::msgQuit = "quit" [static]

bool dtABC::Widget::mIsInitialized [protected]

have we been fully initialized yet


http://www.delta3d.org
2.0.0 generated 14 Feb 2008