GUITriggeredRerouter.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GUITriggeredRerouter_h
00020 #define GUITriggeredRerouter_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <vector>
00033 #include <string>
00034 #include <microsim/trigger/MSTriggeredRerouter.h>
00035 #include <utils/gui/globjects/GUIGlObject.h>
00036 #include <utils/gui/globjects/GUIGlObject_AbstractAdd.h>
00037 #include <utils/gui/globjects/GUIGLObjectPopupMenu.h>
00038 #include <utils/geom/Position2D.h>
00039 #include <gui/GUIManipulator.h>
00040 #include <utils/foxtools/FXRealSpinDial.h>
00041
00042
00043
00044
00045
00046 class MSNet;
00047 class MSEdge;
00048 class GUIManipulator;
00049
00050
00051
00052
00053
00058 class GUITriggeredRerouter
00059 : public MSTriggeredRerouter,
00060 public GUIGlObject_AbstractAdd {
00061 public:
00063 GUITriggeredRerouter(const std::string &id,
00064 const std::vector<MSEdge*> &edges, SUMOReal prob,
00065 const std::string &aXMLFilename, bool off);
00066
00067
00069 ~GUITriggeredRerouter() throw();
00070
00071
00072
00074
00075
00083 GUIGLObjectPopupMenu *getPopUpMenu(GUIMainWindow &app,
00084 GUISUMOAbstractView &parent) throw();
00085
00086
00094 GUIParameterTableWindow *getParameterWindow(GUIMainWindow &app,
00095 GUISUMOAbstractView &parent) throw();
00096
00097
00103 const std::string &getMicrosimID() const throw();
00104
00105
00111 Boundary getCenteringBoundary() const throw();
00112
00113
00118 void drawGL(const GUIVisualizationSettings &s) const throw();
00120
00121
00122
00123 GUIManipulator *openManipulator(GUIMainWindow &app,
00124 GUISUMOAbstractView &parent);
00125
00126 public:
00127 class GUITriggeredRerouterPopupMenu : public GUIGLObjectPopupMenu {
00128 FXDECLARE(GUITriggeredRerouterPopupMenu)
00129 public:
00130
00131 GUITriggeredRerouterPopupMenu(GUIMainWindow &app,
00132 GUISUMOAbstractView &parent, GUIGlObject &o);
00133
00134 ~GUITriggeredRerouterPopupMenu() throw();
00135
00137 long onCmdOpenManip(FXObject*,FXSelector,void*);
00138
00139 protected:
00140 GUITriggeredRerouterPopupMenu() { }
00141
00142 };
00143
00144
00145 class GUIManip_TriggeredRerouter : public GUIManipulator {
00146 FXDECLARE(GUIManip_TriggeredRerouter)
00147 public:
00148 enum {
00149 MID_USER_DEF = FXDialogBox::ID_LAST,
00150 MID_PRE_DEF,
00151 MID_OPTION,
00152 MID_CLOSE,
00153 ID_LAST
00154 };
00156 GUIManip_TriggeredRerouter(GUIMainWindow &app,
00157 const std::string &name, GUITriggeredRerouter &o,
00158 int xpos, int ypos);
00159
00161 virtual ~GUIManip_TriggeredRerouter();
00162
00163 long onCmdOverride(FXObject*,FXSelector,void*);
00164 long onCmdClose(FXObject*,FXSelector,void*);
00165 long onCmdUserDef(FXObject*,FXSelector,void*);
00166 long onUpdUserDef(FXObject*,FXSelector,void*);
00167 long onCmdChangeOption(FXObject*,FXSelector,void*);
00168
00169 private:
00170 GUIMainWindow *myParent;
00171
00172 FXint myChosenValue;
00173
00174 FXDataTarget myChosenTarget;
00175
00176 SUMOReal myUsageProbability;
00177
00178 FXRealSpinDial *myUsageProbabilityDial;
00179
00180 FXDataTarget myUsageProbabilityTarget;
00181
00182 GUITriggeredRerouter *myObject;
00183
00184 protected:
00185 GUIManip_TriggeredRerouter() { }
00186
00187 };
00188
00189 private:
00191 typedef std::vector<Position2D> PosCont;
00192
00194 typedef std::vector<SUMOReal> RotCont;
00195
00196 private:
00198 PosCont myFGPositions;
00199
00201 RotCont myFGRotations;
00202
00204 Boundary myBoundary;
00205
00206 };
00207
00208
00209 #endif
00210
00211
00212