]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlParagraph.h
This file is part of LyX, the document processor.
[lyx.git] / src / frontends / controllers / ControlParagraph.h
1 // -*- C++ -*-
2 /**
3  * \file ControlParagraph.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Edwin Leuven 
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef CONTROLPARAGRAPH_H
13 #define CONTROLPARAGRAPH_H
14
15 #include <boost/scoped_ptr.hpp>
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "ControlDialog_impl.h"
22 #include "layout.h" // for LyXAlignment
23
24 class ParagraphParameters;
25
26 /** A controller for Paragraph dialogs.
27  */
28 class ControlParagraph : public ControlDialogBD
29 {
30 public:
31         ///
32         ControlParagraph(LyXView &, Dialogs &);
33         /** Declaring this out of line allows us to forward declare
34             ParagraphParameters without upsetting boost::scoped_ptr. */
35         ~ControlParagraph();
36
37         ///
38         ParagraphParameters & params();
39         ///
40         bool inInset() const;
41         ///
42         LyXAlignment alignPossible() const;
43         ///
44         void changedParagraph();
45
46 private:
47         /// Get changed parameters and Dispatch them to the kernel.
48         virtual void apply();
49         /// set the params before show or update.
50         virtual void setParams();
51
52         ///
53         boost::scoped_ptr<ParagraphParameters> pp_;
54         ///
55         bool ininset_;
56         ///
57         LyXAlignment alignpos_;
58 };
59
60 #endif // CONTROLPARAGRAPH_H