Eclipse SUMO - Simulation of Urban MObility
|
#include <MFXDecalsTable.h>
Data Structures | |
class | Cell |
FOX needs this. More... | |
class | Column |
table column More... | |
class | Row |
table row More... | |
Public Member Functions | |
void | clearTable () |
clear table | |
void | fillTable () |
fill table | |
int | getCurrentSelectedRow () const |
Get current selected row. | |
std::string | getItemText (const int row, const int column) const |
Return cell text. | |
int | getNumRows () const |
Get number of rows. | |
MFXDecalsTable (GUIDialog_ViewSettings *dialogViewSettingsParent, FXComposite *parent) | |
fox declaration | |
void | selectRow (const int rowIndex) |
Select a row. | |
void | setColumnLabel (const int column, const std::string &text, const std::string &tooltip="") |
Change column header text. | |
void | setItemText (FXint row, FXint column, const std::string &text) |
Modify cell text. | |
~MFXDecalsTable () | |
destructor (Called automatically) | |
FOX callbacks | |
long | onFocusRow (FXObject *, FXSelector, void *) |
called when a row is focused | |
long | onCmdKeyPress (FXObject *, FXSelector, void *) |
called when a key is pressed | |
long | onCmdEditRowString (FXObject *, FXSelector, void *) |
called when a string is updated | |
long | onCmdEditRowSpinner (FXObject *, FXSelector, void *) |
called when a spinner is updated | |
long | onCmdEditRowCheckBox (FXObject *, FXSelector, void *) |
called when a checkBox is updated | |
long | onCmdOpenDecal (FXObject *, FXSelector, void *) |
called when open decal button is pressed | |
long | onCmdAddRow (FXObject *, FXSelector, void *) |
called when add row button is pressed | |
long | onUpdAddRow (FXObject *, FXSelector, void *) |
update add row button | |
long | onCmdRemoveRow (FXObject *, FXSelector, void *) |
called when remove row button is pressed | |
Protected Member Functions | |
bool | moveFocus () |
move focus to current row | |
void | updateIndexLabel () |
update index labels | |
Protected Attributes | |
FXButton * | myAddButton = nullptr |
add button | |
std::vector< Column * > | myColumns |
columns | |
FXHorizontalFrame * | myColumnsFrame = nullptr |
horizontal columns frame | |
int | myCurrentSelectedRow = -1 |
current selected row | |
GUIDialog_ViewSettings * | myDialogViewSettings = nullptr |
@frame pointer to GUIDialog_ViewSettings parent | |
FXFont * | myIndexFont = nullptr |
font for index | |
FXFont * | myIndexSelectedFont = nullptr |
font for index selected | |
std::vector< Row * > | myRows |
rows | |
Private Member Functions | |
MFXDecalsTable (const MFXDecalsTable &)=delete | |
Invalidated duplicate constructor. | |
MFXDecalsTable & | operator= (const MFXDecalsTable &)=delete |
Invalidated assignment operator. | |
Definition at line 40 of file MFXDecalsTable.h.
MFXDecalsTable::MFXDecalsTable | ( | GUIDialog_ViewSettings * | dialogViewSettingsParent, |
FXComposite * | parent | ||
) |
fox declaration
constructor (Exactly like the FXButton constructor)
Definition at line 65 of file MFXDecalsTable.cpp.
References ADD, GUIDesigns::buildFXButton(), GUIIconSubSys::getIcon(), GUIDesignAuxiliarFrame, GUIDesignButtonIcon, MID_DECALSTABLE_ADD, and TL.
MFXDecalsTable::~MFXDecalsTable | ( | ) |
destructor (Called automatically)
Definition at line 78 of file MFXDecalsTable.cpp.
References myIndexFont, and myIndexSelectedFont.
|
privatedelete |
Invalidated duplicate constructor.
void MFXDecalsTable::clearTable | ( | ) |
clear table
Definition at line 86 of file MFXDecalsTable.cpp.
References myColumns, and myRows.
Referenced by fillTable().
void MFXDecalsTable::fillTable | ( | ) |
fill table
Definition at line 102 of file MFXDecalsTable.cpp.
References clearTable(), GUISUMOAbstractView::getDecals(), GUIDialog_ViewSettings::getSUMOAbstractView(), GUIDesignHeight, MAXROWS, myColumns, myDialogViewSettings, myRows, and toString().
Referenced by GUIDialog_ViewSettings::loadDecals(), GUIDialog_ViewSettings::loadSettings(), onCmdAddRow(), GUIDialog_ViewSettings::onCmdClearDecals(), onCmdRemoveRow(), and GUIDialog_ViewSettings::show().
int MFXDecalsTable::getCurrentSelectedRow | ( | ) | const |
Get current selected row.
Definition at line 181 of file MFXDecalsTable.cpp.
References myCurrentSelectedRow.
std::string MFXDecalsTable::getItemText | ( | const int | row, |
const int | column | ||
) | const |
Return cell text.
Definition at line 165 of file MFXDecalsTable.cpp.
int MFXDecalsTable::getNumRows | ( | ) | const |
|
protected |
move focus to current row
Definition at line 432 of file MFXDecalsTable.cpp.
References myCurrentSelectedRow, and myRows.
Referenced by onCmdKeyPress().
long MFXDecalsTable::onCmdAddRow | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when add row button is pressed
Definition at line 374 of file MFXDecalsTable.cpp.
References fillTable(), GUISUMOAbstractView::getDecals(), GUIDialog_ViewSettings::getSUMOAbstractView(), and myDialogViewSettings.
Referenced by FXDEFMAP().
long MFXDecalsTable::onCmdEditRowCheckBox | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
called when a checkBox is updated
Definition at line 318 of file MFXDecalsTable.cpp.
References GUISUMOAbstractView::getDecals(), GUIDialog_ViewSettings::getSUMOAbstractView(), myDialogViewSettings, and myRows.
Referenced by FXDEFMAP().
long MFXDecalsTable::onCmdEditRowSpinner | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
called when a spinner is updated
Definition at line 300 of file MFXDecalsTable.cpp.
References GUISUMOAbstractView::getDecals(), GUIDialog_ViewSettings::getSUMOAbstractView(), myDialogViewSettings, and myRows.
Referenced by FXDEFMAP().
long MFXDecalsTable::onCmdEditRowString | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
called when a string is updated
Definition at line 271 of file MFXDecalsTable.cpp.
References GUISUMOAbstractView::getDecals(), GUIDialog_ViewSettings::getSUMOAbstractView(), myDialogViewSettings, myRows, and StringUtils::toDouble().
Referenced by FXDEFMAP().
long MFXDecalsTable::onCmdKeyPress | ( | FXObject * | sender, |
FXSelector | sel, | ||
void * | ptr | ||
) |
called when a key is pressed
Definition at line 233 of file MFXDecalsTable.cpp.
References moveFocus(), myCurrentSelectedRow, myRows, and updateIndexLabel().
Referenced by FXDEFMAP().
long MFXDecalsTable::onCmdOpenDecal | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
called when open decal button is pressed
Definition at line 338 of file MFXDecalsTable.cpp.
References gCurrentFolder, GUISUMOAbstractView::getDecals(), GUIIconSubSys::getIcon(), GUIDialog_ViewSettings::getSUMOAbstractView(), myDialogViewSettings, myRows, OPEN, and TL.
Referenced by FXDEFMAP().
long MFXDecalsTable::onCmdRemoveRow | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
called when remove row button is pressed
Definition at line 394 of file MFXDecalsTable.cpp.
References fillTable(), GUISUMOAbstractView::getDecals(), GUIDialog_ViewSettings::getSUMOAbstractView(), myDialogViewSettings, and myRows.
Referenced by FXDEFMAP().
long MFXDecalsTable::onFocusRow | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
called when a row is focused
Definition at line 210 of file MFXDecalsTable.cpp.
References myCurrentSelectedRow, myRows, and updateIndexLabel().
Referenced by FXDEFMAP().
long MFXDecalsTable::onUpdAddRow | ( | FXObject * | sender, |
FXSelector | , | ||
void * | ptr | ||
) |
update add row button
Definition at line 384 of file MFXDecalsTable.cpp.
References GUISUMOAbstractView::getDecals(), GUIDialog_ViewSettings::getSUMOAbstractView(), MAXROWS, and myDialogViewSettings.
Referenced by FXDEFMAP().
|
privatedelete |
Invalidated assignment operator.
void MFXDecalsTable::selectRow | ( | const int | rowIndex | ) |
Select a row.
Definition at line 187 of file MFXDecalsTable.cpp.
References myCurrentSelectedRow, myRows, TL, and updateIndexLabel().
void MFXDecalsTable::setColumnLabel | ( | const int | column, |
const std::string & | text, | ||
const std::string & | tooltip = "" |
||
) |
Change column header text.
Definition at line 200 of file MFXDecalsTable.cpp.
void MFXDecalsTable::setItemText | ( | FXint | row, |
FXint | column, | ||
const std::string & | text | ||
) |
Modify cell text.
Definition at line 154 of file MFXDecalsTable.cpp.
|
protected |
update index labels
Definition at line 414 of file MFXDecalsTable.cpp.
References myCurrentSelectedRow, and myRows.
Referenced by onCmdKeyPress(), onFocusRow(), and selectRow().
|
protected |
add button
Definition at line 308 of file MFXDecalsTable.h.
|
protected |
columns
Definition at line 302 of file MFXDecalsTable.h.
Referenced by clearTable(), fillTable(), getItemText(), MFXDecalsTable::Row::Row(), setColumnLabel(), and setItemText().
|
protected |
horizontal columns frame
Definition at line 290 of file MFXDecalsTable.h.
Referenced by MFXDecalsTable::Column::Column().
|
protected |
current selected row
Definition at line 311 of file MFXDecalsTable.h.
Referenced by getCurrentSelectedRow(), moveFocus(), onCmdKeyPress(), onFocusRow(), selectRow(), and updateIndexLabel().
|
protected |
@frame pointer to GUIDialog_ViewSettings parent
Definition at line 299 of file MFXDecalsTable.h.
Referenced by MFXDecalsTable::Column::Column(), fillTable(), onCmdAddRow(), onCmdEditRowCheckBox(), onCmdEditRowSpinner(), onCmdEditRowString(), onCmdOpenDecal(), onCmdRemoveRow(), and onUpdAddRow().
|
protected |
font for index
Definition at line 293 of file MFXDecalsTable.h.
Referenced by MFXDecalsTable::Row::Row(), and ~MFXDecalsTable().
|
protected |
font for index selected
Definition at line 296 of file MFXDecalsTable.h.
Referenced by MFXDecalsTable::Row::Row(), and ~MFXDecalsTable().
|
protected |
rows
Definition at line 305 of file MFXDecalsTable.h.
Referenced by clearTable(), fillTable(), getItemText(), getNumRows(), moveFocus(), onCmdEditRowCheckBox(), onCmdEditRowSpinner(), onCmdEditRowString(), onCmdKeyPress(), onCmdOpenDecal(), onCmdRemoveRow(), onFocusRow(), MFXDecalsTable::Row::Row(), selectRow(), setItemText(), and updateIndexLabel().