wxMaxima
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 "FindReplacePane.h"
37 
40 class FindReplaceDialog : public wxDialog
41 {
42 public:
43  FindReplaceDialog(wxWindow *parent, wxFindReplaceData *data, const wxString &title,
44  int style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
45 
47  wxFindReplaceData *GetData()
48  { return m_contents->GetData(); }
49 
51  void SetFindString(wxString string)
52  { m_contents->SetFindString(string); }
53 
54 protected:
56  void OnActivate(wxActivateEvent &WXUNUSED(event));
57 
59  void OnKeyDown(wxKeyEvent &WXUNUSED(event));
60 
66  void OnClose(wxCloseEvent& WXUNUSED(event));
67 
74 
75 private:
80  static wxSize m_windowSize;
89  static wxPoint m_windowPos;
90 };
91 
92 #endif // FINDREPLACEDIALOG_H
FindReplaceDialog::OnKeyDown
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:50
FindReplaceDialog::m_contents
FindReplacePane * m_contents
Definition: FindReplaceDialog.h:73
FindReplaceDialog::OnClose
void OnClose(wxCloseEvent &WXUNUSED(event))
Definition: FindReplaceDialog.cpp:58
FindReplacePane
Definition: FindReplacePane.h:43
FindReplacePane.h
FindReplaceDialog
Definition: FindReplaceDialog.h:40
FindReplaceDialog::SetFindString
void SetFindString(wxString string)
Set the string we are currently searching for.
Definition: FindReplaceDialog.h:51
FindReplaceDialog::OnActivate
void OnActivate(wxActivateEvent &WXUNUSED(event))
Is called if this element looses or gets the focus.
Definition: FindReplaceDialog.cpp:66
FindReplaceDialog::GetData
wxFindReplaceData * GetData()
Returns the standard wxFindReplaceData data structure.
Definition: FindReplaceDialog.h:47