- status: open --> closed
I've created a new interface - IShelfAddOn - based on
cm's IProject9AddOn interface used in iceFire R2.1.
This new interface bring with it two major
improvements. Firstly, the Menu() method is no longer a
function that expects an XMenu object - instead it's just
a basic Sub. This removes the dependency on the
interface kit XMenu objects (as we're trying to move
away from them completely now anyway) and also adds
more flexibilty as the AddOn can now do other
processing rather than simply provide a menu. In short,
now when the user right-clicks an AddOn, all the shelf
needs to do is call the Menu() sub for the appropriate
AddOn; the AddOn itself can determine what it wants to
do in response to the action. The second improvement
is support for multiple instances within single AddOns.
The functionality here is very similar to working with
Windows Control Panel applets: assuming the AddOn
responds to Loaded() with an X_OK status, the shelf will
then query the AddOn's AddOnCount property - the
AddOn should use this property to return the number of
instances (icons) it supports - from here on the shelf will
query the Flags, Icon and Tooltip properties once for
each instance (the new Index parameter indicates which
instance is being queried).