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