41 myViewPort(viewPort) {
137 if (ratio < canvasRatio) {
FXint getMouseYPosition() const
Returns the last mouse y-position an event occured at.
double 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 void setViewport(double zoom, double xPos, double yPos)=0
Sets the viewport Used for: Adapting a new viewport.
FXint getMouseXPosition() const
Returns the last mouse x-position an event occured at.
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)
void growHeight(double by)
Increases the height of the boundary (y-axis)
virtual void onLeftBtnPress(void *data)
mouse functions
Boundary getViewport(bool fixRatio=true)
get viewport
Boundary myViewPort
the intended viewport
double getHeight() const
Returns the height of the boundary (y-axis)
virtual void onMouseWheel(void *data)
called when user changes mouse wheel
virtual long onKeyPress(void *data)
called when user press a key
void growWidth(double by)
Increases the width of the boundary (x-axis)
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
FXint myMouseXPosition
the current mouse position
virtual long onKeyRelease(void *data)
called when user releases a key
virtual ~GUIPerspectiveChanger()
Destructor.