void SetCursorEnabled(bool aCursorEnabled)
Enable/disable cursor.
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual void ForceCursorPosition(bool aEnabled, const VECTOR2D &aPosition=VECTOR2D(0, 0))
Place the cursor immediately at a given point.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
virtual void SetAutoPanMargin(float aMargin)
Set the margin for autopanning (ie.
bool IsCursorShown() const
Return true when cursor is visible.
virtual void SetGrabMouse(bool aEnabled)
Turn on/off mouse grabbing.
virtual void Reset()
Restore the default VIEW_CONTROLS settings.
virtual void SetAutoPanSpeed(float aSpeed)
Set the speed of autopanning.
VC_SETTINGS m_settings
Current VIEW_CONTROLS settings.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
void ApplySettings(const VC_SETTINGS &aSettings)
Apply VIEW_CONTROLS settings from an object.
VIEW * m_view
Pointer to controlled VIEW.
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
The Cairo implementation of the graphics abstraction layer.
std::vector< FAB_LAYER_COLOR > dummy
Structure to keep VIEW_CONTROLS settings for easy store/restore operations.
float m_autoPanMargin
Distance from cursor to VIEW edge when panning is active.
VECTOR2D m_forcedPosition
Forced cursor position (world coordinates).
MOUSE_DRAG_ACTION m_dragLeft
bool m_horizontalPan
Enable horizontal panning with the horizontal scroll/trackpad input.
bool m_scrollReversePanH
Whether to invert the scroll wheel movement for horizontal pan.
void Reset()
Restore the default settings.
bool m_autoPanSettingEnabled
Flag for turning on autopanning.
bool m_focusFollowSchPcb
Flag for automatic focus switching between Schematic and PCB editors.
float m_autoPanAcceleration
How fast does panning accelerate when approaching the window boundary.
MOUSE_DRAG_ACTION m_dragMiddle
bool m_cursorCaptured
Should the cursor be locked within the parent window area.
int m_zoomSpeed
Zoom speed for the non-accelerating zoom controller.
int m_scrollModifierZoom
What modifier key to enable zoom with the (vertical) scroll wheel.
int m_scrollModifierPanH
What modifier key to enable horizontal pan with the (vertical) scroll wheel.
VECTOR2D m_lastKeyboardCursorPosition
Position of the above event.
float m_autoPanSpeed
How fast is panning when in auto mode.
bool m_warpCursor
If the cursor is allowed to be warped.
MOUSE_DRAG_ACTION m_dragRight
bool m_grabMouse
Flag for grabbing the mouse cursor.
bool m_scrollReverseZoom
Whether to invert the scroll wheel movement for zoom.
bool m_zoomAcceleration
Enable the accelerating zoom controller.
bool m_lastKeyboardCursorPositionValid
Is last cursor motion event coming from keyboard arrow cursor motion action.
bool m_zoomSpeedAuto
When true, ignore zoom_speed and pick a platform-specific default.
bool m_autoPanEnabled
Flag for turning on autopanning.
bool m_snappingEnabled
Should the cursor snap to grid or move freely.
bool m_showCursor
Flag determining the cursor visibility.
int m_scrollModifierPanV
What modifier key to enable vertical with the (vertical) scroll wheel.
long m_lastKeyboardCursorCommand
ACTIONS::CURSOR_UP, ACTIONS::CURSOR_DOWN, etc.
bool m_forceCursorPosition
Is the forced cursor position enabled.