33 using namespace KIGFX;
63 m_dpi( nullptr, nullptr ),
66 m_gridLineWidth( 1.0 ),
67 m_gridMinSpacing( 10.0 ),
68 m_axesEnabled( false ),
69 m_fullscreenCursor( false ),
70 m_forceDisplayCursor( false ),
71 m_scaleFactor(
DPI_SCALING::GetDefaultScaleFactor() )
GRID_STYLE
GRID_STYLE: Type definition of the grid style.
The Cairo implementation of the graphics abstraction layer.
KIGFX::GRID_STYLE m_gridStyle
Snapping options for the grid.
static const UTIL::CFG_MAP< KIGFX::GRID_STYLE > gridStyleConfigVals
static const wxChar * traceGalDispOpts
Flag to enable GAL_DISPLAY_OPTIONS logging.
bool m_forceDisplayCursor
The pixel scale factor (>1 for hi-DPI scaled displays)
double m_gridMinSpacing
Whether or not to draw the coordinate system axes.
void Notify(void(GAL_DISPLAY_OPTIONS_OBSERVER ::*Ptr)(Args1...), Args2 &&... aArgs)
Notify event to all subscribed observers.
OPENGL_ANTIALIASING_MODE gl_antialiasing_mode
double GetScaleFactor() const
Get the DPI scale from all known sources in order:
Class to handle configuration and automatic determination of the DPI scale to use for canvases.
bool m_axesEnabled
Fullscreen crosshair or small cross.
CAIRO_ANTIALIASING_MODE cairo_antialiasing_mode
Stores the common settings that are saved and loaded for each window / frame.
GRID_SNAPPING m_gridSnapping
Thickness to render grid lines/dots.
void WriteConfig(WINDOW_SETTINGS &aCfg)
void ReadCommonConfig(COMMON_SETTINGS &aCommonSettings, wxWindow *aWindow)
Read GAL config options from the common config store.
static CFG_NATIVE_VAL< MAP > GetValFromConfig(const MAP &aMap, long aConf)
Get the native value corresponding to the config value (read from file or UI, probably) and find it i...
Use small cross instead of dots for the grid.
DPI_SCALING m_dpi
The grid style to draw the grid in.
virtual void OnGalDisplayOptionsChanged(const GAL_DISPLAY_OPTIONS &)=0
static const UTIL::CFG_MAP< KIGFX::GRID_SNAPPING > gridSnapConfigVals
double m_gridLineWidth
Minimum pixel distance between displayed grid lines.
void ReadConfig(COMMON_SETTINGS &aCommonConfig, WINDOW_SETTINGS &aWindowConfig, wxWindow *aWindow)
Read application and common configs.
std::vector< std::pair< T, long > > CFG_MAP
A config value table is a list of native values (usually enums) to a different set of values,...
bool m_fullscreenCursor
Force cursor display.
void ReadWindowSettings(WINDOW_SETTINGS &aCfg)
Read GAL config options from application-level config.
static long GetConfigForVal(const MAP &aMap, CFG_NATIVE_VAL< MAP > aVal)
Get the mapped config value (the one to write to file, or use in an index) from the given native (pro...