This is the object that manages dialogs. More...
#include <dialog.h>
Public Member Functions | |
virtual smart_ptr< Drawer > | getDrawer (void)=0 |
virtual void | registerFactory (IN const char *type, IN smart_ptr< Factory > &factory)=0 |
virtual Factory * | getFactory (IN const char *type)=0 |
virtual void | display (IN int screen_w, IN int screen_h)=0 |
virtual void | cursor (IN int x, IN int y)=0 |
virtual void | button (IN int buttons, IN int state, IN int x, IN int y)=0 |
virtual void | keyboard (IN int key, IN int mods)=0 |
virtual bool | createDialog (IN const char *id, IN int x, IN int y, IN const Datahash *data, IN Host *host)=0 |
virtual bool | doesDialogExist (IN const char *id)=0 |
virtual void | destroyDialog (IN const char *id)=0 |
| |
virtual | ~Manager (void) throw () |
static smart_ptr< Manager > | create (IN smart_ptr< crypto::DESKey > &desKey, IN smart_ptr< Drawer > &drawer) |
This is the object that manages dialogs.
Create one of these for each viewport. These aren't viewport-aware, but by partitioning your dialog managers by viewport, that lets you specify viewport settings before invoking the manager for display etc.
NOTE: clients must supply their own identifiers (opaque strings) to uniquely identify dialogs!
You should call display like this:
// set viewport to arbitrary rectangle in screen glViewport(x, y, w, h); // provide full window (screen) coordinates for display manager->display(screen_w, screen_h);
The dialog manager needs the full screen (window) dimensions to properly establish the orthographic projection, but you should call glViewport before calling the manager to display so that clipping occurs.
Definition at line 118 of file dialog.h.