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 )
19 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
21 wxBoxSizer* bMainSizer;
22 bMainSizer =
new wxBoxSizer( wxVERTICAL );
25 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
29 bMainSizer->Add(
m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
32 bSizer13 =
new wxBoxSizer( wxVERTICAL );
35 bMargins =
new wxBoxSizer( wxVERTICAL );
37 wxFlexGridSizer* fgTextStyleSizer;
38 fgTextStyleSizer =
new wxFlexGridSizer( 0, 2, 5, 5 );
39 fgTextStyleSizer->SetFlexibleDirection( wxBOTH );
40 fgTextStyleSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
42 wxStaticText* hAlignLabel;
43 hAlignLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Horizontal alignment:"), wxDefaultPosition, wxDefaultSize, 0 );
44 hAlignLabel->Wrap( -1 );
45 hAlignLabel->SetToolTip(
_(
"Horizontal alignment") );
47 fgTextStyleSizer->Add( hAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
49 wxBoxSizer* hAlignButtons;
50 hAlignButtons =
new wxBoxSizer( wxHORIZONTAL );
52 m_hAlignLeft =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
55 hAlignButtons->Add(
m_hAlignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
60 hAlignButtons->Add(
m_hAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
62 m_hAlignRight =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
65 hAlignButtons->Add(
m_hAlignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
68 fgTextStyleSizer->Add( hAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
70 vAlignLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Vertical alignment:"), wxDefaultPosition, wxDefaultSize, 0 );
74 fgTextStyleSizer->Add(
vAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
76 wxBoxSizer* vAlignButtons;
77 vAlignButtons =
new wxBoxSizer( wxHORIZONTAL );
79 m_vAlignTop =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
82 vAlignButtons->Add(
m_vAlignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
87 vAlignButtons->Add(
m_vAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
92 vAlignButtons->Add(
m_vAlignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
95 fgTextStyleSizer->Add( vAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
98 bMargins->Add( fgTextStyleSizer, 0, wxEXPAND|wxBOTTOM, 6 );
101 bMargins->Add( 0, 10, 0, wxEXPAND, 5 );
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 ) );
109 m_styleLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Style:"), wxDefaultPosition, wxDefaultSize, 0 );
111 gbFontSizer->Add(
m_styleLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
113 wxBoxSizer* bSizer14;
114 bSizer14 =
new wxBoxSizer( wxHORIZONTAL );
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 );
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 );
123 gbFontSizer->Add( bSizer14, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
125 m_fontLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Font:"), wxDefaultPosition, wxDefaultSize, 0 );
127 gbFontSizer->Add(
m_fontLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 );
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 );
133 gbFontSizer->Add(
m_fontCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
135 m_textSizeLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Size:"), wxDefaultPosition, wxDefaultSize, 0 );
137 gbFontSizer->Add(
m_textSizeLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
139 wxBoxSizer* bSizer15;
140 bSizer15 =
new wxBoxSizer( wxHORIZONTAL );
142 m_textSizeCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
145 m_textSizeUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
147 bSizer15->Add(
m_textSizeUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 3 );
150 gbFontSizer->Add( bSizer15, wxGBPosition( 1, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL, 5 );
153 gbFontSizer->AddGrowableCol( 1 );
155 bMargins->Add( gbFontSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
157 wxFlexGridSizer* fgColorSizer;
158 fgColorSizer =
new wxFlexGridSizer( 0, 2, 4, 5 );
159 fgColorSizer->SetFlexibleDirection( wxBOTH );
160 fgColorSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
162 m_textColorLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text color:"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
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 );
179 textColorPopupPanel->SetSizer( bSizer20 );
180 textColorPopupPanel->Layout();
181 bSizer20->Fit( textColorPopupPanel );
184 wxBoxSizer* bSizer222;
185 bSizer222 =
new wxBoxSizer( wxHORIZONTAL );
188 wxBoxSizer* bSizer221;
189 bSizer221 =
new wxBoxSizer( wxVERTICAL );
192 bSizer221->Add(
m_textColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
208 m_fillColorLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Background fill:"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
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 );
225 fillColorPopupPanel->SetSizer( bSizer211 );
226 fillColorPopupPanel->Layout();
227 bSizer211->Fit( fillColorPopupPanel );
230 wxBoxSizer* bSizer23;
231 bSizer23 =
new wxBoxSizer( wxHORIZONTAL );
234 wxBoxSizer* bSizer22;
235 bSizer22 =
new wxBoxSizer( wxVERTICAL );
238 bSizer22->Add(
m_fillColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
255 bMargins->Add( fgColorSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 20 );
258 bMargins->Add( 0, 5, 0, wxEXPAND, 5 );
260 wxGridSizer* gMarginsSizer;
261 gMarginsSizer =
new wxGridSizer( 0, 3, 4, 2 );
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 );
268 m_marginTopCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
271 m_marginTopUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
273 gMarginsSizer->Add(
m_marginTopUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 2 );
275 m_marginLeftCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
279 gMarginsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
281 m_marginRightCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
285 gMarginsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
287 m_marginBottomCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
291 bMargins->Add( gMarginsSizer, 0, wxEXPAND, 5 );
294 bSizer13->Add( bMargins, 1, wxEXPAND|wxALL, 5 );
297 bMainSizer->Add( bSizer13, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
299 m_staticline1 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
300 bMainSizer->Add(
m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
302 wxBoxSizer* bButtons;
303 bButtons =
new wxBoxSizer( wxHORIZONTAL );
305 m_editTable =
new wxButton(
this, wxID_ANY,
_(
"Edit Table..."), wxDefaultPosition, wxDefaultSize, 0 );
306 m_editTable->SetToolTip(
_(
"Edit table properties and cell contents") );
308 bButtons->Add(
m_editTable, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
311 bButtons->Add( 0, 0, 1, wxEXPAND, 5 );
320 bButtons->Add(
m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
323 bMainSizer->Add( bButtons, 0, wxEXPAND, 5 );
326 this->SetSizer( bMainSizer );
328 bMainSizer->Fit(
this );
A simple color swatch of the kind used to set layer colors.
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
BITMAP_BUTTON * m_vAlignTop
wxStaticText * m_styleLabel
wxPanel * m_panelFillColor
wxChoice * m_fillColorPopup
wxStaticText * m_textColorLabel
COLOR_SWATCH * m_fillColorSwatch
wxPanel * textColorSwatchPanel
BITMAP_BUTTON * m_vAlignCenter
wxStaticLine * m_staticline1
BITMAP_BUTTON * m_hAlignRight
BITMAP_BUTTON * m_hAlignCenter
BITMAP_BUTTON * m_vAlignBottom
wxButton * m_sdbSizer1Cancel
wxTextCtrl * m_textSizeCtrl
COLOR_SWATCH * m_textColorSwatch
~DIALOG_TABLECELL_PROPERTIES_BASE()
wxPanel * m_panelTextColor
wxSimplebook * m_textColorBook
virtual void onFillColorPopup(wxCommandEvent &event)
wxTextCtrl * m_marginTopCtrl
wxChoice * m_textColorPopup
wxStdDialogButtonSizer * m_sdbSizer1
wxStaticText * m_fillColorLabel
wxStaticText * vAlignLabel
virtual void onEditTable(wxCommandEvent &event)
wxPanel * fillColorSwatchPanel
wxTextCtrl * m_marginBottomCtrl
wxStaticText * m_textSizeUnits
virtual void onTextColorPopup(wxCommandEvent &event)
wxStaticText * m_fontLabel
BITMAP_BUTTON * m_hAlignLeft
wxTextCtrl * m_marginRightCtrl
wxStaticText * m_marginTopUnits
wxSimplebook * m_fillColorBook
wxTextCtrl * m_marginLeftCtrl
wxStaticText * m_textSizeLabel
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: