|
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, int x, int y) | |
| Constructor. More... | |
| bool | haveGrabbed () const |
| Returns the information whether one of the spin dialers is grabbed. More... | |
| void | setOldValues (const Position &lookFrom, const Position &lookAt) |
| Resets old values. More... | |
| void | setValues (SUMOReal zoom, SUMOReal xoff, SUMOReal yoff) |
| Sets the given values into the dialog. More... | |
| void | setValues (const Position &lookFrom, const Position &lookAt) |
| Sets the given values into the dialog. More... | |
| ~GUIDialog_EditViewport () | |
| Destructor. More... | |
FOX-callbacks | |
| long | onCmdChanged (FXObject *, FXSelector, void *) |
| Called when the user changes the viewport. More... | |
| long | onCmdOk (FXObject *, FXSelector, void *) |
| Called when the user wants to keep the viewport. More... | |
| long | onCmdCancel (FXObject *, FXSelector, void *) |
| Called when the user wants to restore the viewport. More... | |
| long | onCmdLoad (FXObject *, FXSelector, void *) |
| Called when the user wants to load a viewport. More... | |
| long | onCmdSave (FXObject *, FXSelector, void *) |
| Called when the user wants to save a viewport. More... | |
Protected Member Functions | |
| GUIDialog_EditViewport () | |
| FOX needs this. More... | |
Protected Attributes | |
| Position | myOldLookAt |
| Position | myOldLookFrom |
| The old viewport. More... | |
| GUISUMOAbstractView * | myParent |
| The calling view. More... | |
| FXRealSpinDial * | myXOff |
| FXRealSpinDial * | myYOff |
| FXRealSpinDial * | myZoom |
| The spin dialers used to change the view. More... | |
A dialog to change the viewport.
Definition at line 52 of file GUIDialog_EditViewport.h.
| anonymous enum |
FOX-callback enumerations.
| Enumerator | |
|---|---|
| MID_CHANGED | |
| MID_OK | |
| MID_CANCEL | |
| MID_LOAD | |
| MID_SAVE | |
Definition at line 57 of file GUIDialog_EditViewport.h.
| GUIDialog_EditViewport::GUIDialog_EditViewport | ( | GUISUMOAbstractView * | parent, |
| const char * | name, | ||
| int | x, | ||
| int | y | ||
| ) |
Constructor.
| [in] | parent | The view to change |
| [in] | name | This dialog's caption |
| [in] | x | x-position to show the dialog at |
| [in] | y | y-position to show the dialog at |
Definition at line 66 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 135 of file GUIDialog_EditViewport.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 148 of file GUIDialog_EditViewport.h.
| bool GUIDialog_EditViewport::haveGrabbed | ( | ) | const |
Returns the information whether one of the spin dialers is grabbed.
Definition at line 256 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 153 of file GUIDialog_EditViewport.cpp.
References myOldLookAt, myOldLookFrom, myParent, and GUISUMOAbstractView::setViewport().
Called when the user changes the viewport.
Definition at line 161 of file GUIDialog_EditViewport.cpp.
References Position::INVALID, myParent, myXOff, myYOff, myZoom, and GUISUMOAbstractView::setViewport().
Called when the user wants to load a viewport.
Definition at line 174 of file GUIDialog_EditViewport.cpp.
References gCurrentFolder, GUIIconSubSys::getIcon(), ICON_EMPTY, myParent, setValues(), and GUISUMOAbstractView::setViewport().
Called when the user wants to keep the viewport.
Definition at line 139 of file GUIDialog_EditViewport.cpp.
References Position::INVALID, myParent, myXOff, myYOff, myZoom, and GUISUMOAbstractView::setViewport().
Called when the user wants to save a viewport.
Definition at line 197 of file GUIDialog_EditViewport.cpp.
References gCurrentFolder, OutputDevice::getDevice(), GUIIconSubSys::getIcon(), ICON_EMPTY, myXOff, myYOff, myZoom, and MFXUtils::userPermitsOverwritingWhenFileExists().
Resets old values.
| [in] | lookFrom | Current viewport's from |
| [in] | lookAt | Current viewport's at |
Definition at line 248 of file GUIDialog_EditViewport.cpp.
References myOldLookAt, myOldLookFrom, and setValues().
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 225 of file GUIDialog_EditViewport.cpp.
References myXOff, myYOff, and myZoom.
Referenced by onCmdLoad(), GUISUMOAbstractView::onMouseMove(), and setOldValues().
Sets the given values into the dialog.
| [in] | lookFrom | Current viewport's from |
| [in] | lookAt | Current viewport's at |
Definition at line 233 of file GUIDialog_EditViewport.cpp.
References myXOff, myYOff, myZoom, UNUSED_PARAMETER, Position::x(), Position::y(), and Position::z().
|
protected |
Definition at line 135 of file GUIDialog_EditViewport.h.
Referenced by onCmdCancel(), and setOldValues().
|
protected |
The old viewport.
Definition at line 135 of file GUIDialog_EditViewport.h.
Referenced by onCmdCancel(), and setOldValues().
|
protected |
The calling view.
Definition at line 132 of file GUIDialog_EditViewport.h.
Referenced by onCmdCancel(), onCmdChanged(), onCmdLoad(), and onCmdOk().
|
protected |
Definition at line 138 of file GUIDialog_EditViewport.h.
Referenced by haveGrabbed(), onCmdChanged(), onCmdOk(), onCmdSave(), and setValues().
|
protected |
Definition at line 138 of file GUIDialog_EditViewport.h.
Referenced by haveGrabbed(), onCmdChanged(), onCmdOk(), onCmdSave(), and setValues().
|
protected |
The spin dialers used to change the view.
Definition at line 138 of file GUIDialog_EditViewport.h.
Referenced by haveGrabbed(), onCmdChanged(), onCmdOk(), onCmdSave(), and setValues().