XFont Class Reference

#include <xfont.h>

Inherits WFont.

Inheritance diagram for XFont:

Inheritance graph
[legend]
Collaboration diagram for XFont:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 XFont (Monitor *monitor, XFontStruct *font)
virtual ~XFont ()
virtual void drawText (Window window, GC gc, int x, int y, string text)
virtual int textWidth (string text)
virtual unsigned int height ()
virtual void setHeight (unsigned int height)
XFontStruct * font () const
virtual int ascent ()
virtual int descent ()

Static Public Member Functions

static XFontload (Monitor *monitor, string name)

Private Attributes

XFontStruct * font_
unsigned int height_

Detailed Description

Base class for default XFonts.

Definition at line 22 of file xfont.h.


Constructor & Destructor Documentation

XFont::XFont ( Monitor monitor,
XFontStruct *  font 
)

Definition at line 11 of file xfont.cpp.

References font_, WFont::NORMAL, and WFont::type_.

Referenced by load().

XFont::~XFont (  )  [virtual]

Definition at line 32 of file xfont.cpp.


Member Function Documentation

void XFont::drawText ( Window  window,
GC  gc,
int  x,
int  y,
string  text 
) [virtual]

Implements WFont.

Definition at line 47 of file xfont.cpp.

References XCORE.

int XFont::textWidth ( string  text  )  [virtual]

Implements WFont.

Definition at line 35 of file xfont.cpp.

References font_, and XCORE.

unsigned int XFont::height (  )  [virtual]

Implements WFont.

Definition at line 39 of file xfont.cpp.

References height_.

void XFont::setHeight ( unsigned int  height  )  [virtual]

Implements WFont.

Definition at line 43 of file xfont.cpp.

References height_.

Referenced by load().

XFontStruct * XFont::font (  )  const

Definition at line 60 of file xfont.cpp.

References font_.

Referenced by load().

int XFont::ascent (  )  [virtual]

Implements WFont.

Definition at line 51 of file xfont.cpp.

References font_.

int XFont::descent (  )  [virtual]

Implements WFont.

Definition at line 55 of file xfont.cpp.

References font_.

XFont * XFont::load ( Monitor monitor,
string  name 
) [static]

Reimplemented from WFont.

Definition at line 18 of file xfont.cpp.

References font(), setHeight(), XCORE, and XFont().

Referenced by Monitor::initFonts(), and WFont::load().

Here is the call graph for this function:


Member Data Documentation

XFontStruct* XFont::font_ [private]

Definition at line 47 of file xfont.h.

Referenced by ascent(), descent(), font(), textWidth(), and XFont().

unsigned int XFont::height_ [private]

Definition at line 48 of file xfont.h.

Referenced by height(), and setHeight().


The documentation for this class was generated from the following files:
Generated on Thu May 24 15:20:34 2007 for ncwm by  doxygen 1.5.1