KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_drc_rule_editor_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
14PANEL_DRC_RULE_EDITOR_BASE::PANEL_DRC_RULE_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : WX_PANEL( parent, id, pos, size, style, name )
15{
16 wxBoxSizer* mainSizer;
17 mainSizer = new wxBoxSizer( wxHORIZONTAL );
18
19 m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
20 mainSizer->Add( m_staticline4, 0, wxEXPAND|wxRIGHT, 5 );
21
22 bContentSizer = new wxBoxSizer( wxVERTICAL );
23
24 bBasicDetailSizer = new wxBoxSizer( wxVERTICAL );
25
26 wxFlexGridSizer* fgSizer2;
27 fgSizer2 = new wxFlexGridSizer( 1, 4, 5, 5 );
28 fgSizer2->AddGrowableCol( 1 );
29 fgSizer2->AddGrowableCol( 3 );
30 fgSizer2->SetFlexibleDirection( wxBOTH );
31 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
32
33 m_nameLabel = new wxStaticText( this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
34 m_nameLabel->Wrap( -1 );
35 fgSizer2->Add( m_nameLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
36
37 m_nameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_PROCESS_ENTER );
38 fgSizer2->Add( m_nameCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
39
40 m_commentLabel = new wxStaticText( this, wxID_ANY, _("Comment:"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_commentLabel->Wrap( -1 );
42 fgSizer2->Add( m_commentLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
43
44 m_commentCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_PROCESS_ENTER );
45 fgSizer2->Add( m_commentCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
46
47
48 bBasicDetailSizer->Add( fgSizer2, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
49
50
51 bContentSizer->Add( bBasicDetailSizer, 0, wxEXPAND, 20 );
52
53 wxBoxSizer* bColumnsSizer;
54 bColumnsSizer = new wxBoxSizer( wxHORIZONTAL );
55
56 m_constraintSizer = new wxBoxSizer( wxVERTICAL );
57
58 m_constraintHeaderTitle = new wxStaticText( this, wxID_ANY, _("Constraint"), wxDefaultPosition, wxDefaultSize, 0 );
59 m_constraintHeaderTitle->Wrap( -1 );
60 m_constraintSizer->Add( m_constraintHeaderTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
61
62 m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
63 m_constraintSizer->Add( m_staticline3, 0, wxEXPAND|wxALL, 2 );
64
65 m_constraintContentSizer = new wxBoxSizer( wxVERTICAL );
66
67
68 m_constraintSizer->Add( m_constraintContentSizer, 0, wxEXPAND, 5 );
69
70
71 bColumnsSizer->Add( m_constraintSizer, 0, wxEXPAND|wxRIGHT, 16 );
72
73 wxBoxSizer* bScopeSizer;
74 bScopeSizer = new wxBoxSizer( wxVERTICAL );
75
76 wxBoxSizer* bConditionSizer;
77 bConditionSizer = new wxBoxSizer( wxVERTICAL );
78
79 wxBoxSizer* bSizer13;
80 bSizer13 = new wxBoxSizer( wxHORIZONTAL );
81
82 m_conditionHeaderTitle = new wxStaticText( this, wxID_ANY, _("Conditions"), wxDefaultPosition, wxDefaultSize, 0 );
83 m_conditionHeaderTitle->Wrap( -1 );
84 bSizer13->Add( m_conditionHeaderTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
85
86
87 bSizer13->Add( 0, 0, 1, wxEXPAND, 5 );
88
89 m_syntaxHelp = new wxHyperlinkCtrl( this, wxID_ANY, _("Syntax help"), wxT("http://www.wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
90 bSizer13->Add( m_syntaxHelp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
91
92
93 bConditionSizer->Add( bSizer13, 0, wxEXPAND, 5 );
94
95 m_staticline8 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
96 bConditionSizer->Add( m_staticline8, 0, wxEXPAND|wxALL, 2 );
97
98 m_conditionControlsSizer = new wxBoxSizer( wxVERTICAL );
99
100 m_textConditionCtrl = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0, wxEmptyString );
101 m_textConditionCtrl->SetUseTabs( true );
102 m_textConditionCtrl->SetTabWidth( 4 );
103 m_textConditionCtrl->SetIndent( 4 );
104 m_textConditionCtrl->SetTabIndents( true );
105 m_textConditionCtrl->SetBackSpaceUnIndents( true );
106 m_textConditionCtrl->SetViewEOL( false );
107 m_textConditionCtrl->SetViewWhiteSpace( false );
108 m_textConditionCtrl->SetMarginWidth( 2, 0 );
109 m_textConditionCtrl->SetIndentationGuides( true );
110 m_textConditionCtrl->SetReadOnly( false );
111 m_textConditionCtrl->SetMarginWidth( 1, 0 );
112 m_textConditionCtrl->SetMarginType( 0, wxSTC_MARGIN_NUMBER );
113 m_textConditionCtrl->SetMarginWidth( 0, m_textConditionCtrl->TextWidth( wxSTC_STYLE_LINENUMBER, wxT("_99999") ) );
114 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
115 m_textConditionCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) );
116 m_textConditionCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) );
117 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
118 m_textConditionCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) );
119 m_textConditionCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) );
120 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
121 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
122 m_textConditionCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) );
123 m_textConditionCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) );
124 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
125 m_textConditionCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) );
126 m_textConditionCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) );
127 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
128 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
129 m_textConditionCtrl->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
130 m_textConditionCtrl->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
131 m_textConditionCtrl->SetMaxSize( wxSize( -1,60 ) );
132
133 m_conditionControlsSizer->Add( m_textConditionCtrl, 0, wxBOTTOM|wxEXPAND|wxRIGHT, 5 );
134
135 wxBoxSizer* bSizer16;
136 bSizer16 = new wxBoxSizer( wxHORIZONTAL );
137
138 m_checkSyntaxBtnCtrl = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
139 m_checkSyntaxBtnCtrl->SetToolTip( _("Check rule syntax") );
140
141 bSizer16->Add( m_checkSyntaxBtnCtrl, 0, wxALL, 5 );
142
143 m_syntaxErrorReport = new WX_HTML_REPORT_BOX( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
144 m_syntaxErrorReport->SetMinSize( wxSize( -1,50 ) );
145
146 bSizer16->Add( m_syntaxErrorReport, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
147
148
149 m_conditionControlsSizer->Add( bSizer16, 1, wxEXPAND, 5 );
150
151
152 bConditionSizer->Add( m_conditionControlsSizer, 1, wxEXPAND|wxTOP, 5 );
153
154
155 bScopeSizer->Add( bConditionSizer, 0, wxEXPAND, 5 );
156
157 wxBoxSizer* bLayerSizer;
158 bLayerSizer = new wxBoxSizer( wxVERTICAL );
159
160 m_staticText711 = new wxStaticText( this, wxID_ANY, _("Layer"), wxDefaultPosition, wxDefaultSize, 0 );
161 m_staticText711->Wrap( -1 );
162 bLayerSizer->Add( m_staticText711, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
163
164 m_staticline111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
165 bLayerSizer->Add( m_staticline111, 0, wxEXPAND | wxALL, 2 );
166
167 m_LayersComboBoxSizer = new wxBoxSizer( wxVERTICAL );
168
169
170 bLayerSizer->Add( m_LayersComboBoxSizer, 1, wxALL|wxEXPAND, 5 );
171
172
173 bScopeSizer->Add( bLayerSizer, 0, wxEXPAND|wxTOP, 15 );
174
175
176 bColumnsSizer->Add( bScopeSizer, 1, wxEXPAND, 5 );
177
178
179 bContentSizer->Add( bColumnsSizer, 1, wxEXPAND|wxTOP, 15 );
180
181
182 mainSizer->Add( bContentSizer, 1, wxEXPAND, 5 );
183
184
185 this->SetSizer( mainSizer );
186 this->Layout();
187 mainSizer->Fit( this );
188
189 // Connect Events
190 m_nameCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::OnEnterKey ), NULL, this );
191 m_commentCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::OnEnterKey ), NULL, this );
192 m_syntaxHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onSyntaxHelp ), NULL, this );
193 m_textConditionCtrl->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onContextMenu ), NULL, this );
194 m_checkSyntaxBtnCtrl->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onCheckSyntax ), NULL, this );
195 m_syntaxErrorReport->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onErrorLinkClicked ), NULL, this );
196}
197
199{
200 // Disconnect Events
201 m_nameCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::OnEnterKey ), NULL, this );
202 m_commentCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::OnEnterKey ), NULL, this );
203 m_syntaxHelp->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onSyntaxHelp ), NULL, this );
204 m_textConditionCtrl->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onContextMenu ), NULL, this );
205 m_checkSyntaxBtnCtrl->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onCheckSyntax ), NULL, this );
206 m_syntaxErrorReport->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onErrorLinkClicked ), NULL, this );
207
208}
const char * name
virtual void OnEnterKey(wxCommandEvent &event)
virtual void onErrorLinkClicked(wxHtmlLinkEvent &event)
virtual void onContextMenu(wxMouseEvent &event)
virtual void onSyntaxHelp(wxHyperlinkEvent &event)
PANEL_DRC_RULE_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxBORDER_NONE|wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void onCheckSyntax(wxCommandEvent &event)
A slimmed down version of WX_HTML_REPORT_PANEL.
WX_PANEL(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
Definition wx_panel.cpp:24
#define _(s)