xCHM  1.23
chmfinddialog.h
1 /*
2 
3  Copyright (C) 2003 - 2013 Razvan Cojocaru <rzvncj@gmail.com>
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 2 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, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18  MA 02110-1301, USA.
19 
20 */
21 
22 
23 #ifndef __CHMFINDDIALOG_H
24 #define __CHMFINDDIALOG_H
25 
26 
27 #include <wx/dialog.h>
28 #include <wx/textctrl.h>
29 #include <wx/html/htmlcell.h>
30 
31 
32 // Forward declarations.
33 class wxCheckBox;
34 class CHMHtmlWindow;
35 
36 
38 enum {
39  ID_TextFind = 1408,
40  ID_FindNext,
41 };
42 
43 
45 class CHMFindDialog : public wxDialog {
46 public:
48  CHMFindDialog(wxWindow *parent, CHMHtmlWindow *toSearch);
49 
51  void SetFocusToTextBox() { _text->SetFocusFromKbd(); }
52 
54  void Reset() { _cell = NULL; }
55 
56 protected:
58  void OnFind(wxCommandEvent& event);
59 
60 private:
61  CHMHtmlWindow* _html;
62  wxTextCtrl* _text;
63  wxCheckBox* _whole;
64  wxCheckBox* _case;
65  wxString _currWord;
66  wxHtmlCell *_cell;
67 
68 private:
69  DECLARE_EVENT_TABLE();
70 };
71 
72 
73 #endif // __CHMFINDDIALOG_H
74 
75 
76 /*
77  Local Variables:
78  mode: c++
79  c-basic-offset: 8
80  tab-width: 8
81  c-indent-comments-syntactically-p: t
82  c-tab-always-indent: t
83  indent-tabs-mode: t
84  End:
85 */
86 
87 // vim:shiftwidth=8:autoindent:tabstop=8:noexpandtab:softtabstop=8
88 
Dialog for finding a word in the currently displayed page.
Definition: chmfinddialog.h:45
void SetFocusToTextBox()
Sets the focus to the textbox.
Definition: chmfinddialog.h:51
void Reset()
Resets the word to be found, so &#39;Find next&#39; will start over.
Definition: chmfinddialog.h:54
Custom HTML widget class. Needed for sychnronization between the topics tree control and the currentl...
Definition: chmhtmlwindow.h:62
void OnFind(wxCommandEvent &event)
Called when the user clicks the &#39;Find next&#39; button.
Definition: chmfinddialog.cpp:69
wxWidgets generic dialog class.
CHMFindDialog(wxWindow *parent, CHMHtmlWindow *toSearch)
Initializes the dialog.
Definition: chmfinddialog.cpp:32