KiCad PCB EDA Suite
panel_eeschema_display_options.cpp
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) 2009 Wayne Stambaugh <stambaughw@gmail.com>
5  * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #include <sch_edit_frame.h>
26 #include <sch_painter.h>
27 #include <class_libentry.h>
30 #include <sch_junction.h>
31 
33  wxWindow* aWindow ) :
35  m_frame( aFrame )
36 {
38  m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
39 
40  m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
41 
42  wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
43  infoFont.SetSymbolicSize( wxFONTSIZE_SMALL );
44  m_highlightColorNote->SetFont( infoFont );
45 }
46 
47 
49 {
51 
55 
56  m_checkSelTextBox->SetValue( cfg->m_Selection.text_as_box );
59  m_selWidthCtrl->SetValue( cfg->m_Selection.thickness );
60 
64 
66 
67  return true;
68 }
69 
70 
72 {
74 
78 
79  cfg->m_Selection.text_as_box = m_checkSelTextBox->GetValue();
81  cfg->m_Selection.fill_shapes = m_checkSelFillShapes->GetValue();
82  cfg->m_Selection.thickness = KiROUND( m_selWidthCtrl->GetValue() );
83 
87 
88  // Update canvas
95 
97 
98  return true;
99 }
100 
101 
KIGFX::SCH_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
void UpdateAllItems(int aUpdateFlags)
Updates all items in the view according to the given flags.
Definition: view.cpp:1417
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
Schematic editor (Eeschema) main window.
EESCHEMA_SETTINGS * eeconfig() const
Item is being added to the view.
Definition: view_item.h:62
PANEL_EESCHEMA_DISPLAY_OPTIONS(SCH_EDIT_FRAME *aFrame, wxWindow *aWindow)
bool TransferDataToWindow() override
Load the panel controls from the given opt.
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
bool zoom_to_fit
Zoom to fit items (ignored if center_on_items is off)
Definition: app_settings.h:33
bool auto_highlight
Automatically turn on highlight mode in the target frame.
Definition: app_settings.h:34
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:68
CROSS_PROBING_SETTINGS m_CrossProbing
Definition: app_settings.h:159
bool center_on_items
Automatically pan to cross-probed items.
Definition: app_settings.h:32
Class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE.
void MarkDirty()
Function MarkDirty() Forces redraw of view on the next rendering.
Definition: view.h:596
void SetShowPageLimits(bool aDraw)
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.