KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eeschema/dialogs/dialog_tablecell_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10#include "widgets/font_choice.h"
11#include "widgets/wx_infobar.h"
12
14
16
17DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
18{
19 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
20
21 wxBoxSizer* bMainSizer;
22 bMainSizer = new wxBoxSizer( wxVERTICAL );
23
24 m_infoBar = new WX_INFOBAR( this );
25 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
26 m_infoBar->SetEffectDuration( 500 );
27 m_infoBar->Hide();
28
29 bMainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
30
31 wxBoxSizer* bSizer13;
32 bSizer13 = new wxBoxSizer( wxVERTICAL );
33
34 wxBoxSizer* bMargins;
35 bMargins = new wxBoxSizer( wxVERTICAL );
36
37 wxFlexGridSizer* fgTextStyleSizer;
38 fgTextStyleSizer = new wxFlexGridSizer( 0, 2, 5, 5 );
39 fgTextStyleSizer->SetFlexibleDirection( wxBOTH );
40 fgTextStyleSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
41
42 wxStaticText* hAlignLabel;
43 hAlignLabel = new wxStaticText( this, wxID_ANY, _("Horizontal alignment:"), wxDefaultPosition, wxDefaultSize, 0 );
44 hAlignLabel->Wrap( -1 );
45 hAlignLabel->SetToolTip( _("Horizontal alignment") );
46
47 fgTextStyleSizer->Add( hAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
48
49 wxBoxSizer* hAlignButtons;
50 hAlignButtons = new wxBoxSizer( wxHORIZONTAL );
51
52 m_hAlignLeft = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
53 m_hAlignLeft->SetToolTip( _("Align left") );
54
55 hAlignButtons->Add( m_hAlignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
56
57 m_hAlignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
58 m_hAlignCenter->SetToolTip( _("Align horizontal center") );
59
60 hAlignButtons->Add( m_hAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
61
62 m_hAlignRight = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
63 m_hAlignRight->SetToolTip( _("Align right") );
64
65 hAlignButtons->Add( m_hAlignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
66
67
68 fgTextStyleSizer->Add( hAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
69
70 vAlignLabel = new wxStaticText( this, wxID_ANY, _("Vertical alignment:"), wxDefaultPosition, wxDefaultSize, 0 );
71 vAlignLabel->Wrap( -1 );
72 vAlignLabel->SetToolTip( _("Vertical alignment") );
73
74 fgTextStyleSizer->Add( vAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
75
76 wxBoxSizer* vAlignButtons;
77 vAlignButtons = new wxBoxSizer( wxHORIZONTAL );
78
79 m_vAlignTop = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
80 m_vAlignTop->SetToolTip( _("Align top") );
81
82 vAlignButtons->Add( m_vAlignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
83
84 m_vAlignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
85 m_vAlignCenter->SetToolTip( _("Align vertical center") );
86
87 vAlignButtons->Add( m_vAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
88
89 m_vAlignBottom = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
90 m_vAlignBottom->SetToolTip( _("Align bottom") );
91
92 vAlignButtons->Add( m_vAlignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
93
94
95 fgTextStyleSizer->Add( vAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
96
97
98 bMargins->Add( fgTextStyleSizer, 0, wxEXPAND|wxBOTTOM, 6 );
99
100
101 bMargins->Add( 0, 10, 0, wxEXPAND, 5 );
102
103 wxGridBagSizer* gbFontSizer;
104 gbFontSizer = new wxGridBagSizer( 6, 5 );
105 gbFontSizer->SetFlexibleDirection( wxBOTH );
106 gbFontSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
107 gbFontSizer->SetEmptyCellSize( wxSize( -1,5 ) );
108
109 m_styleLabel = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 );
110 m_styleLabel->Wrap( -1 );
111 gbFontSizer->Add( m_styleLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
112
113 wxBoxSizer* bSizer14;
114 bSizer14 = new wxBoxSizer( wxHORIZONTAL );
115
116 m_bold = new wxCheckBox( this, wxID_ANY, _("Bold"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
117 bSizer14->Add( m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
118
119 m_italic = new wxCheckBox( this, wxID_ANY, _("Italic"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
120 bSizer14->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 45 );
121
122
123 gbFontSizer->Add( bSizer14, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
124
125 m_fontLabel = new wxStaticText( this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 );
126 m_fontLabel->Wrap( -1 );
127 gbFontSizer->Add( m_fontLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 );
128
129 wxString m_fontCtrlChoices[] = { _("Default Font"), _("KiCad Font") };
130 int m_fontCtrlNChoices = sizeof( m_fontCtrlChoices ) / sizeof( wxString );
131 m_fontCtrl = new FONT_CHOICE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
132 m_fontCtrl->SetSelection( 0 );
133 gbFontSizer->Add( m_fontCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
134
135 m_textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 );
136 m_textSizeLabel->Wrap( -1 );
137 gbFontSizer->Add( m_textSizeLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
138
139 wxBoxSizer* bSizer15;
140 bSizer15 = new wxBoxSizer( wxHORIZONTAL );
141
142 m_textSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
143 bSizer15->Add( m_textSizeCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
144
145 m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
146 m_textSizeUnits->Wrap( -1 );
147 bSizer15->Add( m_textSizeUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 3 );
148
149
150 gbFontSizer->Add( bSizer15, wxGBPosition( 1, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL, 5 );
151
152
153 gbFontSizer->AddGrowableCol( 1 );
154
155 bMargins->Add( gbFontSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
156
157 wxFlexGridSizer* fgColorSizer;
158 fgColorSizer = new wxFlexGridSizer( 0, 2, 4, 5 );
159 fgColorSizer->SetFlexibleDirection( wxBOTH );
160 fgColorSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
161
162 m_textColorLabel = new wxStaticText( this, wxID_ANY, _("Text color:"), wxDefaultPosition, wxDefaultSize, 0 );
163 m_textColorLabel->Wrap( -1 );
164 fgColorSizer->Add( m_textColorLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
165
166 m_textColorBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
167 wxPanel* textColorPopupPanel;
168 textColorPopupPanel = new wxPanel( m_textColorBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
169 wxBoxSizer* bSizer20;
170 bSizer20 = new wxBoxSizer( wxVERTICAL );
171
172 wxString m_textColorPopupChoices[] = { _("-- mixed values --"), _("Set Color...") };
173 int m_textColorPopupNChoices = sizeof( m_textColorPopupChoices ) / sizeof( wxString );
174 m_textColorPopup = new wxChoice( textColorPopupPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_textColorPopupNChoices, m_textColorPopupChoices, 0 );
175 m_textColorPopup->SetSelection( 0 );
176 bSizer20->Add( m_textColorPopup, 0, 0, 5 );
177
178
179 textColorPopupPanel->SetSizer( bSizer20 );
180 textColorPopupPanel->Layout();
181 bSizer20->Fit( textColorPopupPanel );
182 m_textColorBook->AddPage( textColorPopupPanel, _("a page"), false );
183 textColorSwatchPanel = new wxPanel( m_textColorBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
184 wxBoxSizer* bSizer222;
185 bSizer222 = new wxBoxSizer( wxHORIZONTAL );
186
187 m_panelTextColor = new wxPanel( textColorSwatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
188 wxBoxSizer* bSizer221;
189 bSizer221 = new wxBoxSizer( wxVERTICAL );
190
191 m_textColorSwatch = new COLOR_SWATCH( m_panelTextColor, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
192 bSizer221->Add( m_textColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
193
194
195 m_panelTextColor->SetSizer( bSizer221 );
196 m_panelTextColor->Layout();
197 bSizer221->Fit( m_panelTextColor );
198 bSizer222->Add( m_panelTextColor, 0, wxALIGN_CENTER_VERTICAL, 5 );
199
200
201 textColorSwatchPanel->SetSizer( bSizer222 );
202 textColorSwatchPanel->Layout();
203 bSizer222->Fit( textColorSwatchPanel );
204 m_textColorBook->AddPage( textColorSwatchPanel, _("a page"), false );
205
206 fgColorSizer->Add( m_textColorBook, 0, wxALIGN_CENTER_VERTICAL, 5 );
207
208 m_fillColorLabel = new wxStaticText( this, wxID_ANY, _("Background fill:"), wxDefaultPosition, wxDefaultSize, 0 );
209 m_fillColorLabel->Wrap( -1 );
210 fgColorSizer->Add( m_fillColorLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
211
212 m_fillColorBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
213 wxPanel* fillColorPopupPanel;
214 fillColorPopupPanel = new wxPanel( m_fillColorBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
215 wxBoxSizer* bSizer211;
216 bSizer211 = new wxBoxSizer( wxVERTICAL );
217
218 wxString m_fillColorPopupChoices[] = { _("-- mixed values --"), _("Set Color...") };
219 int m_fillColorPopupNChoices = sizeof( m_fillColorPopupChoices ) / sizeof( wxString );
220 m_fillColorPopup = new wxChoice( fillColorPopupPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fillColorPopupNChoices, m_fillColorPopupChoices, 0 );
221 m_fillColorPopup->SetSelection( 0 );
222 bSizer211->Add( m_fillColorPopup, 0, 0, 5 );
223
224
225 fillColorPopupPanel->SetSizer( bSizer211 );
226 fillColorPopupPanel->Layout();
227 bSizer211->Fit( fillColorPopupPanel );
228 m_fillColorBook->AddPage( fillColorPopupPanel, _("a page"), false );
229 fillColorSwatchPanel = new wxPanel( m_fillColorBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
230 wxBoxSizer* bSizer23;
231 bSizer23 = new wxBoxSizer( wxHORIZONTAL );
232
233 m_panelFillColor = new wxPanel( fillColorSwatchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
234 wxBoxSizer* bSizer22;
235 bSizer22 = new wxBoxSizer( wxVERTICAL );
236
237 m_fillColorSwatch = new COLOR_SWATCH( m_panelFillColor, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
238 bSizer22->Add( m_fillColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
239
240
241 m_panelFillColor->SetSizer( bSizer22 );
242 m_panelFillColor->Layout();
243 bSizer22->Fit( m_panelFillColor );
244 bSizer23->Add( m_panelFillColor, 0, wxALIGN_CENTER_VERTICAL, 5 );
245
246
247 fillColorSwatchPanel->SetSizer( bSizer23 );
248 fillColorSwatchPanel->Layout();
249 bSizer23->Fit( fillColorSwatchPanel );
250 m_fillColorBook->AddPage( fillColorSwatchPanel, _("a page"), false );
251
252 fgColorSizer->Add( m_fillColorBook, 0, wxALIGN_CENTER_VERTICAL, 5 );
253
254
255 bMargins->Add( fgColorSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 20 );
256
257
258 bMargins->Add( 0, 5, 0, wxEXPAND, 5 );
259
260 wxGridSizer* gMarginsSizer;
261 gMarginsSizer = new wxGridSizer( 0, 3, 4, 2 );
262
263 wxStaticText* marginsLabel;
264 marginsLabel = new wxStaticText( this, wxID_ANY, _("Cell margins:"), wxDefaultPosition, wxDefaultSize, 0 );
265 marginsLabel->Wrap( -1 );
266 gMarginsSizer->Add( marginsLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
267
268 m_marginTopCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
269 gMarginsSizer->Add( m_marginTopCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
270
271 m_marginTopUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
272 m_marginTopUnits->Wrap( -1 );
273 gMarginsSizer->Add( m_marginTopUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 2 );
274
275 m_marginLeftCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
276 gMarginsSizer->Add( m_marginLeftCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
277
278
279 gMarginsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
280
281 m_marginRightCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
282 gMarginsSizer->Add( m_marginRightCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
283
284
285 gMarginsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
286
287 m_marginBottomCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
288 gMarginsSizer->Add( m_marginBottomCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
289
290
291 bMargins->Add( gMarginsSizer, 0, wxEXPAND, 5 );
292
293
294 bSizer13->Add( bMargins, 1, wxEXPAND|wxALL, 5 );
295
296
297 bMainSizer->Add( bSizer13, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
298
299 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
300 bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
301
302 wxBoxSizer* bButtons;
303 bButtons = new wxBoxSizer( wxHORIZONTAL );
304
305 m_editTable = new wxButton( this, wxID_ANY, _("Edit Table..."), wxDefaultPosition, wxDefaultSize, 0 );
306 m_editTable->SetToolTip( _("Edit table properties and cell contents") );
307
308 bButtons->Add( m_editTable, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
309
310
311 bButtons->Add( 0, 0, 1, wxEXPAND, 5 );
312
313 m_sdbSizer1 = new wxStdDialogButtonSizer();
314 m_sdbSizer1OK = new wxButton( this, wxID_OK );
315 m_sdbSizer1->AddButton( m_sdbSizer1OK );
316 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
317 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
318 m_sdbSizer1->Realize();
319
320 bButtons->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
321
322
323 bMainSizer->Add( bButtons, 0, wxEXPAND, 5 );
324
325
326 this->SetSizer( bMainSizer );
327 this->Layout();
328 bMainSizer->Fit( this );
329
330 // Connect Events
331 m_textColorPopup->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onTextColorPopup ), NULL, this );
332 m_fillColorPopup->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onFillColorPopup ), NULL, this );
333 m_editTable->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onEditTable ), NULL, this );
334}
335
337{
338 // Disconnect Events
339 m_textColorPopup->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onTextColorPopup ), NULL, this );
340 m_fillColorPopup->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onFillColorPopup ), NULL, this );
341 m_editTable->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onEditTable ), NULL, this );
342
343}
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
Definition: bitmap_button.h:42
A simple color swatch of the kind used to set layer colors.
Definition: color_swatch.h:57
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
DIALOG_TABLECELL_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Table Cell Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
A modified version of the wxInfoBar class that allows us to:
Definition: wx_infobar.h:76
#define _(s)