KiCad PCB EDA Suite
dialog_lib_text_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Oct 26 2018)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10#include "widgets/font_choice.h"
11
13
15
16DIALOG_LIB_TEXT_PROPERTIES_BASE::DIALOG_LIB_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 )
17{
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19
20 wxBoxSizer* bMainSizer;
21 bMainSizer = new wxBoxSizer( wxVERTICAL );
22
23 wxBoxSizer* bPropertiesSizer;
24 bPropertiesSizer = new wxBoxSizer( wxVERTICAL );
25
26 wxGridBagSizer* gbSizer1;
27 gbSizer1 = new wxGridBagSizer( 3, 0 );
28 gbSizer1->SetFlexibleDirection( wxBOTH );
29 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
30 gbSizer1->SetEmptyCellSize( wxSize( -1,10 ) );
31
32 m_textLabel = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
33 m_textLabel->Wrap( -1 );
34 gbSizer1->Add( m_textLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT, 5 );
35
36 m_StyledTextCtrl = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN, wxEmptyString );
37 m_StyledTextCtrl->SetUseTabs( true );
38 m_StyledTextCtrl->SetTabWidth( 4 );
39 m_StyledTextCtrl->SetIndent( 4 );
40 m_StyledTextCtrl->SetTabIndents( false );
41 m_StyledTextCtrl->SetBackSpaceUnIndents( false );
42 m_StyledTextCtrl->SetViewEOL( false );
43 m_StyledTextCtrl->SetViewWhiteSpace( false );
44 m_StyledTextCtrl->SetMarginWidth( 2, 0 );
45 m_StyledTextCtrl->SetIndentationGuides( false );
46 m_StyledTextCtrl->SetMarginWidth( 1, 0 );
47 m_StyledTextCtrl->SetMarginWidth( 0, 0 );
48 m_StyledTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
49 m_StyledTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) );
50 m_StyledTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) );
51 m_StyledTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
52 m_StyledTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) );
53 m_StyledTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) );
54 m_StyledTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
55 m_StyledTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
56 m_StyledTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) );
57 m_StyledTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) );
58 m_StyledTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
59 m_StyledTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) );
60 m_StyledTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) );
61 m_StyledTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
62 m_StyledTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
63 m_StyledTextCtrl->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
64 m_StyledTextCtrl->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
65 gbSizer1->Add( m_StyledTextCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 4 ), wxEXPAND, 5 );
66
67 m_fontLabel = new wxStaticText( this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 );
68 m_fontLabel->Wrap( -1 );
69 gbSizer1->Add( m_fontLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT, 5 );
70
71 wxString m_fontCtrlChoices[] = { _("Default Font"), _("KiCad Font") };
72 int m_fontCtrlNChoices = sizeof( m_fontCtrlChoices ) / sizeof( wxString );
73 m_fontCtrl = new FONT_CHOICE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
74 m_fontCtrl->SetSelection( 0 );
75 gbSizer1->Add( m_fontCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
76
77 wxBoxSizer* formattingSizer;
78 formattingSizer = new wxBoxSizer( wxHORIZONTAL );
79
80 m_separator1 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
81 m_separator1->Enable( false );
82
83 formattingSizer->Add( m_separator1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
84
85 m_horizontal = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
86 m_horizontal->SetToolTip( _("Horizontal text") );
87
88 formattingSizer->Add( m_horizontal, 0, wxALIGN_CENTER_VERTICAL, 5 );
89
90 m_vertical = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
91 m_vertical->SetToolTip( _("Vertical text") );
92
93 formattingSizer->Add( m_vertical, 0, wxALIGN_CENTER_VERTICAL, 5 );
94
95 m_separator2 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
96 m_separator2->Enable( false );
97
98 formattingSizer->Add( m_separator2, 0, wxALIGN_CENTER_VERTICAL, 5 );
99
100 m_bold = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
101 m_bold->SetToolTip( _("Bold") );
102
103 formattingSizer->Add( m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
104
105 m_italic = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
106 m_italic->SetToolTip( _("Italic") );
107
108 formattingSizer->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL, 5 );
109
110 m_separator3 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
111 m_separator3->Enable( false );
112
113 formattingSizer->Add( m_separator3, 0, wxALIGN_CENTER_VERTICAL, 5 );
114
115 m_hAlignLeft = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
116 m_hAlignLeft->SetToolTip( _("Align left") );
117
118 formattingSizer->Add( m_hAlignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
119
120 m_hAlignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
121 m_hAlignCenter->SetToolTip( _("Align horizontal center") );
122
123 formattingSizer->Add( m_hAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
124
125 m_hAlignRight = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
126 m_hAlignRight->SetToolTip( _("Align right") );
127
128 formattingSizer->Add( m_hAlignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
129
130 m_separator4 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
131 m_separator4->Enable( false );
132
133 formattingSizer->Add( m_separator4, 0, wxALIGN_CENTER_VERTICAL, 5 );
134
135 m_vAlignTop = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
136 m_vAlignTop->SetToolTip( _("Align top") );
137
138 formattingSizer->Add( m_vAlignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
139
140 m_vAlignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
141 m_vAlignCenter->SetToolTip( _("Align vertical center") );
142
143 formattingSizer->Add( m_vAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
144
145 m_vAlignBottom = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
146 m_vAlignBottom->SetToolTip( _("Align bottom") );
147
148 formattingSizer->Add( m_vAlignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
149
150 m_separator5 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
151 m_separator5->Enable( false );
152
153 formattingSizer->Add( m_separator5, 0, wxALIGN_CENTER_VERTICAL, 5 );
154
155
156 gbSizer1->Add( formattingSizer, wxGBPosition( 2, 3 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
157
158 m_textSizeLabel = new wxStaticText( this, wxID_ANY, _("Text size:"), wxDefaultPosition, wxDefaultSize, 0 );
159 m_textSizeLabel->Wrap( -1 );
160 gbSizer1->Add( m_textSizeLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
161
162 wxBoxSizer* bSizer71;
163 bSizer71 = new wxBoxSizer( wxHORIZONTAL );
164
165 m_textSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
166 bSizer71->Add( m_textSizeCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
167
168 m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
169 m_textSizeUnits->Wrap( -1 );
170 bSizer71->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
171
172 m_textColorLabel = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
173 m_textColorLabel->Wrap( -1 );
174 bSizer71->Add( m_textColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
175
176
177 bSizer71->Add( 5, 0, 0, 0, 5 );
178
179 m_panelBorderColor1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
180 wxBoxSizer* bSizer221;
181 bSizer221 = new wxBoxSizer( wxVERTICAL );
182
183 m_textColorSwatch = new COLOR_SWATCH( m_panelBorderColor1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
184 bSizer221->Add( m_textColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
185
186
187 m_panelBorderColor1->SetSizer( bSizer221 );
188 m_panelBorderColor1->Layout();
189 bSizer221->Fit( m_panelBorderColor1 );
190 bSizer71->Add( m_panelBorderColor1, 0, wxALIGN_CENTER_VERTICAL, 5 );
191
192
193 gbSizer1->Add( bSizer71, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
194
195 m_privateCheckbox = new wxCheckBox( this, wxID_ANY, _("Private to Symbol Editor"), wxDefaultPosition, wxDefaultSize, 0 );
196 gbSizer1->Add( m_privateCheckbox, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxLEFT, 5 );
197
198 m_CommonUnit = new wxCheckBox( this, wxID_ANY, _("Common to all units"), wxDefaultPosition, wxDefaultSize, 0 );
199 gbSizer1->Add( m_CommonUnit, wxGBPosition( 5, 3 ), wxGBSpan( 1, 1 ), wxLEFT, 100 );
200
201 m_CommonConvert = new wxCheckBox( this, wxID_ANY, _("Common to all body styles"), wxDefaultPosition, wxDefaultSize, 0 );
202 gbSizer1->Add( m_CommonConvert, wxGBPosition( 6, 3 ), wxGBSpan( 1, 1 ), wxLEFT, 100 );
203
204
205 bPropertiesSizer->Add( gbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
206
207 wxFlexGridSizer* fgSizer3;
208 fgSizer3 = new wxFlexGridSizer( 5, 4, 3, 3 );
209 fgSizer3->SetFlexibleDirection( wxBOTH );
210 fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
211
212
213 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
214
215
216 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
217
218
219 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
220
221
222 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
223
224
225 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
226
227
228 bPropertiesSizer->Add( fgSizer3, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
229
230 wxBoxSizer* bBottomtBoxSizer;
231 bBottomtBoxSizer = new wxBoxSizer( wxVERTICAL );
232
233
234 bPropertiesSizer->Add( bBottomtBoxSizer, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
235
236
237 bMainSizer->Add( bPropertiesSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
238
239 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
240 bMainSizer->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
241
242 m_sdbSizerButtons = new wxStdDialogButtonSizer();
243 m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
245 m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
247 m_sdbSizerButtons->Realize();
248
249 bMainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALL, 5 );
250
251
252 this->SetSizer( bMainSizer );
253 this->Layout();
254 bMainSizer->Fit( this );
255
256 // Connect Events
257 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnCloseDialog ) );
258 m_StyledTextCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::onMultiLineTCLostFocus ), NULL, this );
259 m_StyledTextCtrl->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnSetFocusText ), NULL, this );
260}
261
263{
264 // Disconnect Events
265 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnCloseDialog ) );
266 m_StyledTextCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::onMultiLineTCLostFocus ), NULL, this );
267 m_StyledTextCtrl->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnSetFocusText ), 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:40
bool Enable(bool aEnable=true) override
Enable the button.
A simple color swatch of the kind used to set layer colors.
Definition: color_swatch.h:57
virtual void OnCloseDialog(wxCloseEvent &event)
DIALOG_LIB_TEXT_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Text Item Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnSetFocusText(wxFocusEvent &event)
virtual void onMultiLineTCLostFocus(wxFocusEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
#define _(s)