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