home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
education
/
a
/
linguist
/
!Linguist
/
IntDocs
< prev
next >
Wrap
Text File
|
1990-12-09
|
25KB
|
655 lines
********************* Interface 1.30 (c) Simon Huntington *******************
*********************************************************************************
*********************************************************************************
*********************************************************************************
*********************************************************************************
* *
* Modification : You now pass the task handle in R2 when using Wimp_PollPointer *
* *
* Shading is now done with the light from the top left as in Impression II *
* *
*********************************************************************************
*********************************************************************************
*********************************************************************************
*********************************************************************************
© Software Interrupt 1990
This manual and software is public domain. It may be copied and distributed freely
as long as:
It is not separated from the documentation (except for commercial use)
The module is not tampered with
You do not claim that you have written the module
If you wish to use this in a commercial product please contact me so that I can make
sure you have the latest release, please send a disk.
In no circumstances shall the author be liable for any damage, loss of profits, time or
data or any indirect or consequential loss rising out of the use of this software or
inability to use this software.
Contacts:
Arcade BBS (081 654 2212)
The World Of Cryton (0749 679794)
Charron BBS (0420 63115)
Noah BBS (0272 572322)
MegaNet (0924 223456)
All mail on the above Bulletin Bords should be mailed to JICK
A version of this document in Impression format can be obtained by sending a
blank disc and return postage to me. I will also stick on a modified Formed
to display Interface windows
All correspondence should be addressed to:
SoftWare Interrupt
40 Castle Ings Gardens
New Farnley
Leeds
LS12 5EG
**************** Introduction ***********************************************
Interface is a small module that allows application programmers to implement a
colourful and pleasant graphical user interface. Interface provides many more
functions that allows you to change the pointer shape easily and to interface with the
!Help or !Spy application.
The Interface module provides functions to improve the friendliness and appearance
of the application. The application should still operate as stated in the Acorn
guidelines in the Programmers Reference Manuals.
The module implements a number of SWIs which are described further in this
manual, these SWI calls can be called from any language. Most of the functions
provided are specified in the icons validation string, and so no complex
programming is needed to make the application look good.
This guide tells you how to fully implement the features of Interface. It is split into
the follow sections:
The first section explains the validation strings options provided
by Interface.
The next section gives details of the SWI calls provided.
The remaining section covers hints and tips on programming.
**************** Technical details ***********************************************
An indirected text icon can have a validation string which is used to pass further
information to the WIMP, such as what border type the icon has and also what
pointer, if any should be displayed whilst over this icon. The syntax of a validation
string is:
validation string ::- command {;command}*
command ::- b border-type {border-spec} |
r on/off-type {,icon-number}* |
u on/off-type {,icon-number}* |
p text-string {,x} {,y} |
i text-string
border-spec ::- {,button-slabbing-mask} {,slabbing-time} {,colour}*
The parameters above are described under the relevant validation command.
In simple terms, a validation string consists of a series of 'commands', each starting
with a single letter and seperated from the following command by a semi-colon.
{}* means zero or more of the thing inside the {}. The following commands are
available with the Interface module.
These commands are provided in addition to the standard Wimp validation strings.
I suggest that you edit the !FormEd program to allow you to enter larger validation
strings, otherwise when entering a help command you will only be allowed a
maximum of 80 characters.
The (B)order command tells Interface which border to use when rendering an icon.
The border types available at present are :
border type 0, this is a single border used mainly for headings and action icons.
The icon will slab inwards if the user clicks a button whilst the pointer is over
the icon providing it is not setup to ignore mouse clicks.
border type 1, this is a double border and should be used to group together
icons that perform an operation.
border type 2, this is a triple border and should be used on the default action
button. The icon will slab inwards when the user clicks a button whilst the
pointer is over this icon providing it is not setup to ignore mouse clicks.
border type 3, this is a wide inverted border and should be used on writable
icons. This border type is usually used in-conjunction with the writable
pointer.
The second optional parameter is the button slabbing mask, this states whether the
icon should be slabbed until the button is released. The values contained in this
parameter can be from 0 to 7. The button slabbing mask can be calculated in the
following way:
Value Button Meaning
1 Adjust slab icon until adjust is released
2 Menu slab icon until menu is released
4 Select slab icon until select is released
The button slabbing mask can then be calculated by adding together the required
button values.
The button slabbing time is the minimum time that the icon will be slabbed for, the
default time is for 15cs. This value is a decimal number in centi-seconds.
The colours are specified in the following order:
{,border colour1} {,border colour2} {,slabbing out colour}
{,slabbing in colour} {,inner channel colour}
These colours can be any valid WIMP colour in the range of 0 to 15, the default
selection is 4, 0, 1, 14, 12.
The (R)adio command specified in the validation string is used to set the state of
other radio button type icons. The R command is followed by a decimal number in
the range 0 to 2, the action that these perform is:
Radio type Operation
0 this has the effect of switching off the specified icon(s).
1 this has the effect of switching on the specified icon(s).
2 this has the effect of toggling the icons current state.
This command is then followed by the numbers of the icons you wish to alter, these
should be separated by commas. This command may be specified more than once in
a validation string, for example to switch icons 1 & 2 off, 3 & 4 on and toggle the
state of icons 5 & 6 you could use the following validation string
R0,1,2;R1,3,4;R2,5,6
The (U)nselectable command in the validation string has the effect of shading the
icon grey so that it cannot be selected by the user. It is followed by a decimal
number in the range 0 to 2, the action that these is described above in the radio
command.
This command is then followed by the numbers of the icons you wish