4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS.
14 #ifndef GUICHARACTER_H
15 #define GUICHARACTER_H
17 #include "GuiDialog.h"
18 #include "ui_CharacterUi.h"
19 #include "qt_helpers.h" // for LanguagePair
41 typedef std::pair<QString, FontFamily> FamilyPair;
42 typedef std::pair<QString, FontFamily> FamilyPair;
43 typedef std::pair<QString, FontSeries> SeriesPair;
44 typedef std::pair<QString, FontShape> ShapePair;
45 typedef std::pair<QString, FontSize> SizePair;
46 typedef std::pair<QString, FontState> BarPair;
47 typedef std::pair<QString, ColorCode> ColorPair;
49 class GuiCharacter : public GuiDialog, public Ui::CharacterUi
54 GuiCharacter(GuiView & lv);
57 void change_adaptor();
63 void updateContents();
65 QList<FamilyPair> family;
66 QList<SeriesPair> series;
67 QList<ShapePair> shape;
70 QList<ColorPair> color;
71 QList<LanguagePair> language;
74 bool initialiseParams(std::string const & data);
78 void dispatchParams();
80 bool isBufferDependent() const { return true; }
82 FuncCode getLfun() const { return LFUN_FONT_FREE_UPDATE; }
85 void setFamily(FontFamily);
87 void setSeries(FontSeries);
89 void setShape(FontShape);
91 void setSize(FontSize);
93 void setBar(FontState);
95 void setColor(ColorCode);
97 void setLanguage(QString const &);
100 FontFamily getFamily() const;
102 FontSeries getSeries() const;
104 FontShape getShape() const;
106 FontSize getSize() const;
108 FontState getBar() const;
110 ColorCode getColor() const;
112 QString getLanguage() const;
119 /// If true the language should be reset.
120 /// If false the language of font_ is used.
124 } // namespace frontend
127 #endif // GUICHARACTER_H