127 virtual void setViewport(
double zoom,
double xPos,
double yPos) = 0;
A class that stores a 2D geometrical boundary.
virtual double zoom2ZPos(double zoom) const =0
Returns the camera height at which the given zoom level is reached.
GUISUMOAbstractView & myCallback
The parent window (canvas to scale)
virtual void setViewportFrom(double xPos, double yPos, double zPos)=0
Alternative method for setting the viewport.
virtual long onKeyPress(void *data)
called when user press a key
virtual void setRotation(double rotation)=0
Sets the rotation.
virtual double zPos2Zoom(double zPos) const =0
Returns the zoom level that is achieved at a given camera height.
virtual void onRightBtnPress(void *data)
called when user press right button
virtual void centerTo(const Position &pos, double radius, bool applyZoom=true)=0
Centers the view to the given position, setting it to a size that covers the radius....
virtual double getRotation() const =0
Returns the rotation of the canvas stored in this changer.
virtual ~GUIPerspectiveChanger()
Destructor.
virtual bool onLeftBtnRelease(void *data)
called when user releases left button
Boundary myViewPort
the intended viewport
virtual double getZoom() const =0
Returns the zoom factor computed stored in this changer.
virtual void onLeftBtnPress(void *data)
mouse functions
FXint getMouseXPosition() const
Returns the last mouse x-position an event occurred at.
virtual bool onMiddleBtnRelease(void *data)
called when user releases middle button
GUIPerspectiveChanger(const GUIPerspectiveChanger &)
Invalidated copy constructor.
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
virtual void onDoubleClicked(void *data)
called when user click two times
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
virtual void onMiddleBtnPress(void *data)
called when user press middle button
FXint getMouseYPosition() const
Returns the last mouse y-position an event occurred at.
GUIPerspectiveChanger & operator=(const GUIPerspectiveChanger &)
Invalidated assignment operator.
virtual long onKeyRelease(void *data)
called when user releases a key
Boundary patchedViewPort()
patched viewPort with the same aspect ratio as the canvas
virtual void changeCanvasSizeLeft(int change)=0
FXint myMouseXPosition
the current mouse position
virtual void onMouseMove(void *data)
called when user moves mouse
virtual double getZPos() const =0
Returns the camera height corresponding to the current zoom factor.
virtual void onMouseWheel(void *data)
called when user changes mouse wheel
virtual bool onRightBtnRelease(void *data)
called when user releases right button
Boundary getViewport(bool fixRatio=true)
get viewport
virtual void setViewport(double zoom, double xPos, double yPos)=0
Sets the viewport Used for: Adapting a new viewport.
A point in 2D or 3D with translation and scaling methods.