KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_rules_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10
12
14
15PANEL_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 )
16{
17 wxBoxSizer* bPanelSizer;
18 bPanelSizer = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* bSizer4;
21 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
22
23 m_title = new wxStaticText( this, wxID_ANY, _("DRC rules:"), wxDefaultPosition, wxDefaultSize, 0 );
24 m_title->Wrap( -1 );
25 bSizer4->Add( m_title, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
26
27
28 bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
29
30 m_syntaxHelp = new wxHyperlinkCtrl( this, wxID_ANY, _("Syntax help"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
31 m_syntaxHelp->SetToolTip( _("Show syntax help window") );
32
33 bSizer4->Add( m_syntaxHelp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
34
35
36 bPanelSizer->Add( bSizer4, 0, wxEXPAND, 5 );
37
38 m_topMargin = new wxBoxSizer( wxVERTICAL );
39
40 m_textEditor = new wxStyledTextCtrl( this, ID_RULES_EDITOR, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString );
41 m_textEditor->SetUseTabs( true );
42 m_textEditor->SetTabWidth( 4 );
43 m_textEditor->SetIndent( 4 );
44 m_textEditor->SetTabIndents( true );
45 m_textEditor->SetBackSpaceUnIndents( true );
46 m_textEditor->SetViewEOL( false );
47 m_textEditor->SetViewWhiteSpace( false );
48 m_textEditor->SetMarginWidth( 2, 0 );
49 m_textEditor->SetIndentationGuides( true );
50 m_textEditor->SetReadOnly( false );
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|wxBOTTOM|wxRIGHT, 5 );
72
73 wxBoxSizer* bSizer5;
74 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
75
76 m_compileButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
77 m_compileButton->SetToolTip( _("Check rule syntax") );
78
79 bSizer5->Add( m_compileButton, 0, wxTOP|wxBOTTOM, 5 );
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, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
85
86
87 m_topMargin->Add( bSizer5, 1, wxEXPAND, 5 );
88
89
90 bPanelSizer->Add( m_topMargin, 1, wxEXPAND, 10 );
91
92
93 this->SetSizer( bPanelSizer );
94 this->Layout();
95 bPanelSizer->Fit( this );
96
97 // Connect Events
98 m_syntaxHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( PANEL_SETUP_RULES_BASE::OnSyntaxHelp ), NULL, this );
99 m_textEditor->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_SETUP_RULES_BASE::OnContextMenu ), 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_textEditor->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_SETUP_RULES_BASE::OnContextMenu ), NULL, this );
109 m_compileButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_RULES_BASE::OnCompile ), NULL, this );
110 m_errorsReport->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_SETUP_RULES_BASE::OnErrorLinkClicked ), NULL, this );
111
112}
const char * name
Definition: DXF_plotter.cpp:57
STD_BITMAP_BUTTON * m_compileButton
virtual void OnSyntaxHelp(wxHyperlinkEvent &event)
wxStyledTextCtrl * m_textEditor
virtual void OnErrorLinkClicked(wxHtmlLinkEvent &event)
wxHyperlinkCtrl * m_syntaxHelp
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)
WX_HTML_REPORT_BOX * m_errorsReport
virtual void OnContextMenu(wxMouseEvent &event)
virtual void OnCompile(wxCommandEvent &event)
A bitmap button widget that behaves like a standard dialog button except with an icon.
A slimmed down version of WX_HTML_REPORT_PANEL.
#define _(s)
#define ID_RULES_EDITOR