]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlParagraph.h
* src/frontend/controllers/frontend_helpers.cpp: safety fix suggested by Andre
[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 "Dialog.h"
16 #include "Layout.h" // for LyXAlignment
17
18 namespace lyx {
19
20 class ParagraphParameters;
21
22 namespace frontend {
23
24 class ControlParagraph : public Dialog::Controller {
25 public:
26         ///
27         ControlParagraph(Dialog &);
28         ///
29         virtual bool initialiseParams(std::string const & data);
30         /// clean-up on hide.
31         virtual void clearParams();
32         ///
33         virtual void dispatchParams();
34         ///
35         virtual bool isBufferDependent() const { return true; }
36         ///
37         ParagraphParameters & params();
38         ///
39         ParagraphParameters const & params() const;
40         ///
41         bool const haveMulitParSelection();
42         ///
43         bool inInset() const;
44         ///
45         bool canIndent() const;
46         ///
47         LyXAlignment alignPossible() const;
48         ///
49         LyXAlignment alignDefault() const;
50
51 private:
52         ///
53         boost::scoped_ptr<ParagraphParameters> params_;
54         ///
55         bool ininset_;
56         ///
57         LyXAlignment alignpossible_;
58         ///
59         LyXAlignment aligndefault_;
60 };
61
62 } // namespace frontend
63 } // namespace lyx
64
65 #endif // CONTROLPARAGRAPH_H