Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Menu Class Reference

List of all members.

Detailed Description

Definition for a menu.

Definition at line 11 of file UIMenu.h.

Public Types

enum  MenuStatus {
  START = 1,
  STOP = 0,
  NOSTAT = -1
}
 enumeration for the menuStatus More...


Public Member Functions

 Menu ()
 Constructor for a menu intializes the menuSize to zero.

 ~Menu ()
 Destructor for a menu.

void setMenuTitle (char *title)
 sets up the menuTitle

int setMenuList (char *list[], MenuStatus stat[], int size)
 sets up the remaining values of the menu

void printMenu (WINDOW *menuWin)
 prints out the menu format: title: entry 1 status entry 2 status entry 3 status ...

MenuStatus getMenuStatus (int itemNumber)
 gives the menuStatus of the cooresponding menu item

int setMenuStatus (int itemNumber, MenuStatus stat)
 sets the menuStatus of the cooresponding menu item

void setMenuName (char *name)
 sets up the name for the menu

char * getMenuName ()
 returns the menu name

int getMenuSize ()
 returns the menu size this is important to find out how to position it on the screen


Private Attributes

char * menuName
 the menu name

char * menuTitle
 the menu title

char * menuList [9]
 the complete Menu list maxlength 10

MenuStatus status [9]
 the complete list of the status of each menu item

int menuSize
 size of the menu


Member Enumeration Documentation

enum Menu::MenuStatus
 

enumeration for the menuStatus

Enumeration values:
START  Turn the menu on.
STOP  Turn the menu off.
NOSTAT  There is no menu status.

Definition at line 16 of file UIMenu.h.


Member Function Documentation

char* Menu::getMenuName  ) 
 

returns the menu name

Return values:
the menu name

int Menu::getMenuSize  ) 
 

returns the menu size this is important to find out how to position it on the screen

Return values:
the size of the menu

MenuStatus Menu::getMenuStatus int  itemNumber  ) 
 

gives the menuStatus of the cooresponding menu item

Parameters:
itemNumber to check
Return values:
the MenuStatus of the menu

void Menu::printMenu WINDOW *  menuWin  ) 
 

prints out the menu format: title: entry 1 status entry 2 status entry 3 status ...

just tell it which window to write it to

Parameters:
menuWin to print

int Menu::setMenuList char *  list[],
MenuStatus  stat[],
int  size
 

sets up the remaining values of the menu

Parameters:
list of menu titles
stat type of each menu
size of the list
Return values:
1 on success -1 on error

void Menu::setMenuName char *  name  ) 
 

sets up the name for the menu

Parameters:
name to set to the menu

int Menu::setMenuStatus int  itemNumber,
MenuStatus  stat
 

sets the menuStatus of the cooresponding menu item

Parameters:
itemNumber to set
stat the status to set it to
Return values:
returns 0 on success -1 when NOSTAT is the value

void Menu::setMenuTitle char *  title  ) 
 

sets up the menuTitle

Parameters:
title to set the title to


The documentation for this class was generated from the following file:
Generated on Sat Mar 26 00:07:05 2005 for CS498EmbeddedSystemsProgramming by doxygen 1.3.6