Laxkit  0.0.7.1
Public Member Functions
Laxkit::FontManager Class Reference

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

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

List of all members.

Public Member Functions

virtual LaxFontMakeFontFromFile (const char *file, double size, int nid)=0
 Create and return a LaxFont, but do not store it within the fontmanager.
virtual LaxFontMakeFontFromStr (const char *fcstr, int nid)=0
 Create and return a LaxFont, but do not store it within the fontmanager.
virtual LaxFontMakeFont (const char *family, const char *style, double size, int nid)=0
 Create and return a LaxFont, but do not store it within the fontmanager.
virtual LaxFontAdd (LaxFont *font, int nid)=0
 Add an existing font to the fontmananger.
virtual LaxFontCheckOut (int id)=0
 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.
- Public Member Functions inherited from Laxkit::anObject
 anObject ()
 Set object_id=getUniqueNumber().
virtual ~anObject ()
 Empty virtual destructor.
virtual const charwhattype ()
 Returns the type of anObject.
virtual anObjectduplicate (anObject *ref=NULL)
virtual int inc_count ()
 Increment the data's count by 1. Returns count.
virtual int dec_count ()
 Decrement the count of the data, deleting if count is less than or equal to 0.
virtual int the_count ()

Additional Inherited Members

- Public Attributes inherited from Laxkit::anObject
int suppress_debug
DeleteRefCountedFunc deleteMe
 Called when the count is decremented to 0.
unsigned long object_id
charobject_idstr
- Protected Attributes inherited from Laxkit::anObject
int _count
 The reference count of the object.

Detailed Description

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


Member Function Documentation

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

Add an existing font to the fontmananger.

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

Returns the new font object, or NULL on failure.

Implemented in Laxkit::FontManagerXlib, and Laxkit::FontManagerCairo.

LaxFont * Laxkit::FontManager::CheckOut ( int  id)
pure 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.

Implemented in Laxkit::FontManagerXlib, and Laxkit::FontManagerCairo.

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

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

If nid<=0, then a random id is given to the font.

Implemented in Laxkit::FontManagerXlib, and Laxkit::FontManagerCairo.

Referenced by Laxkit::DisplayerXlib::font(), and Laxkit::RulerWindow::RulerWindow().

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

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

If nid<=0, then a random id is given to the font.

Implemented in Laxkit::FontManagerXlib, and Laxkit::FontManagerCairo.

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

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

str is a FontConfig string. If nid<=0, then a random id is given to the font.

Implemented in Laxkit::FontManagerXlib, and Laxkit::FontManagerCairo.


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

Mon Feb 17 2014 11:52:59, Laxkit