]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormParagraph.h
Merging BRANCH_MVC back into HEAD.
[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 #include "FormBaseDeprecated.h"
18 #include "xformsBC.h"
19
20 #ifdef __GNUG_
21 #pragma interface
22 #endif
23
24 struct FD_form_tabbed_paragraph;
25 struct FD_form_paragraph_general;
26 struct FD_form_paragraph_extra;
27
28 /** This class provides an XForms implementation of the FormParagraph Popup.
29  *           @author Jürgen Vigna
30  */
31 class FormParagraph : public FormBaseBD {
32 public:
33         ///
34         FormParagraph(LyXView *, Dialogs *);
35 private:
36         /// Pointer to the actual instantiation of the ButtonController.
37         virtual xformsBC & bc();
38         /** Redraw the form (on receipt of a Signal indicating, for example,
39             that the xforms colours have been re-mapped). */
40         virtual void redraw();
41         /// Build the popup
42         virtual void build();
43         /// Apply from popup
44         virtual void apply();
45         /// Update the popup.
46         virtual void update();
47         /// Filter the inputs on callback from xforms
48         virtual bool input(FL_OBJECT * ob, long);
49
50         ///
51         virtual FL_FORM * form() const;
52         
53         ///
54         void general_update();
55         ///
56         void extra_update();
57         ///
58         void general_apply();
59         ///
60         void extra_apply();
61
62         /// Typedefinitions from the fdesign produced Header file
63         FD_form_tabbed_paragraph * build_tabbed_paragraph();
64         ///
65         FD_form_paragraph_general * build_paragraph_general();
66         ///
67         FD_form_paragraph_extra * build_paragraph_extra();
68
69         /// Real GUI implementation.
70         boost::scoped_ptr<FD_form_tabbed_paragraph> dialog_;
71         ///
72         boost::scoped_ptr<FD_form_paragraph_general> general_;
73         ///
74         boost::scoped_ptr<FD_form_paragraph_extra> extra_;
75         /// The ButtonController
76         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
77 };
78
79
80 inline
81 xformsBC & FormParagraph::bc()
82 {
83         return bc_;
84 }
85 #endif