56 FXIMPLEMENT(
GUIParameterTableWindow, FXMainWindow, GUIParameterTableWindowMap, ARRAYNUMBER(GUIParameterTableWindowMap))
69 FXMainWindow(app.getApp(), (o.getFullName() +
" Parameter").c_str(), NULL, NULL, DECOR_ALL, 20, 20, 500, (FXint)(noRows * 20 + 60)),
71 myApplication(&app), myCurrentPos(0) {
72 myTable =
new FXTable(
this,
this,
MID_TABLE, TABLE_COL_SIZABLE | TABLE_ROW_SIZABLE | LAYOUT_FILL_X | LAYOUT_FILL_Y);
73 myTable->setVisibleRows((FXint)(noRows + 1));
75 myTable->setTableSize((FXint)(noRows + 1), 3);
76 myTable->setBackColor(FXRGB(255, 255, 255));
77 myTable->setColumnText(0,
"Name");
78 myTable->setColumnText(1,
"Value");
79 myTable->setColumnText(2,
"Dynamic");
80 myTable->getRowHeader()->setWidth(0);
81 FXHeader* header =
myTable->getColumnHeader();
82 header->setItemJustify(0, JUSTIFY_CENTER_X);
83 header->setItemSize(0, 240);
84 header->setItemJustify(1, JUSTIFY_CENTER_X);
85 header->setItemSize(1, 120);
86 header->setItemJustify(2, JUSTIFY_CENTER_X);
87 header->setItemSize(2, 60);
100 for (std::vector<GUIParameterTableItemInterface*>::iterator i =
myItems.begin(); i !=
myItems.end(); ++i) {
108 std::vector<GUIParameterTableWindow*>::iterator i = std::find(
myContainer.begin(),
myContainer.end(),
this);
148 myTable->onLeftBtnPress(sender, sel, data);
149 int row =
myTable->getCurrentRow();
150 if (row == -1 || row >= (
int)(
myItems.size())) {
164 p->setX(static_cast<FXEvent*>(data)->root_x);
165 p->setY(static_cast<FXEvent*>(data)->root_y);
233 long long int value) {
245 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.
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.
static MFXMutex myGlobalContainerLock
The mutex used to avoid concurrent updates of the instance container.
void addParameterTable(GUIParameterTableWindow *w)
Interface to a single line in a parameter window.
A Tracker shall be opened.
static std::vector< GUIParameterTableWindow * > myContainer
The container of items that shall be updated.
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.
GUIParameterTableWindow()
FOX needs this.
MFXMutex myLock
A lock assuring save updates in case 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.
virtual ValueSource< double > * getdoubleSourceCopy() const =0
Returns a double-typed copy of the value-source.
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.
A Simulation step was performed.
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)
returns a icon previously defined in the enum GUIIcon
FXDEFMAP(GUIParameterTableWindow) GUIParameterTableWindowMap[]