]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormParagraph.h
LyX Drinkers Union: patch 1
[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 2000-2001 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
24 class Paragraph;
25 struct FD_form_tabbed_paragraph;
26 struct FD_form_paragraph_general;
27 struct FD_form_paragraph_extra;
28
29 /** This class provides an XForms implementation of the FormParagraph dialog.
30  *           @author Jürgen Vigna
31  */
32 class FormParagraph : public FormBaseBD {
33 public:
34         ///
35         FormParagraph(LyXView *, Dialogs *);
36 private:
37         /// Pointer to the actual instantiation of the ButtonController.
38         virtual xformsBC & bc();
39         /** Redraw the form (on receipt of a Signal indicating, for example,
40             that the xforms colours have been re-mapped). */
41         virtual void redraw();
42         /// Build the dialog
43         virtual void build();
44         /// Apply from dialog
45         virtual void apply();
46         /// Update the dialog
47         virtual void update();
48         /// Filter the inputs on callback from xforms
49         virtual bool input(FL_OBJECT * ob, long);
50         /// Connect signals
51         virtual void connect();
52         /// Disconnect signals
53         virtual void disconnect();
54         ///
55         void changedParagraph();
56         ///
57         Paragraph const * getCurrentParagraph() const;
58         ///
59         virtual FL_FORM * form() const;
60         
61         ///
62         void general_update();
63         ///
64         void general_apply();
65
66         /// Fdesign generated methods
67         FD_form_tabbed_paragraph * build_tabbed_paragraph();
68         ///
69         FD_form_paragraph_general * build_paragraph_general();
70         ///
71         FD_form_paragraph_extra * build_paragraph_extra();
72         /// Real GUI implementation.
73         boost::scoped_ptr<FD_form_tabbed_paragraph> dialog_;
74         ///
75         boost::scoped_ptr<FD_form_paragraph_general> general_;
76         /// The ButtonController
77         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
78         /// Changed Paragraph connection.
79         SigC::Connection cp_;
80
81         /// The current Paragraph
82         Paragraph const * par_;
83 };
84
85
86 inline
87 xformsBC & FormParagraph::bc()
88 {
89         return bc_;
90 }
91 #endif