SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // A wrapper for tl-logics to allow their visualisation and interaction 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef GUITrafficLightLogicWrapper_h 00023 #define GUITrafficLightLogicWrapper_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <gui/GUITLLogicPhasesTrackerWindow.h> 00036 #include <utils/gui/globjects/GUIGlObject.h> 00037 #include <utils/gui/globjects/GUIGLObjectPopupMenu.h> 00038 00039 00040 // =========================================================================== 00041 // class declarations 00042 // =========================================================================== 00043 class MSTrafficLightLogic; 00044 class GUIMainWindow; 00045 00046 00047 // =========================================================================== 00048 // class definition 00049 // =========================================================================== 00055 class GUITrafficLightLogicWrapper : public GUIGlObject { 00056 public: 00058 GUITrafficLightLogicWrapper(MSTLLogicControl& control, MSTrafficLightLogic& tll) ; 00059 00061 ~GUITrafficLightLogicWrapper() ; 00062 00063 00064 00066 00067 00075 GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, 00076 GUISUMOAbstractView& parent) ; 00077 00078 00086 GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, 00087 GUISUMOAbstractView& parent) ; 00088 00089 00095 Boundary getCenteringBoundary() const ; 00096 00097 00102 void drawGL(const GUIVisualizationSettings& s) const ; 00104 00105 00107 void begin2TrackPhases(); 00108 00110 void showPhases(); 00111 00113 void switchTLSLogic(int to); 00114 00116 int getLinkIndex(const MSLink* const link) const; 00117 00118 00119 public: 00125 class GUITrafficLightLogicWrapperPopupMenu : public GUIGLObjectPopupMenu { 00126 FXDECLARE(GUITrafficLightLogicWrapperPopupMenu) 00127 public: 00129 GUITrafficLightLogicWrapperPopupMenu(GUIMainWindow& app, 00130 GUISUMOAbstractView& parent, GUIGlObject& o); 00131 00133 ~GUITrafficLightLogicWrapperPopupMenu() ; 00134 00136 long onCmdShowPhases(FXObject*, FXSelector, void*); 00137 00139 long onCmdBegin2TrackPhases(FXObject*, FXSelector, void*); 00140 00141 long onCmdSwitchTLS2Off(FXObject*, FXSelector, void*); 00142 long onCmdSwitchTLSLogic(FXObject*, FXSelector, void*); 00143 00144 protected: 00146 GUITrafficLightLogicWrapperPopupMenu() { } 00147 00148 }; 00149 00150 private: 00152 MSTLLogicControl& myTLLogicControl; 00153 00155 MSTrafficLightLogic& myTLLogic; 00156 00158 GUIMainWindow* myApp; 00159 00160 }; 00161 00162 00163 #endif 00164 00165 /****************************************************************************/ 00166