update (24/07/99)
Either I'm doing something wrong or the File object isnt working in Mozilla, so
my addins plan has stalled for now, or until I can think of a better way to do
it. Some of my design drawings are here,
here and here.
(each about 100k, mind my handwriting).
update (22/07/99)
Rather than design a new dialog for the customise feature, I'm going to simply
create another entry in the prefs dialog that handles this. This is a more integrated
way of doing stuff, doesn't require knowledge of another dialog box. Calling
"customize..." from the popup would just bring up the prefs dialog with the
main addins page activated.
Here's a screenshot of what I'm working on. It looks rough, but the whole prefs dialog looks rough at the moment ;p
When Mozilla is released its extensibility will undoubtedly encourage JavaScript hackers from around the globe to create hundreds of nifty little widgets to enhance the browsing experience or add utility in some way. I figured it wouldn't be long before I discovered a few that I liked, and wanted to use. I figured that most of these widgets would be invoked either from a menu item or from a toolbar button. The creators of these widgets would probably rely on their scriptlet featuring on my toolbar, but my toolbar is only so big, and I don't want to add zillions of extra buttons - nor do I want to go searching through menus to find where the latest widget has added itself. What I want is a way of managing the widgets I have, and having a standardised way of accessing them. Thats what led me to think of a Macro/Utility button to handle this sort of thing.
Programs like MS Word and Excel support macros, but you have to go through the menus and a dialog to access them. I want instant, or near instant access.
Widget Description
Before describing the button itself, I'll describe the form of the widgets that
will be used with it. In this context, a widget is a group of XUL, JS and CSS
files which define the operations that it performs - e.g. a specialized print
dialog. These file can link to the standard navigator chrome files so they
may pick up the look of the browser and appear to be consistent with the rest of
the browser (looking less like add-ons) [encouraged]. Depending on the final
implementation of the chrome system, it may be possible to package widgets as a
single jar file (as was suggested for the browser chrome (?). This way each
widget (your widgets would reside in their own folder) would be easy to add and
remove.

Popup Menu!
Product Description
A single toolbar button. The click behaviour of this button is highly
customisable. First, when clicked and held, the button would drop down a popup
menu as the back and forward buttons of Navigator 4.x do. This would list your
add ins, have a separator, and a customize option. (See below). You activate
a macro by simply selecting it.
The click behaviour of the button can be modified so that a fast click runs a particular macro (as a fast click of the back button takes you back to the previous page), or you could set it to run the last macro run, etc. You could set events for right click (or Command-click, or shift or alt click for that matter) -- all allowing quick access to particular functions without having to pop out the menu.
The Widgets
Each widget appears as an item in the popup menu as described above. The form
of this menu item would be defined in the widget package itself (as a XUL fragment
probably). This way it can be easily imported by the program and displayed with
the intended caption and function call. Where a widget provides more than one
feature, the widget may provide a submenu. (See prototype screenshot). This submenu
is defined in a XUL fragment as the menuitem was. Each widget can be assigned
a keystroke for instant access.
Customisation Dialog
As I described, the last option on the menu would be a customise option
that would bring up a dialog that allows you to customise your add ins. You
can add and remove add-ins from the menu, or delete them completely from
your hard drive (if JS supports file manipulation as I am led to believe from
mozilla.org dox). One can define the order that they appear in the menu, what
their activation keystroke is, etc. One can also define the behaviour of the
toolbar button, single fast click, right click etc.
Extra Notes On widgets
Widgets can also place a regular menu item if they wish. For instance, if you
had a specialized print button, you may wish to add it to the File menu. If one
enabled this support, the XUL fragment for the menu item would be added to the menu
specified in some sort of ini file in the widget (? - needs improvement).
Some widgets may require specialised customisation. The widget package would include a XUL document containing the description of its customise dialog, and the master button customise dialog would have a tabbed page that displayed the customise dialog for the selected item (see hypothetical screenshot).

Don't bug me about how ugly/inconsistent/unusable this looks. its just a sketch.
Menu items are root elements in the tree, items with submenus have subitems in
the tree. One can manipulate them, move them up and down, rename them, etc.
(I made this in VB6 rather than XUL, it was quicker that way).
Notes
This is nothing proprietary, its based entirely on XUL, JavaScript, DOM and
CSS. See the docs at Mozilla.org,
they're what I use for my inspiration. Furthermore, when the browser hits the
streets I'll look and see how most people are presenting their add ons, and if
a common method is used, the Macro button's programming can be enhanced to
understand and deal with these, too.
Space in the macro button need not be restricted to widgets. Dump a regular Navigator command in there too. Note in the screenshot above I've placed a translate menu in (even though the popupmenu popups dont work yet, you get the idea). People gripe about the translate button on the toolbar - fine, but if you like to read the german articles slashdot links to regularly, you may want reasonably quick access to a translator, this is an idea.
This is all I can think of at the moment. If you have any comments/flames please let me know (rgoodger@ihug.co.nz)
Ben "Third Party" Goodger (08/07/99)