36 #ifdef CHECK_MEMORY_LEAKS
38 #endif // CHECK_MEMORY_LEAKS
46 myViewPort(viewPort) {
142 if (ratio < canvasRatio) {
SUMOReal getHeight() const
Returns the height of the boundary (y-axis)
void growWidth(SUMOReal by)
Increases the width of the boundary (x-axis)
virtual void setViewport(SUMOReal zoom, SUMOReal xPos, SUMOReal yPos)=0
Sets the viewport Used for: Adapting a new viewport.
SUMOReal getWidth() const
Returns the width of the boudary (x-axis)
A class that stores a 2D geometrical boundary.
Boundary patchedViewPort()
patched viewPort with the same aspect ratio as the canvas
virtual bool onLeftBtnRelease(void *data)
called when user releases left button
virtual bool onRightBtnRelease(void *data)
called when user releases right button
GUISUMOAbstractView & myCallback
The parent window (canvas to scale)
virtual void onLeftBtnPress(void *data)
mouse functions
Boundary getViewport(bool fixRatio=true)
get viewport
FXint getMouseXPosition() const
Returns the last mouse x-position an event occured at.
Boundary myViewPort
the intended viewport
virtual void onMouseWheel(void *data)
called when user changes mouse wheel
virtual long onKeyPress(void *data)
called when user press a key
FXint getMouseYPosition() const
Returns the last mouse y-position an event occured at.
GUIPerspectiveChanger(GUISUMOAbstractView &callBack, const Boundary &viewPort)
Constructor.
virtual void onDoubleClicked(void *data)
called when user click two times
virtual void onMouseMove(void *data)
called when user moves mouse
virtual void onRightBtnPress(void *data)
called when user press right button
void growHeight(SUMOReal by)
Increases the height of the boundary (y-axis)
FXint myMouseXPosition
the current mouse position
virtual long onKeyRelease(void *data)
called when user releases a key
virtual ~GUIPerspectiveChanger()
Destructor.