Class: Fox::FXIconDict

FXDict show all
Defined in:


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.

Instance Attribute Summary

Attributes inherited from FXDict

#first, #last, #length

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FXDict

#clear, #each_key, #empty?, #has_key?, #key, #keys, #marked?, #next, #prev

Methods inherited from FXObject

#bind, #handle, #load, #save, subclasses

Constructor Details

#initialize(app, path = FXIconDict.defaultIconPath) ⇒ FXIconDict

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

# File 'rdoc-sources/FXIconDict.rb', line 24

def initialize(app, path=FXIconDict.defaultIconPath);

Class Method Details


Return the default icon search path (as a string)

# File 'rdoc-sources/FXIconDict.rb', line 18

def FXIconDict.defaultIconPath; end

Instance Method Details

#find(name) ⇒ Object

Find icon by name and return a reference to it.

# File 'rdoc-sources/FXIconDict.rb', line 46

def find(name); end


Return current icon search path

# File 'rdoc-sources/FXIconDict.rb', line 37

def iconPath; end

#iconPath=(path) ⇒ Object

Set icon search path

# File 'rdoc-sources/FXIconDict.rb', line 34

def iconPath=(path); end


Return icon source

# File 'rdoc-sources/FXIconDict.rb', line 31

def iconSource; end

#iconSource=(src) ⇒ Object

Change icon source to src (an FXIconSource instance).

# File 'rdoc-sources/FXIconDict.rb', line 28

def iconSource=(src); end

#insert(filename) ⇒ Object

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

# File 'rdoc-sources/FXIconDict.rb', line 40

def insert(filename); end

#remove(name) ⇒ Object

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

# File 'rdoc-sources/FXIconDict.rb', line 43

def remove(name); end