IS3D::MultiColumnMenu Class Reference

#include <MultiColumnMenu.H>

Inherits IS3D::DrawObj.

List of all members.

Public Types

enum  ItemState { ENABLED, DISABLED, HIGHLIGHTED, ACTIVATED }

Public Member Functions

 MultiColumnMenu (const std::string &name, const std::string &title, Array< Array< std::string > > printedNames, Array< Array< std::string > > eventNames, Array< std::string > trackerTriggers, Array< std::string > btnDownTriggers, Array< std::string > btnUpTriggers, Array< std::string > disableTriggers, Array< std::string > enableTriggers, CoordinateFrame initialFrame)
virtual ~MultiColumnMenu ()
int getNumRows ()
int getNumColumns ()
void addRow (int insertBeforeRowNumber, Array< std::string > printedNames, Array< std::string > eventNames)
void enterDisabled (EventRef e)
void exitDisabled (EventRef e)
void trackerMove (EventRef e)
void trackerMoveInMenu (EventRef e)
void trackerMoveBtnDown (EventRef e)
void menuBtnOn (EventRef e)
void menuBtnOff (EventRef e)
void draw ()
 Override this function and place your G3D draw calls inside it.
void setColumnJustify (int column, GFont::XAlign justify)
void setTurnedOn (int column, int row, bool on)
void setPrintedName (int column, int row, const std::string &newName)

Protected Member Functions

void generateBoxesGeometry ()
void drawTextOnBox (const std::string &str, AABox box, Color4 color, Color4 outline, GFont::XAlign justify)

Protected Attributes

std::string _name
std::string _title
AABox _titleBox
ItemState _titleState
Array< Array< std::string > > _eventNames
Array< Array< std::string > > _items
Array< Array< AABox > > _boxes
Array< Array< ItemState > > _states
Array< Array< bool > > _turnedOn
Array< GFont::XAlign > _columnJustify
FsaRef _fsa
CoordinateFrame _dragOffset
bool _firstDrag
std::string _activeTracker
GFontRef _font
double _textHeight
double _padding
Color4 _outlineCol
Color4 _titleFG
Color4 _titleBG
Color4 _itemFG
Color4 _itemBG
Color4 _disabledFG
Color4 _disabledBG
Color4 _highltFG
Color4 _highltBG
Color4 _activatedFG
Color4 _activatedBG


Detailed Description

A 3D menu system that is more advanced than IS3D::Default3DMenu. This menu provides for: 1. multiple columns of menu items. 2. generating events that are named something other than the displayed name of the menu item. 3. inserting a new row to the menu while your program is running.

Member Enumeration Documentation

Enumerator:
ENABLED 
DISABLED 
HIGHLIGHTED 
ACTIVATED 


Constructor & Destructor Documentation

IS3D::MultiColumnMenu::MultiColumnMenu ( const std::string &  name,
const std::string &  title,
Array< Array< std::string > >  printedNames,
Array< Array< std::string > >  eventNames,
Array< std::string >  trackerTriggers,
Array< std::string >  btnDownTriggers,
Array< std::string >  btnUpTriggers,
Array< std::string >  disableTriggers,
Array< std::string >  enableTriggers,
CoordinateFrame  initialFrame 
)

virtual IS3D::MultiColumnMenu::~MultiColumnMenu (  )  [virtual]


Member Function Documentation

int IS3D::MultiColumnMenu::getNumRows (  )  [inline]

References _items.

int IS3D::MultiColumnMenu::getNumColumns (  )  [inline]

References _items.

void IS3D::MultiColumnMenu::addRow ( int  insertBeforeRowNumber,
Array< std::string >  printedNames,
Array< std::string >  eventNames 
)

void IS3D::MultiColumnMenu::enterDisabled ( EventRef  e  ) 

void IS3D::MultiColumnMenu::exitDisabled ( EventRef  e  ) 

void IS3D::MultiColumnMenu::trackerMove ( EventRef  e  ) 

void IS3D::MultiColumnMenu::trackerMoveInMenu ( EventRef  e  ) 

void IS3D::MultiColumnMenu::trackerMoveBtnDown ( EventRef  e  ) 

void IS3D::MultiColumnMenu::menuBtnOn ( EventRef  e  ) 

void IS3D::MultiColumnMenu::menuBtnOff ( EventRef  e  ) 

void IS3D::MultiColumnMenu::draw (  )  [virtual]

Override this function and place your G3D draw calls inside it.

Implements IS3D::DrawObj.

void IS3D::MultiColumnMenu::setColumnJustify ( int  column,
GFont::XAlign  justify 
) [inline]

References _columnJustify.

void IS3D::MultiColumnMenu::setTurnedOn ( int  column,
int  row,
bool  on 
) [inline]

References _turnedOn.

void IS3D::MultiColumnMenu::setPrintedName ( int  column,
int  row,
const std::string &  newName 
) [inline]

References _items.

void IS3D::MultiColumnMenu::generateBoxesGeometry (  )  [protected]

void IS3D::MultiColumnMenu::drawTextOnBox ( const std::string &  str,
AABox  box,
Color4  color,
Color4  outline,
GFont::XAlign  justify 
) [protected]


Member Data Documentation

std::string IS3D::MultiColumnMenu::_name [protected]

Reimplemented from IS3D::DrawObj.

std::string IS3D::MultiColumnMenu::_title [protected]

Array< Array<std::string> > IS3D::MultiColumnMenu::_eventNames [protected]

Array< Array<std::string> > IS3D::MultiColumnMenu::_items [protected]

Array< Array<AABox> > IS3D::MultiColumnMenu::_boxes [protected]

Array< Array<ItemState> > IS3D::MultiColumnMenu::_states [protected]

Array< Array<bool> > IS3D::MultiColumnMenu::_turnedOn [protected]

Referenced by setTurnedOn().

Array<GFont::XAlign> IS3D::MultiColumnMenu::_columnJustify [protected]

Referenced by setColumnJustify().

CoordinateFrame IS3D::MultiColumnMenu::_dragOffset [protected]

std::string IS3D::MultiColumnMenu::_activeTracker [protected]

GFontRef IS3D::MultiColumnMenu::_font [protected]

double IS3D::MultiColumnMenu::_padding [protected]

Color4 IS3D::MultiColumnMenu::_titleFG [protected]

Color4 IS3D::MultiColumnMenu::_titleBG [protected]

Color4 IS3D::MultiColumnMenu::_itemFG [protected]

Color4 IS3D::MultiColumnMenu::_itemBG [protected]


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

Generated on Wed Jan 26 06:31:20 2011 for IS3D by  doxygen 1.5.6