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
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* Full author contact details are available in file CREDITS
|
2001-03-28 12:59:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
2001-04-05 12:26:41 +00:00
|
|
|
#include "gettext.h"
|
2001-03-28 12:59:29 +00:00
|
|
|
#include "character.h"
|
|
|
|
|
|
|
|
using std::vector;
|
|
|
|
|
2002-04-29 15:56:36 +00:00
|
|
|
namespace frnt {
|
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
|
|
|
|
|
|
|
pr.first = _("No change");
|
|
|
|
pr.second = LyXFont::IGNORE_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Roman");
|
|
|
|
pr.second = LyXFont::ROMAN_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Sans Serif");
|
|
|
|
pr.second = LyXFont::SANS_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Typewriter");
|
|
|
|
pr.second = LyXFont::TYPEWRITER_FAMILY;
|
2001-03-28 12:59:29 +00:00
|
|
|
family[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Reset");
|
|
|
|
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
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("No change");
|
|
|
|
pr.second = LyXFont::IGNORE_SERIES;
|
2001-03-28 12:59:29 +00:00
|
|
|
series[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Medium");
|
|
|
|
pr.second = LyXFont::MEDIUM_SERIES;
|
2001-03-28 12:59:29 +00:00
|
|
|
series[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Bold");
|
|
|
|
pr.second = LyXFont::BOLD_SERIES;
|
2001-03-28 12:59:29 +00:00
|
|
|
series[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Reset");
|
|
|
|
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
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("No change");
|
|
|
|
pr.second = LyXFont::IGNORE_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Upright");
|
|
|
|
pr.second = LyXFont::UP_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Italic");
|
|
|
|
pr.second = LyXFont::ITALIC_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Slanted");
|
|
|
|
pr.second = LyXFont::SLANTED_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Small Caps");
|
|
|
|
pr.second = LyXFont::SMALLCAPS_SHAPE;
|
2001-03-28 12:59:29 +00:00
|
|
|
shape[4] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Reset");
|
|
|
|
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
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("No change");
|
|
|
|
pr.second = LyXFont::IGNORE_SIZE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Tiny");
|
|
|
|
pr.second = LyXFont::SIZE_TINY;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Smallest");
|
|
|
|
pr.second = LyXFont::SIZE_SCRIPT;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Smaller");
|
|
|
|
pr.second = LyXFont::SIZE_FOOTNOTE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Small");
|
|
|
|
pr.second = LyXFont::SIZE_SMALL;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[4] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Normal");
|
|
|
|
pr.second = LyXFont::SIZE_NORMAL;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[5] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Large");
|
|
|
|
pr.second = LyXFont::SIZE_LARGE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[6] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Larger");
|
|
|
|
pr.second = LyXFont::SIZE_LARGER;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[7] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Largest");
|
|
|
|
pr.second = LyXFont::SIZE_LARGEST;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[8] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Huge");
|
|
|
|
pr.second = LyXFont::SIZE_HUGE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[9] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Huger");
|
|
|
|
pr.second = LyXFont::SIZE_HUGER;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[10] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Increase");
|
|
|
|
pr.second = LyXFont::INCREASE_SIZE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[11] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Decrease");
|
|
|
|
pr.second = LyXFont::DECREASE_SIZE;
|
2001-03-28 12:59:29 +00:00
|
|
|
size[12] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Reset");
|
|
|
|
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
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("No change");
|
|
|
|
pr.second = IGNORE;
|
2001-03-28 12:59:29 +00:00
|
|
|
bar[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Emph");
|
|
|
|
pr.second = EMPH_TOGGLE;
|
2001-03-28 12:59:29 +00:00
|
|
|
bar[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Underbar");
|
|
|
|
pr.second = UNDERBAR_TOGGLE;
|
2001-03-28 12:59:29 +00:00
|
|
|
bar[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Noun");
|
|
|
|
pr.second = NOUN_TOGGLE;
|
2001-03-28 12:59:29 +00:00
|
|
|
bar[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Reset");
|
|
|
|
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
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("No change");
|
|
|
|
pr.second = LColor::ignore;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[0] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("No color");
|
|
|
|
pr.second = LColor::none;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[1] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Black");
|
|
|
|
pr.second = LColor::black;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[2] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("White");
|
|
|
|
pr.second = LColor::white;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[3] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Red");
|
|
|
|
pr.second = LColor::red;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[4] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Green");
|
|
|
|
pr.second = LColor::green;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[5] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Blue");
|
|
|
|
pr.second = LColor::blue;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[6] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Cyan");
|
|
|
|
pr.second = LColor::cyan;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[7] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Magenta");
|
|
|
|
pr.second = LColor::magenta;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[8] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Yellow");
|
|
|
|
pr.second = LColor::yellow;
|
2001-03-28 12:59:29 +00:00
|
|
|
color[9] = pr;
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
pr.first = _("Reset");
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2002-04-29 15:56:36 +00:00
|
|
|
} // namespace frnt
|