#include <FXFont.h>
Public Types | |
enum | { Fixed, Variable } |
enum | { Decorative, Modern, Roman, Script, Swiss, System, X11, Scalable, Polymorphic, Rotatable } |
enum | { ReverseOblique, ReverseItalic, Straight, Italic, Oblique } |
enum | { Thin, ExtraLight, Light, Normal, Medium, DemiBold, Bold, ExtraBold, Black } |
enum | { UltraCondensed, ExtraCondensed, Condensed, SemiCondensed, NonExpanded, SemiExpanded, Expanded, ExtraExpanded, UltraExpanded } |
Public Member Functions | |
FXFont (FXApp *a, const FXString &string) | |
FXFont (FXApp *a, const FXString &face, FXuint size, FXuint weight=FXFont::Normal, FXuint slant=FXFont::Straight, FXuint encoding=FONTENCODING_DEFAULT, FXuint setwidth=FXFont::NonExpanded, FXuint h=0) | |
FXFont (FXApp *a, const FXFontDesc &fontdesc) | |
virtual void | create () |
virtual void | detach () |
virtual void | destroy () |
FXString | getFamily () const |
FXString | getFoundry () const |
const FXString & | getName () const |
const FXString & | getActualName () const |
FXuint | getSize () const |
FXuint | getActualSize () const |
FXuint | getWeight () const |
FXuint | getActualWeight () const |
FXuint | getSlant () const |
FXuint | getActualSlant () const |
FXuint | getEncoding () const |
FXuint | getActualEncoding () const |
FXuint | getSetWidth () const |
FXuint | getActualSetWidth () const |
FXuint | getHints () const |
FXuint | getFlags () const |
void | getFontDesc (FXFontDesc &fontdesc) const |
virtual void | setFontDesc (const FXFontDesc &fontdesc) |
FXint | getAngle () const |
virtual void | setAngle (FXint ang) |
FXString | getFont () const |
virtual void | setFont (const FXString &string) |
virtual FXbool | isFontMono () const |
virtual FXbool | hasChar (FXwchar ch) const |
virtual FXwchar | getMinChar () const |
virtual FXwchar | getMaxChar () const |
virtual FXint | leftBearing (FXwchar ch) const |
virtual FXint | rightBearing (FXwchar ch) const |
virtual FXint | getFontWidth () const |
virtual FXint | getFontHeight () const |
virtual FXint | getFontAscent () const |
virtual FXint | getFontDescent () const |
virtual FXint | getFontLeading () const |
virtual FXint | getFontSpacing () const |
virtual FXint | getCharWidth (const FXwchar ch) const |
virtual FXint | getTextWidth (const FXString &string) const |
virtual FXint | getTextWidth (const FXchar *string, FXuint length) const |
virtual FXint | getTextHeight (const FXString &string) const |
virtual FXint | getTextHeight (const FXchar *string, FXuint length) const |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXFont () |
FXApp * | getApp () const |
FXEventLoop * | getEventLoop () const |
FXID | id () const |
void | setUserData (void *ptr) |
void * | getUserData () const |
virtual long | onDefault (FXObject *, FXSelector, void *) |
const FXchar * | getClassName () const |
bool | isMemberOf (const FXMetaClass *metaclass) const |
virtual long | tryHandle (FXObject *sender, FXSelector sel, void *ptr) |
QTransString | tr (const char *text, const char *hint=0) |
virtual void * | getPythonObject () const |
virtual void | decouplePythonObject () const |
Static Public Member Functions | |
static FXbool | listFonts (FXFontDesc *&fonts, FXuint &numfonts, const FXString &face, FXuint wt=0, FXuint sl=0, FXuint sw=0, FXuint en=0, FXuint h=0) |
Protected Member Functions | |
void * | match (const FXString &wantfamily, const FXString &wantforge, FXuint wantsize, FXuint wantweight, FXuint wantslant, FXuint wantsetwidth, FXuint wantencoding, FXuint wanthints, FXint res) |
Protected Attributes | |
FXString | wantedName |
FXString | actualName |
FXushort | wantedSize |
FXushort | actualSize |
FXushort | wantedWeight |
FXushort | actualWeight |
FXushort | wantedSlant |
FXushort | actualSlant |
FXushort | wantedSetwidth |
FXushort | actualSetwidth |
FXushort | wantedEncoding |
FXushort | actualEncoding |
FXushort | hints |
FXushort | flags |
FXshort | angle |
void * | font |
FXID | xid |
Friends | |
class | FXDCWindow |
anonymous enum |
Font style hints.
anonymous enum |
anonymous enum |
anonymous enum |
Construct a font with given font description of the form:
fontname [ "[" foundry "]" ] ["," size ["," weight ["," slant ["," setwidth ["," encoding ["," hints]]]]]]
For example:
"helvetica [bitstream],120,bold,italic,normal,iso8859-1,0"
Typically, at least the font name, and size must be given for normal font matching. As a special case, raw X11 fonts can also be passed, for example:
"9x15bold"
Note: use of the raw X11 fonts is stronly discouraged.
FX::FXFont::FXFont | ( | FXApp * | a, | |
const FXString & | face, | |||
FXuint | size, | |||
FXuint | weight = FXFont::Normal , |
|||
FXuint | slant = FXFont::Straight , |
|||
FXuint | encoding = FONTENCODING_DEFAULT , |
|||
FXuint | setwidth = FXFont::NonExpanded , |
|||
FXuint | h = 0 | |||
) |
Construct a font with given name, size in points, weight, slant, character set encoding, setwidth, and hints. The font name may be comprised of a family name and optional foundry name enclosed in square brackets, for example, "helvetica [bitstream]".
FX::FXFont::FXFont | ( | FXApp * | a, | |
const FXFontDesc & | fontdesc | |||
) |
Construct font from font description.
virtual FX::FXFont::~FXFont | ( | ) | [virtual] |
Destroy font.
virtual void FX::FXFont::create | ( | ) | [virtual] |
virtual void FX::FXFont::detach | ( | ) | [virtual] |
virtual void FX::FXFont::destroy | ( | ) | [virtual] |
FXString FX::FXFont::getFamily | ( | ) | const |
Return family part of name.
FXString FX::FXFont::getFoundry | ( | ) | const |
Return foundry part of name.
const FXString& FX::FXFont::getName | ( | ) | const [inline] |
Get font family name.
const FXString& FX::FXFont::getActualName | ( | ) | const [inline] |
Get actual family name.
FXuint FX::FXFont::getSize | ( | ) | const [inline] |
Get size in deci-points.
FXuint FX::FXFont::getActualSize | ( | ) | const [inline] |
Get actual size in deci-points.
FXuint FX::FXFont::getWeight | ( | ) | const [inline] |
Get font weight.
FXuint FX::FXFont::getActualWeight | ( | ) | const [inline] |
Get actual font weight.
FXuint FX::FXFont::getSlant | ( | ) | const [inline] |
Get slant.
FXuint FX::FXFont::getActualSlant | ( | ) | const [inline] |
Get actual slant.
FXuint FX::FXFont::getEncoding | ( | ) | const [inline] |
Get character set encoding.
FXuint FX::FXFont::getActualEncoding | ( | ) | const [inline] |
Get actual encoding.
FXuint FX::FXFont::getSetWidth | ( | ) | const [inline] |
Get setwidth.
FXuint FX::FXFont::getActualSetWidth | ( | ) | const [inline] |
Get actual setwidth.
FXuint FX::FXFont::getHints | ( | ) | const [inline] |
Get hints.
FXuint FX::FXFont::getFlags | ( | ) | const [inline] |
Get flags.
void FX::FXFont::getFontDesc | ( | FXFontDesc & | fontdesc | ) | const |
Get font description.
virtual void FX::FXFont::setFontDesc | ( | const FXFontDesc & | fontdesc | ) | [virtual] |
Change font description.
FXint FX::FXFont::getAngle | ( | ) | const [inline] |
Return angle.
virtual void FX::FXFont::setAngle | ( | FXint | ang | ) | [virtual] |
Set to new angle, in degrees*64 relative to positive x axis.
FXString FX::FXFont::getFont | ( | ) | const |
Return the font description as a string suitable for parsing with setFont(), see above.
virtual void FX::FXFont::setFont | ( | const FXString & | string | ) | [virtual] |
Change the font to the specified font description string.
virtual FXbool FX::FXFont::isFontMono | ( | ) | const [virtual] |
Find out if the font is monotype or proportional.
virtual FXbool FX::FXFont::hasChar | ( | FXwchar | ch | ) | const [virtual] |
See if font has glyph for ch.
virtual FXwchar FX::FXFont::getMinChar | ( | ) | const [virtual] |
Get first character glyph in font.
virtual FXwchar FX::FXFont::getMaxChar | ( | ) | const [virtual] |
Get last character glyph in font.
virtual FXint FX::FXFont::leftBearing | ( | FXwchar | ch | ) | const [virtual] |
Left bearing.
virtual FXint FX::FXFont::rightBearing | ( | FXwchar | ch | ) | const [virtual] |
Right bearing.
virtual FXint FX::FXFont::getFontWidth | ( | ) | const [virtual] |
Width of widest character in font.
virtual FXint FX::FXFont::getFontHeight | ( | ) | const [virtual] |
Height of highest character in font.
virtual FXint FX::FXFont::getFontAscent | ( | ) | const [virtual] |
Ascent from baseline.
virtual FXint FX::FXFont::getFontDescent | ( | ) | const [virtual] |
Descent from baseline.
virtual FXint FX::FXFont::getFontLeading | ( | ) | const [virtual] |
Get font leading [that is lead-ing as in Pb!].
virtual FXint FX::FXFont::getFontSpacing | ( | ) | const [virtual] |
Get font line spacing.
virtual FXint FX::FXFont::getCharWidth | ( | const FXwchar | ch | ) | const [virtual] |
Calculate width of single wide character in this font.
virtual FXint FX::FXFont::getTextWidth | ( | const FXString & | string | ) | const [virtual] |
Calculate width of given text in this font.
virtual FXint FX::FXFont::getTextWidth | ( | const FXchar * | string, | |
FXuint | length | |||
) | const [virtual] |
Calculate width of given text in this font.
virtual FXint FX::FXFont::getTextHeight | ( | const FXString & | string | ) | const [virtual] |
Calculate height of given text in this font.
virtual FXint FX::FXFont::getTextHeight | ( | const FXchar * | string, | |
FXuint | length | |||
) | const [virtual] |
Calculate height of given text in this font.
static FXbool FX::FXFont::listFonts | ( | FXFontDesc *& | fonts, | |
FXuint & | numfonts, | |||
const FXString & | face, | |||
FXuint | wt = 0 , |
|||
FXuint | sl = 0 , |
|||
FXuint | sw = 0 , |
|||
FXuint | en = 0 , |
|||
FXuint | h = 0 | |||
) | [static] |
List all fonts matching hints. If listFonts() returns TRUE then fonts points to a newly-allocated array of length numfonts. It is the caller's responsibility to free this array using FXFREE().
virtual void FX::FXFont::save | ( | FXStream & | store | ) | const [virtual] |
virtual void FX::FXFont::load | ( | FXStream & | store | ) | [virtual] |
FXApp* FX::FXId::getApp | ( | ) | const [inline, inherited] |
Get application.
FXEventLoop* FX::FXId::getEventLoop | ( | ) | const [inline, inherited] |
Get event loop which owns this.
FXID FX::FXId::id | ( | ) | const [inline, inherited] |
Get XID handle.
void FX::FXId::setUserData | ( | void * | ptr | ) | [inline, inherited] |
Set user data pointer.
void* FX::FXId::getUserData | ( | ) | const [inline, inherited] |
Get user data pointer.
virtual long FX::FXObject::onDefault | ( | FXObject * | , | |
FXSelector | , | |||
void * | ||||
) | [virtual, inherited] |
Called for unhandled messages.
Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.
const FXchar* FX::FXObject::getClassName | ( | ) | const [inherited] |
Get class name of some object.
bool FX::FXObject::isMemberOf | ( | const FXMetaClass * | metaclass | ) | const [inherited] |
Check if object is member of metaclass.
virtual long FX::FXObject::tryHandle | ( | FXObject * | sender, | |
FXSelector | sel, | |||
void * | ptr | |||
) | [virtual, inherited] |
Try handle message safely.
QTransString FX::FXObject::tr | ( | const char * | text, | |
const char * | hint = 0 | |||
) | [inherited] |
Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)
virtual void* FX::FXObject::getPythonObject | ( | ) | const [inline, virtual, inherited] |
Returns the python object representing this instance (if created in python).
virtual void FX::FXObject::decouplePythonObject | ( | ) | const [inline, virtual, inherited] |
Causes decoupling of python object from this object (deletes self).