wxMaxima
Loading...
Searching...
No Matches
FindReplaceDialog.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 FINDREPLACEDIALOG_H
31#define FINDREPLACEDIALOG_H
32
33#include "precomp.h"
34#include <wx/dialog.h>
35#include <wx/event.h>
36#include <wx/radiobut.h>
37#include "FindReplacePane.h"
38
41class FindReplaceDialog : public wxDialog
42{
43public:
45 const wxString &title,
46 FindReplaceDialog **pointerToDialogue = nullptr,
47 int style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER,
48 bool searchOnly = false);
49
51
52 void SetFocus() override;
53
55 wxFindReplaceData *GetData()
56 { return m_contents->GetData(); }
57
58 bool GetRegexSearch() const {return m_contents->GetRegexSearch();}
59
61 void SetFindString(const wxString &strng)
62 { m_contents->SetFindString(strng); }
63
67 FindReplacePane *GetPane() const { return m_contents; }
68
69protected:
71 void OnActivateEvent(wxActivateEvent &WXUNUSED(event));
72
74 void OnKeyDown(wxKeyEvent &WXUNUSED(event));
75
82
83private:
84 FindReplaceDialog **m_pointerToDialogue;
89 static wxSize m_windowSize;
98 static wxPoint m_windowPos;
99};
100
101#endif // FINDREPLACEDIALOG_H
This file defines the class FindReplacePane.
The find+replace dialog.
Definition: FindReplaceDialog.h:42
wxFindReplaceData * GetData()
Returns the standard wxFindReplaceData data structure.
Definition: FindReplaceDialog.h:55
FindReplacePane * m_contents
The contents of the dialog.
Definition: FindReplaceDialog.h:81
void OnKeyDown(wxKeyEvent &WXUNUSED(event))
We catch a few hot keys here as we don't provide a menu that could declare them.
Definition: FindReplaceDialog.cpp:92
FindReplacePane * GetPane() const
The pane this dialog wraps – shared with the dockable sidebar's GetActiveFindPane() (GH #2249) so sea...
Definition: FindReplaceDialog.h:67
void SetFindString(const wxString &strng)
Set the string we are currently searching for.
Definition: FindReplaceDialog.h:61
void OnActivateEvent(wxActivateEvent &WXUNUSED(event))
Is called if this element looses or gets the focus.
Definition: FindReplaceDialog.cpp:99
Definition: FindReplacePane.h:51
The find+replace pane.
Definition: FindReplacePane.h:47