Classes | Typedefs | Functions | Variables

dialog Namespace Reference

Classes

class  Host
 Clients will need to provide an object that implements this interface if they want callbacks etc. More...
class  Manager
 This is the object that manages dialogs. More...
struct  font_size_t
 sizing information about how a font is rendered More...
struct  border_size_t
class  Drawer
 This is the object that is capable of rendering dialogs. More...
class  TextDrawer
 for testing, we provide a text-only drawer More...
class  Element
class  Factory
 Clients will need to provide an object that implements this interface if they want to provide their own custom-defined dialog::Element objects. More...
class  ContainerRequest
 object to help construct dialog request streams More...

Typedefs

typedef std::vector
< element_record_t > 
vec_element_t
typedef smart_ptr< Element >(* construct_fn_t )(Manager *mgr, const Datahash *hash)

typedef std::map< std::string,
dialog_record_t > 
dialog_map_t

Functions

smart_ptr< ElementcreateButtonElement (Manager *mgr, const Datahash *hash)
smart_ptr< ElementcreateContainerElement (Manager *mgr, const Datahash *hash)
smart_ptr< ElementcreateContainer (vec_element_t &children)
smart_ptr< ElementcreateLabelElement (Manager *mgr, const Datahash *hash)
smart_ptr< ElementcreateTextboxElement (Manager *mgr, const Datahash *hash)
static construct_fn_t getFn (const char *type_name)
smart_ptr< DrawercreateOpenGLDrawer (void)
 create an OpenGL-based dialog drawer (see dialog::Drawer)

smart_ptr< ElementconstructElementTree (Manager *mgr, const Datahash *hash)
smart_ptr< FactorygetDefaultFactory (void)
 factory for built-in types
void registerDefaultFactories (Manager *mgr)
 helper method to register default types with a manager

Variables

static const int s_border = 2
static const type_entry_t entries []
static const int s_max = 126

static const int s_maxText = 147
static const int s_maxDim = s_maxText + 1



enum  eElementType {
  eElement_Button = 1,
  eElement_Label = 2,
  eElement_Textbox = 3,
  eElement_Container = 50,
  eElement_Dialog = 60,
  eElement_Invalid = 0
}
 

types of elements that appear in a dialog

More...
typedef point2d_t< int > point_t
typedef rect2d_t< int > rect_t

Typedef Documentation

typedef std::vector< element_record_t > dialog::vec_element_t

Definition at line 52 of file container.cpp.

typedef std::map<std::string, dialog_record_t > dialog::dialog_map_t

Definition at line 59 of file dialog.cpp.

typedef rect2d_t<int> dialog::rect_t

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

typedef smart_ptr<Element>(* dialog::construct_fn_t)(Manager *mgr,const Datahash *hash)

Definition at line 100 of file element.cpp.


Enumeration Type Documentation

types of elements that appear in a dialog

Enumerator:
eElement_Button 

a simple text-only button

eElement_Label 

read-only text

eElement_Textbox 

a box for inputting text

eElement_Container 

contains a group of elements

eElement_Dialog 

a top-level dialog object

eElement_Invalid 

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


Function Documentation

smart_ptr< Element > dialog::createButtonElement ( Manager *  mgr,
const Datahash hash 
)
smart_ptr< Element > dialog::createContainerElement ( Manager *  mgr,
const Datahash hash 
)
smart_ptr<Element> dialog::createContainer ( vec_element_t &  children  ) 
smart_ptr< Element > dialog::createLabelElement ( Manager *  mgr,
const Datahash hash 
)

Definition at line 130 of file label.cpp.

smart_ptr< Element > dialog::createTextboxElement ( Manager *  mgr,
const Datahash hash 
)

Definition at line 301 of file textbox.cpp.

static construct_fn_t dialog::getFn ( const char *  type_name  )  [static]

Definition at line 142 of file element.cpp.

smart_ptr< Element > dialog::constructElementTree ( Manager *  mgr,
const Datahash hash 
)
smart_ptr< Factory > dialog::getDefaultFactory ( void   ) 

factory for built-in types

void dialog::registerDefaultFactories ( Manager *  mgr  ) 

helper method to register default types with a manager


Variable Documentation

const int dialog::s_border = 2 [static]

Definition at line 43 of file container.cpp.

const int dialog::s_maxText = 147 [static]

Definition at line 51 of file drawer.cpp.

const int dialog::s_maxDim = s_maxText + 1 [static]

Definition at line 52 of file drawer.cpp.

const type_entry_t dialog::entries[] [static]
Initial value:
 {

        { "button",             createButtonElement },
        { "container",          createContainerElement },
        { "label",              createLabelElement },
        { "textbox",            createTextboxElement },

        
        { NULL, NULL }
}

Definition at line 122 of file element.cpp.

const int dialog::s_max = 126 [static]

Definition at line 46 of file textbox.cpp.