NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
fndrpldialog.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2017 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19
20#ifndef FNDRPLDIALOG_HPP
21#define FNDRPLDIALOG_HPP
22
23#include <wx/fdrepdlg.h>
24#include <wx/wx.h>
25#include <wx/intl.h>
26#include <wx/log.h>
27#include <wx/sizer.h>
28#include <wx/button.h>
29#include <wx/checkbox.h>
30#include <wx/radiobox.h>
31#include <wx/stattext.h>
32#include <wx/textctrl.h>
33#include <wx/settings.h>
34
35#include "../compositions/viewerbook.hpp"
36#include "../compositions/viewerpanel.hpp"
37
38#define wxFR_WRAPAROUND 8
39
40class FindReplaceDialog : public wxFindReplaceDialogBase
41{
42 public:
44
45 FindReplaceDialog(wxWindow *parent,
46 wxFindReplaceData *data,
47 const wxString& title,
48 int style = 0)
49 {
50 Init();
51
52 (void)Create(parent, data, title, style);
53 }
54
55 bool Create(wxWindow *parent,
56 wxFindReplaceData *data,
57 const wxString& title,
58 int style = 0);
59
60 inline void toggleSkipFocus()
61 {
64 (static_cast<ViewerPanel*>(m_tabs->GetCurrentPage()))->toggleSkipFocus();
65 }
66
67 void SetFocus();
68 protected:
69 void Init();
70
71 void InitPage();
72 void OnPageChange(wxNotebookEvent& event);
73 void SendEvent(const wxEventType& evtType);
74
75 void OnFind(wxCommandEvent& event);
76 void OnReplace(wxCommandEvent& event);
77 void OnReplaceAll(wxCommandEvent& event);
78 void OnCancel(wxCommandEvent& event);
79
80 void OnEnter(wxMouseEvent& event);
81 void OnGainFocus(wxFocusEvent& event);
82 void OnLoseFocus(wxFocusEvent& event);
83
84 void OnUpdateFindUI(wxUpdateUIEvent& event);
85
86 void OnCloseWindow(wxCloseEvent& event);
87
88
89 wxCheckBox *m_chkCase,
95
96 wxRadioBox *m_radioDir,
98
99 wxTextCtrl *m_textFind,
102
104
106
107 private:
108 DECLARE_DYNAMIC_CLASS(FindReplaceDialog)
109
110 DECLARE_EVENT_TABLE()
111};
112#endif
113
void OnReplaceAll(wxCommandEvent &event)
wxCheckBox * m_chkWrapAround
void OnCancel(wxCommandEvent &event)
void OnLoseFocus(wxFocusEvent &event)
wxCheckBox * m_chkCase
void OnCloseWindow(wxCloseEvent &event)
wxTextCtrl * m_textFind
void OnEnter(wxMouseEvent &event)
ViewerBook * m_tabs
void OnUpdateFindUI(wxUpdateUIEvent &event)
wxTextCtrl * m_textRepl
wxRadioBox * m_radioDir
void OnFind(wxCommandEvent &event)
bool Create(wxWindow *parent, wxFindReplaceData *data, const wxString &title, int style=0)
wxRadioBox * m_radioDirRepl
void OnPageChange(wxNotebookEvent &event)
wxCheckBox * m_chkWrapAroundRepl
wxCheckBox * m_chkCaseRepl
wxCheckBox * m_chkWordRepl
wxCheckBox * m_chkWord
FindReplaceDialog(wxWindow *parent, wxFindReplaceData *data, const wxString &title, int style=0)
wxTextCtrl * m_textFindRepl
void OnReplace(wxCommandEvent &event)
void OnGainFocus(wxFocusEvent &event)
void SendEvent(const wxEventType &evtType)
void toggleSkipFocus()
Definition: viewerbook.hpp:34