Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

frnt Namespace Reference

Functions of use to the character GUI controller and view. More...


Typedefs

typedef std::pair< string,
LyXFont::FONT_FAMILY
FamilyPair
typedef std::pair< string,
LyXFont::FONT_SERIES
SeriesPair
typedef std::pair< string,
LyXFont::FONT_SHAPE
ShapePair
typedef std::pair< string,
LyXFont::FONT_SIZE
SizePair
typedef std::pair< string,
FONT_STATE
BarPair
typedef std::pair< string,
LColor::color
ColorPair
typedef std::pair< string,
string > 
RotationOriginPair
 The (tranlated) GUI string and it's LaTeX equivalent. More...

typedef std::pair< string,
string > 
LanguagePair

Enumerations

enum  FONT_STATE {
  IGNORE, EMPH_TOGGLE, UNDERBAR_TOGGLE, NOUN_TOGGLE,
  INHERIT
}

Functions

vector< FamilyPair > const getFamilyData ()
vector< SeriesPair > const getSeriesData ()
vector< ShapePair > const getShapeData ()
vector< SizePair > const getSizeData ()
vector< BarPair > const getBarData ()
vector< ColorPair > const getColorData ()
vector< string > const getBBUnits ()
 get the units for the bounding box. More...

vector< RotationOriginPairgetRotationOriginData ()
vector< LanguagePair > const getLanguageData (bool character_dlg)
 If the caller is the character dialog, add "No change" and "Reset" to the vector. More...


Variables

char const *const bb_units [] = { "bp", "cm", "mm", "in" }
size_t const bb_size = sizeof(bb_units) / sizeof(char *)
char const *const rorigin_lyx_strs []
char const *const rorigin_gui_strs []
size_t const rorigin_size = sizeof(rorigin_lyx_strs) / sizeof(char *)


Detailed Description

Functions of use to the character GUI controller and view.

Typedef Documentation

typedef std::pair<string, FONT_STATE> frnt::BarPair
 

Definition at line 48 of file character.h.

typedef std::pair<string, LColor::color> frnt::ColorPair
 

Definition at line 50 of file character.h.

typedef std::pair<string, LyXFont::FONT_FAMILY> frnt::FamilyPair
 

Definition at line 40 of file character.h.

typedef std::pair<string, string> frnt::LanguagePair
 

Definition at line 25 of file frnt_lang.h.

typedef std::pair<string, string> frnt::RotationOriginPair
 

The (tranlated) GUI string and it's LaTeX equivalent.

Definition at line 66 of file ControlGraphics.h.

typedef std::pair<string, LyXFont::FONT_SERIES> frnt::SeriesPair
 

Definition at line 42 of file character.h.

typedef std::pair<string, LyXFont::FONT_SHAPE> frnt::ShapePair
 

Definition at line 44 of file character.h.

typedef std::pair<string, LyXFont::FONT_SIZE> frnt::SizePair
 

Definition at line 46 of file character.h.


Enumeration Type Documentation

enum frnt::FONT_STATE
 

Enumeration values:
IGNORE 
EMPH_TOGGLE 
UNDERBAR_TOGGLE 
NOUN_TOGGLE 
INHERIT 

Definition at line 26 of file character.h.

00026                 {
00028         IGNORE,
00030         EMPH_TOGGLE,
00032         UNDERBAR_TOGGLE,
00034         NOUN_TOGGLE,
00036         INHERIT
00037 };


Function Documentation

std::vector< BarPair > const frnt::getBarData  
 

Definition at line 178 of file character.C.

Referenced by FormCharacter::build, and QCharacter::build_dialog.

00179 {
00180         vector<BarPair> bar(5);
00181 
00182         BarPair pr;
00183 
00184         pr.first = _("No change");
00185         pr.second = IGNORE;
00186         bar[0] = pr;
00187 
00188         pr.first = _("Emph");
00189         pr.second = EMPH_TOGGLE;
00190         bar[1] = pr;
00191 
00192         pr.first = _("Underbar");
00193         pr.second = UNDERBAR_TOGGLE;
00194         bar[2] = pr;
00195 
00196         pr.first = _("Noun");
00197         pr.second = NOUN_TOGGLE;
00198         bar[3] = pr;
00199 
00200         pr.first = _("Reset");
00201         pr.second = INHERIT;
00202         bar[4] = pr;
00203 
00204         return bar;
00205 }

std::vector< string > const frnt::getBBUnits  
 

get the units for the bounding box.

Definition at line 165 of file ControlGraphics.C.

Referenced by QGraphics::update_contents.

00166 {
00167         return vector<string> (bb_units, bb_units + bb_size);
00168 }

std::vector< ColorPair > const frnt::getColorData  
 

Definition at line 208 of file character.C.

Referenced by FormCharacter::build, and QCharacter::build_dialog.

00209 {
00210         vector<ColorPair> color(11);
00211 
00212         ColorPair pr;
00213 
00214         pr.first = _("No change");
00215         pr.second = LColor::ignore;
00216         color[0] = pr;
00217 
00218         pr.first = _("No color");
00219         pr.second = LColor::none;
00220         color[1] = pr;
00221 
00222         pr.first = _("Black");
00223         pr.second = LColor::black;
00224         color[2] = pr;
00225 
00226         pr.first = _("White");
00227         pr.second = LColor::white;
00228         color[3] = pr;
00229 
00230         pr.first = _("Red");
00231         pr.second = LColor::red;
00232         color[4] = pr;
00233 
00234         pr.first = _("Green");
00235         pr.second = LColor::green;
00236         color[5] = pr;
00237 
00238         pr.first = _("Blue");
00239         pr.second = LColor::blue;
00240         color[6] = pr;
00241 
00242         pr.first = _("Cyan");
00243         pr.second = LColor::cyan;
00244         color[7] = pr;
00245 
00246         pr.first = _("Magenta");
00247         pr.second = LColor::magenta;
00248         color[8] = pr;
00249 
00250         pr.first = _("Yellow");
00251         pr.second = LColor::yellow;
00252         color[9] = pr;
00253 
00254         pr.first = _("Reset");
00255         pr.second = LColor::inherit;
00256         color[10] = pr;
00257 
00258         return color;
00259 }

std::vector< FamilyPair > const frnt::getFamilyData  
 

Definition at line 22 of file character.C.

Referenced by FormCharacter::build, and QCharacter::build_dialog.

00023 {
00024         vector<FamilyPair> family(5);
00025 
00026         FamilyPair pr;
00027 
00028         pr.first = _("No change");
00029         pr.second = LyXFont::IGNORE_FAMILY;
00030         family[0] = pr;
00031 
00032         pr.first = _("Roman");
00033         pr.second = LyXFont::ROMAN_FAMILY;
00034         family[1] = pr;
00035 
00036         pr.first = _("Sans Serif");
00037         pr.second = LyXFont::SANS_FAMILY;
00038         family[2] = pr;
00039 
00040         pr.first = _("Typewriter");
00041         pr.second = LyXFont::TYPEWRITER_FAMILY;
00042         family[3] = pr;
00043 
00044         pr.first = _("Reset");
00045         pr.second = LyXFont::INHERIT_FAMILY;
00046         family[4] = pr;
00047 
00048         return family;
00049 }

std::vector< LanguagePair > const frnt::getLanguageData bool    character_dlg
 

If the caller is the character dialog, add "No change" and "Reset" to the vector.

Definition at line 35 of file frnt_lang.C.

Referenced by FormPreferences::Language::build, FormDocument::build, FormCharacter::build, QPrefs::build_dialog, QDocument::build_dialog, QCharacter::build_dialog, and QDocument::QDocument.

00036 {
00037         vector<LanguagePair>::size_type const size = character_dlg ?
00038                 languages.size() + 2 : languages.size();
00039 
00040         vector<LanguagePair> langs(size);
00041 
00042         if (character_dlg) {
00043                 langs[0].first = _("No change");
00044                 langs[0].second = "ignore";
00045                 langs[1].first = _("Reset");
00046                 langs[1].second = "reset";
00047         }
00048 
00049         vector<string>::size_type i = character_dlg ? 2 : 0;
00050         for (Languages::const_iterator cit = languages.begin();
00051              cit != languages.end(); ++cit) {
00052                 langs[i].first  = _(cit->second.display());
00053                 langs[i].second = cit->second.lang();
00054                 ++i;
00055         }
00056 
00057         // Don't sort "ignore" and "reset"
00058         vector<LanguagePair>::iterator begin = character_dlg ?
00059                 langs.begin() + 2 : langs.begin();
00060 
00061         std::sort(begin, langs.end(), Sorter());
00062 
00063         return langs;
00064 }

std::vector< RotationOriginPair > frnt::getRotationOriginData  
 

Definition at line 171 of file ControlGraphics.C.

Referenced by FormGraphics::build, and QGraphics::update_contents.

00172 {
00173         static vector<RotationOriginPair> data;
00174         if (!data.empty())
00175                 return data;
00176 
00177         data.resize(rorigin_size);
00178         for (lyx::size_type i = 0; i < rorigin_size; ++i) {
00179                 data[i] = make_pair(_(rorigin_gui_strs[i]),
00180                                     rorigin_lyx_strs[i]);
00181         }
00182 
00183         return data;
00184 }

std::vector< SeriesPair > const frnt::getSeriesData  
 

Definition at line 52 of file character.C.

Referenced by FormCharacter::build, and QCharacter::build_dialog.

00053 {
00054         vector<SeriesPair> series(4);
00055 
00056         SeriesPair pr;
00057 
00058         pr.first = _("No change");
00059         pr.second = LyXFont::IGNORE_SERIES;
00060         series[0] = pr;
00061 
00062         pr.first = _("Medium");
00063         pr.second = LyXFont::MEDIUM_SERIES;
00064         series[1] = pr;
00065 
00066         pr.first = _("Bold");
00067         pr.second = LyXFont::BOLD_SERIES;
00068         series[2] = pr;
00069 
00070         pr.first = _("Reset");
00071         pr.second = LyXFont::INHERIT_SERIES;
00072         series[3] = pr;
00073 
00074         return series;
00075 }

std::vector< ShapePair > const frnt::getShapeData  
 

Definition at line 78 of file character.C.

Referenced by FormCharacter::build, and QCharacter::build_dialog.

00079 {
00080         vector<ShapePair> shape(6);
00081 
00082         ShapePair pr;
00083 
00084         pr.first = _("No change");
00085         pr.second = LyXFont::IGNORE_SHAPE;
00086         shape[0] = pr;
00087 
00088         pr.first = _("Upright");
00089         pr.second = LyXFont::UP_SHAPE;
00090         shape[1] = pr;
00091 
00092         pr.first = _("Italic");
00093         pr.second = LyXFont::ITALIC_SHAPE;
00094         shape[2] = pr;
00095 
00096         pr.first = _("Slanted");
00097         pr.second = LyXFont::SLANTED_SHAPE;
00098         shape[3] = pr;
00099 
00100         pr.first = _("Small Caps");
00101         pr.second = LyXFont::SMALLCAPS_SHAPE;
00102         shape[4] = pr;
00103 
00104         pr.first = _("Reset");
00105         pr.second = LyXFont::INHERIT_SHAPE;
00106         shape[5] = pr;
00107 
00108         return shape;
00109 }

std::vector< SizePair > const frnt::getSizeData  
 

Definition at line 112 of file character.C.

Referenced by FormCharacter::build, and QCharacter::build_dialog.

00113 {
00114         vector<SizePair> size(14);
00115 
00116         SizePair pr;
00117 
00118         pr.first = _("No change");
00119         pr.second = LyXFont::IGNORE_SIZE;
00120         size[0] = pr;
00121 
00122         pr.first = _("Tiny");
00123         pr.second = LyXFont::SIZE_TINY;
00124         size[1] = pr;
00125 
00126         pr.first = _("Smallest");
00127         pr.second = LyXFont::SIZE_SCRIPT;
00128         size[2] = pr;
00129 
00130         pr.first = _("Smaller");
00131         pr.second = LyXFont::SIZE_FOOTNOTE;
00132         size[3] = pr;
00133 
00134         pr.first = _("Small");
00135         pr.second = LyXFont::SIZE_SMALL;
00136         size[4] = pr;
00137 
00138         pr.first = _("Normal");
00139         pr.second = LyXFont::SIZE_NORMAL;
00140         size[5] = pr;
00141 
00142         pr.first = _("Large");
00143         pr.second = LyXFont::SIZE_LARGE;
00144         size[6] = pr;
00145 
00146         pr.first = _("Larger");
00147         pr.second = LyXFont::SIZE_LARGER;
00148         size[7] = pr;
00149 
00150         pr.first = _("Largest");
00151         pr.second = LyXFont::SIZE_LARGEST;
00152         size[8] = pr;
00153 
00154         pr.first = _("Huge");
00155         pr.second = LyXFont::SIZE_HUGE;
00156         size[9] = pr;
00157 
00158         pr.first = _("Huger");
00159         pr.second = LyXFont::SIZE_HUGER;
00160         size[10] = pr;
00161 
00162         pr.first = _("Increase");
00163         pr.second = LyXFont::INCREASE_SIZE;
00164         size[11] = pr;
00165 
00166         pr.first = _("Decrease");
00167         pr.second = LyXFont::DECREASE_SIZE;
00168         size[12] = pr;
00169 
00170         pr.first = _("Reset");
00171         pr.second = LyXFont::INHERIT_SIZE;
00172         size[13] = pr;
00173 
00174         return size;
00175 }


Variable Documentation

size_t const frnt::bb_size = sizeof(bb_units) / sizeof(char *) [static]
 

Definition at line 140 of file ControlGraphics.C.

char const* const frnt::bb_units[] = { "bp", "cm", "mm", "in" } [static]
 

Definition at line 139 of file ControlGraphics.C.

char const* const frnt::rorigin_gui_strs[] [static]
 

Initial value:

 {
        N_("Default"),
        N_("Top left"), N_("Bottom left"), N_("Left baseline"),
        N_("Center"), N_("Top center"), N_("Bottom center"), N_("Center baseline"),
        N_("Top right"), N_("Bottom right"), N_("Right baseline") }

Definition at line 154 of file ControlGraphics.C.

char const* const frnt::rorigin_lyx_strs[] [static]
 

Initial value:

 {
        
        "",
        "leftTop",  "leftBottom", "leftBaseline", 
        "center", "centerTop", "centerBottom", "centerBaseline", 
        "rightTop", "rightBottom", "rightBaseline" }

Definition at line 145 of file ControlGraphics.C.

size_t const frnt::rorigin_size = sizeof(rorigin_lyx_strs) / sizeof(char *) [static]
 

Definition at line 160 of file ControlGraphics.C.


Generated on Fri Jul 18 01:19:06 2003 for lyx by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002