[Netsurf-develop] Resource vs Template

Phil Mellor phil at mellor123.freeuk.com
Sat Oct 19 01:10:10 BST 2002

In message <88e872874b.riscos at myrealbox.com>
          Andrew Duffell <andrew at banners.iconbar.com> wrote:

> Can someone tell me what the difference is, and why we are using Template
> Files over Resource Files?

Template files contain, more or less, copies of the window definitions
used by the Window Manager.  They can be edited using freely available
tools (eg. TemplEd, which I used to produce the current Templates and 
Messages files).

Resource files are used in conjunction with the Toolbox modules, which
allow windows and gadgets to be manipulated using common reusable code
that enforces the style guide.

Using the Toolbox allows an interface to be designed more easily -- a lot
of useful things such as opening menus/submenus, dialogue boxes etc. can
be done automatically.

The disadvantage is that expensive software is needed to create and edit
these Resource files -- ResEdit, provided as part of the Acorn C/C++ kit
(and presumably the new Castle stuff).  Apparently it's possible to
produce a working version of ResEdit by combining various demo versions
with distributed upgrades, but it's probably not legal.

There's also the issue of using Toolbox libraries -- they're provided with
Acorn C/C++ but someone developing with GCC might not have access to them.
I suppose a rummage on the old Acorn FTP site might come up with something.

Another disadvantage is that the Toolbox modules are not part of the OS
in versions earlier than RISC OS 3.6 (I think).  They can eat up large
chunks of valuable memory on older machines such as mine!


More information about the netsurf-users mailing list