KiCad PCB EDA Suite
dialog_find_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jul 10 2019)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "dialog_find_base.h"
9 
11 
12 DIALOG_FIND_BASE::DIALOG_FIND_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bSizer10;
17  bSizer10 = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* topSizer;
20  topSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxBoxSizer* leftSizer;
23  leftSizer = new wxBoxSizer( wxVERTICAL );
24 
25  wxBoxSizer* bSizer8;
26  bSizer8 = new wxBoxSizer( wxHORIZONTAL );
27 
28  searchStringLabel = new wxStaticText( this, wxID_ANY, wxT("Search for:"), wxDefaultPosition, wxDefaultSize, 0 );
29  searchStringLabel->Wrap( -1 );
30  bSizer8->Add( searchStringLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
31 
32  m_searchCombo = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxTE_PROCESS_ENTER );
33  m_searchCombo->SetToolTip( wxT("Text with optional wildcards") );
34 
35  bSizer8->Add( m_searchCombo, 1, wxALL|wxEXPAND, 5 );
36 
37 
38  leftSizer->Add( bSizer8, 1, wxEXPAND, 5 );
39 
40  wxBoxSizer* sizerOptions;
41  sizerOptions = new wxBoxSizer( wxHORIZONTAL );
42 
43  m_matchCase = new wxCheckBox( this, wxID_ANY, wxT("Match case"), wxDefaultPosition, wxDefaultSize, 0 );
44  sizerOptions->Add( m_matchCase, 0, wxALL, 5 );
45 
46  m_matchWords = new wxCheckBox( this, wxID_ANY, wxT("Words"), wxDefaultPosition, wxDefaultSize, 0 );
47  sizerOptions->Add( m_matchWords, 0, wxALL, 5 );
48 
49  m_wildcards = new wxCheckBox( this, wxID_ANY, wxT("Wildcards"), wxDefaultPosition, wxDefaultSize, 0 );
50  sizerOptions->Add( m_wildcards, 0, wxALL, 5 );
51 
52  m_wrap = new wxCheckBox( this, wxID_ANY, wxT("Wrap"), wxDefaultPosition, wxDefaultSize, 0 );
53  m_wrap->SetValue(true);
54  sizerOptions->Add( m_wrap, 0, wxALL, 5 );
55 
56 
57  leftSizer->Add( sizerOptions, 1, wxALL|wxEXPAND, 0 );
58 
59  wxBoxSizer* sizerInclude;
60  sizerInclude = new wxBoxSizer( wxVERTICAL );
61 
62  m_includeReferences = new wxCheckBox( this, wxID_ANY, wxT("Search footprint reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
63  m_includeReferences->SetValue(true);
64  sizerInclude->Add( m_includeReferences, 0, wxALL, 5 );
65 
66  m_includeValues = new wxCheckBox( this, wxID_ANY, wxT("Search footprint values"), wxDefaultPosition, wxDefaultSize, 0 );
67  m_includeValues->SetValue(true);
68  sizerInclude->Add( m_includeValues, 0, wxALL, 5 );
69 
70  m_includeTexts = new wxCheckBox( this, wxID_ANY, wxT("Search other text items"), wxDefaultPosition, wxDefaultSize, 0 );
71  m_includeTexts->SetValue(true);
72  sizerInclude->Add( m_includeTexts, 0, wxALL, 5 );
73 
74  m_includeMarkers = new wxCheckBox( this, wxID_ANY, wxT("Search DRC markers"), wxDefaultPosition, wxDefaultSize, 0 );
75  m_includeMarkers->SetValue(true);
76  sizerInclude->Add( m_includeMarkers, 0, wxALL, 5 );
77 
78  m_includeVias = new wxCheckBox( this, wxID_ANY, wxT("Vias"), wxDefaultPosition, wxDefaultSize, 0 );
79  m_includeVias->SetValue(true);
80  m_includeVias->Hide();
81 
82  sizerInclude->Add( m_includeVias, 0, wxALL, 5 );
83 
84 
85  leftSizer->Add( sizerInclude, 0, wxEXPAND, 5 );
86 
87 
88  topSizer->Add( leftSizer, 1, wxEXPAND, 5 );
89 
90  wxBoxSizer* buttonSizer;
91  buttonSizer = new wxBoxSizer( wxVERTICAL );
92 
93  m_findNext = new wxButton( this, wxID_ANY, wxT("Find Next"), wxDefaultPosition, wxDefaultSize, 0 );
94 
95  m_findNext->SetDefault();
96  buttonSizer->Add( m_findNext, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 );
97 
98  m_findPrevious = new wxButton( this, wxID_ANY, wxT("Find Previous"), wxDefaultPosition, wxDefaultSize, 0 );
99  buttonSizer->Add( m_findPrevious, 0, wxALIGN_LEFT|wxALL|wxEXPAND, 5 );
100 
101  m_searchAgain = new wxButton( this, wxID_ANY, wxT("Restart Search"), wxDefaultPosition, wxDefaultSize, 0 );
102  buttonSizer->Add( m_searchAgain, 0, wxALL|wxEXPAND, 5 );
103 
104  m_closeButton = new wxButton( this, wxID_CANCEL, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
105  buttonSizer->Add( m_closeButton, 0, wxALL|wxEXPAND, 5 );
106 
107 
108  topSizer->Add( buttonSizer, 0, 0, 5 );
109 
110 
111  bSizer10->Add( topSizer, 0, wxEXPAND, 5 );
112 
113  wxStaticLine* staticline1;
114  staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
115  bSizer10->Add( staticline1, 0, wxEXPAND | wxALL, 5 );
116 
117  wxBoxSizer* sizerStatus;
118  sizerStatus = new wxBoxSizer( wxHORIZONTAL );
119 
120  m_status = new wxStaticText( this, wxID_ANY, wxT("Status"), wxDefaultPosition, wxDefaultSize, 0 );
121  m_status->Wrap( -1 );
122  sizerStatus->Add( m_status, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
123 
124 
125  bSizer10->Add( sizerStatus, 0, wxEXPAND, 5 );
126 
127 
128  this->SetSizer( bSizer10 );
129  this->Layout();
130  bSizer10->Fit( this );
131 
132  this->Centre( wxBOTH );
133 
134  // Connect Events
135  m_searchCombo->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_FIND_BASE::onTextEnter ), NULL, this );
136  m_findNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onFindNextClick ), NULL, this );
137  m_findPrevious->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onFindPreviousClick ), NULL, this );
138  m_searchAgain->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onSearchAgainClick ), NULL, this );
139  m_closeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onClose ), NULL, this );
140 }
141 
143 {
144  // Disconnect Events
145  m_searchCombo->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_FIND_BASE::onTextEnter ), NULL, this );
146  m_findNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onFindNextClick ), NULL, this );
147  m_findPrevious->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onFindPreviousClick ), NULL, this );
148  m_searchAgain->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onSearchAgainClick ), NULL, this );
149  m_closeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onClose ), NULL, this );
150 
151 }
virtual void onFindPreviousClick(wxCommandEvent &event)
wxCheckBox * m_includeVias
wxStaticText * searchStringLabel
wxCheckBox * m_includeReferences
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
DIALOG_FIND_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE)
wxStaticText * m_status
virtual void onClose(wxCommandEvent &event)
#define NULL
wxComboBox * m_searchCombo
wxCheckBox * m_includeTexts
wxCheckBox * m_matchCase
virtual void onFindNextClick(wxCommandEvent &event)
wxButton * m_closeButton
wxCheckBox * m_wildcards
wxButton * m_findPrevious
virtual void onSearchAgainClick(wxCommandEvent &event)
wxCheckBox * m_includeMarkers
wxCheckBox * m_matchWords
virtual void onTextEnter(wxCommandEvent &event)
wxButton * m_searchAgain
wxCheckBox * m_wrap
wxCheckBox * m_includeValues
wxButton * m_findNext