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"
49 typedef std::pair<QString, FontFamily> FamilyPair;
50 typedef std::pair<QString, FontFamily> FamilyPair;
51 typedef std::pair<QString, FontSeries> SeriesPair;
52 typedef std::pair<QString, FontShape> ShapePair;
53 typedef std::pair<QString, FontSize> SizePair;
54 typedef std::pair<QString, FontState> BarPair;
55 typedef std::pair<QString, ColorCode> ColorPair;
56 typedef std::pair<QString, QString> LanguagePair;
58 class GuiCharacter : public GuiDialog, public Ui::CharacterUi
63 GuiCharacter(GuiView & lv);
66 void change_adaptor();
69 /// \name Dialog inherited methods
72 void updateContents();
73 bool initialiseParams(std::string const & data);
75 void dispatchParams();
76 bool isBufferDependent() const { return true; }
77 FuncCode getLfun() const { return LFUN_TEXTSTYLE_UPDATE; }
78 void saveSession() const;
79 void restoreSession();
83 void paramsToDialog(Font const & font);
85 QList<FamilyPair> family;
86 QList<SeriesPair> series;
87 QList<ShapePair> shape;
90 QList<ColorPair> color;
91 QList<LanguagePair> language;
98 /// If true the language should be reset.
99 /// If false the language of font_ is used.
103 } // namespace frontend
106 #endif // GUICHARACTER_H