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

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

KIGFX::VC_SETTINGS::VC_SETTINGS ( )
inline

Definition at line 46 of file view_controls.h.

References Reset().

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

Member Function Documentation

void VC_SETTINGS::Reset ( )

Restores the default settings

Definition at line 57 of file view_controls.cpp.

References m_autoPanEnabled, m_autoPanMargin, m_autoPanSpeed, m_cursorCaptured, m_enableMousewheelPan, m_forceCursorPosition, m_grabMouse, m_showCursor, m_snappingEnabled, and m_warpCursor.

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

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;
65  m_autoPanMargin = 0.1;
66  m_autoPanSpeed = 0.15;
67  m_warpCursor = false;
68  m_enableMousewheelPan = false;
69 }
bool m_enableMousewheelPan
Mousewheel (2-finger touchpad) panning
Definition: view_controls.h:85
float m_autoPanSpeed
How fast is panning when in auto mode
Definition: view_controls.h:79
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_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:82
float m_autoPanMargin
Distance from cursor to VIEW edge when panning is active
Definition: view_controls.h:76
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_cursorCaptured
Should the cursor be locked within the parent window area
Definition: view_controls.h:64

Member Data Documentation

bool KIGFX::VC_SETTINGS::m_autoPanEnabled
float KIGFX::VC_SETTINGS::m_autoPanMargin
float KIGFX::VC_SETTINGS::m_autoPanSpeed

How fast is panning when in auto mode

Definition at line 79 of file view_controls.h.

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

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().

bool KIGFX::VC_SETTINGS::m_enableMousewheelPan
VECTOR2D KIGFX::VC_SETTINGS::m_forcedPosition
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().

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().

bool KIGFX::VC_SETTINGS::m_snappingEnabled

Should the cursor snap to grid or move freely

Definition at line 67 of file view_controls.h.

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

bool KIGFX::VC_SETTINGS::m_warpCursor

If the cursor is allowed to be warped

Definition at line 82 of file view_controls.h.

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


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