18DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_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 )
20 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
22 wxBoxSizer* bMainSizer;
23 bMainSizer =
new wxBoxSizer( wxVERTICAL );
26 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
30 bMainSizer->Add(
m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
37 m_textLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text:"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_textCtrl =
new wxStyledTextCtrl(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN, wxEmptyString );
54 m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
55 m_textCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT(
"BLACK") ) );
56 m_textCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT(
"WHITE") ) );
57 m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
58 m_textCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT(
"BLACK") ) );
59 m_textCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT(
"WHITE") ) );
60 m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
61 m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
62 m_textCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT(
"BLACK") ) );
63 m_textCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT(
"WHITE") ) );
64 m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
65 m_textCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT(
"BLACK") ) );
66 m_textCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT(
"WHITE") ) );
67 m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
68 m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
69 m_textCtrl->SetSelBackground(
true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
70 m_textCtrl->SetSelForeground(
true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
76 bSizer41 =
new wxBoxSizer( wxVERTICAL );
78 m_syntaxHelp =
new wxHyperlinkCtrl(
this, wxID_ANY,
_(
"Syntax help"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
81 bSizer41->Add(
m_syntaxHelp, 0, wxBOTTOM|wxRIGHT|wxLEFT, 6 );
84 m_textEntrySizer->Add( bSizer41, wxGBPosition( 1, 5 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_RIGHT|wxLEFT, 5 );
86 m_excludeFromSim =
new wxCheckBox(
this, wxID_ANY,
_(
"Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
89 m_fontLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Font:"), wxDefaultPosition, wxDefaultSize, 0 );
93 wxString m_fontCtrlChoices[] = {
_(
"Default Font"),
_(
"KiCad Font") };
94 int m_fontCtrlNChoices =
sizeof( m_fontCtrlChoices ) /
sizeof( wxString );
95 m_fontCtrl =
new FONT_CHOICE(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
99 wxBoxSizer* bSizeCtrlSizer;
100 bSizeCtrlSizer =
new wxBoxSizer( wxHORIZONTAL );
102 m_separator1 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
105 bSizeCtrlSizer->Add(
m_separator1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
107 m_bold =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
108 m_bold->SetToolTip(
_(
"Bold") );
110 bSizeCtrlSizer->Add(
m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
112 m_italic =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
115 bSizeCtrlSizer->Add(
m_italic, 0, wxALIGN_CENTER_VERTICAL, 5 );
117 m_separator2 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
120 bSizeCtrlSizer->Add(
m_separator2, 0, wxALIGN_CENTER_VERTICAL, 5 );
122 m_hAlignLeft =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
125 bSizeCtrlSizer->Add(
m_hAlignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
130 bSizeCtrlSizer->Add(
m_hAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
132 m_hAlignRight =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
135 bSizeCtrlSizer->Add(
m_hAlignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
137 m_separator3 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
140 bSizeCtrlSizer->Add(
m_separator3, 0, wxALIGN_CENTER_VERTICAL, 5 );
142 m_vAlignTop =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
145 bSizeCtrlSizer->Add(
m_vAlignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
150 bSizeCtrlSizer->Add(
m_vAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
155 bSizeCtrlSizer->Add(
m_vAlignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
157 m_separator4 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
160 bSizeCtrlSizer->Add(
m_separator4, 0, wxALIGN_CENTER_VERTICAL, 5 );
162 m_horizontal =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
165 bSizeCtrlSizer->Add(
m_horizontal, 0, wxALIGN_CENTER_VERTICAL, 5 );
167 m_vertical =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
170 bSizeCtrlSizer->Add(
m_vertical, 0, wxALIGN_CENTER_VERTICAL, 5 );
172 m_separator5 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
175 bSizeCtrlSizer->Add(
m_separator5, 0, wxALIGN_CENTER_VERTICAL, 5 );
178 m_textEntrySizer->Add( bSizeCtrlSizer, wxGBPosition( 3, 3 ), wxGBSpan( 1, 3 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
180 m_textSizeLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Text size:"), wxDefaultPosition, wxDefaultSize, 0 );
184 wxBoxSizer* bSizer71;
185 bSizer71 =
new wxBoxSizer( wxHORIZONTAL );
187 m_textSizeCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
190 m_textSizeUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
192 bSizer71->Add(
m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
194 m_textColorLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Color:"), wxDefaultPosition, wxDefaultSize, 0 );
199 bSizer71->Add( 5, 0, 0, 0, 5 );
201 m_panelBorderColor1 =
new wxPanel(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
202 wxBoxSizer* bSizer22;
203 bSizer22 =
new wxBoxSizer( wxVERTICAL );
206 bSizer22->Add(
m_textColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
215 m_textEntrySizer->Add( bSizer71, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
217 m_borderCheckbox =
new wxCheckBox(
this, wxID_ANY,
_(
"Border"), wxDefaultPosition, wxDefaultSize, 0 );
220 m_borderWidthLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Width:"), wxDefaultPosition, wxDefaultSize, 0 );
225 bSizer7 =
new wxBoxSizer( wxHORIZONTAL );
227 m_borderWidthCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
230 m_borderWidthUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
234 m_borderColorLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Color:"), wxDefaultPosition, wxDefaultSize, 0 );
239 bSizer7->Add( 5, 0, 0, 0, 5 );
241 m_panelBorderColor =
new wxPanel(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
243 bSizer2 =
new wxBoxSizer( wxVERTICAL );
246 bSizer2->Add(
m_borderColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
255 m_textEntrySizer->Add( bSizer7, wxGBPosition( 7, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
257 m_borderStyleLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Style:"), wxDefaultPosition, wxDefaultSize, 0 );
261 m_borderStyleCombo =
new wxBitmapComboBox(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
266 m_filledCtrl =
new wxCheckBox(
this, wxID_ANY,
_(
"Background fill"), wxDefaultPosition, wxDefaultSize, 0 );
270 bSizer8 =
new wxBoxSizer( wxHORIZONTAL );
272 m_fillColorLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Fill color:"), wxDefaultPosition, wxDefaultSize, 0 );
276 m_panelFillColor =
new wxPanel(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
277 wxBoxSizer* bSizer21;
278 bSizer21 =
new wxBoxSizer( wxVERTICAL );
281 bSizer21->Add(
m_fillColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
290 m_textEntrySizer->Add( bSizer8, wxGBPosition( 7, 4 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
292 m_hyperlinkCb =
new wxCheckBox(
this, wxID_ANY,
_(
"Link:"), wxDefaultPosition, wxDefaultSize, 0 );
294 m_hyperlinkCb->SetToolTip(
_(
"Make this text item a clickable hyperlink") );
298 wxBoxSizer* bSizer11;
299 bSizer11 =
new wxBoxSizer( wxHORIZONTAL );
302 bSizer11->Add(
m_hyperlinkCombo, 1, wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 5 );
305 m_textEntrySizer->Add( bSizer11, wxGBPosition( 10, 1 ), wxGBSpan( 1, 5 ), wxEXPAND|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5 );
318 m_privateCheckbox =
new wxCheckBox(
this, wxID_ANY,
_(
"Private to Symbol Editor"), wxDefaultPosition, wxDefaultSize, 0 );
325 m_commonToAllUnits =
new wxCheckBox(
this, wxID_ANY,
_(
"Common to all units"), wxDefaultPosition, wxDefaultSize, 0 );
334 m_commonToAllBodyStyles =
new wxCheckBox(
this, wxID_ANY,
_(
"Common to all body styles"), wxDefaultPosition, wxDefaultSize, 0 );
347 bMainSizer->Add(
m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
350 this->SetSizer( bMainSizer );
352 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...
virtual void onHyperlinkChecked(wxCommandEvent &event)
virtual void onHyperlinkText(wxCommandEvent &event)
wxBitmapComboBox * m_borderStyleCombo
wxStdDialogButtonSizer * m_sdbSizer1
wxCheckBox * m_borderCheckbox
wxStaticText * m_borderWidthUnits
COLOR_SWATCH * m_borderColorSwatch
wxCheckBox * m_privateCheckbox
~DIALOG_TEXT_PROPERTIES_BASE()
wxStyledTextCtrl * m_textCtrl
DIALOG_TEXT_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Text Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
BITMAP_BUTTON * m_separator5
BITMAP_BUTTON * m_hAlignCenter
BITMAP_BUTTON * m_vAlignTop
virtual void OnFormattingHelp(wxHyperlinkEvent &event)
BITMAP_BUTTON * m_vAlignBottom
WX_COMBOBOX * m_hyperlinkCombo
wxFlexGridSizer * m_fgSymbolEditor
BITMAP_BUTTON * m_hAlignLeft
BITMAP_BUTTON * m_vAlignCenter
wxCheckBox * m_filledCtrl
COLOR_SWATCH * m_textColorSwatch
virtual void onFillChecked(wxCommandEvent &event)
wxStaticText * m_textSizeUnits
virtual void onMultiLineTCLostFocus(wxFocusEvent &event)
wxPanel * m_panelBorderColor1
wxStaticText * m_textColorLabel
wxPanel * m_panelFillColor
wxTextCtrl * m_textSizeCtrl
wxCheckBox * m_hyperlinkCb
wxPanel * m_panelBorderColor
wxStaticText * m_borderStyleLabel
wxStaticText * m_fillColorLabel
wxStaticText * m_textSizeLabel
wxStaticText * m_fontLabel
wxTextCtrl * m_borderWidthCtrl
wxStaticText * m_borderWidthLabel
BITMAP_BUTTON * m_separator1
wxButton * m_sdbSizer1Cancel
wxGridBagSizer * m_textEntrySizer
wxCheckBox * m_excludeFromSim
wxStaticText * m_textLabel
BITMAP_BUTTON * m_separator4
BITMAP_BUTTON * m_vertical
virtual void onHyperlinkCombo(wxCommandEvent &event)
BITMAP_BUTTON * m_hAlignRight
wxCheckBox * m_commonToAllBodyStyles
wxHyperlinkCtrl * m_syntaxHelp
BITMAP_BUTTON * m_separator2
virtual void onBorderChecked(wxCommandEvent &event)
BITMAP_BUTTON * m_separator3
wxStaticText * m_borderColorLabel
COLOR_SWATCH * m_fillColorSwatch
wxCheckBox * m_commonToAllUnits
BITMAP_BUTTON * m_horizontal
Fix some issues with wxCombobox:
A modified version of the wxInfoBar class that allows us to: