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...
 
bool m_warpCursor
 

If the cursor is allowed to be warped

More...
 
bool m_enableMousewheelPan
 

Mousewheel (2-finger touchpad) panning

More...
 
bool m_panWithRightButton
 

Allow panning with the right button in addition to middle

More...
 
bool m_panWithLeftButton
 

Allow panning with the left button in addition to middle

More...
 
bool m_lastKeyboardCursorPositionValid
 

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

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 44 of file view_controls.h.

Constructor & Destructor Documentation

◆ VC_SETTINGS()

KIGFX::VC_SETTINGS::VC_SETTINGS ( )
inline

Definition at line 46 of file view_controls.h.

47  {
48  Reset();
49  }
void Reset()
Restores the default settings

References Reset().

Member Function Documentation

◆ Reset()

void VC_SETTINGS::Reset ( )

Restores the default settings

Definition at line 57 of file view_controls.cpp.

58 {
59  m_showCursor = false;
60  m_forceCursorPosition = false;
61  m_cursorCaptured = false;
62  m_snappingEnabled = true;
63  m_grabMouse = false;
64  m_autoPanEnabled = false;
66  m_autoPanMargin = 0.1;
67  m_autoPanSpeed = 0.15;
68  m_warpCursor = false;
69  m_enableMousewheelPan = false;
70  m_panWithRightButton = false;
71  m_panWithLeftButton = false;
73 }
bool m_enableMousewheelPan
Mousewheel (2-finger touchpad) panning
Definition: view_controls.h:88
float m_autoPanSpeed
How fast is panning when in auto mode
Definition: view_controls.h:82
bool m_snappingEnabled
Should the cursor snap to grid or move freely
Definition: view_controls.h:67
bool m_grabMouse
Flag for grabbing the mouse cursor
Definition: view_controls.h:70
bool m_panWithRightButton
Allow panning with the right button in addition to middle
Definition: view_controls.h:91
bool m_autoPanSettingEnabled
Flag for turning on autopanning
Definition: view_controls.h:76
bool m_forceCursorPosition
Is the forced cursor position enabled
Definition: view_controls.h:61
bool m_warpCursor
If the cursor is allowed to be warped
Definition: view_controls.h:85
float m_autoPanMargin
Distance from cursor to VIEW edge when panning is active
Definition: view_controls.h:79
bool m_autoPanEnabled
Flag for turning on autopanning
Definition: view_controls.h:73
bool m_showCursor
Flag determining the cursor visibility
Definition: view_controls.h:55
bool m_lastKeyboardCursorPositionValid
Is last cursor motion event coming from keyboard arrow cursor motion action
Definition: view_controls.h:97
bool m_cursorCaptured
Should the cursor be locked within the parent window area
Definition: view_controls.h:64
bool m_panWithLeftButton
Allow panning with the left button in addition to middle
Definition: view_controls.h:94

References m_autoPanEnabled, m_autoPanMargin, m_autoPanSettingEnabled, m_autoPanSpeed, m_cursorCaptured, m_enableMousewheelPan, m_forceCursorPosition, m_grabMouse, m_lastKeyboardCursorPositionValid, m_panWithLeftButton, m_panWithRightButton, m_showCursor, m_snappingEnabled, and m_warpCursor.

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

Member Data Documentation

◆ 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 82 of file view_controls.h.

Referenced by KIGFX::VIEW_CONTROLS::ApplySettings(), KIGFX::WX_VIEW_CONTROLS::onTimer(), 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 64 of file view_controls.h.

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

◆ m_enableMousewheelPan

◆ m_forceCursorPosition

◆ m_forcedPosition

◆ m_grabMouse

bool KIGFX::VC_SETTINGS::m_grabMouse

Flag for grabbing the mouse cursor

Definition at line 70 of file view_controls.h.

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

◆ m_lastKeyboardCursorPosition

VECTOR2D KIGFX::VC_SETTINGS::m_lastKeyboardCursorPosition

Position of the above event

Definition at line 100 of file view_controls.h.

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

◆ m_lastKeyboardCursorPositionValid

bool KIGFX::VC_SETTINGS::m_lastKeyboardCursorPositionValid

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

Definition at line 97 of file view_controls.h.

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

◆ m_panWithLeftButton

bool KIGFX::VC_SETTINGS::m_panWithLeftButton

Allow panning with the left button in addition to middle

Definition at line 94 of file view_controls.h.

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

◆ m_panWithRightButton

bool KIGFX::VC_SETTINGS::m_panWithRightButton

Allow panning with the right button in addition to middle

Definition at line 91 of file view_controls.h.

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

◆ m_showCursor

bool KIGFX::VC_SETTINGS::m_showCursor

Flag determining the cursor visibility

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

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