39 #ifdef CHECK_MEMORY_LEAKS
41 #endif // CHECK_MEMORY_LEAKS
50 myOrigWidth(viewPort.getWidth()),
51 myOrigHeight(viewPort.getHeight()),
53 myMouseButtonState(MOUSEBTN_NONE),
70 if (
myCallback.getApp()->reg().readIntEntry(
"gui",
"zoomAtCenter", 1)) {
135 FXEvent* e = (FXEvent*) data;
146 FXEvent* e = (FXEvent*) data;
156 FXEvent* e = (FXEvent*) data;
169 FXEvent* e = (FXEvent*) data;
179 FXEvent* e = (FXEvent*) data;
181 if (e->state & CONTROLMASK) {
183 }
else if (e->state & SHIFTMASK) {
197 FXEvent* e = (FXEvent*) data;
201 const bool moved = xdiff != 0 || ydiff != 0;
235 const SUMOReal zoomFactor = zoom / 50;
GUICompleteSchemeStorage gSchemeStorage
void growWidth(SUMOReal by)
SUMOReal getWidth() const
Returns the width of the boudary.
bool myMoveOnClick
Information whether the user has moved the cursor while pressing a mouse button.
Position getCenter() const
Returns the center of the boundary.
~GUIDanielPerspectiveChanger()
Destructor.
void move(int xdiff, int ydiff)
void onRightBtnPress(void *data)
bool onLeftBtnRelease(void *data)
bool gaming
whether the application is in gaming mode or not
SUMOReal ymin() const
Returns minimum y-coordinate.
Position myZoomBase
the network location on which to zoom using right click+drag
SUMOReal xmin() const
Returns minimum x-coordinate.
SUMOReal p2m(SUMOReal pixel) const
pixels-to-meters conversion method
virtual SUMOReal getRotation() const
Returns the rotation of the canvas stored in this changer.
void rotate(int diff)
Performs the rotation of the view.
SUMOReal x() const
Returns the x-position.
SUMOReal myOrigWidth
the original viewport dimensions in m which serve as the reference point for 100% zoom ...
void onLeftBtnPress(void *data)
virtual SUMOReal getXPos() const
Returns the x-offset of the field to show stored in this changer.
SUMOReal xmax() const
Returns maximum x-coordinate.
A class that stores a 2D geometrical boundary.
void onMouseWheel(void *data)
bool onRightBtnRelease(void *data)
GUIDanielPerspectiveChanger(GUISUMOAbstractView &callBack, const Boundary &viewPort)
FXTime myDragDelay
avoid flicker
A point in 2D or 3D with translation and scaling methods.
void centerTo(const Position &pos, SUMOReal radius, bool applyZoom=true)
Centers the view to the given position, setting it to a size that covers the radius.
int myMouseButtonState
the current mouse state
void onMouseMove(void *data)
GUISUMOAbstractView & myCallback
The parent window (canvas to scale)
void zoom(SUMOReal factor)
Performs the zooming of the view.
SUMOReal myRotation
the current rotation
void setViewport(SUMOReal zoom, SUMOReal xPos, SUMOReal yPos)
Sets the viewport.
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
GUIVisualizationSettings & getDefault()
Returns the default scheme.
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
Boundary myViewPort
the intended viewport
SUMOReal y() const
Returns the y-position.
void setWindowCursorPosition(FXint x, FXint y)
Returns the information whether rotation is allowd.
virtual SUMOReal getYPos() const
Returns the y-offset of the field to show stored in this changer.
void updateToolTip()
A method that updates the tooltip.
SUMOReal ymax() const
Returns maximum y-coordinate.
void growHeight(SUMOReal by)
FXint myMouseXPosition
the current mouse position
void moveby(SUMOReal x, SUMOReal y)
Moves the boundary by the given amount.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
virtual SUMOReal getZoom() const
Returns the zoom factor computed stored in this changer.
void changeCanvassLeft(int change)