]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormSearch.h
7167f2fa2692441c3d634079d7b16f36153280be
[features.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 #include "xformsBC.h"
20
21 struct FD_form_search;
22 class LyXView;
23 class Dialogs;
24
25 /** This class provides an XForms implementation of the FormSearch Dialog.
26  */
27 class FormSearch : public FormBaseBD {
28 public:
29         ///
30         FormSearch(LyXView *, Dialogs *);
31    
32 private:
33         /// Pointer to the actual instantiation of the ButtonController.
34         virtual xformsBC & bc();
35
36         /// Filter the inputs
37         virtual bool input(FL_OBJECT *, long);
38    
39         /// Build the popup
40         virtual void build();
41
42         /// Update the popup
43         virtual void update();
44
45         /// Searches occurance of string
46         /// if argument=true forward search otherwise backward search
47         void Find(bool const = true);
48         /// if argument=false replace once otherwise replace all
49         /// Replaces occurance of string
50         void Replace(bool const = false);
51    
52         ///
53         virtual FL_FORM * form() const;
54    
55         /// Typedefinitions from the fdesign produced Header file
56         FD_form_search  * build_search();
57    
58         /// Real GUI implementation.
59         boost::scoped_ptr<FD_form_search> dialog_;
60         /// The ButtonController
61         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
62 };
63
64
65 inline
66 xformsBC & FormSearch::bc()
67 {
68         return bc_;
69 }
70 #endif