]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormSearch.h
Compile fixes for DEC cxx, John's maths and keymap patches.
[lyx.git] / src / frontends / xforms / FormSearch.h
1 /**
2  * \file FormSearch.h
3  * Copyright 2001 The LyX Team.
4  * See the file COPYING.
5  *
6  * \author Edwin Leuven
7  */
8
9 #ifndef FORMSEARCH_H
10 #define FORMSEARCH_H
11
12 #include <boost/smart_ptr.hpp>
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "FormBaseDeprecated.h"
19
20 struct FD_form_search;
21
22 /** This class provides an XForms implementation of the FormSearch Dialog.
23  */
24 class FormSearch : public FormBaseBD {
25 public:
26         ///
27         FormSearch(LyXView *, Dialogs *);
28    
29 private:
30         /// Pointer to the actual instantiation of the ButtonController.
31         virtual xformsBC & bc();
32
33         /// Filter the inputs
34         virtual bool input(FL_OBJECT *, long);
35    
36         /// Build the popup
37         virtual void build();
38
39         /// Update the popup
40         virtual void update();
41
42         /// Searches occurance of string
43         /// if argument=true forward search otherwise backward search
44         void Find(bool const = true);
45         /// if argument=false replace once otherwise replace all
46         /// Replaces occurance of string
47         void Replace(bool const = false);
48    
49         ///
50         virtual FL_FORM * form() const;
51    
52         /// Typedefinitions from the fdesign produced Header file
53         FD_form_search  * build_search();
54    
55         /// Real GUI implementation.
56         boost::scoped_ptr<FD_form_search> dialog_;
57         /// The ButtonController
58         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
59 };
60
61
62 inline
63 xformsBC & FormSearch::bc()
64 {
65         return bc_;
66 }
67 #endif