On Feb 20, 2009, at 1:35 PM, Dan Miron wrote:
Guys, this is what I'm thinking of after
reading your proposals:
- the macro to look like {{icon name="smile" /}}, thus having a
mapping
between the name parameter and the image file
- having a base set of icons from the silk icon set
- allowing plugging in other icon sets, too
+1
So, there you have a sketch on how the macro
would look like:
class IconMacro implements Macro {
List<Block> execute(IconMacroParameters parameters) {
Map resources = getResourcesMap();
return new ImageBlock(resources.get(parameters.getName()));
}
I'd rather use a IconResourceSet component.
You create one implementation called SilkIconResourceSet and register
it with a "silk" hint.
Yes, sounds good. "silk" should be the default value for the "set"
parameter of the macro.