rtop
Public Member Functions | Private Attributes | Friends | List of all members
rtop::ScreenManager Class Reference

Top Level UI object. Responsible to switching between views and capturing key input. More...

#include <screen2.h>

Public Member Functions

 ScreenManager (int)
 ScreenManager constructor. Initializes ncurses. More...
 
 ~ScreenManager ()
 ScreenManager destructor. exit curses mode, thus releasing all resources. More...
 
void start ()
 Captures key input from screen. More...
 
void refresh ()
 refreshes screen More...
 
void resolveKey (int ch)
 resolves the key input at ScreenManager level More...
 
int CurrentView () const
 
int uUid () const
 

Private Attributes

int uuid
 
ViewcurrView
 pointer to current view object More...
 
std::vector< View * > views
 collection of view object pointers More...
 
StateMachine smKeys
 Keys statemachine. More...
 
StateMachine smViews
 Views statemachine. More...
 

Friends

class XMLTree
 

Detailed Description

Top Level UI object. Responsible to switching between views and capturing key input.

Performs three major tasks

  1. initializes ncurses and refreshes the screen
  2. captures key input and send it for processing down the UI object heirarchy
  3. switch between views

Definition at line 34 of file screen2.h.

Constructor & Destructor Documentation

◆ ScreenManager()

rtop::ScreenManager::ScreenManager ( int  id)

ScreenManager constructor. Initializes ncurses.

Definition at line 59 of file screen2.h.

◆ ~ScreenManager()

rtop::ScreenManager::~ScreenManager ( )

ScreenManager destructor. exit curses mode, thus releasing all resources.

Definition at line 145 of file screen2.h.

Member Function Documentation

◆ CurrentView()

int rtop::ScreenManager::CurrentView ( ) const
inline

Definition at line 42 of file screen2.h.

◆ refresh()

void rtop::ScreenManager::refresh ( )

refreshes screen

invokes current view's refresh function

Definition at line 135 of file screen2.h.

◆ resolveKey()

void rtop::ScreenManager::resolveKey ( int  ch)

resolves the key input at ScreenManager level

passes keys to ScreenManager's Key StateMachine
key is passed to previous and current views for further processing
screen is refreshed

Definition at line 80 of file screen2.h.

◆ start()

void rtop::ScreenManager::start ( )

Captures key input from screen.

Definition at line 113 of file screen2.h.

◆ uUid()

int rtop::ScreenManager::uUid ( ) const
inline

Definition at line 43 of file screen2.h.

Friends And Related Function Documentation

◆ XMLTree

friend class XMLTree
friend

Definition at line 54 of file screen2.h.

Member Data Documentation

◆ currView

View* rtop::ScreenManager::currView
private

pointer to current view object

Definition at line 47 of file screen2.h.

◆ smKeys

StateMachine rtop::ScreenManager::smKeys
private

Keys statemachine.

Definition at line 51 of file screen2.h.

◆ smViews

StateMachine rtop::ScreenManager::smViews
private

Views statemachine.

Definition at line 53 of file screen2.h.

◆ uuid

int rtop::ScreenManager::uuid
private

Definition at line 45 of file screen2.h.

◆ views

std::vector<View*> rtop::ScreenManager::views
private

collection of view object pointers

Definition at line 49 of file screen2.h.


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