rtop
|
derived from BrowsePanelData. capable of editing items in ncurses menu list. More...
#include <panel2.h>
Public Member Functions | |
EditPanelData (int) | |
EditPanelData<T> constructor. More... | |
void | editModeOn () override |
sets editing to true More... | |
void | editModeOff () override |
sets editing to false More... | |
void | toggleEditMode () override |
toggles editing mode More... | |
void | Down () override |
swap selected item with item below it (editing) or moves cursor down by one (not editing) More... | |
void | Up () override |
swap selected item with item above it (editing) or moves cursor up by one (not editing) More... | |
void | remove () override |
remove currently selected menu item More... | |
void | setEditingColor (int color_pair) override |
sets editing color_pair More... | |
virtual void | resolveKey (int) override |
resolves current key with KeyDict More... | |
void | selectionOn () override |
sets currently selected menu item's color to selection curr_color_pair (editiing_color or selection_color) and update curr_color to selection color_pair/editing_color More... | |
void | selectionOff () override |
sets currently selected menu item's color to basic_color and update curr_color to basic_color More... | |
void | setHeaderColor (int) override |
sets header color_pair More... | |
void | insertIntoLeftNbr () override |
inserts value of currently selected menu item into menu of left neighbour More... | |
void | insertIntoRightNbr () override |
inserts value of currently selected menu item into menu of right neighbour More... | |
void | insert (Info *) |
inserts Info* object into into object_list above selected item More... | |
void | insert (InfoProc< float > *) |
not implemented More... | |
void | insert (InfoProc< int > *) |
not implemented More... | |
void | insert (InfoProc< std::string > *) |
not implemented More... | |
bool | editMode () const |
return edit mode More... | |
void | release () |
releases UI resources associated with this panel More... | |
![]() | |
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 | 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 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... | |
Private Attributes | |
bool | editing |
editing status of panel More... | |
int | editing_color |
index of color_pair for editing More... | |
Friends | |
class | XMLTree |
Additional Inherited Members | |
![]() | |
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... | |
derived from BrowsePanelData. capable of editing items in ncurses menu list.
enables editing capability of menu items by deleting, adding and rearraging items. also enables object highlighting with different color when the panel is selected and in edit mode
rtop::EditPanelData< T >::EditPanelData | ( | int | id | ) |
|
overridevirtual |
swap selected item with item below it (editing) or moves cursor down by one (not editing)
Reimplemented from rtop::BrowsePanelData< T >.
|
inline |
|
overridevirtual |
sets editing to false
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
sets editing to true
Reimplemented from rtop::SimplePanelData.
void rtop::EditPanelData< T >::insert | ( | Info * | pitem | ) |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
inserts value of currently selected menu item into menu of left neighbour
Reimplemented from rtop::BrowsePanelData< T >.
|
overridevirtual |
inserts value of currently selected menu item into menu of right neighbour
Reimplemented from rtop::BrowsePanelData< T >.
void rtop::EditPanelData< T >::release | ( | ) |
|
overridevirtual |
remove currently selected menu item
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
resolves current key with KeyDict
Reimplemented from rtop::BrowsePanelData< T >.
|
overridevirtual |
sets currently selected menu item's color to basic_color and update curr_color to basic_color
Reimplemented from rtop::BrowsePanelData< T >.
|
overridevirtual |
sets currently selected menu item's color to selection curr_color_pair (editiing_color or selection_color) and update curr_color to selection color_pair/editing_color
Reimplemented from rtop::BrowsePanelData< T >.
|
inlineoverridevirtual |
sets editing color_pair
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
sets header color_pair
Reimplemented from rtop::BrowsePanelData< T >.
|
overridevirtual |
toggles editing mode
Reimplemented from rtop::SimplePanelData.
|
overridevirtual |
swap selected item with item above it (editing) or moves cursor up by one (not editing)
if in editing mode
Reimplemented from rtop::BrowsePanelData< T >.
|
private |
|
private |