Hi Quentin, Nicholas!I've attached a first design for an IKIcon class that would be the central class for icon management. IKIconProvider would then only return IKIcon objects.
IKIcon objects are mutable. If you create an icon using initWithIdentifier: or initWithExtension:mimeType:attributes: you can hold on to them and they will automatically update when the theme changes.
If you want to composite an image onto an icon, you have to create another IKIcon for it. That way, when the theme changes, all badges provided by the current theme will update to the new theme.
IKIcon *may* (but isn't guaranteed to) perform caching and return the same objects for requests for the same icon (with the retainCount increased).
Quentin, this doesn't yet support any custom compositors. But I think this could be added as needed by just adding a new addIcon:toRect:withCompositor: variant when this is implemented.
I'd be happy to hear your feedback.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
IKIcon.h
Description: Binary data
