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