Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXIconCache Class Reference

The Icon Cache manages a collection of icons. More...

#include <FXIconCache.h>

Inheritance diagram for FX::FXIconCache:
FX::FXObject

List of all members.

Public Member Functions

 FXIconCache (FXApp *ap, const FXString &sp=defaultIconPath)
 Construct Icon Cache, and set initial search path; also sets a pointer to the default icon source object.
FXAppgetApp () const
 Get application.
void setIconSource (FXIconSource *src)
 Change icon source.
FXIconSourcegetIconSource () const
 Return icon source.
void setIconPath (const FXString &p)
 Set the icon search paths.
const FXStringgetIconPath () const
 Return the current icon search paths.
FXIconinsert (const FXchar *name)
 Insert icon into cache, load it from file if not already cached.
FXIconinsert (const FXString &name)
 Insert icon into cache, load it from file if not already cached.
FXIconfind (const FXchar *name) const
 Find icon by name, return NULL if no icon found in cache.
FXIconfind (const FXString &name) const
 Find icon by name, return NULL if no icon found in cache.
void remove (const FXchar *name)
 Remove icon from cache and delete it.
void remove (const FXString &name)
 Remove icon from cache.
void clear ()
 Delete all icons.
virtual void save (FXStream &store) const
 Save object to stream.
virtual void load (FXStream &store)
 Load object from stream.
virtual ~FXIconCache ()
 Delete everything.
- Public Member Functions inherited from FX::FXObject
const FXchar * getClassName () const
 Get class name of some object.
FXbool isMemberOf (const FXMetaClass *metaclass) const
 Check if object is member of metaclass.
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
 Try handle message safely, catching certain exceptions.
virtual long onDefault (FXObject *, FXSelector, void *)
 Called for unhandled messages.
virtual ~FXObject ()
 Virtual destructor.

Static Public Attributes

static const FXchar defaultIconPath []
 Default icon search path.

Detailed Description

The Icon Cache manages a collection of icons.

The icons are referenced by their file name. When first encountering a new file name, the icon is located by searching the icon search path for the icon file. If found, the services of the Icon Source object are used to load the icon from the file. A custom Icon Source may be installed to furnish support for additonal image file formats. Once the icon is loaded, an association between the icon name and the icon is entered into the Icon Dictionary. Subsequent searches for an icon with this name will be satisfied from the cached value. The lifetype of the icons is managed by the Icon Cache, and thus all icons will be deleted when the Icon Cache itself is deleted.


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

Copyright © 1997-2016 Jeroen van der Zijp