KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::CONSTANT_ZOOM_CONTROLLER Class Reference

A CONSTANT_ZOOM_CONTROLLER that zooms by a fixed factor based only on the magnitude of the scroll wheel rotation. More...

#include <zoom_controller.h>

Inheritance diagram for KIGFX::CONSTANT_ZOOM_CONTROLLER:
KIGFX::ZOOM_CONTROLLER

Public Member Functions

 CONSTANT_ZOOM_CONTROLLER (double aScale)
 
double GetScaleForRotation (int aRotation) override
 A suitable (magic) scale factor for GTK3 systems.
 

Static Public Attributes

static constexpr double GTK3_SCALE = 0.002
 A suitable (magic) scale factor for Mac systems.
 
static constexpr double MAC_SCALE = 0.01
 
static constexpr double MSW_SCALE = 0.005
 A suitable (magic) scale factor for Windows systems.
 
static constexpr double MANUAL_SCALE_FACTOR = 0.001
 

Private Attributes

double m_scale
 < The scale factor set by the constructor.
 

Detailed Description

A CONSTANT_ZOOM_CONTROLLER that zooms by a fixed factor based only on the magnitude of the scroll wheel rotation.

Definition at line 142 of file zoom_controller.h.

Constructor & Destructor Documentation

◆ CONSTANT_ZOOM_CONTROLLER()

CONSTANT_ZOOM_CONTROLLER::CONSTANT_ZOOM_CONTROLLER ( double  aScale)
Parameters
aScalea scaling parameter that adjusts the magnitude of the scroll. This factor might be dependent on the platform for comfort.

Definition at line 120 of file zoom_controller.cpp.

Member Function Documentation

◆ GetScaleForRotation()

double CONSTANT_ZOOM_CONTROLLER::GetScaleForRotation ( int  aRotation)
overridevirtual

A suitable (magic) scale factor for GTK3 systems.

Implements KIGFX::ZOOM_CONTROLLER.

Definition at line 125 of file zoom_controller.cpp.

References m_scale, and traceZoomScroll.

Referenced by BOOST_AUTO_TEST_CASE().

Member Data Documentation

◆ GTK3_SCALE

constexpr double KIGFX::CONSTANT_ZOOM_CONTROLLER::GTK3_SCALE = 0.002
staticconstexpr

A suitable (magic) scale factor for Mac systems.

Definition at line 154 of file zoom_controller.h.

Referenced by GetZoomControllerForPlatform().

◆ m_scale

double KIGFX::CONSTANT_ZOOM_CONTROLLER::m_scale
private

< The scale factor set by the constructor.

Definition at line 167 of file zoom_controller.h.

Referenced by GetScaleForRotation().

◆ MAC_SCALE

constexpr double KIGFX::CONSTANT_ZOOM_CONTROLLER::MAC_SCALE = 0.01
staticconstexpr

Definition at line 157 of file zoom_controller.h.

Referenced by GetZoomControllerForPlatform().

◆ MANUAL_SCALE_FACTOR

constexpr double KIGFX::CONSTANT_ZOOM_CONTROLLER::MANUAL_SCALE_FACTOR = 0.001
staticconstexpr

Definition at line 163 of file zoom_controller.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::LoadSettings().

◆ MSW_SCALE

constexpr double KIGFX::CONSTANT_ZOOM_CONTROLLER::MSW_SCALE = 0.005
staticconstexpr

A suitable (magic) scale factor for Windows systems.

Multiplier for manual scale ssetting.

Definition at line 160 of file zoom_controller.h.

Referenced by GetZoomControllerForPlatform().


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