2002-09-05 14:10:50 +00:00
|
|
|
/**
|
|
|
|
* \file character.C
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-03-28 12:59:29 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Angus Leeming
|
2001-03-28 12:59:29 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-03-28 12:59:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
2001-04-05 12:26:41 +00:00
|
|
|
#include "gettext.h"
|
2001-03-28 12:59:29 +00:00
|
|
|
#include "character.h"
|
2003-09-16 09:01:15 +00:00
|
|
|
#include "LColor.h"
|
2001-03-28 12:59:29 +00:00
|
|
|
|
|
|
|
using std::vector;
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
2001-03-28 12:59:29 +00:00
|
|
|
|
|
|
|
vector<FamilyPair> const getFamilyData()
|
|
|
|
{
|
|
|
|
vector<FamilyPair> family(5);
|
|
|
|
|
|
|
|
FamilyPair pr;
|
2002-10-21 17:38:09 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("No change"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::IGNORE_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Roman"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::ROMAN_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Sans Serif"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SANS_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Typewriter"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::TYPEWRITER_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Reset"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::INHERIT_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[4] = pr;
|
|
|
|
|
|
|
|
return family;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
vector<SeriesPair> const getSeriesData()
|
|
|
|
{
|
|
|
|
vector<SeriesPair> series(4);
|
|
|
|
|
|
|
|
SeriesPair pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("No change"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::IGNORE_SERIES;
|
2001-03-28 12:59:29 +00:00
|
|
|
series[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Medium"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::MEDIUM_SERIES;
|
2001-03-28 12:59:29 +00:00
|
|
|
series[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Bold"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::BOLD_SERIES;
|
2001-03-28 12:59:29 +00:00
|
|
|
series[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Reset"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::INHERIT_SERIES;
|
2001-03-28 12:59:29 +00:00
|
|
|
series[3] = pr;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-28 12:59:29 +00:00
|
|
|
return series;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
vector<ShapePair> const getShapeData()
|
|
|
|
{
|
|
|
|
vector<ShapePair> shape(6);
|
|
|
|
|
|
|
|
ShapePair pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("No change"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::IGNORE_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Upright"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::UP_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Italic"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::ITALIC_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Slanted"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SLANTED_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Small Caps"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SMALLCAPS_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[4] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Reset"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::INHERIT_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[5] = pr;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-28 12:59:29 +00:00
|
|
|
return shape;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
vector<SizePair> const getSizeData()
|
|
|
|
{
|
|
|
|
vector<SizePair> size(14);
|
|
|
|
|
|
|
|
SizePair pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("No change"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::IGNORE_SIZE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Tiny"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_TINY;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Smallest"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_SCRIPT;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Smaller"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_FOOTNOTE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Small"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_SMALL;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[4] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Normal"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_NORMAL;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[5] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Large"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_LARGE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[6] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Larger"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_LARGER;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[7] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Largest"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_LARGEST;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[8] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Huge"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_HUGE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[9] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Huger"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::SIZE_HUGER;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[10] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Increase"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::INCREASE_SIZE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[11] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Decrease"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::DECREASE_SIZE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[12] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Reset"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LyXFont::INHERIT_SIZE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[13] = pr;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-28 12:59:29 +00:00
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
vector<BarPair> const getBarData()
|
|
|
|
{
|
2001-08-28 11:57:10 +00:00
|
|
|
vector<BarPair> bar(5);
|
2001-03-28 12:59:29 +00:00
|
|
|
|
|
|
|
BarPair pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("No change"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = IGNORE;
|
2001-03-28 12:59:29 +00:00
|
|
|
bar[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Emph"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = EMPH_TOGGLE;
|
2001-03-28 12:59:29 +00:00
|
|
|
bar[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Underbar"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = UNDERBAR_TOGGLE;
|
2001-03-28 12:59:29 +00:00
|
|
|
bar[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Noun"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = NOUN_TOGGLE;
|
2001-03-28 12:59:29 +00:00
|
|
|
bar[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Reset"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = INHERIT;
|
2001-08-28 11:57:10 +00:00
|
|
|
bar[4] = pr;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-28 12:59:29 +00:00
|
|
|
return bar;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
vector<ColorPair> const getColorData()
|
|
|
|
{
|
|
|
|
vector<ColorPair> color(11);
|
|
|
|
|
|
|
|
ColorPair pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("No change"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::ignore;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("No color"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::none;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Black"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::black;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("White"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::white;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Red"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::red;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[4] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Green"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::green;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[5] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Blue"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::blue;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[6] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Cyan"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::cyan;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[7] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Magenta"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::magenta;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[8] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Yellow"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::yellow;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[9] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2006-09-09 15:27:44 +00:00
|
|
|
pr.first = lyx::to_utf8(_("Reset"));
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.second = LColor::inherit;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[10] = pr;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-28 12:59:29 +00:00
|
|
|
return color;
|
|
|
|
}
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|