Naming conventions
Twgui uses several predefined extensions and filenames. Also, it uses predefined ways to
combine filenames of buttons belonging to the same window. I will list the most important
ones here, all of these (and more) can be found in the doxygen-generated documentation, or,
if you feel like it, can be found in the code.
Windows
In the code, windows are supplied with a directory string, such as
A = new TWindow("data");
This implies, that twgui will search for a file called data/backgr.bmp, which is the
bitmap that defines the window.
It will also search for a file called data/info.txt, which has setup information for
this window.
In addition, twgui will also look for child button graphics in this directory.
Buttons
In the code, buttons are at minimum associated with a window, and have a (unique) string:
button = new Button(A, "button_");
Note that I use an underscore here. I could have omitted it, or I could have used a "/"
character (in which case, the content for the button would be in a subdirectory).
In any case, the Button initialization code will append default strings,
and check for the presence of (assuming use of the _ here):
data/button_default.bmp, which is the bitmap that is shown when the mouse is out of focus.
This bitmap is also used for auto-location, and therefore, must have an exact duplicate
somewhere on the data/backgr.bmp file.
data/button_focus.bmp, which is the bitmap that is shown when the mouse is held over
the button.
data/button_selected.bmp, which is the bitmap that is shown when the mouse is pressed
on the button.
Switch button
There are two required bitmaps, namely data/switch_off.bmp and data/switch_on.bmp (for a switch
button initialized with the string "switch". The "off" button is used for location on the
data.backgr.bmp, and should have a matching image there.
Area
An area is a button which is mainly used because of the area that it occupies. If the Area
is initialize with Area(A, "area"), it will look for a bitmap called data/area_backgr.bmp. Note that
this must have a match on the window bitmap.
Other types
Other custom types have their own naming conventions. For those, see the general code
description. Always take care, that there is a match with the window background,
for autolocation.