SUMO - Simulation of Urban MObility
GUIDialog_EditViewport.h
Go to the documentation of this file.
00001 /****************************************************************************/
00008 // A dialog to change the viewport
00009 /****************************************************************************/
00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00012 /****************************************************************************/
00013 //
00014 //   This file is part of SUMO.
00015 //   SUMO is free software: you can redistribute it and/or modify
00016 //   it under the terms of the GNU General Public License as published by
00017 //   the Free Software Foundation, either version 3 of the License, or
00018 //   (at your option) any later version.
00019 //
00020 /****************************************************************************/
00021 #ifndef GUIDialog_EditViewport_h
00022 #define GUIDialog_EditViewport_h
00023 
00024 
00025 // ===========================================================================
00026 // included modules
00027 // ===========================================================================
00028 #ifdef _MSC_VER
00029 #include <windows_config.h>
00030 #else
00031 #include <config.h>
00032 #endif
00033 
00034 #include <fx.h>
00035 #include <utils/foxtools/FXRealSpinDial.h>
00036 
00037 
00038 // ===========================================================================
00039 // class declarations
00040 // ===========================================================================
00041 class GUISUMOAbstractView;
00042 
00043 
00044 // ===========================================================================
00045 // class definitions
00046 // ===========================================================================
00051 class GUIDialog_EditViewport : public FXDialogBox {
00052     // FOX-declarations
00053     FXDECLARE(GUIDialog_EditViewport)
00054 public:
00056     enum {
00057         MID_CHANGED = FXDialogBox::ID_LAST,
00058         MID_OK,
00059         MID_CANCEL,
00060         MID_LOAD,
00061         MID_SAVE
00062     };
00063 
00064 
00074     GUIDialog_EditViewport(GUISUMOAbstractView* parent,  const char* name,
00075                            SUMOReal zoom, SUMOReal xoff, SUMOReal yoff, int x, int y) ;
00076 
00077 
00079     ~GUIDialog_EditViewport() ;
00080 
00081 
00082 
00085 
00087     long onCmdChanged(FXObject*, FXSelector, void*);
00088 
00090     long onCmdOk(FXObject*, FXSelector, void*);
00091 
00093     long onCmdCancel(FXObject*, FXSelector, void*);
00094 
00096     long onCmdLoad(FXObject*, FXSelector, void*);
00097 
00099     long onCmdSave(FXObject*, FXSelector, void*);
00101 
00102 
00103 
00109     void setValues(SUMOReal zoom, SUMOReal xoff, SUMOReal yoff) ;
00110 
00111 
00117     void setOldValues(SUMOReal zoom, SUMOReal xoff, SUMOReal yoff) ;
00118 
00119 
00123     bool haveGrabbed() const ;
00124 
00125 
00126 protected:
00128     GUISUMOAbstractView* myParent;
00129 
00131     SUMOReal myOldZoom;
00132 
00134     SUMOReal myOldXOff, myOldYOff;
00135 
00137     FXRealSpinDial* myZoom, *myXOff, *myYOff;
00138 
00139 
00140 protected:
00142     GUIDialog_EditViewport() { }
00143 
00144 };
00145 
00146 
00147 #endif
00148 
00149 /****************************************************************************/
00150 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines