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

2nd level UI object. Responsible for switching between panels and resolving key input More...

#include <view2.h>

Public Member Functions

 View (int)
 View Constructor. More...
 
int uUid () const
 
void resolveKey (int)
 resolves the key input at View level More...
 
void refresh ()
 refreshes view More...
 
void show ()
 sets view to visible More...
 
void hide ()
 sets view to hidden More...
 

Private Attributes

int uuid
 
WINDOW * win
 pointer to window associated with the view, contained panels' windows are derived from it More...
 
SimplePanelDatacurr_panel
 pointer to current panel's (Browse/Edit Panel) data structure More...
 
std::vector< SimplePanelData * > panels
 vector of pointers to panel data structures corresponding to panels contained in the view More...
 
std::vector< std::pair< int, int > > panels_yx
 vector of contained panels' window positions within view window More...
 
StateMachine smKeys
 Keys statemachine. More...
 
StateMachine smPanels
 Panel statemachine. More...
 
bool hidden
 indicates if view is hidden/visible More...
 
int editing_color_pair = 0
 index of color_pair used for selected menu item in edit mode More...
 
int selection_color_pair = 0
 index of color_pair used for selected menu item in non-edit mode More...
 
int basic_color_pair = 0
 index of color_pair used for non-selected menu items More...
 
int header_color_pair = 0
 index of color_pair used for panel header More...
 
std::map< SimplePanelData *, std::pair< SimplePanelData *, SimplePanelData * > > neighbourhood
 dictionary storing pair of pointers to panel data structures corresponding to left/right neighbour panels of each panel in the view More...
 
std::mutex view_mutex
 mutex for accessing View::refresh More...
 

Friends

class XMLTree
 

Detailed Description

2nd level UI object. Responsible for switching between panels and resolving key input

Tasks

  1. switch between panels
  2. captures key input and send it for processing down the UI object heirarchy
  3. assigning position and neighbours of panels within it

Definition at line 30 of file view2.h.

Constructor & Destructor Documentation

◆ View()

rtop::View::View ( int  id)

View Constructor.

Definition at line 71 of file view2.h.

Member Function Documentation

◆ hide()

void rtop::View::hide ( )

sets view to hidden

Definition at line 165 of file view2.h.

◆ refresh()

void rtop::View::refresh ( )

refreshes view

invokes contained panels' refresh functions

Definition at line 109 of file view2.h.

◆ resolveKey()

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

resolves the key input at View level

passes key to View's Key statemachine
key is passed to current and previous view for further processing
view is refreshed

Definition at line 83 of file view2.h.

◆ show()

void rtop::View::show ( )

sets view to visible

Definition at line 155 of file view2.h.

◆ uUid()

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

Definition at line 62 of file view2.h.

Friends And Related Function Documentation

◆ XMLTree

friend class XMLTree
friend

Definition at line 67 of file view2.h.

Member Data Documentation

◆ basic_color_pair

int rtop::View::basic_color_pair = 0
private

index of color_pair used for non-selected menu items

Definition at line 53 of file view2.h.

◆ curr_panel

SimplePanelData* rtop::View::curr_panel
private

pointer to current panel's (Browse/Edit Panel) data structure

Definition at line 37 of file view2.h.

◆ editing_color_pair

int rtop::View::editing_color_pair = 0
private

index of color_pair used for selected menu item in edit mode

Definition at line 49 of file view2.h.

◆ header_color_pair

int rtop::View::header_color_pair = 0
private

index of color_pair used for panel header

Definition at line 55 of file view2.h.

◆ hidden

bool rtop::View::hidden
private

indicates if view is hidden/visible

Definition at line 47 of file view2.h.

◆ neighbourhood

std::map<SimplePanelData*, std::pair<SimplePanelData*, SimplePanelData*> > rtop::View::neighbourhood
private

dictionary storing pair of pointers to panel data structures corresponding to left/right neighbour panels of each panel in the view

Definition at line 57 of file view2.h.

◆ panels

std::vector<SimplePanelData*> rtop::View::panels
private

vector of pointers to panel data structures corresponding to panels contained in the view

Definition at line 39 of file view2.h.

◆ panels_yx

std::vector<std::pair<int, int> > rtop::View::panels_yx
private

vector of contained panels' window positions within view window

Definition at line 41 of file view2.h.

◆ selection_color_pair

int rtop::View::selection_color_pair = 0
private

index of color_pair used for selected menu item in non-edit mode

Definition at line 51 of file view2.h.

◆ smKeys

StateMachine rtop::View::smKeys
private

Keys statemachine.

Definition at line 43 of file view2.h.

◆ smPanels

StateMachine rtop::View::smPanels
private

Panel statemachine.

Definition at line 45 of file view2.h.

◆ uuid

int rtop::View::uuid
private

Definition at line 33 of file view2.h.

◆ view_mutex

std::mutex rtop::View::view_mutex
private

mutex for accessing View::refresh

Definition at line 59 of file view2.h.

◆ win

WINDOW* rtop::View::win
private

pointer to window associated with the view, contained panels' windows are derived from it

Definition at line 35 of file view2.h.


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