SUMO - Simulation of Urban MObility

GUIDialog_GLObjChooser.h

Go to the documentation of this file.
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*);
00108 
00109 
00110 private:
00112     FXList* myList;
00113 
00115     GUIGlObjectType myObjectType;
00116 
00118     GUIGlChildWindow* myParent;
00119 
00121     GUIGlObject* mySelected;
00122 
00124     FXTextField* myTextEntry;
00125 
00127     //volatile pointers to GUIGlObject
00128     std::set<GUIGlID> myIDs;
00129 
00130 
00131 protected:
00133     GUIDialog_GLObjChooser() { }
00134 
00135 };
00136 
00137 
00138 #endif
00139 
00140 /****************************************************************************/
00141 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines