SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Class for the window that allows to choose a street, junction or vehicle 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 GUIDialog_GLObjChooser_h 00023 #define GUIDialog_GLObjChooser_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 <string> 00036 #include <vector> 00037 #include <set> 00038 #include <fx.h> 00039 #include <utils/gui/globjects/GUIGlObject.h> 00040 00041 00042 // =========================================================================== 00043 // class declarations 00044 // =========================================================================== 00045 class GUIGlChildWindow; 00046 class GUIGlObjectStorage; 00047 class GUIGlObject; 00048 00049 00050 // =========================================================================== 00051 // class definition 00052 // =========================================================================== 00059 class GUIDialog_GLObjChooser : public FXMainWindow { 00060 // FOX-declarations 00061 FXDECLARE(GUIDialog_GLObjChooser) 00062 00063 public: 00071 GUIDialog_GLObjChooser(GUIGlChildWindow* parent, FXIcon* icon, const FXString& title, 00072 GUIGlObjectType type, 00073 const std::vector<GUIGlID> &ids, 00074 GUIGlObjectStorage& glStorage); 00075 00076 00078 ~GUIDialog_GLObjChooser() ; 00079 00080 00084 GUIGlObject* getObject() const { 00085 return static_cast<GUIGlObject*>(mySelected); 00086 } 00087 00088 00089 00092 00094 long onCmdCenter(FXObject*, FXSelector, void*); 00095 00097 long onCmdClose(FXObject*, FXSelector, void*); 00098 00100 long onChgText(FXObject*, FXSelector, void*); 00101 00103 long onCmdText(FXObject*, FXSelector, void*); 00104 00106 long onListKeyPress(FXObject*, FXSelector, void*); 00107 00109 long onCmdFilter(FXObject*, FXSelector, void*); 00111 00112 00113 private: 00115 FXList* myList; 00116 00118 GUIGlObjectType myObjectType; 00119 00121 GUIGlChildWindow* myParent; 00122 00124 GUIGlObject* mySelected; 00125 00127 FXTextField* myTextEntry; 00128 00130 //volatile pointers to GUIGlObject 00131 std::set<GUIGlID> myIDs; 00132 00133 00134 protected: 00136 GUIDialog_GLObjChooser() { } 00137 00138 }; 00139 00140 00141 #endif 00142 00143 /****************************************************************************/ 00144