zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Fonts Class Reference

A Font database read in from a file. More...

#include <Fonts.h>

Inherits Zeni::Singleton< Fonts >, and Zeni::Database< Font >.

Friends

class Singleton< Fonts >
 

Additional Inherited Members

- Public Member Functions inherited from Zeni::Singleton< Fonts >
void fax_post_reinit (Event::Handler *const &handler)
 
void fax_pre_uninit (Event::Handler *const &handler)
 
void give_post_reinit (Event::Handler *const &handler)
 
void give_pre_uninit (Event::Handler *const &handler)
 
void lend_post_reinit (Event::Handler *const &handler)
 
void lend_pre_uninit (Event::Handler *const &handler)
 
- Public Member Functions inherited from Zeni::Database< Font >
 Database (const String &filename, const String &xml_identifier)
 
virtual ~Database ()
 
void clear (const String &name, const String &filename="")
 Clear an entry. More...
 
void clear ()
 Permanently clear all resources. More...
 
unsigned long find (const String &name) const
 Get an id by name, without throwing an Error. More...
 
bool find (const unsigned long &id) const
 Check to see that an id is valid. More...
 
unsigned long get_id (const String &name) const
 Get an id by name, possibly throwing an Error. More...
 
unsigned long give (const String &name, Font *const &type, const bool &keep, const String &filename="")
 Add an entry (which it will later delete) More...
 
unsigned long lend (const String &name, Font *const &type, const bool &keep)
 Add an entry (which it will NEVER delete) More...
 
void load_file (const String &filename)
 Load all resources from a given file, giving them highest priority. More...
 
void lose_resources ()
 Wipe losable resources and prepare to reload them when they are next needed. More...
 
const bool & lost_resources ()
 Check to see if resources have been lost. More...
 
Fontoperator[] (const String &name) const
 Get a TYPE by name. More...
 
Fontoperator[] (const unsigned long &id) const
 Get a TYPE by id. More...
 
void reload ()
 lose_resources + init More...
 
void unload_file (const String &filename)
 Unload all resources from a given file, reloading lower priority resources. More...
 
void unlose_resources ()
 If resources have been lost, then reload them. More...
 
- Static Public Member Functions inherited from Zeni::Singleton< Fonts >
static void completely_destroy ()
 
static void destroy ()
 
static Fontsget ()
 
static bool is_initialized ()
 
static void remove_post_reinit (Event::Handler *const &handler)
 
static void remove_pre_uninit (Event::Handler *const &handler)
 
- Protected Member Functions inherited from Zeni::Singleton< Fonts >
 Singleton ()
 
virtual ~Singleton ()
 
- Protected Member Functions inherited from Zeni::Database< Font >
bool give_priority (const String &name, const bool &lent, const bool &keep, const String &filename="")
 If 'lent', 'keep', and 'filename' match, give priority over other 'name' entries. More...
 
void init ()
 
void uninit ()
 

Detailed Description

A Font database read in from a file.

One can retrieve fonts by name from this singleton class.

Note
It is important to note that Fonts can potentially take up a lot of memory. While it is still desirable to name fonts by use rather than actual font name, it may be necessary to reload different font databases to keep memory usage down.
Author
bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 51 of file Fonts.h.

Friends And Related Function Documentation

friend class Singleton< Fonts >
friend

Definition at line 52 of file Fonts.h.


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