44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
67 :
FXMainWindow(app.getApp(), (o.getFullName() + " Parameter").c_str(),
68 NULL, NULL, DECOR_ALL, 20, 20, 500, (FXint)(noRows * 20 + 60)),
70 myApplication(&app), myCurrentPos(0) {
71 myTable =
new FXTable(
this,
this,
MID_TABLE, TABLE_COL_SIZABLE | TABLE_ROW_SIZABLE | LAYOUT_FILL_X | LAYOUT_FILL_Y);
72 myTable->setVisibleRows((FXint)(noRows + 1));
73 myTable->setVisibleColumns(3);
74 myTable->setTableSize((FXint)(noRows + 1), 3);
75 myTable->setBackColor(FXRGB(255, 255, 255));
76 myTable->setColumnText(0,
"Name");
77 myTable->setColumnText(1,
"Value");
78 myTable->setColumnText(2,
"Dynamic");
79 myTable->getRowHeader()->setWidth(0);
80 FXHeader* header = myTable->getColumnHeader();
81 header->setItemJustify(0, JUSTIFY_CENTER_X);
82 header->setItemSize(0, 240);
83 header->setItemJustify(1, JUSTIFY_CENTER_X);
84 header->setItemSize(1, 120);
85 header->setItemJustify(2, JUSTIFY_CENTER_X);
86 header->setItemSize(2, 60);
89 myObject->addParameterTable(
this);
97 for (std::vector<GUIParameterTableItemInterface*>::iterator i =
myItems.begin(); i !=
myItems.end(); ++i) {
139 myTable->onLeftBtnPress(sender, sel, data);
140 int row =
myTable->getCurrentRow();
141 if (row == -1 || row >= (
int)(
myItems.size())) {
152 p->setX(static_cast<FXEvent*>(data)->root_x);
153 p->setY(static_cast<FXEvent*>(data)->root_y);
225 for (std::vector<GUIParameterTableItemInterface*>::iterator i =
myItems.begin(); i !=
myItems.end(); i++) {
void removeObject(GUIGlObject *const o)
Lets this window know the object shown is being deleted.
unsigned myCurrentPos
The index of the next row to add - used while building.
FXTable * myTable
The table to display the information in.
GUIMainWindow * myApplication
The main application window.
A Tracker shall be opened.
A Simulation step was performed.
virtual const std::string & getName() const =0
Returns the name of the value.
void updateTable()
Updates the table.
void removeParameterTable(GUIParameterTableWindow *w)
Lets this object know a parameter window showing the object's values was closed.
void addChild(FXMDIChild *child, bool updateOnSimStep=true)
Adds a further child window to the list.
virtual ValueSource< SUMOReal > * getSUMORealSourceCopy() const =0
Returns a SUMOReal-typed copy of the value-source.
Interface to a single line in a parameter window.
long onRightButtonPress(FXObject *, FXSelector, void *)
Shows a popup.
void removeChild(FXMDIChild *child)
removes the given child window from the list
long onSimStep(FXObject *, FXSelector, void *)
Updates the table due to a simulation step.
void unlock()
release mutex lock
long onTableDeselected(FXObject *, FXSelector, void *)
Does nothing.
~GUIParameterTableWindow()
Destructor.
MFXMutex myLock
A lock assuring save updates in cse of object deletion.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
virtual bool dynamic() const =0
Returns the information whether the value changes over simulation time.
GUIGlObject * myObject
The object to get the information from.
Instance of a single line in a parameter window.
long onTableSelected(FXObject *, FXSelector, void *)
Does nothing.
std::vector< GUIParameterTableItemInterface * > myItems
The list of table rows.
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
void closeBuilding()
Closes the building of the table.
A window containing a gl-object's parameter.
static FXIcon * getIcon(GUIIcon which)
FXDEFMAP(GUIParameterTableWindow) GUIParameterTableWindowMap[]