SUMO - Simulation of Urban MObility

GUIDialog_GLObjChooser.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Class for the window that allows to choose a street, junction or vehicle
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 GUIDialog_GLObjChooser_h
00020 #define GUIDialog_GLObjChooser_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 <string>
00033 #include <vector>
00034 #include <set>
00035 #include <fx.h>
00036 #include <utils/gui/globjects/GUIGlObject.h>
00037 
00038 
00039 // ===========================================================================
00040 // class declarations
00041 // ===========================================================================
00042 class GUIGlChildWindow;
00043 class GUIGlObjectStorage;
00044 class GUIGlObject;
00045 
00046 
00047 // ===========================================================================
00048 // class definition
00049 // ===========================================================================
00056 class GUIDialog_GLObjChooser : public FXMainWindow {
00057     // FOX-declarations
00058     FXDECLARE(GUIDialog_GLObjChooser)
00059 
00060 public:
00068     GUIDialog_GLObjChooser(GUIGlChildWindow* parent, FXIcon* icon, const FXString& title,
00069                            GUIGlObjectType type,
00070                            const std::vector<GUIGlID> &ids,
00071                            GUIGlObjectStorage& glStorage);
00072 
00073 
00075     ~GUIDialog_GLObjChooser() throw();
00076 
00077 
00081     GUIGlObject* getObject() const throw() {
00082         return static_cast<GUIGlObject*>(mySelected);
00083     }
00084 
00085 
00086 
00089 
00091     long onCmdCenter(FXObject*,FXSelector,void*);
00092 
00094     long onCmdClose(FXObject*,FXSelector,void*);
00095 
00097     long onChgText(FXObject*,FXSelector,void*);
00098 
00100     long onCmdText(FXObject*,FXSelector,void*);
00101 
00103     long onListKeyPress(FXObject*,FXSelector,void*);
00105 
00106 
00107 private:
00109     FXList* myList;
00110 
00112     GUIGlObjectType myObjectType;
00113 
00115     GUIGlChildWindow* myParent;
00116 
00118     GUIGlObject* mySelected;
00119 
00121     FXTextField* myTextEntry;
00122 
00124     //volatile pointers to GUIGlObject
00125     std::set<GUIGlID> myIDs;
00126 
00127 
00128 protected:
00130     GUIDialog_GLObjChooser() { }
00131 
00132 };
00133 
00134 
00135 #endif
00136 
00137 /****************************************************************************/
00138 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines