Class: Fox::FXIconDict

Inherits:
FXDict show all
Defined in:
rdoc-sources/FXIconDict.rb

Overview

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.



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

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

Class Method Details

.defaultIconPathObject

Return the default icon search path (as a string)



18
# 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.



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

def find(name); end

#iconPathObject

Return current icon search path



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

def iconPath; end

#iconPath=(path) ⇒ Object

Set icon search path



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

def iconPath=(path); end

#iconSourceObject

Return icon source



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

def iconSource; end

#iconSource=(src) ⇒ Object

Change icon source to src (an FXIconSource instance).



28
# 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).



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

def insert(filename); end

#remove(name) ⇒ Object

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



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

def remove(name); end