GUIDialog_EditViewport.cpp File Reference


Detailed Description

Author:
Daniel Krajzewicz
Date:
Mon, 25.04.2005
Version:
Id
GUIDialog_EditViewport.cpp 8236 2010-02-10 11:16:41Z behrisch

Definition in file GUIDialog_EditViewport.cpp.

#include <config.h>
#include "GUIDialog_EditViewport.h"
#include <utils/gui/windows/GUIAppGlobals.h>
#include "GUISUMOAbstractView.h"
#include <utils/foxtools/FXRealSpinDial.h>
#include <utils/gui/windows/GUIAppEnum.h>
#include <utils/gui/images/GUIIconSubSys.h>
#include <utils/gui/settings/GUISettingsHandler.h>
#include <utils/gui/div/GUIIOGlobals.h>
#include <utils/foxtools/MFXUtils.h>

Go to the source code of this file.

Functions

 FXDEFMAP (GUIDialog_EditViewport) GUIDialog_EditViewportMap[]
 FXIMPLEMENT (GUIDialog_EditViewport, FXDialogBox, GUIDialog_EditViewportMap, ARRAYNUMBER(GUIDialog_EditViewportMap)) GUIDialog_EditViewport


Function Documentation

FXDEFMAP ( GUIDialog_EditViewport   ) 

FXIMPLEMENT ( GUIDialog_EditViewport  ,
FXDialogBox  ,
GUIDialog_EditViewportMap  ,
ARRAYNUMBER(GUIDialog_EditViewportMap)   
)

Definition at line 58 of file GUIDialog_EditViewport.cpp.

References GUIIconSubSys::getIcon(), ICON_EMPTY, ICON_OPEN_CONFIG, ICON_SAVE, GUIDialog_EditViewport::MID_CANCEL, GUIDialog_EditViewport::MID_LOAD, GUIDialog_EditViewport::MID_OK, and GUIDialog_EditViewport::MID_SAVE.

00066         : FXDialogBox(parent, name, DECOR_TITLE|DECOR_BORDER, x, y, 0, 0),
00067         myParent(parent), myOldZoom(zoom), myOldXOff(xoff), myOldYOff(yoff) {
00068     FXVerticalFrame *f1 = new FXVerticalFrame(this, LAYOUT_TOP|FRAME_NONE|LAYOUT_FILL_X, 0,0,0,0, 0,0,1,1);
00069     {
00070         FXHorizontalFrame *frame0 =
00071             new FXHorizontalFrame(f1,FRAME_THICK, 0,0,0,0, 0,0,0,0, 2,2);
00072         new FXButton(frame0,"\t\tLoad viewport from file",
00073                      GUIIconSubSys::getIcon(ICON_OPEN_CONFIG), this, GUIDialog_EditViewport::MID_LOAD,
00074                      ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT);
00075         new FXButton(frame0,"\t\tSave viewport to file",
00076                      GUIIconSubSys::getIcon(ICON_SAVE), this, GUIDialog_EditViewport::MID_SAVE,
00077                      ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT);
00078     }
00079     FXMatrix *m1 = new FXMatrix(f1, 2, MATRIX_BY_COLUMNS);
00080     {
00081         new FXLabel(m1, "Zoom:", 0, LAYOUT_CENTER_Y);
00082         myZoom = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y|LAYOUT_TOP|FRAME_SUNKEN|FRAME_THICK);
00083         myZoom->setRange(0.0001, 100000);
00084         myZoom->setNumberFormat(4);
00085         myZoom->setValue(zoom);
00086     }
00087     {
00088         new FXLabel(m1, "X Offset:", 0, LAYOUT_CENTER_Y);
00089         myXOff = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y|LAYOUT_TOP|FRAME_SUNKEN|FRAME_THICK);
00090         myXOff->setRange(-1000000, 1000000);
00091         myXOff->setNumberFormat(4);
00092         myXOff->setValue(xoff);
00093     }
00094     {
00095         new FXLabel(m1, "Y Offset:", 0, LAYOUT_CENTER_Y);
00096         myYOff = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y|LAYOUT_TOP|FRAME_SUNKEN|FRAME_THICK);
00097         myYOff->setRange(-1000000, 1000000);
00098         myYOff->setNumberFormat(4);
00099         myYOff->setValue(yoff);
00100     }
00101     // ok/cancel
00102     new FXHorizontalSeparator(f1,SEPARATOR_GROOVE|LAYOUT_FILL_X);
00103     FXHorizontalFrame *f6 = new FXHorizontalFrame(f1, LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0,0,0,0, 10,10,5,0);
00104     FXButton *initial =
00105         new FXButton(f6, "&OK", NULL, this, GUIDialog_EditViewport::MID_OK,
00106                      BUTTON_INITIAL|BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X,
00107                      0,0,0,0,  4,4,3,3);
00108     new FXButton(f6,"&Cancel", NULL, this, GUIDialog_EditViewport::MID_CANCEL,
00109                  FRAME_RAISED|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_CENTER_X,
00110                  0,0,0,0,  4,4,3,3);
00111     initial->setFocus();
00112     setIcon(GUIIconSubSys::getIcon(ICON_EMPTY));
00113 }


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