1 ///////////////////////////////////////////////////////////////////////////
2 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
6 ///////////////////////////////////////////////////////////////////////////
7
8 #include "wx_html_report_box.h"
9
10 #include "panel_setup_rules_base.h"
11
12 ///////////////////////////////////////////////////////////////////////////
13
PANEL_SETUP_RULES_BASE(wxWindow * parent,wxWindowID id,const wxPoint & pos,const wxSize & size,long style,const wxString & name)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"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
34 m_syntaxHelp->SetToolTip( _("Show syntax help window") );
35
36 bSizer4->Add( m_syntaxHelp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
37
38
39 m_topMargin->Add( bSizer4, 0, wxEXPAND, 5 );
40
41 m_textEditor = new wxStyledTextCtrl( this, ID_RULES_EDITOR, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString );
42 m_textEditor->SetUseTabs( true );
43 m_textEditor->SetTabWidth( 4 );
44 m_textEditor->SetIndent( 4 );
45 m_textEditor->SetTabIndents( true );
46 m_textEditor->SetBackSpaceUnIndents( true );
47 m_textEditor->SetViewEOL( false );
48 m_textEditor->SetViewWhiteSpace( false );
49 m_textEditor->SetMarginWidth( 2, 0 );
50 m_textEditor->SetIndentationGuides( true );
51 m_textEditor->SetMarginWidth( 1, 0 );
52 m_textEditor->SetMarginType( 0, wxSTC_MARGIN_NUMBER );
53 m_textEditor->SetMarginWidth( 0, m_textEditor->TextWidth( wxSTC_STYLE_LINENUMBER, wxT("_99999") ) );
54 m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
55 m_textEditor->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) );
56 m_textEditor->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) );
57 m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
58 m_textEditor->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) );
59 m_textEditor->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) );
60 m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
61 m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
62 m_textEditor->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) );
63 m_textEditor->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) );
64 m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
65 m_textEditor->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) );
66 m_textEditor->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) );
67 m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
68 m_textEditor->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
69 m_textEditor->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
70 m_textEditor->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
71 m_topMargin->Add( m_textEditor, 3, wxEXPAND | wxALL, 5 );
72
73 wxBoxSizer* bSizer5;
74 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
75
76 m_compileButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW|0 );
77 m_compileButton->SetToolTip( _("Check rule syntax") );
78
79 bSizer5->Add( m_compileButton, 0, wxALL, 3 );
80
81 m_errorsReport = new WX_HTML_REPORT_BOX( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
82 m_errorsReport->SetMinSize( wxSize( 400,60 ) );
83
84 bSizer5->Add( m_errorsReport, 1, wxALL|wxEXPAND, 5 );
85
86
87 m_topMargin->Add( bSizer5, 1, wxEXPAND, 5 );
88
89
90 m_leftMargin->Add( m_topMargin, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
91
92
93 bPanelSizer->Add( m_leftMargin, 1, wxEXPAND, 5 );
94
95
96 this->SetSizer( bPanelSizer );
97 this->Layout();
98 bPanelSizer->Fit( this );
99
100 // Connect Events
101 m_syntaxHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_SETUP_RULES_BASE::OnSyntaxHelp ), NULL, this );
102 m_compileButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_RULES_BASE::OnCompile ), NULL, this );
103 m_errorsReport->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_SETUP_RULES_BASE::OnErrorLinkClicked ), NULL, this );
104 }
105
~PANEL_SETUP_RULES_BASE()106 PANEL_SETUP_RULES_BASE::~PANEL_SETUP_RULES_BASE()
107 {
108 // Disconnect Events
109 m_syntaxHelp->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_SETUP_RULES_BASE::OnSyntaxHelp ), NULL, this );
110 m_compileButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_RULES_BASE::OnCompile ), NULL, this );
111 m_errorsReport->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_SETUP_RULES_BASE::OnErrorLinkClicked ), NULL, this );
112
113 }
114