Laxkit  0.0.7.1
Public Member Functions
Laxkit::FontManagerXlib Class Reference

The font manager used by anXApp to simplify keeping track of what fonts are loaded. More...

Inheritance diagram for Laxkit::FontManagerXlib:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual LaxFontAdd (XftFont *xftfont, int nid)
 Add a font to the fontmananger for which an XftFont is already made.
virtual LaxFontMakeFontFromFile (const char *file, double size, int nid)
 Create and return a LaxFont, but do not store it within the fontmanager.
virtual LaxFontMakeFontFromStr (const char *fcstr, int nid)
 Create and return a font based on fcstr, a fontconfig string.
virtual LaxFontMakeFont (const char *family, const char *style, double size, int nid)
 Create and return a LaxFont, but do not store it within the fontmanager.
virtual LaxFontAdd (LaxFont *font, int nid)
 Add an already created LaxFont to the manager.
virtual LaxFontCheckOut (int id)
 Add a count of 1 to the LaxFont with the given id, and return the corresponding font object.

Additional Inherited Members

- Protected Member Functions inherited from Laxkit::RefPtrStack< LaxFont >
 RefPtrStack (char nar=3)
virtual void flush ()
virtual int push (LaxFont *nd, char local=-1, int where=-1)
virtual int pushnodup (LaxFont *nd, char local=-1, int where=-1)
virtual int remove (int which=-1)
- Protected Member Functions inherited from Laxkit::PtrStack< LaxFont >
 PtrStack (char nar=1)
virtual LaxFontoperator[] (int i)
virtual int howmany ()
virtual void swap (int i1, int i2)
virtual int popp (LaxFont *topop, int *local=NULL)
virtual int pop (LaxFont *&popped, int which=-1, int *local=NULL)
virtual LaxFontpop (int which=-1, int *local=NULL)
virtual int findindex (LaxFont *t)
virtual void Delta (int ndelta)
virtual int Delta ()
virtual LaxFont ** extractArrays (char **local=NULL, int *nn=NULL)
virtual int insertArrays (LaxFont **a, char *nl, int nn)

Detailed Description

The font manager used by anXApp to simplify keeping track of what fonts are loaded.


Member Function Documentation

LaxFont * Laxkit::FontManagerXlib::Add ( XftFont *  xftfont,
int  nid 
)
virtual

Add a font to the fontmananger for which an XftFont is already made.

The manager takes possession of xfs, it should not be deleted by anything else.

If nid<0 then the id is from getUniqueNumber().

Returns the new font object, or NULL on failure.

References Laxkit::anObject::dec_count(), Laxkit::PtrStack< LaxFont >::e, Laxkit::getUniqueNumber(), Laxkit::PtrStack< LaxFont >::n, and Laxkit::RefPtrStack< LaxFont >::push().

LaxFont * Laxkit::FontManagerXlib::Add ( LaxFont font,
int  nid 
)
virtual

Add an already created LaxFont to the manager.

If nid<0 then the id is from getUniqueNumber().

If the font is already on the stack, nothing is done.

The font's count is incremented. Returns the font object or NULL on error.

Implements Laxkit::FontManager.

References Laxkit::getUniqueNumber().

LaxFont * Laxkit::FontManagerXlib::CheckOut ( int  id)
virtual

Add a count of 1 to the LaxFont with the given id, and return the corresponding font object.

Returns the LaxFont object, or NULL if object not found.

Please remember that when you are all done with the font, you must decrement its count.

Implements Laxkit::FontManager.

References Laxkit::PtrStack< LaxFont >::e, Laxkit::anObject::inc_count(), and Laxkit::PtrStack< LaxFont >::n.

LaxFont * Laxkit::FontManagerXlib::MakeFont ( const char family,
const char style,
double  size,
int  nid 
)
virtual

Create and return a LaxFont, but do not store it within the fontmanager.

This family, style, and size are passed along to fontconfig. If fontconfig cannot do anything with it, NULL is returned.

Implements Laxkit::FontManager.

References Laxkit::anXApp::app.

LaxFont * Laxkit::FontManagerXlib::MakeFontFromFile ( const char file,
double  size,
int  nid 
)
virtual

Create and return a LaxFont, but do not store it within the fontmanager.

This file and size are passed along to fontconfig. If fontconfig cannot do anything with it, NULL is returned.

Implements Laxkit::FontManager.

References Laxkit::anXApp::app.

LaxFont * Laxkit::FontManagerXlib::MakeFontFromStr ( const char fcstr,
int  nid 
)
virtual

Create and return a font based on fcstr, a fontconfig string.

If nid<0 then the id is from getUniqueNumber().

Implements Laxkit::FontManager.

References Laxkit::anXApp::app, and Laxkit::getUniqueNumber().


The documentation for this class was generated from the following files:

Mon Feb 17 2014 11:52:59, Laxkit