Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

HelpControl Class Reference

Recurses through the menu system and outputs the name and description of each item. More...

#include <HelpControl.h>

Inheritance diagram for HelpControl:

Detailed Description

Recurses through the menu system and outputs the name and description of each item.

Definition at line 8 of file HelpControl.h.

List of all members.

Public Member Functions

 HelpControl (ControlBase *r, unsigned int depth=-1U)
 < constructor
virtual ControlBaseactivate (MC_ID disp_id, Socket *gui)
 displays global Controller commands (hardcoded as strings, will need updates) as well as recursing the menu system (dynamic)
void report (ControlBase *r, const std::string &prefix, unsigned int max_depth)
 displays the menu items of r and their descriptions, recursing on submenus
void setReportDepth (unsigned int depth)
 sets maxDepth
unsigned int getReportDepth () const
 gets maxDepth

Protected Attributes

unsigned int maxDepth
 default maximum recursion depth for reporting from activation
ControlBaseroot
 stores root node to begin recursion (this item is not displayed)

Static Protected Attributes

static const unsigned int term_width = 80
 number of character to word wrap the display

Private Member Functions

 HelpControl (const HelpControl &)
 don't call
HelpControl operator= (const HelpControl &)
 don't call

Constructor & Destructor Documentation

HelpControl::HelpControl ( ControlBase r,
unsigned int  depth = -1U 
)

< constructor

Definition at line 11 of file HelpControl.h.

HelpControl::HelpControl ( const HelpControl  )  [private]

don't call


Member Function Documentation

ControlBase * HelpControl::activate ( MC_ID  disp_id,
Socket gui 
) [virtual]

displays global Controller commands (hardcoded as strings, will need updates) as well as recursing the menu system (dynamic)

Reimplemented from NullControl.

Definition at line 7 of file HelpControl.cc.

unsigned int HelpControl::getReportDepth (  )  const

gets maxDepth

Definition at line 29 of file HelpControl.h.

HelpControl HelpControl::operator= ( const HelpControl  )  [private]

don't call

void HelpControl::report ( ControlBase r,
const std::string &  prefix,
unsigned int  depth_remain 
)

displays the menu items of r and their descriptions, recursing on submenus

prefix is what should be displayed before each menu item (like a bullet point) this is itself prefixed by 2 spaces for each level of recursion. Word wrapping is performed to maintain the clean indenting

Definition at line 35 of file HelpControl.cc.

Referenced by activate().

void HelpControl::setReportDepth ( unsigned int  depth  ) 

sets maxDepth

Definition at line 26 of file HelpControl.h.


Member Data Documentation

unsigned int HelpControl::maxDepth [protected]

default maximum recursion depth for reporting from activation

Definition at line 34 of file HelpControl.h.

Referenced by activate(), getReportDepth(), and setReportDepth().

stores root node to begin recursion (this item is not displayed)

Definition at line 36 of file HelpControl.h.

Referenced by activate().

const unsigned int HelpControl::term_width = 80 [static, protected]

number of character to word wrap the display

Definition at line 32 of file HelpControl.h.

Referenced by report().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:09 2016 by Doxygen 1.6.3