AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry
     R0 -> buffer for storing window handles
     R1 -> user buffer for template (big enough for largest template)
     R2 -> workspace for indirected icons
     R3 -> end of workspace for indirected icons
     R4 -> 256-byte font reference array (-1 for no fonts)
     R5 -> filename of templates file
     R6 -> sprite area control block (+1 for Wimp sprite pool)
Exit
     R2 = first free byte in indirected workspace

Loads in all the templates from the file whose name is pointed to by R5, and called Wimp_CreateWindow for each one.  The value in R6 is placed in the window block at offset +64.  Stores the window handles sequentially in the buffer pointed to by R0, in the order they are found in the templates file.  On exit the buffer pointed to by R1 will contain the template for the last window in the file.  The buffer for window handles should be big enough to store all the window handles, each of which is a word.  For each window, if the word on entry is zero the window will be created as usual.  Bits that are set have the following meanings :

     Bit     Meaning if set
     0     centre window horizontally
     1     don‘t create window
     2     centre window vertically
     3-31     reserved; MUST BE 0

Bit 1 is useful if you have a window in the file as one that you want repeatedly, but you don‘t want it created at once.

When a window with bit 1 is encountered R1 is stored as the handle and R1 is increased so that the next template can be loaded above the previous one.

Provided by LoadTemplates

[sh-index] Back to list of manuals