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

FX::FXIconDict Class Reference

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

#include <FXIconDict.h>

Inheritance diagram for FX::FXIconDict:

FX::FXDict FX::FXObject List of all members.

Public Member Functions

 FXIconDict (FXApp *app, const FXString &p=defaultIconPath)
void setIconSource (FXIconSource *src)
FXIconSourcegetIconSource () const
void setIconPath (const FXString &p)
const FXStringgetIconPath () const
FXIconinsert (const FXchar *name)
FXIconremove (const FXchar *name)
FXIconfind (const FXchar *name)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXIconDict ()

Static Public Attributes

const FXchar defaultIconPath []

Detailed Description

The Icon Dictionary 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 dictionary, and thus all icons will be deleted when the dictionary is deleted.


Constructor & Destructor Documentation

FX::FXIconDict::FXIconDict FXApp app,
const FXString p = defaultIconPath
 

Construct icon dictionary, and set initial search path; also creates a default icon source object.

virtual FX::FXIconDict::~FXIconDict  )  [virtual]
 

Destroy the icon dict as well as the icon source.


Member Function Documentation

void FX::FXIconDict::setIconSource FXIconSource src  )  [inline]
 

Change icon source.

FXIconSource* FX::FXIconDict::getIconSource  )  const [inline]
 

Return icon source.

void FX::FXIconDict::setIconPath const FXString p  )  [inline]
 

Set icon search path.

const FXString& FX::FXIconDict::getIconPath  )  const [inline]
 

Return current icon search path.

FXIcon* FX::FXIconDict::insert const FXchar *  name  )  [inline]
 

Insert unique icon loaded from filename into dictionary.

FXIcon* FX::FXIconDict::remove const FXchar *  name  )  [inline]
 

Remove icon from dictionary.

Reimplemented from FX::FXDict.

FXIcon* FX::FXIconDict::find const FXchar *  name  )  [inline]
 

Find icon by name.

virtual void FX::FXIconDict::save FXStream store  )  const [virtual]
 

Save to stream.

Reimplemented from FX::FXObject.

virtual void FX::FXIconDict::load FXStream store  )  [virtual]
 

Load from stream.

Reimplemented from FX::FXObject.


Member Data Documentation

const FXchar FX::FXIconDict::defaultIconPath[] [static]
 

Default icon search path.

Copyright © 1997-2005 Jeroen van der Zijp