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 )
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
20 wxBoxSizer* bMainSizer;
21 bMainSizer =
new wxBoxSizer( wxVERTICAL );
24 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
25 m_infoBar->SetEffectDuration( 500 );
28 bMainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
31 bMargins =
new wxBoxSizer( wxVERTICAL );
33 wxFlexGridSizer* fgTextStyleSizer;
34 fgTextStyleSizer =
new wxFlexGridSizer( 0, 2, 5, 5 );
35 fgTextStyleSizer->SetFlexibleDirection( wxBOTH );
36 fgTextStyleSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
38 wxStaticText* hAlignLabel;
39 hAlignLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Horizontal alignment:"), wxDefaultPosition, wxDefaultSize, 0 );
40 hAlignLabel->Wrap( -1 );
41 hAlignLabel->SetToolTip(
_(
"Horizontal alignment") );
43 fgTextStyleSizer->Add( hAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
45 wxBoxSizer* hAlignButtons;
46 hAlignButtons =
new wxBoxSizer( wxHORIZONTAL );
48 m_hAlignLeft =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
49 m_hAlignLeft->SetToolTip(
_(
"Align left") );
51 hAlignButtons->Add( m_hAlignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
53 m_hAlignCenter =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
54 m_hAlignCenter->SetToolTip(
_(
"Align horizontal center") );
56 hAlignButtons->Add( m_hAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
58 m_hAlignRight =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
59 m_hAlignRight->SetToolTip(
_(
"Align right") );
61 hAlignButtons->Add( m_hAlignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
64 fgTextStyleSizer->Add( hAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
66 vAlignLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Vertical alignment:"), wxDefaultPosition, wxDefaultSize, 0 );
67 vAlignLabel->Wrap( -1 );
68 vAlignLabel->SetToolTip(
_(
"Vertical alignment") );
70 fgTextStyleSizer->Add( vAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
72 wxBoxSizer* vAlignButtons;
73 vAlignButtons =
new wxBoxSizer( wxHORIZONTAL );
75 m_vAlignTop =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
76 m_vAlignTop->SetToolTip(
_(
"Align top") );
78 vAlignButtons->Add( m_vAlignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
80 m_vAlignCenter =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
81 m_vAlignCenter->SetToolTip(
_(
"Align vertical center") );
83 vAlignButtons->Add( m_vAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
85 m_vAlignBottom =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
86 m_vAlignBottom->SetToolTip(
_(
"Align bottom") );
88 vAlignButtons->Add( m_vAlignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
91 fgTextStyleSizer->Add( vAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
94 bMargins->Add( fgTextStyleSizer, 0, wxEXPAND, 5 );
97 bMargins->Add( 0, 20, 0, wxEXPAND, 5 );
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 ) );
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 );
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 );
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 );
119 wxBoxSizer* bSizer14;
120 bSizer14 =
new wxBoxSizer( wxHORIZONTAL );
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 );
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 );
129 gbFontSizer->Add( bSizer14, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
132 gbFontSizer->AddGrowableCol( 1 );
134 bMargins->Add( gbFontSizer, 0, wxEXPAND|wxBOTTOM, 1 );
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 ) );
142 m_SizeXLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text width:"), wxDefaultPosition, wxDefaultSize, 0 );
143 m_SizeXLabel->Wrap( -1 );
144 m_SizeXLabel->SetToolTip(
_(
"Text width") );
146 gbSizer1->Add( m_SizeXLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 4 );
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 );
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 );
155 m_SizeYLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
156 m_SizeYLabel->Wrap( -1 );
157 m_SizeYLabel->SetToolTip(
_(
"Text height") );
159 gbSizer1->Add( m_SizeYLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 4 );
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 );
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 );
168 m_ThicknessLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
169 m_ThicknessLabel->Wrap( -1 );
170 m_ThicknessLabel->SetToolTip(
_(
"Text thickness") );
172 gbSizer1->Add( m_ThicknessLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 4 );
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 );
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 );
182 bMargins->Add( gbSizer1, 0, wxEXPAND|wxTOP, 5 );
185 bMargins->Add( 0, 20, 0, wxEXPAND, 5 );
187 wxGridSizer* gMarginsSizer;
188 gMarginsSizer =
new wxGridSizer( 0, 3, 4, 2 );
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 );
195 m_marginTopCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
196 gMarginsSizer->Add( m_marginTopCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
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 );
202 m_marginLeftCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
203 gMarginsSizer->Add( m_marginLeftCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
206 gMarginsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
208 m_marginRightCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
209 gMarginsSizer->Add( m_marginRightCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
212 gMarginsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
214 m_marginBottomCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
215 gMarginsSizer->Add( m_marginBottomCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
218 bMargins->Add( gMarginsSizer, 0, wxEXPAND, 5 );
221 bMainSizer->Add( bMargins, 1, wxEXPAND|wxALL, 10 );
223 m_staticline1 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
224 bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
226 wxBoxSizer* bButtons;
227 bButtons =
new wxBoxSizer( wxHORIZONTAL );
229 m_editTable =
new wxButton(
this, wxID_ANY,
_(
"Edit Table..."), wxDefaultPosition, wxDefaultSize, 0 );
230 m_editTable->SetToolTip(
_(
"Edit table properties and cell contents") );
232 bButtons->Add( m_editTable, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
235 bButtons->Add( 0, 0, 1, wxEXPAND, 5 );
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();
244 bButtons->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
247 bMainSizer->Add( bButtons, 0, wxEXPAND, 5 );
250 this->SetSizer( bMainSizer );
252 bMainSizer->Fit(
this );
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
~DIALOG_TABLECELL_PROPERTIES_BASE()
virtual void OnOkClick(wxCommandEvent &event)
virtual void onEditTable(wxCommandEvent &event)
wxTextCtrl * m_ThicknessCtrl
virtual void onThickness(wxCommandEvent &event)
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: