![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXIconDict.h>
Public Member Functions | |
FXIconDict (FXApp *app, const FXString &p=defaultIconPath) | |
void | setIconSource (FXIconSource *src) |
FXIconSource * | getIconSource () const |
void | setIconPath (const FXString &p) |
const FXString & | getIconPath () const |
FXIcon * | insert (const FXchar *name) |
FXIcon * | remove (const FXchar *name) |
FXIcon * | find (const FXchar *name) |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXIconDict () |
Static Public Attributes | |
static const FXchar | defaultIconPath [] |
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.
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.
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.
Insert unique icon loaded from filename into dictionary.
virtual void FX::FXIconDict::save | ( | FXStream & | store | ) | const [virtual] |
virtual void FX::FXIconDict::load | ( | FXStream & | store | ) | [virtual] |
const FXchar FX::FXIconDict::defaultIconPath[] [static] |
Default icon search path.
![]() |