]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormParagraph.h
sourcedoc-friendly files.
[lyx.git] / src / frontends / xforms / FormParagraph.h
1 // -*- C++ -*-
2 /**
3  * \file Tooltips.h
4  * Copyright 2000-2001 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Jürgen Vigna, jug@sad.it
8  */
9
10 #ifndef FORM_PARAGRAPH_H
11 #define FORM_PARAGRAPH_H
12
13 #include <boost/smart_ptr.hpp>
14
15 #ifdef __GNUG_
16 #pragma interface
17 #endif
18
19 #include "FormBaseDeprecated.h"
20
21 class Paragraph;
22 struct FD_form_paragraph;
23
24 /** This class provides an XForms implementation of the FormParagraph dialog.
25  */
26 class FormParagraph : public FormBaseBD {
27 public:
28         ///
29         FormParagraph(LyXView *, Dialogs *);
30 private:
31         /// Pointer to the actual instantiation of the ButtonController.
32         virtual xformsBC & bc();
33         /** Redraw the form (on receipt of a Signal indicating, for example,
34             that the xforms colours have been re-mapped). */
35         virtual void redraw();
36         /// Build the dialog
37         virtual void build();
38         /// Apply from dialog
39         virtual void apply();
40         /// Update the dialog
41         virtual void update();
42         /// Filter the inputs on callback from xforms
43         virtual bool input(FL_OBJECT * ob, long);
44         /// Connect signals
45         virtual void connect();
46         /// Disconnect signals
47         virtual void disconnect();
48         ///
49         void changedParagraph();
50         ///
51         Paragraph const * getCurrentParagraph() const;
52         ///
53         virtual FL_FORM * form() const;
54         
55         /// Fdesign generated method
56         FD_form_paragraph * build_paragraph();
57
58         /// Real GUI implementation.
59         boost::scoped_ptr<FD_form_paragraph> dialog_;
60
61         /// The ButtonController
62         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
63
64         /// Changed Paragraph connection.
65         SigC::Connection cp_;
66
67         /// The current Paragraph
68         Paragraph const * par_;
69 };
70
71
72 inline
73 xformsBC & FormParagraph::bc()
74 {
75         return bc_;
76 }
77 #endif