X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfont.h;h=68015ae34b611dbbbcea3674650ee7e250b9cd33;hb=1d7d3cc4afa2205c801ccc2aa71c7ac59359dc5f;hp=17be0682db16915dced72c679dabe2bd84471e25;hpb=27de1486ca34aaad446adb798d71a77d6f6304da;p=lyx.git diff --git a/src/lyxfont.h b/src/lyxfont.h index 17be0682db..68015ae34b 100644 --- a/src/lyxfont.h +++ b/src/lyxfont.h @@ -6,9 +6,10 @@ * * Copyright (C) 1995 Matthias Ettrich * - *======================================================*/ -#ifndef _LYXFONT_H -#define _LYXFONT_H + * ====================================================== */ + +#ifndef LYXFONT_H +#define LYXFONT_H #ifdef __GNUG__ #pragma interface @@ -16,6 +17,7 @@ #include FORMS_H_LOCATION #include "LString.h" +#include "debug.h" // It might happen that locale.h defines ON and OFF. This is not good // for us, since we use these names below. But of course this is due @@ -189,7 +191,7 @@ public: /// Shortcut initialization LyXFont(LyXFont::FONT_INIT3); - /// LyXFont x,y; x=y; + /// LyXFont x, y; x = y; LyXFont& operator=(LyXFont const & x); /// Decreases font size by one @@ -245,40 +247,40 @@ public: LyXFont & setColor(LyXFont::FONT_COLOR c); /// Set family after LyX text format - LyXFont & setLyXFamily(LString const &); + LyXFont & setLyXFamily(string const &); /// Set series after LyX text format - LyXFont & setLyXSeries(LString const &); + LyXFont & setLyXSeries(string const &); /// Set shape after LyX text format - LyXFont & setLyXShape(LString const &); + LyXFont & setLyXShape(string const &); /// Set size after LyX text format - LyXFont & setLyXSize(LString const &); + LyXFont & setLyXSize(string const &); /// Returns misc flag after LyX text format - LyXFont::FONT_MISC_STATE setLyXMisc(LString const &); + LyXFont::FONT_MISC_STATE setLyXMisc(string const &); /// Sets color after LyX text format - LyXFont & setLyXColor(LString const &); + LyXFont & setLyXColor(string const &); /// Sets size after GUI name - LyXFont & setGUISize(LString const &); + LyXFont & setGUISize(string const &); /// Returns size of font in LaTeX text notation - LString latexSize() const; + string latexSize() const; /** Updates font settings according to request. If an attribute is IGNORE, the attribute is left as it is. */ /* - * When toggleall=true, all properties that matches the font in use + * When toggleall = true, all properties that matches the font in use * will have the effect that the properties is reset to the * default. If we have a text that is TYPEWRITER_FAMILY, and is * update()'ed with TYPEWRITER_FAMILY, the operation will be as if * a INHERIT_FAMILY was asked for. This is necessary for the * toggle-user-defined-style button on the toolbar. */ - void update(LyXFont const & newfont, bool toggleall=false); + void update(LyXFont const & newfont, bool toggleall = false); /** Reduce font to fall back to template where possible. Equal fields are reduced to INHERIT */ @@ -302,11 +304,11 @@ public: */ int latexWriteStartChanges(FILE *, LyXFont const & base) const; - /** Writes to LString, the head of the LaTeX needed to change + /** Writes to string, the head of the LaTeX needed to change to this font. Returns number of chars written. Base is the font state active now. */ - int latexWriteStartChanges(LString &, LyXFont const & base) const; + int latexWriteStartChanges(string &, LyXFont const & base) const; /** Writes the tail of the LaTeX needd to change to this font. Returns number of chars written. Base is the font state we want @@ -318,10 +320,10 @@ public: Returns number of chars written. Base is the font state we want to achieve. */ - int latexWriteEndChanges(LString &, LyXFont const & base) const; + int latexWriteEndChanges(string &, LyXFont const & base) const; /// Build GUI description of font state - LString stateText() const; + string stateText() const; /// int maxAscent() const; @@ -342,16 +344,16 @@ public: int textWidth(char const *s, int n) const; /// - int stringWidth(LString const & s) const; + int stringWidth(string const & s) const; /// - int signedStringWidth(LString const & s) const; + int signedStringWidth(string const & s) const; /// Draws text and returns width of text int drawText(char const*, int n, Pixmap, int baseline, int x) const; /// - int drawString(LString const &, Pixmap pm, int baseline, int x) const; + int drawString(string const &, Pixmap pm, int baseline, int x) const; /// GC getGC() const; @@ -470,6 +472,7 @@ private: XFontStruct* getXFontstruct() const; }; +ostream & operator<<(ostream &, LyXFont::FONT_MISC_STATE); inline LyXFont::LyXFont() {