Theme setup plugin
==================

This plugin is for selecting the theme.

It is not intended to be a theme designer, that's a much more complex dialogue, and likely to be daunting for most users who would instead prefer to select from existing proven themes.

The settings corresponding to *WimpVisualFlags will also be considered.

Review of plugins
=================

Some of the configure plugins have had a confused personality, proclaiming to exist to configure one area while overlapping into others. The following is a brief review of the plugins, and their division of responsibility in light of the new theme setup plugin, for versions pertinent at the time writing.

!BootSetup, !DiscSetup, !FilrSetup
!HelpSetup, !KbdSetup, !LockSetup
!ScrnSetup, !SysMerge, !TimeSetup
----------------------------------
These have well defined boundaries and remain unchanged.

!FontSetup
----------
Font setup will no longer control the Wimp's default font, it will instead only be concerned with FontManager's settings and the install of new fonts.

!MouseSetup
-----------
Control of the iconbar and submenus will move to the Window setup plugin.

!PinSetup
---------
The pinboard is being considered as distinct from the theme, since the user will often want to change the backdrop graphic (for example a photo of family members) and likewise the screensaver image. It is therefore not considered part of the theme definition (though theme specific backdrop images may be optionally provided).

!SndSetup
---------
Option 'Beep when an error occurs' will move from the Window setup here.

!WindSetup
----------
This is the most confused of the plugins. Its new role might be described as "behavioural aspects of the desktop" whereas the theme setup might be described as "visual aspects of the desktop".

For example, allowing windows to be dragged off the screen affects the behaviour of a window not what it looks like. Therefore that's a window setup item. Having textured window backgrounds doesn't make the desktop operate differently but does change the way it looks - that's a theme setup item.

Summary of changes
==================

Desktop font -> move from font to theme setup
Textured window backgrounds -> move from window to theme setup
Beep when an error occurs -> move from window to sound setup
Protect built in icons -> move from window to theme setup (failing to set
                          it might let older applications mess up a theme's
                          uniformity, even though it could be argued that
                          it's a behavioural aspect)
File solid dragging -> move from window to filer setup
Iconbar popping -> move from mouse to window setup
Submenus auto open -> move from mouse to window setup
3DWindowBorders -> new in theme setup
TexturedMenus -> new in theme setup
UseAlternativeMenuBg -> new in theme setup
Fully3DIconBar -> new in theme setup

Out of scope
============

The following visual flags will be settable via the theme definition but not presented in the user interface since they relate to finessing and technical options intended to augment a theme design, rather than settings a user may prefer to change.

NoIconBoxesInTransWindows
RemoveIconBoxes
FontBlending
WindowOutlineOver
WindowBorder[Face|Opp]Colour
MenuBorder[Face|Opp]Colour
WindowOutlineColour

and, provided the Window Manager is new enough to support them

ButtonBorder[Face|Opp|Shallow]Colour
ButtonColour
Button[Well|Highlight]Colour

A simple obey file called 'CoFlags' inside !ThemeDefs provides the default visual flags settings for the theme. This will be sought and parsed on startup by the theme setup plugin.

Preview support
===============

Though themes could in theory be changed on the fly, initially the change of theme will take effect on the next reboot. To avoid having to reboot to see what each theme looks like a menu entry will allow thumbnail view of the theme in use.

Implementing the preview using a series of cunning text+sprite icons arranged appropriately in a standard window (allowing the Wimp to render most of it) was considered since
 - R validation is the same as a 3D border, and C validation can set the
   slab colours
 - text can be unfilled to remove the icon boxes

several important elements aren't directly controllable via text+sprite icons
 - there's no equivalent of WindowOutline[Over|Colour] so a rectangle plotter
   would be needed
 - there's no control of FontBlending on a per icon basis which may need to
   be on for themes that are far from the cream/grey standard
 - you can't tile sprites in an icon
 - system font can't be selected as a non-outline font unless the rest of the
   desktop is also using it

at a minimum a tiler; border plotter; and font plotter is needed, so adding a slab plotter is all that is required.

To avoid having to load potentially large theme resources to render a preview the theme should supply a set of partially rendered previews as a sprite file called 'CoSprite' inside !ThemeDefs.

Sprites required are
   wtitle   - a title bar with input focus & back & close (only)
   mtitle   - a non focus title bar with no tool gadgets
   file_fff - a sample of a file icon from the theme (can use a mask)
   tile_1   - a tessellating desktop tile background
   tile_m   - a tessellating menu tile background

Each sprite must use the standard desktop palette. Alternate resolutions will not be searched for, it it suggested since this is only a preview to provide EX1 EY1 resolution which will be scaled for the destination mode. The tile backgrounds must be a multiple of 4 pixels such that after scaling to OS units they will butt join exactly.
