Amos Professional Manual  Contents  Index

Advanced Control Panels


Next the width and height parameters are specified to define the size of the text window that will hold the required characters. This.window is very similar to a window produced by AList, and is relatively crude compared to the fancy Help screen display. However, when border images and sliders are added, things begin to take on a true AMOS Professional appearance.

Text is listed in windows numbered 3000+z, and you can write to these windows from the main program if necessary, using a WINDOW command like this:

X> Window 3001 : Rem Print to text window assigned to zone 1

The next parameter to be given is the address of the text in memory. Unlike the AList command, HyperText expects an address of a Memory Bank rather than an array. This bank should already be loaded with some text in standard Ascii format, and each line should be separated by either a chr$(13) for Amiga format, or by chr$(13)+ chr$(10) for PC format. Text must be terminated with a single chr$(0) character.

The line number parameter holds the number of the first line in the text to be displayed in the window.

The buffer parameter sets the maximum number of buttons on any one screen line. The Interface requires 8 bytes for each zone, so if the window is 25 lines high, and ten button's are required on every line, you will need 25*10*8 or 2000 bytes for the buffer area. If you simply want to display some normal text, use a value of zero for the buffer parameter instead.

The paper and pen parameters are set as usual, to determine the colour of the text on screen, and the background window will be filled with the paper colour when it is initially drawn.

The square brackets hold an Interface function that will be called up whenever the mouse is clicked on the HyperText zone. If the zone returns a number, it will now be available directly from the ZPosition function.

Creating some HyperText
The text can include a number of active zones if required. These are defined using curled brackets, and their are two alternative formats, as follows:

X> {[value]highlighted text}
or
X> {[value,paper,pen]highlighted text}

The square brackets contain a value which will be transferred to the program when the item is selected. This can be either a number or a part of the text, up to 64 characters long. If the value is a number, such as {[1000]...}, the main program will load it into an RDIALOG function, and it can now be read directly from a [changes] routine using the ZPosition function. If a string is entered, such as {[Hello everybody]...}, the main program will grab it with RDIALOG$ instead, and the ZPosition function will return a value of zero.

Back    Next
09.03.16