ExternalIconFamily
Project Description
This framework allows importing and managing any external icon family. Once imported , the icon family is reified into the image, as a subclass of
ExternalIconFamily.
Subclasses of ExternalIconFamily act as caches for all the forms, that were requested previously.
To load a form send
ExternalIconFamily>>iconNamed: aString size: aNumber
AlphaImageMorph named: 'document_save' size: 32 family: 'oxygen'.
As an example it comes with a tiny subset of the Oxygen icon family imported, to load others see the example named OxygenIconsBuilder.
To open at all the icons provided by an imported family send #openAllIcons to any subclass of ExternalIconFamily.
How to import?
The external file directory, from where to import the files should have all the desired icons, categorized by sizes in directories named 16x16, 32x32, 64x64, etc...
Every icon family builder responds iconsSpecs, which is the specification of all the icons to import.
IconsFamilyBuilder>>iconsSpecs is automatically created with the contents of all the icons in the external folder. But this can be overridden in any subclass, for loading any subset of all the available icons. ( See ExternalIconSpec class).
The importer creates valid selectors from the icon file names, and later creates aliases. For example, "AlphaImageMorph named: 'document_save' size: 32 family: 'oxygen'", the icon contents are retrieved using a automatically defined alias, so you can the original file names
To load evaluate in Pharo
Gofer it
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfExternalIconFamily';
load.
(Smalltalk globals classNamed: 'ConfigurationOfExternalIconFamily') perform: #load.
Try out this example
ExternalIconFamilyOxygenTinySubsetExample openAllIcons
Members
Tags
multimedia,
pharoLicense
Code commited to this repository will be automatically under
MIT license.
Registration
MCHttpRepository
location: 'http://www.squeaksource.com/ExternalIconFamily'
user: ''
password: ''
Packages
- ConfigurationOfExternalIconFamily
- ExternalIconFamily
- ExternalIconFamily-Core
- ExternalIconFamily-Examples
- ExternalIconFamily-Tests
Links
http://www.squeaksource.com/ExternalIconFamily.htmlhttp://www.squeaksource.com/ExternalIconFamilyStatistics
Registered: | 26 October 2010 4:19:26 pm |
Total Releases: | 0 |
Total Versions: | 40 |
Total Downloads: | 2256 |