SUMO - Simulation of Urban MObility
|
A dialog to change the viewport. More...
#include <GUIDialog_EditViewport.h>
Public Types | |
enum | { MID_CHANGED = FXDialogBox::ID_LAST, MID_OK, MID_CANCEL, MID_LOAD, MID_SAVE } |
FOX-callback enumerations. More... |
Public Member Functions | |
GUIDialog_EditViewport (GUISUMOAbstractView *parent, const char *name, SUMOReal zoom, SUMOReal xoff, SUMOReal yoff, int x, int y) | |
Constructor. | |
bool | haveGrabbed () const |
Returns the information whether one of the spin dialers is grabbed. | |
void | setOldValues (SUMOReal zoom, SUMOReal xoff, SUMOReal yoff) |
Resets old values. | |
void | setValues (SUMOReal zoom, SUMOReal xoff, SUMOReal yoff) |
Sets the given values into the dialog. | |
~GUIDialog_EditViewport () | |
Destructor. | |
FOX-callbacks | |
long | onCmdChanged (FXObject *, FXSelector, void *) |
Called when the user changes the viewport. | |
long | onCmdOk (FXObject *, FXSelector, void *) |
Called when the user wants to keep the viewport. | |
long | onCmdCancel (FXObject *, FXSelector, void *) |
Called when the user wants to restore the viewport. | |
long | onCmdLoad (FXObject *, FXSelector, void *) |
Called when the user wants to load a viewport. | |
long | onCmdSave (FXObject *, FXSelector, void *) |
Called when the user wants to save a viewport. |
Protected Member Functions | |
GUIDialog_EditViewport () | |
FOX needs this. |
Protected Attributes | |
SUMOReal | myOldXOff |
The old offsets. | |
SUMOReal | myOldYOff |
SUMOReal | myOldZoom |
The old zoom. | |
GUISUMOAbstractView * | myParent |
The calling view. | |
FXRealSpinDial * | myXOff |
FXRealSpinDial * | myYOff |
FXRealSpinDial * | myZoom |
The spin dialers used to change the view. |
A dialog to change the viewport.
Definition at line 51 of file GUIDialog_EditViewport.h.
anonymous enum |
FOX-callback enumerations.
Definition at line 56 of file GUIDialog_EditViewport.h.
GUIDialog_EditViewport::GUIDialog_EditViewport | ( | GUISUMOAbstractView * | parent, |
const char * | name, | ||
SUMOReal | zoom, | ||
SUMOReal | xoff, | ||
SUMOReal | yoff, | ||
int | x, | ||
int | y | ||
) |
Constructor.
[in] | parent | The view to change |
[in] | name | This dialog's caption |
[in] | zoom | Current view's zoom |
[in] | xoff | Current view's x-offset |
[in] | yoff | Current view's y-offset |
[in] | x | x-position to show the dialog at |
[in] | y | y-position to show the dialog at |
Definition at line 65 of file GUIDialog_EditViewport.cpp.
References GUIIconSubSys::getIcon(), ICON_EMPTY, ICON_OPEN_CONFIG, ICON_SAVE, MID_CANCEL, MID_LOAD, MID_OK, and MID_SAVE.
GUIDialog_EditViewport::~GUIDialog_EditViewport | ( | ) |
Destructor.
Definition at line 117 of file GUIDialog_EditViewport.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 142 of file GUIDialog_EditViewport.h.
bool GUIDialog_EditViewport::haveGrabbed | ( | ) | const |
Returns the information whether one of the spin dialers is grabbed.
Definition at line 211 of file GUIDialog_EditViewport.cpp.
References myXOff, myYOff, and myZoom.
Referenced by GUISUMOAbstractView::onMouseMove().
Called when the user wants to restore the viewport.
Definition at line 129 of file GUIDialog_EditViewport.cpp.
References myOldXOff, myOldYOff, myOldZoom, myParent, and GUISUMOAbstractView::setViewport().
Called when the user changes the viewport.
Definition at line 137 of file GUIDialog_EditViewport.cpp.
References myParent, myXOff, myYOff, myZoom, GUISUMOAbstractView::setViewport(), and SUMOReal.
Called when the user wants to load a viewport.
Definition at line 144 of file GUIDialog_EditViewport.cpp.
References gCurrentFolder, GUIIconSubSys::getIcon(), ICON_EMPTY, myParent, setValues(), GUISUMOAbstractView::setViewport(), and SUMOReal.
Called when the user wants to keep the viewport.
Definition at line 121 of file GUIDialog_EditViewport.cpp.
References myParent, myXOff, myYOff, myZoom, GUISUMOAbstractView::setViewport(), and SUMOReal.
Called when the user wants to save a viewport.
Definition at line 167 of file GUIDialog_EditViewport.cpp.
References gCurrentFolder, OutputDevice::getDevice(), GUIIconSubSys::getIcon(), ICON_EMPTY, myXOff, myYOff, myZoom, and MFXUtils::userPermitsOverwritingWhenFileExists().
Resets old values.
[in] | zoom | Current view's zoom |
[in] | xoff | Current view's x-offset |
[in] | yoff | Current view's y-offset |
Definition at line 200 of file GUIDialog_EditViewport.cpp.
References myOldXOff, myOldYOff, myOldZoom, myXOff, myYOff, and myZoom.
Referenced by GUISUMOAbstractView::showViewportEditor().
Sets the given values into the dialog.
[in] | zoom | Current view's zoom |
[in] | xoff | Current view's x-offset |
[in] | yoff | Current view's y-offset |
Definition at line 192 of file GUIDialog_EditViewport.cpp.
References myXOff, myYOff, and myZoom.
Referenced by onCmdLoad(), and GUISUMOAbstractView::onMouseMove().
|
protected |
The old offsets.
Definition at line 134 of file GUIDialog_EditViewport.h.
Referenced by onCmdCancel(), and setOldValues().
|
protected |
Definition at line 134 of file GUIDialog_EditViewport.h.
Referenced by onCmdCancel(), and setOldValues().
|
protected |
The old zoom.
Definition at line 131 of file GUIDialog_EditViewport.h.
Referenced by onCmdCancel(), and setOldValues().
|
protected |
The calling view.
Definition at line 128 of file GUIDialog_EditViewport.h.
Referenced by onCmdCancel(), onCmdChanged(), onCmdLoad(), and onCmdOk().
|
protected |
Definition at line 137 of file GUIDialog_EditViewport.h.
Referenced by haveGrabbed(), onCmdChanged(), onCmdOk(), onCmdSave(), setOldValues(), and setValues().
|
protected |
Definition at line 137 of file GUIDialog_EditViewport.h.
Referenced by haveGrabbed(), onCmdChanged(), onCmdOk(), onCmdSave(), setOldValues(), and setValues().
|
protected |
The spin dialers used to change the view.
Definition at line 137 of file GUIDialog_EditViewport.h.
Referenced by haveGrabbed(), onCmdChanged(), onCmdOk(), onCmdSave(), setOldValues(), and setValues().