KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbnew/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/wx_infobar.h"
11
13
15
16DIALOG_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 )
17{
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19
20 wxBoxSizer* bMainSizer;
21 bMainSizer = new wxBoxSizer( wxVERTICAL );
22
23 m_infoBar = new WX_INFOBAR( this );
24 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
25 m_infoBar->SetEffectDuration( 500 );
26 m_infoBar->Hide();
27
28 bMainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
29
30 wxBoxSizer* bMargins;
31 bMargins = new wxBoxSizer( wxVERTICAL );
32
33 wxFlexGridSizer* fgTextStyleSizer;
34 fgTextStyleSizer = new wxFlexGridSizer( 0, 2, 5, 5 );
35 fgTextStyleSizer->SetFlexibleDirection( wxBOTH );
36 fgTextStyleSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
37
38 wxStaticText* hAlignLabel;
39 hAlignLabel = new wxStaticText( this, wxID_ANY, _("Horizontal alignment:"), wxDefaultPosition, wxDefaultSize, 0 );
40 hAlignLabel->Wrap( -1 );
41 hAlignLabel->SetToolTip( _("Horizontal alignment") );
42
43 fgTextStyleSizer->Add( hAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
44
45 wxBoxSizer* hAlignButtons;
46 hAlignButtons = new wxBoxSizer( wxHORIZONTAL );
47
48 m_hAlignLeft = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
49 m_hAlignLeft->SetToolTip( _("Align left") );
50
51 hAlignButtons->Add( m_hAlignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
52
53 m_hAlignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
54 m_hAlignCenter->SetToolTip( _("Align horizontal center") );
55
56 hAlignButtons->Add( m_hAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
57
58 m_hAlignRight = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
59 m_hAlignRight->SetToolTip( _("Align right") );
60
61 hAlignButtons->Add( m_hAlignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
62
63
64 fgTextStyleSizer->Add( hAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
65
66 vAlignLabel = new wxStaticText( this, wxID_ANY, _("Vertical alignment:"), wxDefaultPosition, wxDefaultSize, 0 );
67 vAlignLabel->Wrap( -1 );
68 vAlignLabel->SetToolTip( _("Vertical alignment") );
69
70 fgTextStyleSizer->Add( vAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
71
72 wxBoxSizer* vAlignButtons;
73 vAlignButtons = new wxBoxSizer( wxHORIZONTAL );
74
75 m_vAlignTop = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
76 m_vAlignTop->SetToolTip( _("Align top") );
77
78 vAlignButtons->Add( m_vAlignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
79
80 m_vAlignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
81 m_vAlignCenter->SetToolTip( _("Align vertical center") );
82
83 vAlignButtons->Add( m_vAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
84
85 m_vAlignBottom = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
86 m_vAlignBottom->SetToolTip( _("Align bottom") );
87
88 vAlignButtons->Add( m_vAlignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
89
90
91 fgTextStyleSizer->Add( vAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
92
93
94 bMargins->Add( fgTextStyleSizer, 0, wxEXPAND, 5 );
95
96
97 bMargins->Add( 0, 20, 0, wxEXPAND, 5 );
98
99 wxGridBagSizer* gbFontSizer;
100 gbFontSizer = new wxGridBagSizer( 7, 5 );
101 gbFontSizer->SetFlexibleDirection( wxBOTH );
102 gbFontSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
103 gbFontSizer->SetEmptyCellSize( wxSize( -1,5 ) );
104
105 m_fontLabel = new wxStaticText( this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 );
106 m_fontLabel->Wrap( -1 );
107 gbFontSizer->Add( m_fontLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 );
108
109 wxString m_fontCtrlChoices[] = { _("Default Font"), _("KiCad Font") };
110 int m_fontCtrlNChoices = sizeof( m_fontCtrlChoices ) / sizeof( wxString );
111 m_fontCtrl = new FONT_CHOICE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
112 m_fontCtrl->SetSelection( 0 );
113 gbFontSizer->Add( m_fontCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
114
115 m_styleLabel = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 );
116 m_styleLabel->Wrap( -1 );
117 gbFontSizer->Add( m_styleLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
118
119 wxBoxSizer* bSizer14;
120 bSizer14 = new wxBoxSizer( wxHORIZONTAL );
121
122 m_bold = new wxCheckBox( this, wxID_ANY, _("Bold"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
123 bSizer14->Add( m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
124
125 m_italic = new wxCheckBox( this, wxID_ANY, _("Italic"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
126 bSizer14->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 45 );
127
128
129 gbFontSizer->Add( bSizer14, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
130
131
132 gbFontSizer->AddGrowableCol( 1 );
133
134 bMargins->Add( gbFontSizer, 0, wxEXPAND|wxBOTTOM, 1 );
135
136 wxGridBagSizer* gbSizer1;
137 gbSizer1 = new wxGridBagSizer( 4, 5 );
138 gbSizer1->SetFlexibleDirection( wxBOTH );
139 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
140 gbSizer1->SetEmptyCellSize( wxSize( -1,8 ) );
141
142 m_SizeXLabel = new wxStaticText( this, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 );
143 m_SizeXLabel->Wrap( -1 );
144 m_SizeXLabel->SetToolTip( _("Text width") );
145
146 gbSizer1->Add( m_SizeXLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 4 );
147
148 m_SizeXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
149 gbSizer1->Add( m_SizeXCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
150
151 m_SizeXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
152 m_SizeXUnits->Wrap( -1 );
153 gbSizer1->Add( m_SizeXUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
154
155 m_SizeYLabel = new wxStaticText( this, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
156 m_SizeYLabel->Wrap( -1 );
157 m_SizeYLabel->SetToolTip( _("Text height") );
158
159 gbSizer1->Add( m_SizeYLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 4 );
160
161 m_SizeYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
162 gbSizer1->Add( m_SizeYCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
163
164 m_SizeYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
165 m_SizeYUnits->Wrap( -1 );
166 gbSizer1->Add( m_SizeYUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
167
168 m_ThicknessLabel = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
169 m_ThicknessLabel->Wrap( -1 );
170 m_ThicknessLabel->SetToolTip( _("Text thickness") );
171
172 gbSizer1->Add( m_ThicknessLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 4 );
173
174 m_ThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
175 gbSizer1->Add( m_ThicknessCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
176
177 m_ThicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
178 m_ThicknessUnits->Wrap( -1 );
179 gbSizer1->Add( m_ThicknessUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
180
181
182 bMargins->Add( gbSizer1, 0, wxEXPAND|wxTOP, 5 );
183
184
185 bMargins->Add( 0, 20, 0, wxEXPAND, 5 );
186
187 wxGridSizer* gMarginsSizer;
188 gMarginsSizer = new wxGridSizer( 0, 3, 4, 2 );
189
190 wxStaticText* marginsLabel;
191 marginsLabel = new wxStaticText( this, wxID_ANY, _("Cell margins:"), wxDefaultPosition, wxDefaultSize, 0 );
192 marginsLabel->Wrap( -1 );
193 gMarginsSizer->Add( marginsLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
194
195 m_marginTopCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
196 gMarginsSizer->Add( m_marginTopCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
197
198 m_marginTopUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
199 m_marginTopUnits->Wrap( -1 );
200 gMarginsSizer->Add( m_marginTopUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 2 );
201
202 m_marginLeftCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
203 gMarginsSizer->Add( m_marginLeftCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
204
205
206 gMarginsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
207
208 m_marginRightCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
209 gMarginsSizer->Add( m_marginRightCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
210
211
212 gMarginsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
213
214 m_marginBottomCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
215 gMarginsSizer->Add( m_marginBottomCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
216
217
218 bMargins->Add( gMarginsSizer, 0, wxEXPAND, 5 );
219
220
221 bMainSizer->Add( bMargins, 1, wxEXPAND|wxALL, 10 );
222
223 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
224 bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
225
226 wxBoxSizer* bButtons;
227 bButtons = new wxBoxSizer( wxHORIZONTAL );
228
229 m_editTable = new wxButton( this, wxID_ANY, _("Edit Table..."), wxDefaultPosition, wxDefaultSize, 0 );
230 m_editTable->SetToolTip( _("Edit table properties and cell contents") );
231
232 bButtons->Add( m_editTable, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
233
234
235 bButtons->Add( 0, 0, 1, wxEXPAND, 5 );
236
237 m_sdbSizer1 = new wxStdDialogButtonSizer();
238 m_sdbSizer1OK = new wxButton( this, wxID_OK );
239 m_sdbSizer1->AddButton( m_sdbSizer1OK );
240 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
241 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
242 m_sdbSizer1->Realize();
243
244 bButtons->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
245
246
247 bMainSizer->Add( bButtons, 0, wxEXPAND, 5 );
248
249
250 this->SetSizer( bMainSizer );
251 this->Layout();
252 bMainSizer->Fit( this );
253
254 // Connect Events
255 m_SizeXCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::OnOkClick ), NULL, this );
256 m_SizeYCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::OnOkClick ), NULL, this );
257 m_ThicknessCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onThickness ), NULL, this );
258 m_editTable->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onEditTable ), NULL, this );
259}
260
262{
263 // Disconnect Events
264 m_SizeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::OnOkClick ), NULL, this );
265 m_SizeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::OnOkClick ), NULL, this );
266 m_ThicknessCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onThickness ), NULL, this );
267 m_editTable->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onEditTable ), NULL, this );
268
269}
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
Definition: bitmap_button.h:42
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)