KiCad PCB EDA Suite
KIGFX::VC_SETTINGS Struct Reference

Structure to keep VIEW_CONTROLS settings for easy store/restore operations. More...

#include <view_controls.h>

Public Member Functions

 VC_SETTINGS ()
 Restore the default settings. More...
 
void Reset ()
 Flag determining the cursor visibility. More...
 

Public Attributes

bool m_showCursor
 Forced cursor position (world coordinates). More...
 
VECTOR2D m_forcedPosition
 Is the forced cursor position enabled. More...
 
bool m_forceCursorPosition
 Should the cursor be locked within the parent window area. More...
 
bool m_cursorCaptured
 Should the cursor snap to grid or move freely. More...
 
bool m_snappingEnabled
 Flag for grabbing the mouse cursor. More...
 
bool m_grabMouse
 Flag for automatic focus switching between Schematic and PCB editors. More...
 
bool m_focusFollowSchPcb
 Flag for turning on autopanning. More...
 
bool m_autoPanEnabled
 Flag for turning on autopanning. More...
 
bool m_autoPanSettingEnabled
 Distance from cursor to VIEW edge when panning is active. More...
 
float m_autoPanMargin
 How fast is panning when in auto mode. More...
 
float m_autoPanSpeed
 How fast does panning accelerate when approaching the window boundary. More...
 
float m_autoPanAcceleration
 If the cursor is allowed to be warped. More...
 
bool m_warpCursor
 Enable horizontal panning with the horizontal scroll/trackpad input. More...
 
bool m_horizontalPan
 Enable the accelerating zoom controller. More...
 
bool m_zoomAcceleration
 Zoom speed for the non-accelerating zoom controller. More...
 
int m_zoomSpeed
 When true, ignore zoom_speed and pick a platform-specific default. More...
 
bool m_zoomSpeedAuto
 What modifier key to enable zoom with the (vertical) scroll wheel. More...
 
int m_scrollModifierZoom
 What modifier key to enable horizontal pan with the (vertical) scroll wheel. More...
 
int m_scrollModifierPanH
 What modifier key to enable vertical with the (vertical) scroll wheel. More...
 
int m_scrollModifierPanV
 
MOUSE_DRAG_ACTION m_dragLeft
 
MOUSE_DRAG_ACTION m_dragMiddle
 
MOUSE_DRAG_ACTION m_dragRight
 Is last cursor motion event coming from keyboard arrow cursor motion action. More...
 
bool m_lastKeyboardCursorPositionValid
 ACTIONS::CURSOR_UP, ACTIONS::CURSOR_DOWN, etc. More...
 
long m_lastKeyboardCursorCommand
 Position of the above event. More...
 
VECTOR2D m_lastKeyboardCursorPosition
 

Detailed Description

Structure to keep VIEW_CONTROLS settings for easy store/restore operations.

Definition at line 41 of file view_controls.h.

Constructor & Destructor Documentation

◆ VC_SETTINGS()

KIGFX::VC_SETTINGS::VC_SETTINGS ( )
inline

Restore the default settings.

Definition at line 43 of file view_controls.h.

References Reset().

Member Function Documentation

◆ Reset()

void VC_SETTINGS::Reset ( )

Flag determining the cursor visibility.

Definition at line 58 of file view_controls.cpp.

59{
60 m_showCursor = false;
62 m_cursorCaptured = false;
63 m_snappingEnabled = true;
64 m_grabMouse = false;
65 m_focusFollowSchPcb = false;
66 m_autoPanEnabled = false;
68 m_autoPanMargin = 0.02f;
69 m_autoPanSpeed = 0.15f;
71 m_warpCursor = false;
72 m_horizontalPan = false;
73 m_zoomAcceleration = false;
74 m_zoomSpeed = 5;
75 m_zoomSpeedAuto = true;
77 m_scrollModifierPanH = WXK_CONTROL;
78 m_scrollModifierPanV = WXK_SHIFT;
83 m_lastKeyboardCursorPosition = { 0.0, 0.0 };
85}
@ CURSOR_NONE
Definition: actions.h:191
float m_autoPanMargin
How fast is panning when in auto mode.
Definition: view_controls.h:79
MOUSE_DRAG_ACTION m_dragLeft
bool m_horizontalPan
Enable the accelerating zoom controller.
Definition: view_controls.h:91
bool m_autoPanSettingEnabled
Distance from cursor to VIEW edge when panning is active.
Definition: view_controls.h:76
bool m_focusFollowSchPcb
Flag for turning on autopanning.
Definition: view_controls.h:70
float m_autoPanAcceleration
If the cursor is allowed to be warped.
Definition: view_controls.h:85
MOUSE_DRAG_ACTION m_dragMiddle
bool m_cursorCaptured
Should the cursor snap to grid or move freely.
Definition: view_controls.h:61
int m_zoomSpeed
When true, ignore zoom_speed and pick a platform-specific default.
Definition: view_controls.h:97
int m_scrollModifierZoom
What modifier key to enable horizontal pan with the (vertical) scroll wheel.
int m_scrollModifierPanH
What modifier key to enable vertical with the (vertical) scroll wheel.
VECTOR2D m_lastKeyboardCursorPosition
float m_autoPanSpeed
How fast does panning accelerate when approaching the window boundary.
Definition: view_controls.h:82
bool m_warpCursor
Enable horizontal panning with the horizontal scroll/trackpad input.
Definition: view_controls.h:88
MOUSE_DRAG_ACTION m_dragRight
Is last cursor motion event coming from keyboard arrow cursor motion action.
bool m_grabMouse
Flag for automatic focus switching between Schematic and PCB editors.
Definition: view_controls.h:67
bool m_zoomAcceleration
Zoom speed for the non-accelerating zoom controller.
Definition: view_controls.h:94
bool m_lastKeyboardCursorPositionValid
ACTIONS::CURSOR_UP, ACTIONS::CURSOR_DOWN, etc.
bool m_zoomSpeedAuto
What modifier key to enable zoom with the (vertical) scroll wheel.
bool m_autoPanEnabled
Flag for turning on autopanning.
Definition: view_controls.h:73
bool m_snappingEnabled
Flag for grabbing the mouse cursor.
Definition: view_controls.h:64
bool m_showCursor
Forced cursor position (world coordinates).
Definition: view_controls.h:52
long m_lastKeyboardCursorCommand
Position of the above event.
bool m_forceCursorPosition
Should the cursor be locked within the parent window area.
Definition: view_controls.h:58

References ACTIONS::CURSOR_NONE, m_autoPanAcceleration, m_autoPanEnabled, m_autoPanMargin, m_autoPanSettingEnabled, m_autoPanSpeed, m_cursorCaptured, m_dragLeft, m_dragMiddle, m_dragRight, m_focusFollowSchPcb, m_forceCursorPosition, m_grabMouse, m_horizontalPan, m_lastKeyboardCursorCommand, m_lastKeyboardCursorPosition, m_lastKeyboardCursorPositionValid, m_scrollModifierPanH, m_scrollModifierPanV, m_scrollModifierZoom, m_showCursor, m_snappingEnabled, m_warpCursor, m_zoomAcceleration, m_zoomSpeed, m_zoomSpeedAuto, NONE, and PAN.

Referenced by TOOL_MANAGER::TOOL_STATE::clear(), and VC_SETTINGS().

Member Data Documentation

◆ m_autoPanAcceleration

float KIGFX::VC_SETTINGS::m_autoPanAcceleration

If the cursor is allowed to be warped.

Definition at line 85 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::onTimer(), Reset(), and KIGFX::VIEW_CONTROLS::SetAutoPanAcceleration().

◆ m_autoPanEnabled

bool KIGFX::VC_SETTINGS::m_autoPanEnabled

◆ m_autoPanMargin

◆ m_autoPanSettingEnabled

bool KIGFX::VC_SETTINGS::m_autoPanSettingEnabled

Distance from cursor to VIEW edge when panning is active.

Definition at line 76 of file view_controls.h.

Referenced by KIGFX::VIEW_CONTROLS::EnableAutoPan(), KIGFX::WX_VIEW_CONTROLS::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::onMotion(), and Reset().

◆ m_autoPanSpeed

float KIGFX::VC_SETTINGS::m_autoPanSpeed

How fast does panning accelerate when approaching the window boundary.

Definition at line 82 of file view_controls.h.

Referenced by KIGFX::VIEW_CONTROLS::ApplySettings(), Reset(), and KIGFX::VIEW_CONTROLS::SetAutoPanSpeed().

◆ m_cursorCaptured

bool KIGFX::VC_SETTINGS::m_cursorCaptured

◆ m_dragLeft

MOUSE_DRAG_ACTION KIGFX::VC_SETTINGS::m_dragLeft

Definition at line 111 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), and Reset().

◆ m_dragMiddle

MOUSE_DRAG_ACTION KIGFX::VC_SETTINGS::m_dragMiddle

◆ m_dragRight

MOUSE_DRAG_ACTION KIGFX::VC_SETTINGS::m_dragRight

Is last cursor motion event coming from keyboard arrow cursor motion action.

Definition at line 113 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::onButton(), and Reset().

◆ m_focusFollowSchPcb

bool KIGFX::VC_SETTINGS::m_focusFollowSchPcb

Flag for turning on autopanning.

Definition at line 70 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::onMotion(), and Reset().

◆ m_forceCursorPosition

◆ m_forcedPosition

◆ m_grabMouse

bool KIGFX::VC_SETTINGS::m_grabMouse

Flag for automatic focus switching between Schematic and PCB editors.

Definition at line 67 of file view_controls.h.

Referenced by KIGFX::VIEW_CONTROLS::ApplySettings(), Reset(), and KIGFX::VIEW_CONTROLS::SetGrabMouse().

◆ m_horizontalPan

bool KIGFX::VC_SETTINGS::m_horizontalPan

Enable the accelerating zoom controller.

Definition at line 91 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::onWheel(), and Reset().

◆ m_lastKeyboardCursorCommand

long KIGFX::VC_SETTINGS::m_lastKeyboardCursorCommand

◆ m_lastKeyboardCursorPosition

◆ m_lastKeyboardCursorPositionValid

◆ m_scrollModifierPanH

int KIGFX::VC_SETTINGS::m_scrollModifierPanH

What modifier key to enable vertical with the (vertical) scroll wheel.

Definition at line 106 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::onWheel(), and Reset().

◆ m_scrollModifierPanV

int KIGFX::VC_SETTINGS::m_scrollModifierPanV

Definition at line 109 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), and Reset().

◆ m_scrollModifierZoom

int KIGFX::VC_SETTINGS::m_scrollModifierZoom

What modifier key to enable horizontal pan with the (vertical) scroll wheel.

Definition at line 103 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::onWheel(), and Reset().

◆ m_showCursor

bool KIGFX::VC_SETTINGS::m_showCursor

Forced cursor position (world coordinates).

Definition at line 52 of file view_controls.h.

Referenced by KIGFX::VIEW_CONTROLS::ApplySettings(), KIGFX::VIEW_CONTROLS::IsCursorShown(), Reset(), and KIGFX::VIEW_CONTROLS::ShowCursor().

◆ m_snappingEnabled

bool KIGFX::VC_SETTINGS::m_snappingEnabled

Flag for grabbing the mouse cursor.

Definition at line 64 of file view_controls.h.

Referenced by KIGFX::VIEW_CONTROLS::GetCursorPosition(), and Reset().

◆ m_warpCursor

bool KIGFX::VC_SETTINGS::m_warpCursor

Enable horizontal panning with the horizontal scroll/trackpad input.

Definition at line 88 of file view_controls.h.

Referenced by KIGFX::VIEW_CONTROLS::EnableCursorWarping(), KIGFX::VIEW_CONTROLS::IsCursorWarpingEnabled(), KIGFX::WX_VIEW_CONTROLS::LoadSettings(), and Reset().

◆ m_zoomAcceleration

bool KIGFX::VC_SETTINGS::m_zoomAcceleration

Zoom speed for the non-accelerating zoom controller.

Definition at line 94 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), and Reset().

◆ m_zoomSpeed

int KIGFX::VC_SETTINGS::m_zoomSpeed

When true, ignore zoom_speed and pick a platform-specific default.

Definition at line 97 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), KIGFX::WX_VIEW_CONTROLS::onMotion(), and Reset().

◆ m_zoomSpeedAuto

bool KIGFX::VC_SETTINGS::m_zoomSpeedAuto

What modifier key to enable zoom with the (vertical) scroll wheel.

Definition at line 100 of file view_controls.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings(), and Reset().


The documentation for this struct was generated from the following files: