rtop
|
derived from SimplePanelData. capable of storing list of item in a ncurses menu object. More...
#include <panel2.h>
Public Member Functions | |
BrowsePanelData (int) | |
BrowsePanelData<T> constructor. More... | |
std::vector< std::string > | contents () |
returns contents of panel's menu as vector of strings More... | |
int | currIndex () const |
returns currently selected item on object_list More... | |
void | setHeader (std::string head_str) override |
sets panel header. More... | |
void | refreshItemList () override |
intended to be used with browse panels. tears down menu and re-initializes with items in object_list More... | |
void | refreshItemList2 (std::vector< InfoProc< std::string >> &, std::string, const std::vector< int > &, int &) override |
called from ProcViewPanel::refresh. tears down menu and reinitializes with data (reference to vector valued ProcDb dict entry) values More... | |
void | setSelectionColor (int color_pair) override |
sets color_pair for selected menu item More... | |
void | setBasicColor (int color_pair) override |
sets color_pair for unselected menu item More... | |
void | Top () override |
sets menu's first item as selected item More... | |
virtual T * | currItem () const |
returns copy of currently selected item in object_list More... | |
virtual void | selectionOn () override |
sets currently selected menu item's color to selection color_pair and update curr_color to selection color_pair More... | |
virtual void | selectionOff () override |
sets currently selected menu item's color to basic color_pair and update curr_color to basic color_pair More... | |
virtual void | Down () override |
moves menu item selection down by 1 More... | |
virtual void | Up () override |
moves menu item selection up by 1 More... | |
virtual void | resolveKey (int) override |
resolves the key input at panel level More... | |
virtual void | setHeaderColor (int color_pair) override |
sets color of menu's header item to be header color_pair More... | |
virtual void | insertIntoLeftNbr () override |
inserts value of currently selected menu item into menu of left neighbour More... | |
virtual void | insertIntoRightNbr () override |
inserts value of currently selected menu item into menu of right neighbour More... | |
virtual void | addIntoLeftNbr () override |
mock More... | |
virtual void | addIntoRightNbr () override |
mock More... | |
virtual void | moveIntoLeftNbr () override |
mock More... | |
virtual void | moveIntoRightNbr () override |
mock More... | |
![]() | |
SimplePanelData (int) | |
SimplePanelData constructor. More... | |
int | uUid () const |
returns unique identifier of this object More... | |
void | setWin (WINDOW *win_in) |
sets reference to ncurses WINDOW associated with panel More... | |
void | setPanel (PANEL *panel_in) |
sets reference to ncurses PANEL associated with this panel data structure More... | |
void | setDimensions (int h, int w) |
set internal width, height variables corresponding to panel window dimensions More... | |
void | setLeftNbr (SimplePanelData *) |
set pointer to left neighbour panel More... | |
void | setRightNbr (SimplePanelData *) |
set pointer to right neighbour panel More... | |
SimplePanelData * | leftNbr () |
returns pointer to left neighbour panel More... | |
SimplePanelData * | rightNbr () |
returns pointer to right neighbour panel More... | |
void | moveTo (int, int) |
move panel window to desired x,y pos on stdscr. More... | |
virtual void | show () |
refreshes contents of associated BrowsePanel data structure and makes panel visible More... | |
virtual void | show2 () |
makes panel visible More... | |
virtual void | hide () |
hides panel More... | |
WINDOW * | window () const |
returns pointer to ncurses WINDOW associated with panel More... | |
virtual void | toggleEditMode () |
mock More... | |
virtual void | editModeOn () |
mock More... | |
virtual void | editModeOff () |
mock More... | |
virtual void | setEditingColor (int) |
mock More... | |
virtual void | remove () |
mock More... | |
virtual std::vector< std::string > | displayedKeys () const |
mock More... | |
virtual void | deleteColumn () |
mock More... | |
virtual void | insertColumn () |
mock More... | |
virtual void | refresh () |
mock More... | |
virtual void | moveLeft () |
mock More... | |
virtual void | moveRight () |
mock More... | |
virtual void | syncColors () |
mock More... | |
Protected Attributes | |
std::vector< T * > | object_list |
vector of pointers to generic type containing value that goes into menu item. More... | |
ITEM ** | item_list |
array of pointers to ITEM (array of ITEM*) for menu initialization More... | |
int | size_item_list |
size of object_list More... | |
int | capacity |
capacity of object_list. More... | |
MENU * | menu |
pointer to MENU More... | |
int | selected |
item selected in menu, 0 being header item More... | |
int | selection_color |
color_pair id for selected item in menu More... | |
int | basic_color |
color_pair id for unselected item in menu More... | |
int | curr_color |
current color_pair (either selection_color or basic_color) More... | |
int | header_color |
color_paid id for header color More... | |
std::string | header |
panel header. More... | |
![]() | |
int | uuid |
int | width |
width and height in panel window in ncurses units. More... | |
int | height |
PANEL * | panel |
panel to which the data structure is associated More... | |
WINDOW * | win |
window attached to the panel More... | |
SimplePanelData * | r_next |
pointer to panel data structures correponding to left/right neighbour of this panel More... | |
SimplePanelData * | l_next |
StateMachine | smKeys |
Keys statemachine. More... | |
Friends | |
class | XMLTree |
derived from SimplePanelData. capable of storing list of item in a ncurses menu object.
enables browsing capability of menu items in up/down direction. also enables object highlighting with different color when the panel is selected also provides API to resolve keys associated with the panels
rtop::BrowsePanelData< T >::BrowsePanelData | ( | int | id | ) |
|
overridevirtual |
|
overridevirtual |
std::vector< std::string > rtop::BrowsePanelData< T >::contents | ( | ) |
|
inline |
|
virtual |
|
overridevirtual |
moves menu item selection down by 1
Reimplemented from rtop::SimplePanelData.
Reimplemented in rtop::EditPanelData< T >.
|
overridevirtual |
inserts value of currently selected menu item into menu of left neighbour
Reimplemented from rtop::SimplePanelData.
Reimplemented in rtop::EditPanelData< T >.
|
overridevirtual |
inserts value of currently selected menu item into menu of right neighbour
Reimplemented from rtop::SimplePanelData.
Reimplemented in rtop::EditPanelData< T >.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
intended to be used with browse panels. tears down menu and re-initializes with items in object_list
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
called from ProcViewPanel::refresh. tears down menu and reinitializes with data (reference to vector valued ProcDb dict entry) values
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
resolves the key input at panel level
Reimplemented from rtop::SimplePanelData.
Reimplemented in rtop::EditPanelData< T >.
|
overridevirtual |
sets currently selected menu item's color to basic color_pair and update curr_color to basic color_pair
Reimplemented from rtop::SimplePanelData.
Reimplemented in rtop::EditPanelData< T >.
|
overridevirtual |
sets currently selected menu item's color to selection color_pair and update curr_color to selection color_pair
Reimplemented from rtop::SimplePanelData.
Reimplemented in rtop::EditPanelData< T >.
|
inlineoverridevirtual |
sets color_pair for unselected menu item
Reimplemented from rtop::SimplePanelData.
|
inlineoverridevirtual |
sets panel header.
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
sets color of menu's header item to be header color_pair
Reimplemented from rtop::SimplePanelData.
Reimplemented in rtop::EditPanelData< T >.
|
inlineoverridevirtual |
sets color_pair for selected menu item
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
sets menu's first item as selected item
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
moves menu item selection up by 1
Reimplemented from rtop::SimplePanelData.
Reimplemented in rtop::EditPanelData< T >.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |