ExternalIconFamily

ExternalIconFamily project page

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



ConfigurationOfExternalIconFamily-GuillermoPolito.10.mcz
ExternalIconFamily-Core-FernandoOlivero.10.mcz
ExternalIconFamily-Examples-FernandoOlivero.5.mcz
ExternalIconFamily-Core-FernandoOlivero.9.mcz
ExternalIconFamily-Examples-FernandoOlivero.4.mcz
ExternalIconFamily-Core-FernandoOlivero.8.mcz
ExternalIconFamily-Core-FernandoOlivero.7.mcz
ExternalIconFamily-Core-FernandoOlivero.6.mcz
ExternalIconFamily-Core-FernandoOlivero.5.mcz
ExternalIconFamily-Core-FernandoOlivero.4.mcz
ExternalIconFamily-Core-FernandoOlivero.3.mcz
ExternalIconFamily-Examples-FernandoOlivero.3.mcz
ExternalIconFamily-Core-FernandoOlivero.2.mcz
ExternalIconFamily-Examples-FernandoOlivero.2.mcz
ExternalIconFamily-Tests-FernandoOlivero.1.mcz
ExternalIconFamily-Examples-FernandoOlivero.1.mcz
ExternalIconFamily-Core-FernandoOlivero.1.mcz
ExternalIconFamily-FernandoOlivero.27.mcz
ExternalIconFamily-FernandoOlivero.26.mcz
ExternalIconFamily-FernandoOlivero.25.mcz
ExternalIconFamily-FernandoOlivero.24.mcz
ExternalIconFamily-FernandoOlivero.23.mcz
ExternalIconFamily-FernandoOlivero.22.mcz
ExternalIconFamily-FernandoOlivero.21.mcz
ExternalIconFamily-FernandoOlivero.20.mcz
ExternalIconFamily-FernandoOlivero.19.mcz
ExternalIconFamily-FernandoOlivero.18.mcz
ExternalIconFamily-FernandoOlivero.17.mcz
ExternalIconFamily-FernandoOlivero.16.mcz
ExternalIconFamily-FernandoOlivero.15.mcz
ExternalIconFamily-FernandoOlivero.13.mcz
ExternalIconFamily-FernandoOlivero.12.mcz
ExternalIconFamily-FernandoOlivero.11.mcz
ExternalIconFamily-FernandoOlivero.10.mcz
ExternalIconFamily-FernandoOlivero.9.mcz
ExternalIconFamily-FernandoOlivero.7.mcz
ExternalIconFamily-FernandoOlivero.6.mcz
ExternalIconFamily-FernandoOlivero.5.mcz
ExternalIconFamily-FernandoOlivero.4.mcz
ExternalIconFamily-FernandoOlivero.1.mcz