wGui - Global Configuration
wGui has a global configuration that it read from file.
CConfigStore File Structure
The CConfigStore class can read key-value pairs from a text file. The files are formatted with the following rules:
- Comment lines begin have a hash (#) mark as their first character. These lines are ignored when the file is read in.
- Key-value pairs appear as: < keyname > = < valuename >
- Whitespace (space and tab characters) appearing at the beginning and end of both the key and the value are trimmed off.
- Keys can be any combination of alphanumeric letters (including spaces as long as they aren't the first or last character).
- Keys are case sensitive.
- Values can be any combination of alphanumeric letters (including spaces as long as they aren't the first or last character).
wGui.conf File
In the CApplication::Init() method, wGui will attempt to locate and read the wGui.conf file from a couple locations. These are
loaded in order into the wGui global configuration. If a key exists in more than one of these files, the last file read in will ovewrite the
value loaded from the previous files. Therefore any settings that appear in the current directory's wGui.conf file will override any settings in
the global wGui.conf file.
File load order (wGui will search for wGui.conf in these locations):
- The global settings directory (/etc/wgui on *nix based machines, c:\program files\common files\wgui on Win32)
- The user settings directory (/home/ < username >/.wgui on *nix, c:\documents and settings\ < username > \application data\wgui on Win32)
- The current directory
Global Configuration Values
- DEFAULTFONT - The default font filename
- DEFAULTFONTSIZE - The default font size (in points)
- FONTPATH - The path to any font directories (which wGui will use to find fonts if it isn't given an explicit path)
- BACKGROUNDCOLOR - The default background color, specified as a comma seperated RGB triplet (i.e. "255,255,128")
- FOREGROUNDCOLOR - The default foreground color, specified as a comma seperated RGB triplet (i.e. "255,255,128")
- SELECTIONCOLOR - The default selection color, specified as a comma seperated RGB triplet (i.e. "255,255,128")