|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // A wrapper for tl-logics to allow their visualisation and interaction 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors 00011 /****************************************************************************/ 00012 // 00013 // This program is free software; you can redistribute it and/or modify 00014 // it under the terms of the GNU General Public License as published by 00015 // the Free Software Foundation; either version 2 of the License, or 00016 // (at your option) any later version. 00017 // 00018 /****************************************************************************/ 00019 #ifndef GUITrafficLightLogicWrapper_h 00020 #define GUITrafficLightLogicWrapper_h 00021 00022 00023 // =========================================================================== 00024 // included modules 00025 // =========================================================================== 00026 #ifdef _MSC_VER 00027 #include <windows_config.h> 00028 #else 00029 #include <config.h> 00030 #endif 00031 00032 #include <gui/GUITLLogicPhasesTrackerWindow.h> 00033 #include <utils/gui/globjects/GUIGlObject.h> 00034 #include <utils/gui/globjects/GUIGLObjectPopupMenu.h> 00035 00036 00037 // =========================================================================== 00038 // class declarations 00039 // =========================================================================== 00040 class MSTrafficLightLogic; 00041 class GUIMainWindow; 00042 00043 00044 // =========================================================================== 00045 // class definition 00046 // =========================================================================== 00052 class GUITrafficLightLogicWrapper : public GUIGlObject { 00053 public: 00055 GUITrafficLightLogicWrapper(MSTLLogicControl& control, MSTrafficLightLogic& tll) throw(); 00056 00058 ~GUITrafficLightLogicWrapper() throw(); 00059 00060 00061 00063 00064 00072 GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, 00073 GUISUMOAbstractView& parent) throw(); 00074 00075 00083 GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, 00084 GUISUMOAbstractView& parent) throw(); 00085 00086 00092 Boundary getCenteringBoundary() const throw(); 00093 00094 00099 void drawGL(const GUIVisualizationSettings& s) const throw(); 00101 00102 00104 void begin2TrackPhases(); 00105 00107 void showPhases(); 00108 00110 void switchTLSLogic(int to); 00111 00113 int getLinkIndex(const MSLink* const link) const; 00114 00115 00116 public: 00122 class GUITrafficLightLogicWrapperPopupMenu : public GUIGLObjectPopupMenu { 00123 FXDECLARE(GUITrafficLightLogicWrapperPopupMenu) 00124 public: 00126 GUITrafficLightLogicWrapperPopupMenu(GUIMainWindow& app, 00127 GUISUMOAbstractView& parent, GUIGlObject& o); 00128 00130 ~GUITrafficLightLogicWrapperPopupMenu() throw(); 00131 00133 long onCmdShowPhases(FXObject*,FXSelector,void*); 00134 00136 long onCmdBegin2TrackPhases(FXObject*,FXSelector,void*); 00137 00138 long onCmdSwitchTLS2Off(FXObject*,FXSelector,void*); 00139 long onCmdSwitchTLSLogic(FXObject*,FXSelector,void*); 00140 00141 protected: 00143 GUITrafficLightLogicWrapperPopupMenu() { } 00144 00145 }; 00146 00147 private: 00149 MSTLLogicControl& myTLLogicControl; 00150 00152 MSTrafficLightLogic& myTLLogic; 00153 00155 GUIMainWindow* myApp; 00156 00157 }; 00158 00159 00160 #endif 00161 00162 /****************************************************************************/ 00163