]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlParagraph.h
fix scrolling bug: 3320 and 3652, maybe not perfect
[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 inInset() const;
42         ///
43         bool canIndent() const;
44         ///
45         LyXAlignment alignPossible() const;
46         ///
47         LyXAlignment alignDefault() const;
48
49 private:
50         ///
51         boost::scoped_ptr<ParagraphParameters> params_;
52         ///
53         bool ininset_;
54         ///
55         LyXAlignment alignpossible_;
56         ///
57         LyXAlignment aligndefault_;
58 };
59
60 } // namespace frontend
61 } // namespace lyx
62
63 #endif // CONTROLPARAGRAPH_H