Classes | Functions

Dialog Library
[Geometry Libraries]

This is a simple dialog library. More...

Collaboration diagram for Dialog Library:


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...


virtual smart_ptr< Drawer > dialog::Manager::getDrawer (void)=0
virtual void dialog::Manager::registerFactory (const char *type, smart_ptr< Factory > &factory)=0
virtual Factory * dialog::Manager::getFactory (const char *type)=0
virtual void dialog::Manager::display (int screen_w, int screen_h)=0
virtual void dialog::Manager::cursor (int x, int y)=0
virtual void dialog::Manager::button (int buttons, int state, int x, int y)=0
virtual void dialog::Manager::keyboard (int key, int mods)=0
virtual bool dialog::Manager::createDialog (const char *id, int x, int y, const Datahash *data, Host *host)=0
virtual bool dialog::Manager::doesDialogExist (const char *id)=0
virtual void dialog::Manager::destroyDialog (const char *id)=0

typedef point2d_t< int > dialog::point_t

virtual dialog::Host::~Host (void) throw ()
static smart_ptr< Manager > dialog::Manager::create (smart_ptr< crypto::DESKey > &desKey, 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

typedef point2d_t<int> dialog::point_t

Definition at line 46 of file dialog/drawer.h.

Function Documentation

dialog::Host::~Host ( void   )  throw () [protected, virtual, inherited]

Definition at line 49 of file dialog.cpp.

virtual smart_ptr<Drawer> dialog::Manager::getDrawer ( void   )  [pure virtual, inherited]
virtual void dialog::Manager::registerFactory ( const char *  type,
smart_ptr< Factory > &  factory 
) [pure virtual, inherited]
virtual Factory* dialog::Manager::getFactory ( const char *  type  )  [pure virtual, inherited]
virtual void dialog::Manager::display ( int  screen_w,
int  screen_h 
) [pure virtual, inherited]
virtual void dialog::Manager::cursor ( int  x,
int  y 
) [pure virtual, inherited]
virtual void dialog::Manager::button ( int  buttons,
int  state,
int  x,
int  y 
) [pure virtual, inherited]
virtual void dialog::Manager::keyboard ( int  key,
int  mods 
) [pure virtual, inherited]
virtual bool dialog::Manager::createDialog ( const char *  id,
int  x,
int  y,
const Datahash data,
Host host 
) [pure virtual, inherited]
virtual bool dialog::Manager::doesDialogExist ( const char *  id  )  [pure virtual, inherited]
virtual void dialog::Manager::destroyDialog ( const char *  id  )  [pure virtual, inherited]
smart_ptr< Manager > dialog::Manager::create ( smart_ptr< crypto::DESKey > &  desKey,
smart_ptr< Drawer > &  drawer 
) [static, inherited]

Definition at line 553 of file dialog.cpp.

dialog::Manager::~Manager ( void   )  throw () [virtual, inherited]

Definition at line 46 of file dialog.cpp.

Drawer::~Drawer ( void   )  throw () [virtual, inherited]

Definition at line 47 of file drawer.cpp.