Class Fox::FXIconDict
In: rdoc-sources/FXIconDict.rb
Parent: FXDict

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.

Methods

Public Class methods

Return the default icon search path (as a string)

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

Public Instance methods

Find icon by name and return a reference to it.

Return current icon search path

Set icon search path

Return icon source

Change icon source to src (an FXIconSource instance).

Insert unique icon loaded from filename into dictionary, and return a reference to the icon (an FXIcon instance).

Remove icon from dictionary; returns a reference to the icon.

[Validate]