16DIALOG_TEXTBOX_PROPERTIES_BASE::DIALOG_TEXTBOX_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( wxSize( -1,-1 ), wxDefaultSize );
20 wxBoxSizer* bMainSizer;
21 bMainSizer =
new wxBoxSizer( wxVERTICAL );
25 wxStaticText* textLabel;
26 textLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text:"), wxDefaultPosition, wxDefaultSize, 0 );
27 textLabel->Wrap( -1 );
30 m_MultiLineText =
new wxStyledTextCtrl(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString );
43 m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
44 m_MultiLineText->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT(
"BLACK") ) );
45 m_MultiLineText->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT(
"WHITE") ) );
46 m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
47 m_MultiLineText->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT(
"BLACK") ) );
48 m_MultiLineText->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT(
"WHITE") ) );
49 m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
50 m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
51 m_MultiLineText->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT(
"BLACK") ) );
52 m_MultiLineText->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT(
"WHITE") ) );
53 m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
54 m_MultiLineText->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT(
"BLACK") ) );
55 m_MultiLineText->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT(
"WHITE") ) );
56 m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
57 m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
58 m_MultiLineText->SetSelBackground(
true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
59 m_MultiLineText->SetSelForeground(
true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
67 wxGridBagSizer* gbSizer1;
68 gbSizer1 =
new wxGridBagSizer( 3, 3 );
69 gbSizer1->SetFlexibleDirection( wxBOTH );
70 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
71 gbSizer1->SetEmptyCellSize( wxSize( -1,8 ) );
73 m_cbLocked =
new wxCheckBox(
this, wxID_ANY,
_(
"Locked"), wxDefaultPosition, wxDefaultSize, 0 );
74 gbSizer1->Add(
m_cbLocked, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
76 m_LayerLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
78 gbSizer1->Add(
m_LayerLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
83 gbSizer1->Add(
m_LayerSelectionCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
85 m_fontLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Font:"), wxDefaultPosition, wxDefaultSize, 0 );
87 gbSizer1->Add(
m_fontLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
89 wxString m_fontCtrlChoices[] = {
_(
"KiCad Font") };
90 int m_fontCtrlNChoices =
sizeof( m_fontCtrlChoices ) /
sizeof( wxString );
91 m_fontCtrl =
new FONT_CHOICE(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
93 gbSizer1->Add(
m_fontCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
95 wxBoxSizer* bSizerButtonBar;
96 bSizerButtonBar =
new wxBoxSizer( wxHORIZONTAL );
98 m_separator0 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
101 bSizerButtonBar->Add(
m_separator0, 0, wxALIGN_CENTER_VERTICAL, 5 );
103 m_bold =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
104 bSizerButtonBar->Add(
m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
106 m_italic =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
107 bSizerButtonBar->Add(
m_italic, 0, wxALIGN_CENTER_VERTICAL, 5 );
109 m_separator1 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
112 bSizerButtonBar->Add(
m_separator1, 0, wxALIGN_CENTER_VERTICAL, 5 );
114 m_alignLeft =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
115 bSizerButtonBar->Add(
m_alignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
117 m_alignCenter =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
118 bSizerButtonBar->Add(
m_alignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
120 m_alignRight =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
121 bSizerButtonBar->Add(
m_alignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
123 m_separator2 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
126 bSizerButtonBar->Add(
m_separator2, 0, wxALIGN_CENTER_VERTICAL, 5 );
128 m_mirrored =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
129 bSizerButtonBar->Add(
m_mirrored, 0, wxALIGN_CENTER_VERTICAL, 5 );
131 m_separator3 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
134 bSizerButtonBar->Add(
m_separator3, 0, wxALIGN_CENTER_VERTICAL, 5 );
137 gbSizer1->Add( bSizerButtonBar, wxGBPosition( 3, 4 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 8 );
139 m_SizeXLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text width:"), wxDefaultPosition, wxDefaultSize, 0 );
143 gbSizer1->Add(
m_SizeXLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 4 );
145 m_SizeXCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
146 gbSizer1->Add(
m_SizeXCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
148 m_SizeXUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
150 gbSizer1->Add(
m_SizeXUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
152 m_borderCheckbox =
new wxCheckBox(
this, wxID_ANY,
_(
"Border"), wxDefaultPosition, wxDefaultSize, 0 );
153 gbSizer1->Add(
m_borderCheckbox, wxGBPosition( 5, 4 ), wxGBSpan( 1, 2 ), wxLEFT|wxALIGN_CENTER_VERTICAL, 10 );
155 m_SizeYLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
159 gbSizer1->Add(
m_SizeYLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 4 );
161 m_SizeYCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
162 gbSizer1->Add(
m_SizeYCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
164 m_SizeYUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
166 gbSizer1->Add(
m_SizeYUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
168 m_ThicknessLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
172 gbSizer1->Add(
m_ThicknessLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 4 );
174 m_ThicknessCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
175 gbSizer1->Add(
m_ThicknessCtrl, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
177 m_ThicknessUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
179 gbSizer1->Add(
m_ThicknessUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
181 m_OrientLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
185 gbSizer1->Add(
m_OrientLabel, wxGBPosition( 1, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
187 m_OrientCtrl =
new wxComboBox(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
192 gbSizer1->Add(
m_OrientCtrl, wxGBPosition( 1, 5 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
194 m_borderWidthLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Border width:"), wxDefaultPosition, wxDefaultSize, 0 );
196 gbSizer1->Add(
m_borderWidthLabel, wxGBPosition( 6, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
198 m_borderWidthCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
199 gbSizer1->Add(
m_borderWidthCtrl, wxGBPosition( 6, 5 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
201 m_borderWidthUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
203 gbSizer1->Add(
m_borderWidthUnits, wxGBPosition( 6, 6 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
205 m_borderStyleLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Border style:"), wxDefaultPosition, wxDefaultSize, 0 );
207 gbSizer1->Add(
m_borderStyleLabel, wxGBPosition( 7, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
209 m_borderStyleCombo =
new wxBitmapComboBox(
this, wxID_ANY,
_(
"Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
212 gbSizer1->Add(
m_borderStyleCombo, wxGBPosition( 7, 5 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
215 gbSizer1->AddGrowableCol( 3 );
217 bMainSizer->Add( gbSizer1, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 10 );
226 bMainSizer->Add(
m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
229 this->SetSizer( bMainSizer );
231 bMainSizer->Fit(
this );
233 this->Centre( wxBOTH );
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
wxButton * m_sdbSizerCancel
wxStaticText * m_SizeYLabel
wxStaticText * m_fontLabel
wxStaticText * m_ThicknessLabel
BITMAP_BUTTON * m_separator3
virtual void OnInitDlg(wxInitDialogEvent &event)
wxStaticText * m_borderStyleLabel
wxStaticText * m_SizeXUnits
virtual void onBorderChecked(wxCommandEvent &event)
BITMAP_BUTTON * m_mirrored
wxBoxSizer * m_MultiLineSizer
wxTextCtrl * m_ThicknessCtrl
BITMAP_BUTTON * m_alignCenter
BITMAP_BUTTON * m_separator1
DIALOG_TEXTBOX_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Text Box Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU)
wxBitmapComboBox * m_borderStyleCombo
wxStaticText * m_SizeXLabel
wxStaticText * m_SizeYUnits
virtual void onFontSelected(wxCommandEvent &event)
BITMAP_BUTTON * m_alignRight
wxCheckBox * m_borderCheckbox
virtual void onThickness(wxCommandEvent &event)
virtual void onAlignButton(wxCommandEvent &event)
wxStaticText * m_borderWidthLabel
virtual void onMultiLineTCLostFocus(wxFocusEvent &event)
BITMAP_BUTTON * m_alignLeft
wxStaticText * m_ThicknessUnits
wxStaticText * m_OrientLabel
wxStaticText * m_borderWidthUnits
wxStaticText * m_LayerLabel
~DIALOG_TEXTBOX_PROPERTIES_BASE()
wxComboBox * m_OrientCtrl
wxStdDialogButtonSizer * m_sdbSizer
virtual void OnOkClick(wxCommandEvent &event)
BITMAP_BUTTON * m_separator0
wxTextCtrl * m_borderWidthCtrl
virtual void onBoldToggle(wxCommandEvent &event)
wxStyledTextCtrl * m_MultiLineText
PCB_LAYER_BOX_SELECTOR * m_LayerSelectionCtrl
BITMAP_BUTTON * m_separator2
Class to display a pcb layer list in a wxBitmapComboBox.