Public Member Functions

dialog::Manager Class Reference
[Dialog Library]

This is the object that manages dialogs. More...

#include <dialog.h>

Inheritance diagram for dialog::Manager:
Inheritance graph

List of all members.

Public Member Functions

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

virtual ~Manager (void) throw ()
static smart_ptr< Managercreate (smart_ptr< crypto::DESKey > &desKey, smart_ptr< Drawer > &drawer)

Detailed Description

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.

The documentation for this class was generated from the following files: