KiCad PCB EDA Suite
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 (C) 2017 Kicad Developers, see change_log.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, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23 
24 #ifndef GAL_DISPLAY_OPTIONS_H__
25 #define GAL_DISPLAY_OPTIONS_H__
26 
27 #include <observable.h>
28 
29 class wxConfigBase;
30 class wxString;
31 
32 namespace KIGFX
33 {
37  enum class GRID_STYLE
38  {
39  DOTS,
40  LINES,
42  };
43 
45  {
46  NONE,
51  };
52 
53  class GAL_DISPLAY_OPTIONS;
54 
56  {
57  public:
58  virtual void OnGalDisplayOptionsChanged( const GAL_DISPLAY_OPTIONS& ) = 0;
59  protected:
60  // Observer lifetimes aren't handled by base class pointer
62  };
63 
64  class GAL_DISPLAY_OPTIONS : public UTIL::OBSERVABLE<GAL_DISPLAY_OPTIONS_OBSERVER>
65  {
66  public:
68 
69  void ReadConfig ( wxConfigBase* aCfg, wxString aBaseName );
70  void WriteConfig( wxConfigBase* aCfg, wxString aBaseName );
71 
72  void NotifyChanged();
73 
75 
78 
81 
84 
87 
90 
93  };
94 
95 }
96 
97 #endif
98 
Use lines for the grid.
GRID_STYLE
GRID_STYLE: Type definition of the grid style.
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:58
KIGFX::GRID_STYLE m_gridStyle
The grid style to draw the grid in
bool m_forceDisplayCursor
Force cursor display
double m_gridMinSpacing
Minimum pixel distance between displayed grid lines
OPENGL_ANTIALIASING_MODE gl_antialiasing_mode
bool m_axesEnabled
Whether or not to draw the coordinate system axes
Use dots for the grid.
Use small cross instead of dots for the grid.
void ReadConfig(wxConfigBase *aCfg, wxString aBaseName)
virtual void OnGalDisplayOptionsChanged(const GAL_DISPLAY_OPTIONS &)=0
double m_gridLineWidth
Thickness to render grid lines/dots
void WriteConfig(wxConfigBase *aCfg, wxString aBaseName)
bool m_fullscreenCursor
Fullscreen crosshair or small cross