]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormParagraph.h
Implemented controller-view split for FormBibtex.
[lyx.git] / src / frontends / xforms / FormParagraph.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *       
7  *           Copyright (C) 2000 The LyX Team.
8  *
9  *           @author Jürgen Vigna
10  *
11  *======================================================*/
12
13 #ifndef FORM_PARAGRAPH_H
14 #define FORM_PARAGRAPH_H
15
16 #include <boost/smart_ptr.hpp>
17
18 #ifdef __GNUG_
19 #pragma interface
20 #endif
21
22 #include "FormBaseDeprecated.h"
23 #if 1
24 #include "lyxparagraph.h"
25 #endif
26
27 struct FD_form_tabbed_paragraph;
28 struct FD_form_paragraph_general;
29 struct FD_form_paragraph_extra;
30
31 /** This class provides an XForms implementation of the FormParagraph Popup.
32  *           @author Jürgen Vigna
33  */
34 class FormParagraph : public FormBaseBD {
35 public:
36         ///
37         FormParagraph(LyXView *, Dialogs *);
38 private:
39         /// Pointer to the actual instantiation of the ButtonController.
40         virtual xformsBC & bc();
41         /** Redraw the form (on receipt of a Signal indicating, for example,
42             that the xforms colours have been re-mapped). */
43         virtual void redraw();
44         /// Build the popup
45         virtual void build();
46         /// Apply from popup
47         virtual void apply();
48         /// Update the popup.
49         virtual void update();
50         /// Filter the inputs on callback from xforms
51         virtual bool input(FL_OBJECT * ob, long);
52
53         ///
54         virtual FL_FORM * form() const;
55         
56         ///
57         void general_update();
58 #ifndef NO_PEXTRA
59         ///
60         void extra_update();
61 #endif
62         ///
63         void general_apply();
64 #ifndef NO_PEXTRA
65         ///
66         void extra_apply();
67 #endif
68         /// Typedefinitions from the fdesign produced Header file
69         FD_form_tabbed_paragraph * build_tabbed_paragraph();
70         ///
71         FD_form_paragraph_general * build_paragraph_general();
72 //#ifndef NO_PEXTRA
73         ///
74         FD_form_paragraph_extra * build_paragraph_extra();
75 //#endif
76         /// Real GUI implementation.
77         boost::scoped_ptr<FD_form_tabbed_paragraph> dialog_;
78         ///
79         boost::scoped_ptr<FD_form_paragraph_general> general_;
80 #ifndef NO_PEXTRA
81         ///
82         boost::scoped_ptr<FD_form_paragraph_extra> extra_;
83 #endif
84         /// The ButtonController
85         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
86 };
87
88
89 inline
90 xformsBC & FormParagraph::bc()
91 {
92         return bc_;
93 }
94 #endif