]> git.lyx.org Git - features.git/blob - src/frontends/controllers/ControlCharacter.h
rename LColor into Color
[features.git] / src / frontends / controllers / ControlCharacter.h
1 // -*- C++ -*-
2 /**
3  * \file ControlCharacter.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef CONTROLCHARACTER_H
13 #define CONTROLCHARACTER_H
14
15
16 #include "Dialog.h"
17 #include "frontend_helpers.h"
18
19
20 namespace lyx {
21
22 class Color_color;
23
24 namespace frontend {
25
26 class ControlCharacter : public Dialog::Controller {
27 public:
28         ///
29         ControlCharacter(Dialog &);
30         ///
31         virtual bool initialiseParams(std::string const & data);
32         ///
33         virtual void clearParams();
34         ///
35         virtual void dispatchParams();
36         ///
37         virtual bool isBufferDependent() const { return true; }
38         ///
39         virtual kb_action getLfun() const { return LFUN_FONT_FREE_UPDATE; }
40
41         ///
42         void setFamily(LyXFont::FONT_FAMILY);
43         ///
44         void setSeries(LyXFont::FONT_SERIES);
45         ///
46         void setShape(LyXFont::FONT_SHAPE);
47         ///
48         void setSize(LyXFont::FONT_SIZE);
49         ///
50         void setBar(FONT_STATE);
51         ///
52         void setColor(Color_color);
53         ///
54         void setLanguage(std::string const &);
55         ///
56         void setToggleAll(bool);
57
58         ///
59         LyXFont::FONT_FAMILY getFamily() const;
60         ///
61         LyXFont::FONT_SERIES getSeries() const;
62         ///
63         LyXFont::FONT_SHAPE getShape() const;
64         ///
65         LyXFont::FONT_SIZE getSize() const;
66         ///
67         FONT_STATE getBar() const;
68         ///
69         Color_color getColor() const;
70         ///
71         std::string getLanguage() const;
72         ///
73         bool getToggleAll() const;
74 private:
75         ///
76         boost::scoped_ptr<LyXFont> font_;
77         ///
78         bool toggleall_;
79         /// If true the language should be reset.
80         /// If false the language of font_ is used.
81         bool reset_lang_;
82 };
83
84 } // namespace frontend
85 } // namespace lyx
86
87 #endif // CONTROLCHARACTER_H