A toolbox resource file called !PsiFSRes can be provided to allow options for the file format converter to be selected.
The !PsiFSRes file is loaded by PsiFS immediately after processing the associated !PsiFS file. The templates within the file are merged with those belonging to PsiFS itself, as well as those belonging to other file format converters, so it is essential that unique names are used for all templates. Hence, the converter part of the PsiFSConverter$converter variable should be used as a prefix for all template names. Any number of toolbox templates may be included within the resource file, and any template may be used for any combination of file format converters. However, there are some restrictions; these are described in the following sections. |
The object flags for each toolbox template must be set as follows:
|
All toolbox templates must be window objects. The Main window properties should be set as follows:
The Other window properties should also be set as follows:
The Window colours should be set at the defaults as follows:
The Minimum size and Work area should normally both be set to the normal size of the window. No toolbars should be attached to the window. |
Any number of gadgets may be included within each window, although there are restrictions on the types and settings that can be used. These restrictions are described within the following sections.
All gadgets types other than Label and Labelled Box should have appropriate help text specified. Also, all gadget types other than Action Button should have delivery of events disabled; they are not required by PsiFS. The initial values specified for each gadget within the resource file are used as a defaults if no previously used options are available. There are no specific requirements concerning component IDs, other than that they need to agree with the values specified in the !PsiFS file. |
Exactly two Action Button gadgets should be included in the window. The first is used by the user to accept the selected options:
The second is used by the user to discard the selected options:
Additional Action Button gadgets are not supported. |
Label gadgets may be freely used to annotate options:
|
Labelled Box gadgets may be freely used to group or annotate options:
|
Number Range gadgets may be used to allow numeric options:
The "N" specification is used for Number Range options. The value returned is an unscaled interger in the range 0 to 2,147,483,647; any Precision specification is ignored. If a fractional value is required then it must be post-processed to scale the value as appropriate. |
Option Button gadgets may be used to allow binary options:
The "O" specification is used for Option Button options. No value is returned; the state of the gadget is indicated by the presence of the specified switch. |
Radio Button gadgets may be used to allow a single choice from a set of options:
The "R" specification is used for Radio Button options. No value is returned; the state of the gadget is indicated by the presence of the specified switch. Note that exactly one switch will be returned for a particular radio group. |
String Set gadgets may be used to allow a single choice from a set of string options:
The "S" specification is used for String Set options. The value returned is the selected string. Note that the value will be quoted if it contains " " (space) or """ (quotation mark) characters, or if it starts with a "-" (hyphen-minus) character. If a values different from the displayed strings are required then post-processing must be used to map the value as appropriate. |
Writable Field gadgets may be used to allow user specified text options:
The "W" specification is used for Writable Field options. The value returned is the entered string. Note that the value will be quoted if it contains " " (space) or """ (quotation mark) characters, or if it starts with a "-" (hyphen-minus) character. |
No other gadget types are currently supported by PsiFS, so they must not be used. These include, but are not restricted to, Adjuster, Button, Display Field, Draggable, Popup Menu, Scroll List, Slider, Text Area and Tool Action gadgets. |
[Contents] [Up] | Copyright © Alexander Thoukydides, 1998, 1999, 2000 |