GUIDialog_EditViewport.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // A dialog to change the viewport
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 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_EditViewport_h
00020 #define GUIDialog_EditViewport_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 <fx.h>
00033 #include <utils/foxtools/FXRealSpinDial.h>
00034 
00035 
00036 // ===========================================================================
00037 // class declarations
00038 // ===========================================================================
00039 class GUISUMOAbstractView;
00040 
00041 
00042 // ===========================================================================
00043 // class definitions
00044 // ===========================================================================
00049 class GUIDialog_EditViewport : public FXDialogBox {
00050     // FOX-declarations
00051     FXDECLARE(GUIDialog_EditViewport)
00052 public:
00054     enum {
00055         MID_CHANGED = FXDialogBox::ID_LAST,
00056         MID_OK,
00057         MID_CANCEL,
00058         MID_LOAD,
00059         MID_SAVE
00060     };
00061 
00062 
00072     GUIDialog_EditViewport(GUISUMOAbstractView* parent,  const char* name,
00073                            SUMOReal zoom, SUMOReal xoff, SUMOReal yoff, int x, int y) throw();
00074 
00075 
00077     ~GUIDialog_EditViewport() throw();
00078 
00079 
00080 
00083 
00085     long onCmdChanged(FXObject*,FXSelector,void*);
00086 
00088     long onCmdOk(FXObject*,FXSelector,void*);
00089 
00091     long onCmdCancel(FXObject*,FXSelector,void*);
00092 
00094     long onCmdLoad(FXObject*,FXSelector,void*);
00095 
00097     long onCmdSave(FXObject*,FXSelector,void*);
00099 
00100 
00101 
00107     void setValues(SUMOReal zoom, SUMOReal xoff, SUMOReal yoff) throw();
00108 
00109 
00115     void setOldValues(SUMOReal zoom, SUMOReal xoff, SUMOReal yoff) throw();
00116 
00117 
00121     bool haveGrabbed() const throw();
00122 
00123 
00124 protected:
00126     GUISUMOAbstractView *myParent;
00127 
00129     SUMOReal myOldZoom;
00130 
00132     SUMOReal myOldXOff, myOldYOff;
00133 
00135     FXRealSpinDial *myZoom, *myXOff, *myYOff;
00136 
00137 
00138 protected:
00140     GUIDialog_EditViewport() { }
00141 
00142 };
00143 
00144 
00145 #endif
00146 
00147 /****************************************************************************/
00148 

Generated on Wed May 5 00:06:29 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6