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"
45 typedef std::pair<QString, FontFamily> FamilyPair;
46 typedef std::pair<QString, FontFamily> FamilyPair;
47 typedef std::pair<QString, FontSeries> SeriesPair;
48 typedef std::pair<QString, FontShape> ShapePair;
49 typedef std::pair<QString, FontSize> SizePair;
50 typedef std::pair<QString, FontState> BarPair;
51 typedef std::pair<QString, ColorCode> ColorPair;
52 typedef std::pair<QString, QString> LanguagePair;
54 class GuiCharacter : public GuiDialog, public Ui::CharacterUi
59 GuiCharacter(GuiView & lv);
62 void change_adaptor();
65 /// Dialog inherited methods
68 void updateContents();
69 bool initialiseParams(std::string const & data);
71 void dispatchParams();
72 bool isBufferDependent() const { return true; }
73 FuncCode getLfun() const { return LFUN_TEXTSTYLE_UPDATE; }
74 void saveSession() const;
75 void restoreSession();
79 void paramsToDialog(Font const & font);
81 QList<FamilyPair> family;
82 QList<SeriesPair> series;
83 QList<ShapePair> shape;
86 QList<ColorPair> color;
87 QList<LanguagePair> language;
94 /// If true the language should be reset.
95 /// If false the language of font_ is used.
99 } // namespace frontend
102 #endif // GUICHARACTER_H