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 m_constraintSizer = new wxBoxSizer( wxVERTICAL );
54
55 m_constraintHeaderTitle = new wxStaticText( this, wxID_ANY, _("Constraint"), wxDefaultPosition, wxDefaultSize, 0 );
56 m_constraintHeaderTitle->Wrap( -1 );
57 m_constraintSizer->Add( m_constraintHeaderTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
58
59 m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
60 m_constraintSizer->Add( m_staticline3, 0, wxEXPAND|wxALL, 2 );
61
62 m_constraintContentSizer = new wxBoxSizer( wxVERTICAL );
63
64
65 m_constraintSizer->Add( m_constraintContentSizer, 0, wxEXPAND, 5 );
66
67
68 bContentSizer->Add( m_constraintSizer, 0, wxEXPAND|wxTOP, 15 );
69
70 wxBoxSizer* bConditionSizer;
71 bConditionSizer = new wxBoxSizer( wxVERTICAL );
72
73 wxBoxSizer* bSizer13;
74 bSizer13 = new wxBoxSizer( wxHORIZONTAL );
75
76 m_conditionHeaderTitle = new wxStaticText( this, wxID_ANY, _("Conditions"), wxDefaultPosition, wxDefaultSize, 0 );
77 m_conditionHeaderTitle->Wrap( -1 );
78 bSizer13->Add( m_conditionHeaderTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
79
80
81 bSizer13->Add( 0, 0, 1, wxEXPAND, 5 );
82
83 m_syntaxHelp = new wxHyperlinkCtrl( this, wxID_ANY, _("Syntax help"), wxT("http://www.wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
84 bSizer13->Add( m_syntaxHelp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
85
86
87 bConditionSizer->Add( bSizer13, 0, wxEXPAND, 5 );
88
89 m_staticline8 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
90 bConditionSizer->Add( m_staticline8, 0, wxEXPAND|wxALL, 2 );
91
92 m_conditionControlsSizer = new wxBoxSizer( wxVERTICAL );
93
94 m_textConditionCtrl = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0, wxEmptyString );
95 m_textConditionCtrl->SetUseTabs( true );
96 m_textConditionCtrl->SetTabWidth( 4 );
97 m_textConditionCtrl->SetIndent( 4 );
98 m_textConditionCtrl->SetTabIndents( true );
99 m_textConditionCtrl->SetBackSpaceUnIndents( true );
100 m_textConditionCtrl->SetViewEOL( false );
101 m_textConditionCtrl->SetViewWhiteSpace( false );
102 m_textConditionCtrl->SetMarginWidth( 2, 0 );
103 m_textConditionCtrl->SetIndentationGuides( true );
104 m_textConditionCtrl->SetReadOnly( false );
105 m_textConditionCtrl->SetMarginWidth( 1, 0 );
106 m_textConditionCtrl->SetMarginType( 0, wxSTC_MARGIN_NUMBER );
107 m_textConditionCtrl->SetMarginWidth( 0, m_textConditionCtrl->TextWidth( wxSTC_STYLE_LINENUMBER, wxT("_99999") ) );
108 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
109 m_textConditionCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) );
110 m_textConditionCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) );
111 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
112 m_textConditionCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) );
113 m_textConditionCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) );
114 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
115 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
116 m_textConditionCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) );
117 m_textConditionCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) );
118 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
119 m_textConditionCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) );
120 m_textConditionCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) );
121 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
122 m_textConditionCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
123 m_textConditionCtrl->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
124 m_textConditionCtrl->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
125 m_textConditionCtrl->SetMaxSize( wxSize( -1,60 ) );
126
127 m_conditionControlsSizer->Add( m_textConditionCtrl, 0, wxBOTTOM|wxEXPAND|wxRIGHT, 5 );
128
129 wxBoxSizer* bSizer16;
130 bSizer16 = new wxBoxSizer( wxHORIZONTAL );
131
132 m_checkSyntaxBtnCtrl = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
133 m_checkSyntaxBtnCtrl->SetToolTip( _("Check rule syntax") );
134
135 bSizer16->Add( m_checkSyntaxBtnCtrl, 0, wxALL, 5 );
136
137 m_syntaxErrorReport = new WX_HTML_REPORT_BOX( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
138 m_syntaxErrorReport->SetMinSize( wxSize( -1,50 ) );
139
140 bSizer16->Add( m_syntaxErrorReport, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
141
142
143 m_conditionControlsSizer->Add( bSizer16, 1, wxEXPAND, 5 );
144
145
146 bConditionSizer->Add( m_conditionControlsSizer, 1, wxEXPAND|wxTOP, 5 );
147
148
149 bContentSizer->Add( bConditionSizer, 0, wxEXPAND, 15 );
150
151 wxBoxSizer* bLayerSizer;
152 bLayerSizer = new wxBoxSizer( wxVERTICAL );
153
154 m_staticText711 = new wxStaticText( this, wxID_ANY, _("Layer"), wxDefaultPosition, wxDefaultSize, 0 );
155 m_staticText711->Wrap( -1 );
156 bLayerSizer->Add( m_staticText711, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
157
158 m_staticline111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
159 bLayerSizer->Add( m_staticline111, 0, wxEXPAND | wxALL, 2 );
160
161 m_LayersComboBoxSizer = new wxBoxSizer( wxVERTICAL );
162
163
164 bLayerSizer->Add( m_LayersComboBoxSizer, 1, wxALL|wxEXPAND, 5 );
165
166
167 bContentSizer->Add( bLayerSizer, 0, wxEXPAND|wxTOP, 15 );
168
169
170 mainSizer->Add( bContentSizer, 1, wxEXPAND, 5 );
171
172
173 this->SetSizer( mainSizer );
174 this->Layout();
175 mainSizer->Fit( this );
176
177 // Connect Events
178 m_nameCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::OnEnterKey ), NULL, this );
179 m_commentCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::OnEnterKey ), NULL, this );
180 m_syntaxHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onSyntaxHelp ), NULL, this );
181 m_textConditionCtrl->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onContextMenu ), NULL, this );
182 m_checkSyntaxBtnCtrl->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onCheckSyntax ), NULL, this );
183 m_syntaxErrorReport->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onErrorLinkClicked ), NULL, this );
184}
185
187{
188 // Disconnect Events
189 m_nameCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::OnEnterKey ), NULL, this );
190 m_commentCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::OnEnterKey ), NULL, this );
191 m_syntaxHelp->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onSyntaxHelp ), NULL, this );
192 m_textConditionCtrl->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onContextMenu ), NULL, this );
193 m_checkSyntaxBtnCtrl->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onCheckSyntax ), NULL, this );
194 m_syntaxErrorReport->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_DRC_RULE_EDITOR_BASE::onErrorLinkClicked ), NULL, this );
195
196}
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:28
#define _(s)