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 ()
 
void Reset ()
 

Restores the default settings

More...
 

Public Attributes

bool m_showCursor
 

Flag determining the cursor visibility

More...
 
VECTOR2D m_forcedPosition
 

Forced cursor position (world coordinates)

More...
 
bool m_forceCursorPosition
 

Is the forced cursor position enabled

More...
 
bool m_cursorCaptured
 

Should the cursor be locked within the parent window area

More...
 
bool m_snappingEnabled
 

Should the cursor snap to grid or move freely

More...
 
bool m_grabMouse
 

Flag for grabbing the mouse cursor

More...
 
bool m_autoPanEnabled
 

Flag for turning on autopanning

More...
 
bool m_autoPanSettingEnabled
 

Flag for turning on autopanning

More...
 
float m_autoPanMargin
 

Distance from cursor to VIEW edge when panning is active

More...
 
float m_autoPanSpeed
 

How fast is panning when in auto mode

More...
 
float m_autoPanAcceleration
 

How fast does panning accelerate when approaching the window boundary

More...
 
bool m_warpCursor
 

If the cursor is allowed to be warped

More...
 
bool m_horizontalPan
 

Enable horizontal panning with the horizontal scroll/trackpad input

More...
 
bool m_zoomAcceleration
 

Enable the accelerating zoom controller

More...
 
int m_zoomSpeed
 

Zoom speed for the non-accelerating zoom controller

More...
 
bool m_zoomSpeedAuto
 

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

More...
 
int m_scrollModifierZoom
 

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

More...
 
int m_scrollModifierPanH
 

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

More...
 
int m_scrollModifierPanV
 

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

More...
 
MOUSE_DRAG_ACTION m_dragMiddle
 

What drag action to perform when the middle button is pressed

More...
 
MOUSE_DRAG_ACTION m_dragRight
 

What drag action to perform when the right button is pressed

More...
 
bool m_lastKeyboardCursorPositionValid
 

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

More...
 
long m_lastKeyboardCursorCommand
 

ACTIONS::CURSOR_UP, ACTIONS::CURSOR_DOWN, etc.

More...
 
VECTOR2D m_lastKeyboardCursorPosition
 

Position of the above event

More...
 

Detailed Description

Structure to keep VIEW_CONTROLS settings for easy store/restore operations

Definition at line 55 of file view_controls.h.

Constructor & Destructor Documentation

◆ VC_SETTINGS()

KIGFX::VC_SETTINGS::VC_SETTINGS ( )
inline

Definition at line 57 of file view_controls.h.

58  {
59  Reset();
60  }
void Reset()
Restores the default settings

References Reset().

Member Function Documentation

◆ Reset()

void VC_SETTINGS::Reset ( )

Restores the default settings

Definition at line 58 of file view_controls.cpp.

59 {
60  m_showCursor = false;
61  m_forceCursorPosition = false;
62  m_cursorCaptured = false;
63  m_snappingEnabled = true;
64  m_grabMouse = false;
65  m_autoPanEnabled = false;
67  m_autoPanMargin = 0.02f;
68  m_autoPanSpeed = 0.15f;
69  m_autoPanAcceleration = 5.0f;
70  m_warpCursor = false;
71  m_horizontalPan = false;
72  m_zoomAcceleration = false;
73  m_zoomSpeed = 5;
74  m_zoomSpeedAuto = true;
76  m_scrollModifierPanH = WXK_CONTROL;
77  m_scrollModifierPanV = WXK_SHIFT;
81  m_lastKeyboardCursorPosition = { 0.0, 0.0 };
83 }
MOUSE_DRAG_ACTION m_dragRight
What drag action to perform when the right button is pressed
float m_autoPanSpeed
How fast is panning when in auto mode
Definition: view_controls.h:93
bool m_snappingEnabled
Should the cursor snap to grid or move freely
Definition: view_controls.h:78
bool m_grabMouse
Flag for grabbing the mouse cursor
Definition: view_controls.h:81
int m_scrollModifierPanH
What modifier key to enable horizontal pan with the (vertical) scroll wheel
VECTOR2D m_lastKeyboardCursorPosition
Position of the above event
bool m_autoPanSettingEnabled
Flag for turning on autopanning
Definition: view_controls.h:87
bool m_forceCursorPosition
Is the forced cursor position enabled
Definition: view_controls.h:72
MOUSE_DRAG_ACTION m_dragMiddle
What drag action to perform when the middle button is pressed
bool m_zoomSpeedAuto
When true, ignore zoom_speed and pick a platform-specific default
int m_scrollModifierZoom
What modifier key to enable zoom with the (vertical) scroll wheel
float m_autoPanAcceleration
How fast does panning accelerate when approaching the window boundary
Definition: view_controls.h:96
int m_zoomSpeed
Zoom speed for the non-accelerating zoom controller
bool m_warpCursor
If the cursor is allowed to be warped
Definition: view_controls.h:99
float m_autoPanMargin
Distance from cursor to VIEW edge when panning is active
Definition: view_controls.h:90
bool m_horizontalPan
Enable horizontal panning with the horizontal scroll/trackpad input
bool m_autoPanEnabled
Flag for turning on autopanning
Definition: view_controls.h:84
bool m_zoomAcceleration
Enable the accelerating zoom controller
int m_scrollModifierPanV
What modifier key to enable vertical with the (vertical) scroll wheel
bool m_showCursor
Flag determining the cursor visibility
Definition: view_controls.h:66
long m_lastKeyboardCursorCommand
ACTIONS::CURSOR_UP, ACTIONS::CURSOR_DOWN, etc.
bool m_lastKeyboardCursorPositionValid
Is last cursor motion event coming from keyboard arrow cursor motion action
bool m_cursorCaptured
Should the cursor be locked within the parent window area
Definition: view_controls.h:75

References ACTIONS::CURSOR_NONE, m_autoPanAcceleration, m_autoPanEnabled, m_autoPanMargin, m_autoPanSettingEnabled, m_autoPanSpeed, m_cursorCaptured, m_dragMiddle, m_dragRight, 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, and KIGFX::PAN.

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

Member Data Documentation

◆ m_autoPanAcceleration

float KIGFX::VC_SETTINGS::m_autoPanAcceleration

How fast does panning accelerate when approaching the window boundary

Definition at line 96 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

float KIGFX::VC_SETTINGS::m_autoPanMargin

◆ m_autoPanSettingEnabled

bool KIGFX::VC_SETTINGS::m_autoPanSettingEnabled

◆ m_autoPanSpeed

float KIGFX::VC_SETTINGS::m_autoPanSpeed

How fast is panning when in auto mode

Definition at line 93 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

Should the cursor be locked within the parent window area

Definition at line 75 of file view_controls.h.

Referenced by KIGFX::VIEW_CONTROLS::ApplySettings(), KIGFX::VIEW_CONTROLS::CaptureCursor(), KIGFX::WX_VIEW_CONTROLS::onLeave(), and Reset().

◆ m_dragMiddle

MOUSE_DRAG_ACTION KIGFX::VC_SETTINGS::m_dragMiddle

What drag action to perform when the middle button is pressed

Definition at line 123 of file view_controls.h.

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

◆ m_dragRight

MOUSE_DRAG_ACTION KIGFX::VC_SETTINGS::m_dragRight

What drag action to perform when the right button is pressed

Definition at line 126 of file view_controls.h.

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

◆ m_forceCursorPosition

◆ m_forcedPosition

◆ m_grabMouse

bool KIGFX::VC_SETTINGS::m_grabMouse

Flag for grabbing the mouse cursor

Definition at line 81 of file view_controls.h.

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

◆ m_horizontalPan

bool KIGFX::VC_SETTINGS::m_horizontalPan

Enable horizontal panning with the horizontal scroll/trackpad input

Definition at line 102 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

VECTOR2D KIGFX::VC_SETTINGS::m_lastKeyboardCursorPosition

◆ m_lastKeyboardCursorPositionValid

bool KIGFX::VC_SETTINGS::m_lastKeyboardCursorPositionValid

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

Definition at line 129 of file view_controls.h.

Referenced by EDIT_TOOL::doMoveSelection(), KIGFX::WX_VIEW_CONTROLS::handleAutoPanning(), Reset(), KIGFX::WX_VIEW_CONTROLS::SetCursorPosition(), and KIGFX::WX_VIEW_CONTROLS::WX_VIEW_CONTROLS().

◆ m_scrollModifierPanH

int KIGFX::VC_SETTINGS::m_scrollModifierPanH

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

Definition at line 117 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

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

Definition at line 120 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 zoom with the (vertical) scroll wheel

Definition at line 114 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

Flag determining the cursor visibility

Definition at line 66 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

◆ m_warpCursor

bool KIGFX::VC_SETTINGS::m_warpCursor

◆ m_zoomAcceleration

bool KIGFX::VC_SETTINGS::m_zoomAcceleration

Enable the accelerating zoom controller

Definition at line 105 of file view_controls.h.

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

◆ m_zoomSpeed

int KIGFX::VC_SETTINGS::m_zoomSpeed

Zoom speed for the non-accelerating zoom controller

Definition at line 108 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

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

Definition at line 111 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: