SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // The window that holds the table of an object's parameter 00009 /****************************************************************************/ 00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00012 /****************************************************************************/ 00013 // 00014 // This file is part of SUMO. 00015 // SUMO is free software: you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation, either version 3 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 #ifndef GUIParameterTableWindow_h 00022 #define GUIParameterTableWindow_h 00023 00024 00025 // =========================================================================== 00026 // included modules 00027 // =========================================================================== 00028 #ifdef _MSC_VER 00029 #include <windows_config.h> 00030 #else 00031 #include <config.h> 00032 #endif 00033 00034 #include <vector> 00035 #include <string> 00036 #include <fx.h> 00037 #include <utils/foxtools/MFXMutex.h> 00038 #include <utils/common/ValueSource.h> 00039 #include <utils/common/SUMOTime.h> 00040 00041 00042 // =========================================================================== 00043 // class declarations 00044 // =========================================================================== 00045 class GUIGlObject; 00046 class GUIMainWindow; 00047 class GUIParameterTableItemInterface; 00048 00049 00050 // =========================================================================== 00051 // class definitions 00052 // =========================================================================== 00066 class GUIParameterTableWindow : public FXMainWindow { 00067 FXDECLARE(GUIParameterTableWindow) 00068 public: 00075 GUIParameterTableWindow(GUIMainWindow& app, 00076 GUIGlObject& o, size_t noRows) ; 00077 00078 00080 ~GUIParameterTableWindow() ; 00081 00082 00091 void closeBuilding() ; 00092 00093 00094 00098 void removeObject(GUIGlObject* const o) ; 00099 00100 00101 00104 00111 void mkItem(const char* name, bool dynamic, ValueSource<unsigned> *src) ; 00112 00113 00120 void mkItem(const char* name, bool dynamic, ValueSource<SUMOReal> *src) ; 00121 00122 00123 #ifndef HAVE_SUBSECOND_TIMESTEPS 00124 00130 void mkItem(const char* name, bool dynamic, ValueSource<SUMOTime> *src) ; 00131 #endif 00132 00140 void mkItem(const char* name, bool dynamic, std::string value) ; 00141 00142 00150 void mkItem(const char* name, bool dynamic, unsigned value) ; 00151 00152 00160 void mkItem(const char* name, bool dynamic, SUMOReal value) ; 00161 00162 00163 #ifndef HAVE_SUBSECOND_TIMESTEPS 00164 00171 void mkItem(const char* name, bool dynamic, SUMOTime value) ; 00172 #endif 00173 00174 00175 00176 00179 00181 long onSimStep(FXObject*, FXSelector, void*); 00182 00186 long onTableSelected(FXObject*, FXSelector, void*); 00187 00191 long onTableDeselected(FXObject*, FXSelector, void*); 00192 00202 long onRightButtonPress(FXObject*, FXSelector, void*); 00204 00205 00206 protected: 00213 void updateTable() ; 00214 00215 00216 private: 00218 GUIGlObject* myObject; 00219 00221 FXTable* myTable; 00222 00224 GUIMainWindow* myApplication; 00225 00227 std::vector<GUIParameterTableItemInterface*> myItems; 00228 00230 unsigned myCurrentPos; 00231 00233 mutable MFXMutex myLock; 00234 00235 protected: 00237 GUIParameterTableWindow() { } 00238 00239 }; 00240 00241 00242 #endif 00243 00244 /****************************************************************************/ 00245