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
39 typedef std::pair<QString, FontFamily> FamilyPair;
40 typedef std::pair<QString, FontFamily> FamilyPair;
41 typedef std::pair<QString, FontSeries> SeriesPair;
42 typedef std::pair<QString, FontShape> ShapePair;
43 typedef std::pair<QString, FontSize> SizePair;
44 typedef std::pair<QString, FontState> BarPair;
45 typedef std::pair<QString, ColorCode> ColorPair;
47 class GuiCharacter : public GuiDialog, public Ui::CharacterUi
52 GuiCharacter(GuiView & lv);
55 void change_adaptor();
61 void updateContents();
63 QList<FamilyPair> family;
64 QList<SeriesPair> series;
65 QList<ShapePair> shape;
68 QList<ColorPair> color;
69 QList<LanguagePair> language;
72 bool initialiseParams(std::string const & data);
76 void dispatchParams();
78 bool isBufferDependent() const { return true; }
80 kb_action getLfun() const { return LFUN_FONT_FREE_UPDATE; }
83 void setFamily(FontFamily);
85 void setSeries(FontSeries);
87 void setShape(FontShape);
89 void setSize(FontSize);
91 void setBar(FontState);
93 void setColor(ColorCode);
95 void setLanguage(QString const &);
98 FontFamily getFamily() const;
100 FontSeries getSeries() const;
102 FontShape getShape() const;
104 FontSize getSize() const;
106 FontState getBar() const;
108 ColorCode getColor() const;
110 QString getLanguage() const;
117 /// If true the language should be reset.
118 /// If false the language of font_ is used.
122 } // namespace frontend
125 #endif // GUICHARACTER_H