12DIALOG_SCH_FIND_BASE::DIALOG_SCH_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 )
14 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
16 wxBoxSizer* mainSizer;
17 mainSizer =
new wxBoxSizer( wxVERTICAL );
20 topSizer =
new wxBoxSizer( wxHORIZONTAL );
22 wxBoxSizer* leftSizer;
23 leftSizer =
new wxBoxSizer( wxVERTICAL );
25 wxFlexGridSizer* leftGridSizer;
26 leftGridSizer =
new wxFlexGridSizer( 3, 2, 3, 3 );
27 leftGridSizer->AddGrowableCol( 1 );
28 leftGridSizer->SetFlexibleDirection( wxBOTH );
29 leftGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31 m_staticText1 =
new wxStaticText(
this, wxID_ANY,
_(
"&Search for:"), wxDefaultPosition, wxDefaultSize, 0 );
33 leftGridSizer->Add(
m_staticText1, 0, wxALIGN_CENTER_VERTICAL, 6 );
35 m_comboFind =
new wxComboBox(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxTE_PROCESS_ENTER );
36 m_comboFind->SetToolTip(
_(
"Text with optional wildcards") );
41 m_staticReplace =
new wxStaticText(
this, wxID_ANY,
_(
"Replace &with:"), wxDefaultPosition, wxDefaultSize, 0 );
45 leftGridSizer->Add(
m_staticReplace, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
47 m_comboReplace =
new wxComboBox(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER );
52 m_staticDirection =
new wxStaticText(
this, wxID_ANY,
_(
"Direction:"), wxDefaultPosition, wxDefaultSize, 0 );
58 wxBoxSizer* directionSizer;
59 directionSizer =
new wxBoxSizer( wxVERTICAL );
61 m_radioForward =
new wxRadioButton(
this, wxID_ANY,
_(
"F&orward"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
66 m_radioBackward =
new wxRadioButton(
this, wxID_ANY,
_(
"&Backward"), wxDefaultPosition, wxDefaultSize, 0 );
72 leftGridSizer->Add( directionSizer, 1, wxEXPAND, 5 );
75 leftSizer->Add( leftGridSizer, 0, wxALL|wxEXPAND, 5 );
77 wxGridBagSizer* gbSizer2;
78 gbSizer2 =
new wxGridBagSizer( 0, 20 );
79 gbSizer2->SetFlexibleDirection( wxHORIZONTAL );
80 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
82 m_checkMatchCase =
new wxCheckBox(
this, wxID_ANY,
_(
"Match &case"), wxDefaultPosition, wxDefaultSize, 0 );
83 gbSizer2->Add(
m_checkMatchCase, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
85 m_checkWholeWord =
new wxCheckBox(
this, wxID_ANY,
_(
"Whole &words only"), wxDefaultPosition, wxDefaultSize, 0 );
87 gbSizer2->Add(
m_checkWholeWord, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
89 m_checkWildcardMatch =
new wxCheckBox(
this, wxID_ANY,
_(
"Wi&ldcards"), wxDefaultPosition, wxDefaultSize, 0 );
90 gbSizer2->Add(
m_checkWildcardMatch, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
92 m_checkAllPins =
new wxCheckBox(
this, wxID_ANY,
_(
"Search pin &names and numbers"), wxDefaultPosition, wxDefaultSize, 0 );
93 gbSizer2->Add(
m_checkAllPins, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
95 m_checkAllFields =
new wxCheckBox(
this, wxID_ANY,
_(
"Search &hidden fields"), wxDefaultPosition, wxDefaultSize, 0 );
96 gbSizer2->Add(
m_checkAllFields, wxGBPosition( 2, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
98 m_checkCurrentSheetOnly =
new wxCheckBox(
this, wxID_ANY,
_(
"Search the current &sheet only"), wxDefaultPosition, wxDefaultSize, 0 );
101 m_checkSelectedOnly =
new wxCheckBox(
this, wxID_ANY,
_(
"Search the current selection &only"), wxDefaultPosition, wxDefaultSize, 0 );
102 gbSizer2->Add(
m_checkSelectedOnly, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
104 m_checkReplaceReferences =
new wxCheckBox(
this, wxID_ANY,
_(
"Replace matches in reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
110 leftSizer->Add( gbSizer2, 1, wxEXPAND, 5 );
113 topSizer->Add( leftSizer, 1, wxEXPAND|wxALL, 5 );
115 wxBoxSizer* rightSizer;
116 rightSizer =
new wxBoxSizer( wxVERTICAL );
118 m_buttonFind =
new wxButton(
this, wxID_FIND,
_(
"Find"), wxDefaultPosition, wxDefaultSize, 0 );
123 m_buttonReplace =
new wxButton(
this, wxID_REPLACE,
_(
"Replace"), wxDefaultPosition, wxDefaultSize, 0 );
126 rightSizer->Add(
m_buttonReplace, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
128 m_buttonReplaceAll =
new wxButton(
this, wxID_REPLACE_ALL,
_(
"Replace All"), wxDefaultPosition, wxDefaultSize, 0 );
133 m_buttonCancel =
new wxButton(
this, wxID_CANCEL,
_(
"Close"), wxDefaultPosition, wxDefaultSize, 0 );
134 rightSizer->Add(
m_buttonCancel, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 6 );
137 topSizer->Add( rightSizer, 0, wxALL|wxEXPAND, 6 );
140 mainSizer->Add( topSizer, 1, wxEXPAND, 5 );
143 this->SetSizer( mainSizer );
145 mainSizer->Fit(
this );
147 this->Centre( wxBOTH );
wxStaticText * m_staticText1
wxCheckBox * m_checkReplaceReferences
virtual void OnReplaceWithSelect(wxCommandEvent &event)
wxStaticText * m_staticDirection
virtual void OnUpdateDrcUI(wxUpdateUIEvent &event)
virtual void OnClose(wxCloseEvent &event)
wxCheckBox * m_checkAllPins
virtual void OnReplaceWithText(wxCommandEvent &event)
wxCheckBox * m_checkWildcardMatch
virtual void OnSearchForSelect(wxCommandEvent &event)
virtual void OnReplace(wxCommandEvent &event)
wxStaticText * m_staticReplace
wxRadioButton * m_radioForward
wxCheckBox * m_checkCurrentSheetOnly
wxCheckBox * m_checkAllFields
virtual void OnOptions(wxCommandEvent &event)
wxComboBox * m_comboReplace
virtual void OnUpdateReplaceUI(wxUpdateUIEvent &event)
wxButton * m_buttonCancel
DIALOG_SCH_FIND_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Find"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnSearchForEnter(wxCommandEvent &event)
virtual void OnSearchForText(wxCommandEvent &event)
wxButton * m_buttonReplaceAll
wxCheckBox * m_checkMatchCase
virtual void OnUpdateReplaceAllUI(wxUpdateUIEvent &event)
wxRadioButton * m_radioBackward
virtual void OnReplaceWithEnter(wxCommandEvent &event)
virtual void OnIdle(wxIdleEvent &event)
wxButton * m_buttonReplace
wxCheckBox * m_checkSelectedOnly
virtual void OnCancel(wxCommandEvent &event)
wxCheckBox * m_checkWholeWord
virtual void OnFind(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...