2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiCharacter.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
2007-10-06 11:17:57 +00:00
|
|
|
* \author Angus Leeming
|
2006-03-05 17:24:44 +00:00
|
|
|
* \author Edwin Leuven
|
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUICHARACTER_H
|
|
|
|
#define GUICHARACTER_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
#include "GuiDialog.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_CharacterUi.h"
|
2007-10-06 11:17:57 +00:00
|
|
|
#include "Font.h"
|
2007-02-13 18:27:46 +00:00
|
|
|
|
2008-04-20 20:32:00 +00:00
|
|
|
#include <utility>
|
|
|
|
|
2008-05-24 21:58:56 +00:00
|
|
|
#ifdef IGNORE
|
|
|
|
#undef IGNORE
|
|
|
|
#endif
|
2007-10-06 11:17:57 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-10-06 11:17:57 +00:00
|
|
|
enum FontState {
|
|
|
|
///
|
|
|
|
IGNORE,
|
|
|
|
///
|
|
|
|
EMPH_TOGGLE,
|
|
|
|
///
|
|
|
|
UNDERBAR_TOGGLE,
|
|
|
|
///
|
|
|
|
NOUN_TOGGLE,
|
|
|
|
///
|
2009-05-03 22:45:14 +00:00
|
|
|
STRIKEOUT_TOGGLE,
|
|
|
|
///
|
2009-05-05 09:26:28 +00:00
|
|
|
UULINE_TOGGLE,
|
|
|
|
///
|
|
|
|
UWAVE_TOGGLE,
|
|
|
|
///
|
2007-10-06 11:17:57 +00:00
|
|
|
INHERIT
|
|
|
|
};
|
|
|
|
|
2008-03-08 07:59:47 +00:00
|
|
|
typedef std::pair<QString, FontFamily> FamilyPair;
|
2007-10-28 18:51:54 +00:00
|
|
|
typedef std::pair<QString, FontFamily> FamilyPair;
|
|
|
|
typedef std::pair<QString, FontSeries> SeriesPair;
|
|
|
|
typedef std::pair<QString, FontShape> ShapePair;
|
|
|
|
typedef std::pair<QString, FontSize> SizePair;
|
2008-03-08 07:59:47 +00:00
|
|
|
typedef std::pair<QString, FontState> BarPair;
|
|
|
|
typedef std::pair<QString, ColorCode> ColorPair;
|
2008-05-07 22:42:44 +00:00
|
|
|
typedef std::pair<QString, QString> LanguagePair;
|
2007-09-11 21:27:57 +00:00
|
|
|
|
2007-10-09 19:34:27 +00:00
|
|
|
class GuiCharacter : public GuiDialog, public Ui::CharacterUi
|
2007-09-05 20:33:29 +00:00
|
|
|
{
|
2007-04-25 10:57:54 +00:00
|
|
|
Q_OBJECT
|
2007-09-05 20:33:29 +00:00
|
|
|
|
2007-04-25 10:57:54 +00:00
|
|
|
public:
|
2007-11-23 09:44:02 +00:00
|
|
|
GuiCharacter(GuiView & lv);
|
2007-09-05 20:33:29 +00:00
|
|
|
|
2007-04-25 10:57:54 +00:00
|
|
|
protected Q_SLOTS:
|
|
|
|
void change_adaptor();
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
private:
|
2008-05-07 18:53:48 +00:00
|
|
|
/// Dialog inherited methods
|
|
|
|
//@{
|
2007-09-05 20:33:29 +00:00
|
|
|
void applyView();
|
2007-09-11 18:33:42 +00:00
|
|
|
void updateContents();
|
2008-05-07 18:53:48 +00:00
|
|
|
bool initialiseParams(std::string const & data);
|
|
|
|
void clearParams() {}
|
|
|
|
void dispatchParams();
|
|
|
|
bool isBufferDependent() const { return true; }
|
2008-06-11 08:35:15 +00:00
|
|
|
FuncCode getLfun() const { return LFUN_TEXTSTYLE_UPDATE; }
|
2008-05-14 12:03:12 +00:00
|
|
|
void saveSession() const;
|
|
|
|
void restoreSession();
|
2008-05-07 18:53:48 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
///
|
|
|
|
void paramsToDialog(Font const & font);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2008-03-08 07:59:47 +00:00
|
|
|
QList<FamilyPair> family;
|
|
|
|
QList<SeriesPair> series;
|
|
|
|
QList<ShapePair> shape;
|
|
|
|
QList<SizePair> size;
|
|
|
|
QList<BarPair> bar;
|
|
|
|
QList<ColorPair> color;
|
|
|
|
QList<LanguagePair> language;
|
2007-10-06 11:17:57 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
///
|
|
|
|
Font font_;
|
|
|
|
///
|
|
|
|
bool toggleall_;
|
|
|
|
/// If true the language should be reset.
|
|
|
|
/// If false the language of font_ is used.
|
|
|
|
bool reset_lang_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUICHARACTER_H
|