KiCad PCB EDA Suite
panel_setup_rules_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "wx_html_report_box.h"
9 
10 #include "panel_setup_rules_base.h"
11 
13 
14 PANEL_SETUP_RULES_BASE::PANEL_SETUP_RULES_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* bPanelSizer;
17  bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
18 
19  m_leftMargin = new wxBoxSizer( wxHORIZONTAL );
20 
21  m_topMargin = new wxBoxSizer( wxVERTICAL );
22 
23  wxBoxSizer* bSizer4;
24  bSizer4 = new wxBoxSizer( wxHORIZONTAL );
25 
26  m_title = new wxStaticText( this, wxID_ANY, _("DRC rules:"), wxDefaultPosition, wxDefaultSize, 0 );
27  m_title->Wrap( -1 );
28  bSizer4->Add( m_title, 0, wxTOP|wxBOTTOM, 5 );
29 
30 
31  bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
32 
33  m_syntaxHelp = new wxHyperlinkCtrl( this, wxID_ANY, _("Syntax help"), wxT("http://www.wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
34  bSizer4->Add( m_syntaxHelp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
35 
36 
37  m_topMargin->Add( bSizer4, 0, wxEXPAND, 5 );
38 
39  m_textEditor = new wxStyledTextCtrl( this, ID_RULES_EDITOR, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString );
40  m_textEditor->SetUseTabs( true );
41  m_textEditor->SetTabWidth( 4 );
42  m_textEditor->SetIndent( 4 );
43  m_textEditor->SetTabIndents( true );
44  m_textEditor->SetBackSpaceUnIndents( true );
45  m_textEditor->SetViewEOL( false );
46  m_textEditor->SetViewWhiteSpace( false );
47  m_textEditor->SetMarginWidth( 2, 0 );
48  m_textEditor->SetIndentationGuides( true );
49  m_textEditor->SetMarginWidth( 1, 0 );
50  m_textEditor->SetMarginType( 0, wxSTC_MARGIN_NUMBER );
51  m_textEditor->SetMarginWidth( 0, m_textEditor->TextWidth( wxSTC_STYLE_LINENUMBER, wxT("_99999") ) );
52  m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
53  m_textEditor->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) );
54  m_textEditor->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) );
55  m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
56  m_textEditor->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) );
57  m_textEditor->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) );
58  m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
59  m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
60  m_textEditor->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) );
61  m_textEditor->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) );
62  m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
63  m_textEditor->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) );
64  m_textEditor->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) );
65  m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
66  m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
67  m_textEditor->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
68  m_textEditor->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
69  m_topMargin->Add( m_textEditor, 3, wxEXPAND | wxALL, 5 );
70 
71  wxBoxSizer* bSizer5;
72  bSizer5 = new wxBoxSizer( wxHORIZONTAL );
73 
74  m_compileButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|0 );
75  m_compileButton->SetToolTip( _("Check rule syntax") );
76 
77  bSizer5->Add( m_compileButton, 0, wxALL, 3 );
78 
79  m_errorsReport = new WX_HTML_REPORT_BOX( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
80  m_errorsReport->SetMinSize( wxSize( 400,60 ) );
81 
82  bSizer5->Add( m_errorsReport, 1, wxALL|wxEXPAND, 5 );
83 
84 
85  m_topMargin->Add( bSizer5, 1, wxEXPAND, 5 );
86 
87 
88  m_leftMargin->Add( m_topMargin, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
89 
90 
91  bPanelSizer->Add( m_leftMargin, 1, wxEXPAND, 5 );
92 
93 
94  this->SetSizer( bPanelSizer );
95  this->Layout();
96  bPanelSizer->Fit( this );
97 
98  // Connect Events
99  m_syntaxHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_SETUP_RULES_BASE::OnSyntaxHelp ), NULL, this );
100  m_compileButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_RULES_BASE::OnCompile ), NULL, this );
101  m_errorsReport->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_SETUP_RULES_BASE::OnErrorLinkClicked ), NULL, this );
102 }
103 
105 {
106  // Disconnect Events
107  m_syntaxHelp->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_SETUP_RULES_BASE::OnSyntaxHelp ), NULL, this );
108  m_compileButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_RULES_BASE::OnCompile ), NULL, this );
109  m_errorsReport->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_SETUP_RULES_BASE::OnErrorLinkClicked ), NULL, this );
110 
111 }
WX_HTML_REPORT_BOX.
virtual void OnSyntaxHelp(wxHyperlinkEvent &event)
wxBitmapButton * m_compileButton
virtual void OnErrorLinkClicked(wxHtmlLinkEvent &event)
WX_HTML_REPORT_BOX * m_errorsReport
virtual void OnCompile(wxCommandEvent &event)
#define NULL
wxHyperlinkCtrl * m_syntaxHelp
const char * name
Definition: DXF_plotter.cpp:60
#define ID_RULES_EDITOR
#define _(s)
Definition: 3d_actions.cpp:33
wxStyledTextCtrl * m_textEditor
PANEL_SETUP_RULES_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)