KiCad PCB EDA Suite
Loading...
Searching...
No Matches
gal_display_options.h
Go to the documentation of this file.
1/*
2* This program source code file is part of KICAD, a free EDA CAD application.
3*
4* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5*
6* This program is free software; you can redistribute it and/or
7* modify it under the terms of the GNU General Public License
8* as published by the Free Software Foundation; either version 2
9* of the License, or (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/
19
20#ifndef GAL_DISPLAY_OPTIONS_H__
21#define GAL_DISPLAY_OPTIONS_H__
22
23#include <gal/gal.h>
24#include <dpi_scaling.h>
25#include <core/observable.h>
26
27class COMMON_SETTINGS;
28struct WINDOW_SETTINGS;
29class wxString;
30class wxWindow;
31
32#if defined( _MSC_VER )
33#pragma warning( push )
34#pragma warning( disable : 4275 )
35#endif
36
37namespace KIGFX
38{
42 enum class GRID_STYLE
43 {
47 };
48
55
62
69
70 class GAL_DISPLAY_OPTIONS;
71
73 {
74 public:
76
77 protected:
78 // Observer lifetimes aren't handled by base class pointer
80 };
81
122
123} // namespace KIGFX
124
125#if defined( _MSC_VER )
126#pragma warning( pop )
127#endif
128
129#endif
130
virtual void OnGalDisplayOptionsChanged(const GAL_DISPLAY_OPTIONS &)=0
CROSS_HAIR_MODE GetCursorMode() const
CROSS_HAIR_MODE m_crossHairMode
Force cursor display.
double m_gridLineWidth
Minimum pixel distance between displayed grid lines.
double m_gridMinSpacing
Whether or not to draw the coordinate system axes.
GAL_ANTIALIASING_MODE antialiasing_mode
The grid style to draw the grid in.
bool m_forceDisplayCursor
The pixel scale factor (>1 for hi-DPI scaled displays)
KIGFX::GRID_STYLE m_gridStyle
Snapping options for the grid.
void SetCursorMode(CROSS_HAIR_MODE aMode)
bool m_axesEnabled
Crosshair drawing mode.
GRID_SNAPPING m_gridSnapping
Thickness to render grid lines/dots.
#define GAL_API
Definition gal.h:27
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:29
GRID_STYLE
Type definition of the grid style.
@ SMALL_CROSS
Use small cross instead of dots for the grid.
@ DOTS
Use dots for the grid.
@ LINES
Use lines for the grid.
Store the common settings that are saved and loaded for each window / frame.