wxMaxima
FindReplacePane.h
Go to the documentation of this file.
1 // -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2 //
3 // Copyright (C) 2004-2015 Andrej Vodopivec <andrej.vodopivec@gmail.com>
4 // (C) 2012-2013 Doug Ilijev <doug.ilijev@gmail.com>
5 // (C) 2015 Gunter Königsmann <wxMaxima@physikbuch.de>
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 //
22 // SPDX-License-Identifier: GPL-2.0+
23 
30 #ifndef FINDREPLACEPANE_H
31 #define FINDREPLACEPANE_H
32 
33 #include "precomp.h"
34 #include <wx/fdrepdlg.h>
35 #include <wx/event.h>
36 #include <wx/panel.h>
37 #include <wx/radiobut.h>
38 #include <wx/checkbox.h>
39 #include <wx/textctrl.h>
40 
43 class FindReplacePane : public wxPanel
44 {
45 private:
47  wxFindReplaceData *m_findReplaceData;
49  bool m_active;
50  wxTextCtrl *m_searchText;
51  wxTextCtrl *m_replaceText;
52  wxButton *m_searchButton;
53  wxButton *m_replaceButton;
54  wxButton *m_replaceAllButton;
55  wxRadioButton *m_forward;
56  wxRadioButton *m_backwards;
57  wxCheckBox *m_matchCase;
58 
59 public:
60  FindReplacePane(wxWindow *parent, wxFindReplaceData *data);
61 
62  wxString GetFindString()
63  { return m_findReplaceData->GetFindString(); }
64 
65  void SetFindString(wxString string);
66 
67  wxFindReplaceData *GetData()
68  { return m_findReplaceData; }
69 
70 protected:
71  void OnActivate(wxActivateEvent &event);
72 
73  void OnSearch(wxCommandEvent &event);
74 
75  void OnReplace(wxCommandEvent &event);
76 
77  void OnReplaceAll(wxCommandEvent &event);
78 
79  void OnReplaceStringChange(wxCommandEvent &event);
80 
81  void OnFindStringChange(wxCommandEvent &event);
82 
83  void OnDirectionChange(wxCommandEvent &event);
84 
85  void OnMatchCase(wxCommandEvent &event);
86 
87  void OnKeyDown(wxKeyEvent &event);
88 
89 };
90 
91 #endif // FINDREPLACEPANE_H
FindReplacePane
Definition: FindReplacePane.h:43