#include <widget.h>

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 | |
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.
| Widget::Widget | ( | const std::string & | name = "Widget" |
) |
| Widget::~Widget | ( | ) | [protected, virtual] |
| void Widget::Config | ( | const WinData * | data = NULL |
) | [virtual] |
configure the internal components and set system to render in a given window.
| data | the window handle and size |
| void Widget::Quit | ( | void | ) | [virtual] |
| void Widget::SetPath | ( | std::string | path | ) | [virtual] |
Set the data path to use.
| void Widget::PreFrame | ( | const double | deltaFrameTime | ) | [protected, virtual] |
| void Widget::Frame | ( | const double | deltaFrameTime | ) | [protected, virtual] |
| void Widget::PostFrame | ( | const double | deltaFrameTime | ) | [protected, virtual] |
| 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.
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