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

ScreenManager Class Reference

Collaboration diagram for ScreenManager:
[legend]
List of all members.

Detailed Description

draws the UI using the curses API

Definition at line 15 of file screenManager.h.

Public Types

enum  Status {
  OPEN = 1,
  CLOSED = 0,
  ERROR = -1
}
 enumeration for the status of the ScreenManager


Public Member Functions

int changeCurrentMenu (Menu *newMenuPtr)
 changes the menu that is displayed

void writeUserMessage (char *message)
 writes a new message to the array - implemented in FIFO

void updateScreen ()
 clears and updates the screen for the user

MenugetCurrentMenu ()
 get the current Menu

void getUserInput ()
 wait for a command from the user

char * askUserQuestion (char *question)
 askes the user a spefic question, send it the question you want to ask returns the user answer

char * askUserHiddenQuestion (char *question)
 ask a user a question and hide what they are entering

int askUserIntQuestion (char *question)
 ask the user a question expecting a integer reply

void welcomeMessage ()
 shows the welcome screen


Static Public Member Functions

ScreenManagertheInstance ()
 returns the one and only instance of ScreenManager


Protected Member Functions

 ScreenManager ()
 Contructor for the screen Manager - initializes curses.

 ~ScreenManager ()
 brief destructor, shows the exit message

ScreenManageroperator= (const ScreenManager &)

Private Attributes

SysLogsystemLogger
 reference to the systemLogger

char * userMessages [7]
 pointer to all current UserMessages

int welcomeFile
 welcomeMessage, shown on startUp

char * exitMessage
 exitMessage, shown on shutdown

WINDOW * messageWindow
 The message Window.

WINDOW * menuWindow
 The menu window.

WINDOW * inputWindow
 The inputWindow.


Static Private Attributes

MenucurrentMenu
 pointer to the current Menu

int currentMessage
 pointer to the newest User Message

int screenCounter
 keeps track of the number of times the screen has been updated so that it adds a ".." message only every 5 seconds

Status screenStatus
 The status of the screenManager.


Member Function Documentation

char* ScreenManager::askUserHiddenQuestion char *  question  ) 
 

ask a user a question and hide what they are entering

Parameters:
question to display to user
Return values:
the reply supplied by the user

int ScreenManager::askUserIntQuestion char *  question  ) 
 

ask the user a question expecting a integer reply

Parameters:
question to display to user
Return values:
the reply supplied by the user

char* ScreenManager::askUserQuestion char *  question  ) 
 

askes the user a spefic question, send it the question you want to ask returns the user answer

Parameters:
question to display to user
Return values:
the reply supplied by the user

int ScreenManager::changeCurrentMenu Menu newMenuPtr  ) 
 

changes the menu that is displayed

Parameters:
newMenuPtr to change the menu to
Return values:
1 on success -1 on error

Menu* ScreenManager::getCurrentMenu  ) 
 

get the current Menu

Return values:
the current menu Null on error

ScreenManager* ScreenManager::theInstance  )  [static]
 

returns the one and only instance of ScreenManager

Return values:
the instance of the screenManager

void ScreenManager::writeUserMessage char *  message  ) 
 

writes a new message to the array - implemented in FIFO

Parameters:
message to write to the screen


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