Thoughts on enabling alternative window tool shapes.


Introduction
------------

The window tools are the wimp-managed tools which control a window which lie
around the edge of a window.


Requirements
------------

*  The wimp 2.00 window tools are considered old-fassioned and it is felt
they need to be changed to bring the look of the RISC OS desktop up to date.

*  Further tools are mooted and so a mechanism for flexibly tuning the
window tools is desirable.


Design
------

The wimp currently displays the tools using the icon mechanism. This is
probably worth keeping as a general way to specify a tool. It makes the
assumption that the tools don't encroach the visible area and that their
outline is a rectangle. I propose that these restrictions be lifted using
the following scheme:

The tools attached to windows are specified using a template in the window
manager's template file. The template window itself will have no meaning
except that it contains icons specifying the window tools. The layering of
the icons determins the layering of the tools. Each icon is expected to be
completely filled out to its border and no further. There will be one icon
which corresponds to the window's visible work area. The size and details of
this icon are irrelevant, except with repect to its relationship with the
tools. The tool icons specify where, relative to the visible work area, the
tools lie. There may be any number of tools which are of the following
types:

        Edge-Move       Can specify any set of the edges 
        L-scroll        Scroll left button
        R-scroll        Scroll right button
        U-scroll        Scroll up button
        D-scroll        Scroll down button
        Back            Click here sends window to back
        Close           Click here sends a close window request
        Zoom            Click here performs a zoom function

Any of these can also be a title which means that the title text gets filled
in in that icon. The bounding box of a tool icon is bound to the window to
which it is attached. Each edge is bound to be the same distance from the
visible work area edge as that edge was nearest in the template file. The
mid-point of a visible work area edge is considered an edge for this
calculation. This enables stretchy titles, centred buttons and so on to be
implemented.


Extentions to the Icon Mechanism
--------------------------------

Two new validation string commands will be needed:

B<sprite>[,x|y,<offset>] This causes the sprites background to be filled as
  a tiling of the given sprite with the optional offset being applied in the
  x or y direction.

C<text> This does nothing, its purpose being to enable application specific
information to be given in an icon definition.


A new button type is needed, scroll bar.

*  The details of a scroll-bar icon (the slider) are displayed behind the
outline.

*  The icon data gives the workspace size, visible area base and visible
area height.

*  The 'has text' field indicates whether this is an h-scroll or v-scroll: 0
means h-scroll, 1 means v-scroll.
