KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_fp_editor_defaults_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bSizerMain;
18 bSizerMain = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* bSizerMargins;
21 bSizerMargins = new wxBoxSizer( wxVERTICAL );
22
23 defaultFieldPropertiesLabel = new wxStaticText( this, wxID_ANY, _("Default field properties for new footprints:"), wxDefaultPosition, wxDefaultSize, 0 );
25 bSizerMargins->Add( defaultFieldPropertiesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
26
27
28 bSizerMargins->Add( 0, 4, 0, wxEXPAND, 5 );
29
30 wxBoxSizer* defaultFieldPropertiesSizer;
31 defaultFieldPropertiesSizer = new wxBoxSizer( wxVERTICAL );
32
33 m_fieldPropsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
34
35 // Grid
36 m_fieldPropsGrid->CreateGrid( 2, 3 );
37 m_fieldPropsGrid->EnableEditing( true );
38 m_fieldPropsGrid->EnableGridLines( true );
39 m_fieldPropsGrid->EnableDragGridSize( false );
40 m_fieldPropsGrid->SetMargins( 0, 0 );
41
42 // Columns
43 m_fieldPropsGrid->SetColSize( 0, 240 );
44 m_fieldPropsGrid->SetColSize( 1, 60 );
45 m_fieldPropsGrid->SetColSize( 2, 120 );
46 m_fieldPropsGrid->EnableDragColMove( false );
47 m_fieldPropsGrid->EnableDragColSize( true );
48 m_fieldPropsGrid->SetColLabelValue( 0, _("Value") );
49 m_fieldPropsGrid->SetColLabelValue( 1, _("Show") );
50 m_fieldPropsGrid->SetColLabelValue( 2, _("Layer") );
51 m_fieldPropsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
52 m_fieldPropsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
53
54 // Rows
55 m_fieldPropsGrid->EnableDragRowSize( false );
56 m_fieldPropsGrid->SetRowLabelValue( 0, _("Reference designator") );
57 m_fieldPropsGrid->SetRowLabelValue( 1, _("Value") );
58 m_fieldPropsGrid->SetRowLabelSize( 160 );
59 m_fieldPropsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
60
61 // Label Appearance
62
63 // Cell Defaults
64 m_fieldPropsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
65 defaultFieldPropertiesSizer->Add( m_fieldPropsGrid, 0, wxEXPAND, 5 );
66
67
68 bSizerMargins->Add( defaultFieldPropertiesSizer, 0, wxEXPAND, 5 );
69
70
71 bSizerMargins->Add( 5, 25, 0, wxEXPAND, 5 );
72
73 defaultTextItemsLabel = new wxStaticText( this, wxID_ANY, _("Default text items for new footprints:"), wxDefaultPosition, wxDefaultSize, 0 );
74 defaultTextItemsLabel->Wrap( -1 );
75 bSizerMargins->Add( defaultTextItemsLabel, 0, wxTOP|wxLEFT|wxEXPAND, 8 );
76
77
78 bSizerMargins->Add( 0, 4, 0, wxEXPAND, 5 );
79
80 wxBoxSizer* defaultTextItemsSizer;
81 defaultTextItemsSizer = new wxBoxSizer( wxVERTICAL );
82
83 m_textItemsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
84
85 // Grid
86 m_textItemsGrid->CreateGrid( 0, 3 );
87 m_textItemsGrid->EnableEditing( true );
88 m_textItemsGrid->EnableGridLines( true );
89 m_textItemsGrid->EnableDragGridSize( false );
90 m_textItemsGrid->SetMargins( 0, 0 );
91
92 // Columns
93 m_textItemsGrid->SetColSize( 0, 400 );
94 m_textItemsGrid->SetColSize( 1, 60 );
95 m_textItemsGrid->SetColSize( 2, 120 );
96 m_textItemsGrid->EnableDragColMove( false );
97 m_textItemsGrid->EnableDragColSize( true );
98 m_textItemsGrid->SetColLabelValue( 0, _("Text Items") );
99 m_textItemsGrid->SetColLabelValue( 1, _("Show") );
100 m_textItemsGrid->SetColLabelValue( 2, _("Layer") );
101 m_textItemsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
102 m_textItemsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
103
104 // Rows
105 m_textItemsGrid->EnableDragRowSize( false );
106 m_textItemsGrid->SetRowLabelSize( 0 );
107 m_textItemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
108
109 // Label Appearance
110
111 // Cell Defaults
112 m_textItemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
113 m_textItemsGrid->SetMinSize( wxSize( -1,140 ) );
114
115 defaultTextItemsSizer->Add( m_textItemsGrid, 1, wxEXPAND, 5 );
116
117 wxBoxSizer* bButtonSize;
118 bButtonSize = new wxBoxSizer( wxHORIZONTAL );
119
120 m_bpAdd = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
121 m_bpAdd->SetMinSize( wxSize( 30,29 ) );
122
123 bButtonSize->Add( m_bpAdd, 0, wxBOTTOM|wxLEFT|wxTOP, 5 );
124
125
126 bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 );
127
128 m_bpDelete = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
129 m_bpDelete->SetMinSize( wxSize( 30,29 ) );
130
131 bButtonSize->Add( m_bpDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 );
132
133
134 bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
135
136
137 defaultTextItemsSizer->Add( bButtonSize, 0, wxEXPAND, 5 );
138
139
140 bSizerMargins->Add( defaultTextItemsSizer, 1, wxEXPAND, 20 );
141
142
143 bSizerMargins->Add( 0, 20, 0, wxEXPAND, 5 );
144
145 wxBoxSizer* defaultPropertiesSizer;
146 defaultPropertiesSizer = new wxBoxSizer( wxVERTICAL );
147
148 wxStaticText* defaultPropertiesLabel;
149 defaultPropertiesLabel = new wxStaticText( this, wxID_ANY, _("Default properties for new graphic items:"), wxDefaultPosition, wxDefaultSize, 0 );
150 defaultPropertiesLabel->Wrap( -1 );
151 defaultPropertiesSizer->Add( defaultPropertiesLabel, 0, wxEXPAND|wxRIGHT|wxLEFT, 8 );
152
153
154 defaultPropertiesSizer->Add( 0, 4, 0, wxEXPAND, 5 );
155
156 m_graphicsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
157
158 // Grid
159 m_graphicsGrid->CreateGrid( 6, 5 );
160 m_graphicsGrid->EnableEditing( true );
161 m_graphicsGrid->EnableGridLines( true );
162 m_graphicsGrid->EnableDragGridSize( false );
163 m_graphicsGrid->SetMargins( 0, 0 );
164
165 // Columns
166 m_graphicsGrid->SetColSize( 0, 110 );
167 m_graphicsGrid->SetColSize( 1, 100 );
168 m_graphicsGrid->SetColSize( 2, 100 );
169 m_graphicsGrid->SetColSize( 3, 100 );
170 m_graphicsGrid->SetColSize( 4, 60 );
171 m_graphicsGrid->EnableDragColMove( false );
172 m_graphicsGrid->EnableDragColSize( true );
173 m_graphicsGrid->SetColLabelValue( 0, _("Line Thickness") );
174 m_graphicsGrid->SetColLabelValue( 1, _("Text Width") );
175 m_graphicsGrid->SetColLabelValue( 2, _("Text Height") );
176 m_graphicsGrid->SetColLabelValue( 3, _("Text Thickness") );
177 m_graphicsGrid->SetColLabelValue( 4, _("Italic") );
178 m_graphicsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
179 m_graphicsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
180
181 // Rows
182 m_graphicsGrid->EnableDragRowSize( false );
183 m_graphicsGrid->SetRowLabelValue( 0, _("Silk Layers") );
184 m_graphicsGrid->SetRowLabelValue( 1, _("Copper Layers") );
185 m_graphicsGrid->SetRowLabelValue( 2, _("Edge Cuts") );
186 m_graphicsGrid->SetRowLabelValue( 3, _("Courtyards") );
187 m_graphicsGrid->SetRowLabelValue( 4, _("Fab Layers") );
188 m_graphicsGrid->SetRowLabelValue( 5, _("Other Layers") );
189 m_graphicsGrid->SetRowLabelSize( 125 );
190 m_graphicsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
191
192 // Label Appearance
193
194 // Cell Defaults
195 m_graphicsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
196 defaultPropertiesSizer->Add( m_graphicsGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 1 );
197
198
199 bSizerMargins->Add( defaultPropertiesSizer, 0, wxEXPAND|wxTOP, 5 );
200
201
202 bSizerMain->Add( bSizerMargins, 1, wxEXPAND, 5 );
203
204
205 this->SetSizer( bSizerMain );
206 this->Layout();
207 bSizerMain->Fit( this );
208
209 // Connect Events
210 m_fieldPropsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
211 m_textItemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
212 m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnAddTextItem ), NULL, this );
213 m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnDeleteTextItem ), NULL, this );
214}
215
217{
218 // Disconnect Events
219 m_fieldPropsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
220 m_textItemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
221 m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnAddTextItem ), NULL, this );
222 m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnDeleteTextItem ), NULL, this );
223
224}
const char * name
Definition: DXF_plotter.cpp:57
PANEL_FP_EDITOR_DEFAULTS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnGridSize(wxSizeEvent &event)
virtual void OnAddTextItem(wxCommandEvent &event)
virtual void OnDeleteTextItem(wxCommandEvent &event)
A wxPanel that is designed to be reset in a standard manner.
A bitmap button widget that behaves like a standard dialog button except with an icon.
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:249
#define _(s)