This is a simple dialog library.
More...
Classes |
class | dialog::Host |
| Clients will need to provide an object that implements this interface if they want callbacks etc. More...
|
class | dialog::Manager |
| This is the object that manages dialogs. More...
|
class | dialog::Element |
class | dialog::ContainerRequest |
| object to help construct dialog request streams More...
|
Functions |
virtual smart_ptr< Drawer > | dialog::Manager::getDrawer (void)=0 |
virtual void | dialog::Manager::registerFactory (IN const char *type, IN smart_ptr< Factory > &factory)=0 |
virtual Factory * | dialog::Manager::getFactory (IN const char *type)=0 |
virtual void | dialog::Manager::display (IN int screen_w, IN int screen_h)=0 |
virtual void | dialog::Manager::cursor (IN int x, IN int y)=0 |
virtual void | dialog::Manager::button (IN int buttons, IN int state, IN int x, IN int y)=0 |
virtual void | dialog::Manager::keyboard (IN int key, IN int mods)=0 |
virtual bool | dialog::Manager::createDialog (IN const char *id, IN int x, IN int y, IN const Datahash *data, IN Host *host)=0 |
virtual bool | dialog::Manager::doesDialogExist (IN const char *id)=0 |
virtual void | dialog::Manager::destroyDialog (IN const char *id)=0 |
|
typedef point2d_t< int > | dialog::point_t |
|
virtual | dialog::Host::~Host (void) throw () |
static smart_ptr< Manager > | dialog::Manager::create (IN smart_ptr< crypto::DESKey > &desKey, IN smart_ptr< Drawer > &drawer) |
virtual | dialog::Manager::~Manager (void) throw () |
|
virtual | dialog::Drawer::~Drawer (void) throw () |
Detailed Description
This is a simple dialog library.
Originally it was intended to be a thin layer on top of other open-source dialog libraries, but I couldn't find any that worked, especially given the dynamic nature of this library.
This interface allows for basic data-driven dialogs with the user. Think of this as a mini web browser. The caller of these APIs provides an HTML-like description of the dialog, and the end user can interact with it.
The goal is that server-side code can send dialog requests (very similar to HTML forms!) to the client, the client can render the dialog (form) in any way they'd like, and then the user choice is returned back to the server.
The dialog language is intended to be rich enough to give rules plugin writers some control over layout and feel of the dialog (for instance, conversation with NPCs or purchasing from a shop), but keeps enough display up to the client so it can handle constraints such as viewport real estate, etc.
Typedef Documentation
Function Documentation
dialog::Host::~Host |
( |
void |
|
) |
throw () [protected, virtual, inherited] |
virtual smart_ptr<Drawer> dialog::Manager::getDrawer |
( |
void |
|
) |
[pure virtual, inherited] |
virtual void dialog::Manager::registerFactory |
( |
IN const char * |
type, |
|
|
IN smart_ptr< Factory > & |
factory | |
|
) |
| | [pure virtual, inherited] |
virtual Factory* dialog::Manager::getFactory |
( |
IN const char * |
type |
) |
[pure virtual, inherited] |
virtual void dialog::Manager::display |
( |
IN int |
screen_w, |
|
|
IN int |
screen_h | |
|
) |
| | [pure virtual, inherited] |
virtual void dialog::Manager::cursor |
( |
IN int |
x, |
|
|
IN int |
y | |
|
) |
| | [pure virtual, inherited] |
virtual void dialog::Manager::button |
( |
IN int |
buttons, |
|
|
IN int |
state, |
|
|
IN int |
x, |
|
|
IN int |
y | |
|
) |
| | [pure virtual, inherited] |
virtual void dialog::Manager::keyboard |
( |
IN int |
key, |
|
|
IN int |
mods | |
|
) |
| | [pure virtual, inherited] |
virtual bool dialog::Manager::createDialog |
( |
IN const char * |
id, |
|
|
IN int |
x, |
|
|
IN int |
y, |
|
|
IN const Datahash * |
data, |
|
|
IN Host * |
host | |
|
) |
| | [pure virtual, inherited] |
virtual bool dialog::Manager::doesDialogExist |
( |
IN const char * |
id |
) |
[pure virtual, inherited] |
virtual void dialog::Manager::destroyDialog |
( |
IN const char * |
id |
) |
[pure virtual, inherited] |
dialog::Manager::~Manager |
( |
void |
|
) |
throw () [virtual, inherited] |
dialog::Drawer::~Drawer |
( |
void |
|
) |
throw () [virtual, inherited] |