KiCad PCB EDA Suite
dialog_edit_label_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  m_textEntrySizer = new wxFlexGridSizer( 4, 2, 3, 3 );
20  m_textEntrySizer->AddGrowableCol( 1 );
21  m_textEntrySizer->AddGrowableRow( 1 );
22  m_textEntrySizer->SetFlexibleDirection( wxBOTH );
23  m_textEntrySizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
24 
25  m_labelSingleLine = new wxStaticText( this, wxID_ANY, _("Label:"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_labelSingleLine->Wrap( -1 );
27  m_labelSingleLine->SetToolTip( _("Enter the text to be used within the schematic") );
28 
29  m_textEntrySizer->Add( m_labelSingleLine, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 3 );
30 
31  m_valueSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER|wxTE_RICH );
32  m_valueSingleLine->SetMinSize( wxSize( 360,-1 ) );
33 
34  m_textEntrySizer->Add( m_valueSingleLine, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 3 );
35 
36  m_labelMultiLine = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
37  m_labelMultiLine->Wrap( -1 );
38  m_textEntrySizer->Add( m_labelMultiLine, 0, wxRIGHT, 5 );
39 
40  m_valueMultiLine = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString );
41  m_valueMultiLine->SetUseTabs( true );
42  m_valueMultiLine->SetTabWidth( 4 );
43  m_valueMultiLine->SetIndent( 4 );
44  m_valueMultiLine->SetTabIndents( false );
45  m_valueMultiLine->SetBackSpaceUnIndents( false );
46  m_valueMultiLine->SetViewEOL( false );
47  m_valueMultiLine->SetViewWhiteSpace( false );
48  m_valueMultiLine->SetMarginWidth( 2, 0 );
49  m_valueMultiLine->SetIndentationGuides( false );
50  m_valueMultiLine->SetMarginWidth( 1, 0 );
51  m_valueMultiLine->SetMarginWidth( 0, 0 );
52  m_valueMultiLine->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
53  m_valueMultiLine->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) );
54  m_valueMultiLine->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) );
55  m_valueMultiLine->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
56  m_valueMultiLine->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) );
57  m_valueMultiLine->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) );
58  m_valueMultiLine->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
59  m_valueMultiLine->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
60  m_valueMultiLine->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) );
61  m_valueMultiLine->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) );
62  m_valueMultiLine->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
63  m_valueMultiLine->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) );
64  m_valueMultiLine->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) );
65  m_valueMultiLine->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
66  m_valueMultiLine->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
67  m_valueMultiLine->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
68  m_valueMultiLine->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
69  m_valueMultiLine->SetMinSize( wxSize( 480,100 ) );
70 
71  m_textEntrySizer->Add( m_valueMultiLine, 1, wxEXPAND | wxALL, 5 );
72 
73  m_labelCombo = new wxStaticText( this, wxID_ANY, _("Label:"), wxDefaultPosition, wxDefaultSize, 0 );
74  m_labelCombo->Wrap( -1 );
75  m_textEntrySizer->Add( m_labelCombo, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
76 
77  m_valueCombo = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER );
78  m_valueCombo->SetMinSize( wxSize( 360,-1 ) );
79 
80  m_textEntrySizer->Add( m_valueCombo, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
81 
82  m_textSizeLabel = new wxStaticText( this, wxID_ANY, _("Text Size:"), wxDefaultPosition, wxDefaultSize, 0 );
83  m_textSizeLabel->Wrap( -1 );
84  m_textEntrySizer->Add( m_textSizeLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
85 
86  wxBoxSizer* bSizeCtrlSizer;
87  bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
88 
89  m_textSizeCtrl = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
90  bSizeCtrlSizer->Add( m_textSizeCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT, 3 );
91 
92  m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
93  m_textSizeUnits->Wrap( -1 );
94  bSizeCtrlSizer->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL, 2 );
95 
96 
97  m_textEntrySizer->Add( bSizeCtrlSizer, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 3 );
98 
99 
100  bMainSizer->Add( m_textEntrySizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
101 
102  wxBoxSizer* m_OptionsSizer;
103  m_OptionsSizer = new wxBoxSizer( wxHORIZONTAL );
104 
105  wxString m_TextOrientChoices[] = { _("Right"), _("Up"), _("Left"), _("Down") };
106  int m_TextOrientNChoices = sizeof( m_TextOrientChoices ) / sizeof( wxString );
107  m_TextOrient = new wxRadioBox( this, wxID_ANY, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_TextOrientNChoices, m_TextOrientChoices, 1, wxRA_SPECIFY_COLS );
108  m_TextOrient->SetSelection( 0 );
109  m_OptionsSizer->Add( m_TextOrient, 1, wxRIGHT|wxTOP|wxEXPAND, 3 );
110 
111  wxString m_TextStyleChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold and italic") };
112  int m_TextStyleNChoices = sizeof( m_TextStyleChoices ) / sizeof( wxString );
113  m_TextStyle = new wxRadioBox( this, wxID_ANY, _("Style"), wxDefaultPosition, wxDefaultSize, m_TextStyleNChoices, m_TextStyleChoices, 1, wxRA_SPECIFY_COLS );
114  m_TextStyle->SetSelection( 3 );
115  m_OptionsSizer->Add( m_TextStyle, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 3 );
116 
117  wxString m_TextShapeChoices[] = { _("Input"), _("Output"), _("Bidirectional"), _("Tri-state"), _("Passive") };
118  int m_TextShapeNChoices = sizeof( m_TextShapeChoices ) / sizeof( wxString );
119  m_TextShape = new wxRadioBox( this, wxID_ANY, _("Shape"), wxDefaultPosition, wxDefaultSize, m_TextShapeNChoices, m_TextShapeChoices, 1, wxRA_SPECIFY_COLS );
120  m_TextShape->SetSelection( 3 );
121  m_OptionsSizer->Add( m_TextShape, 1, wxEXPAND|wxTOP|wxLEFT, 3 );
122 
123 
124  bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
125 
126  m_sdbSizer1 = new wxStdDialogButtonSizer();
127  m_sdbSizer1OK = new wxButton( this, wxID_OK );
128  m_sdbSizer1->AddButton( m_sdbSizer1OK );
129  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
130  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
131  m_sdbSizer1->Realize();
132 
133  bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
134 
135 
136  this->SetSizer( bMainSizer );
137  this->Layout();
138  bMainSizer->Fit( this );
139 
140  // Connect Events
141  m_valueSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
142  m_valueCombo->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
143 }
144 
146 {
147  // Disconnect Events
148  m_valueSingleLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
149  m_valueCombo->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
150 
151 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:83
wxFlexGridSizer * m_textEntrySizer
DIALOG_LABEL_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Text Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnEnterKey(wxCommandEvent &event)
#define _(s)
wxStdDialogButtonSizer * m_sdbSizer1
wxStyledTextCtrl * m_valueMultiLine