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"
40 typedef std::pair<QString, FontFamily> FamilyPair;
41 typedef std::pair<QString, FontFamily> FamilyPair;
42 typedef std::pair<QString, FontSeries> SeriesPair;
43 typedef std::pair<QString, FontShape> ShapePair;
44 typedef std::pair<QString, FontSize> SizePair;
45 typedef std::pair<QString, FontState> BarPair;
46 typedef std::pair<QString, ColorCode> ColorPair;
47 typedef std::pair<QString, QString> LanguagePair;
49 class GuiCharacter : public GuiDialog, public Ui::CharacterUi
54 GuiCharacter(GuiView & lv);
57 void change_adaptor();
60 /// Dialog inherited methods
63 void updateContents();
64 bool initialiseParams(std::string const & data);
66 void dispatchParams();
67 bool isBufferDependent() const { return true; }
68 FuncCode getLfun() const { return LFUN_FONT_FREE_UPDATE; }
69 void saveSession() const;
70 void restoreSession();
74 void paramsToDialog(Font const & font);
76 QList<FamilyPair> family;
77 QList<SeriesPair> series;
78 QList<ShapePair> shape;
81 QList<ColorPair> color;
82 QList<LanguagePair> language;
89 /// If true the language should be reset.
90 /// If false the language of font_ is used.
94 } // namespace frontend
97 #endif // GUICHARACTER_H