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