wxMaxima
Loading...
Searching...
No Matches
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
43class FindReplacePane : public wxPanel
44{
45public:
46 virtual ~FindReplacePane();
47 class FindReplaceData: public wxFindReplaceData
48 {
49 public:
51 bool GetRegexSearch() const {return m_regexSearch;}
52 void SetRegexSearch(bool regexSearch) {m_regexSearch = regexSearch;}
53 private:
54 bool m_regexSearch;
55 };
56
57private:
59 FindReplaceData *m_findReplaceData;
61 bool m_active;
62 wxTextCtrl *m_searchText;
63 wxTextCtrl *m_replaceText;
64 wxButton *m_searchButton;
65 wxButton *m_replaceButton;
66 wxButton *m_replaceAllButton;
67 wxRadioButton *m_forward;
68 wxRadioButton *m_backwards;
69 wxRadioButton *m_regexSearch;
70 wxRadioButton *m_simpleSearch;
71 wxCheckBox *m_matchCase;
73 bool m_activateDuringConstruction;
74public:
75 FindReplacePane(wxWindow *parent, FindReplaceData *data);
76
77 bool GetRegexSearch() const {return m_findReplaceData->GetRegexSearch();}
78
79 wxString GetFindString() const
80 { return m_findReplaceData->GetFindString(); }
81
82 void SetFindString(wxString strng);
83
84 wxFindReplaceData *GetData() const
85 { return m_findReplaceData; }
86
87protected:
88 void OnActivate(wxActivateEvent &event);
89
90 void OnSearch(wxCommandEvent &event);
91
92 void OnReplace(wxCommandEvent &event);
93
94 void OnReplaceAll(wxCommandEvent &event);
95
96 void OnReplaceStringChange(wxCommandEvent &event);
97
98 void OnFindStringChange(wxCommandEvent &event);
99
100 void OnDirectionChange(wxCommandEvent &event);
101
102 void OnRegexSimpleChange(wxCommandEvent &event);
103
104 void OnMatchCase(wxCommandEvent &event);
105
106 void OnKeyDown(wxKeyEvent &event);
107};
108
109#endif // FINDREPLACEPANE_H
Definition: FindReplacePane.h:48
The find+replace pane.
Definition: FindReplacePane.h:44