KiCad PCB EDA Suite
dialog_graphic_items_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) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
5  * Copyright (C) 1992-2014 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 <fctsys.h>
26 
27 #include <pcbnew.h>
28 #include <wxPcbStruct.h>
29 #include <base_units.h>
30 
31 #include <pcbnew_id.h>
32 #include <module_editor_frame.h>
33 #include <class_board.h>
34 
36 
37 
38 void PCB_EDIT_FRAME::OnConfigurePcbOptions( wxCommandEvent& aEvent )
39 {
40  DIALOG_GRAPHIC_ITEMS_OPTIONS dlg( this );
41 
42  dlg.ShowModal();
43 }
44 
45 
47 {
48  DIALOG_GRAPHIC_ITEMS_OPTIONS dlg( this );
49  dlg.ShowModal();
50 }
51 
52 
53 /*
54  * DIALOG_GRAPHIC_ITEMS_OPTIONS constructor
55  */
56 
59 {
60  m_parent = parent;
62  initValues( );
63 
64  m_sdbSizerOK->SetDefault();
65 
66 }
67 
69 {
70 }
71 
72 
74 {
75  SetFocus();
76 
77  /* Drawings width */
80 
81  /* Edges width */
84 
85  /* Pcb Textes (Size & Width) */
88 
91 
94 
95 
96  /* Modules: Edges width */
99 
100  /* Modules: Texts: Size & width */
103 
106 
109 
112 }
113 
114 
115 void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnOkClick( wxCommandEvent& event )
116 {
122 
124 
129 
131 
134 
136 
137  EndModal( wxID_OK );
138 }
139 
140 
145 void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnCancelClick( wxCommandEvent& event )
146 {
147  event.Skip();
148 }
Definition of class FOOTPRINT_EDIT_FRAME.
Implementation of conversion functions that require both schematic and board internal units...
int m_ModuleTextWidth
Default footprint texts thickness.
int m_ModuleSegmentWidth
Default width for all graphic lines.
int m_PcbTextWidth
current Pcb (not module) Text width
Class BOARD to handle a board.
BOARD * GetBoard() const
wxSize m_ModuleTextSize
Default footprint texts size.
void OnCancelClick(wxCommandEvent &event) override
void OnOkClick(wxCommandEvent &event) override
void InstallOptionsFrame(const wxPoint &pos)
void OnConfigurePcbOptions(wxCommandEvent &aEvent)
wxSize m_PcbTextSize
current Pcb (not module) Text size
int m_DrawSegmentWidth
current graphic line width (not EDGE layer)
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings returns the BOARD_DESIGN_SETTINGS for the BOARD owned by this frame...
void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aDesignSettings)
Function SetDesignSettings.
Definition: class_board.h:543
int g_DrawDefaultLineThickness
Default line thickness in internal units used to draw or plot items using a default thickness line va...
int ValueFromTextCtrl(const wxTextCtrl &aTextCtr)
Convert the number Value in a string according to the internal units and the selected unit (g_UserUni...
Definition: base_units.cpp:384
DIALOG_GRAPHIC_ITEMS_OPTIONS(PCB_BASE_FRAME *parent)
void PutValueInLocalUnits(wxTextCtrl &aTextCtr, int aValue)
Function PutValueInLocalUnits converts aValue from internal units to user units and append the units ...
Definition: base_units.cpp:265
void AddUnitSymbol(wxStaticText &Stext, EDA_UNITS_T aUnit)
Definition: base_units.cpp:509
Class DIALOG_GRAPHIC_ITEMS_OPTIONS_BASE.
virtual void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aSettings)
int m_EdgeSegmentWidth
current graphic line width (EDGE layer only)
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...