home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 5
/
FreshFish_July-August1994.bin
/
useful
/
dist
/
gfx
/
show
/
superview-lib
/
docs
/
svsupport-docs
/
controlpad.doc
next >
Wrap
Text File
|
1994-07-04
|
3KB
|
87 lines
The ControlPad-FileFormat (5.6.94)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the future, more and more SVObjects and SVDrivers will have to
handle globally set preferences, which might be handled and modified
via custom programs or SuperViewPrefs.
To prevent multiple different ways of storing these preferences
data, I felt that this is the right time to introduce a standard
FileFormat for such configuration files : The ControlPad-FileFormat
(please read the notes under "Style Guide" below).
- To allow easy reading and understanding of these Files, they are
stored in plain ASCII
- To prevent people from learning just another technique of configuring
files, they are constructed just like a kind of "Tooltype-Lists"
- a single ControlPad takes a full line of the File
and looks like that : <Name>=<Content> or <Keyword>
Content and Name may contain any ASCII characters except "=", because
the first "=", which is found, is used to divide the Name from the
Content in the line. A Keyword is anything, which does not contain
a "=" somwhere, but is not a comment.
- So all other special characters are possible (although you should
not make too much use of them for ergonomical reasons).
- it is supported to write as much comments to the files, as wished.
A comment line has to begin with "/" or ";" in its first column.
A totally blank line fits to the same category as "/" or ";" lines.
Additional Notes
~~~~~~~~~~~~~~~~
* Note, that comments are totally ignored by the Library functions, when
reading ControlPad-Files, and writing of comments is not supported.
So do not add too much comments to your files, but on the other and,
explain all of the Switches (and their default values) inside the
Doc-Files of your program to prevent a lack of information !
* The SVSUP_FindControlPad() function is case-sensitive !
"Style Guide"
~~~~~~~~~~~~~
Common "style guide" rules (PLEASE NOTE) :
- ControlPads should be located in "ENV:superview-library/"
and have the plain name of the SVDriver/SVObject/... plus
".controlpad" as extension.
For Example a ControlPad for JPEG.svobject should be
named "ENV:superview-library/JPEG.controlpad".
- for boolean entries use <YES/NO> choices, not <TRUE/FALSE>
or just set single Keywords like "USE_..."
- use pregnant names for multiple-choices, like
<HUFF/LWZ/ENTROPY>, not <1/2/3>
- use short names and statements, not long and complicated ones :
"ColorDepth=8" instead of "Number_of_Colors=16.7_million"
Examples
~~~~~~~~
In "Programmers/Example_Tools/ControlPadDemo" you find an example
Source, which deals with ControlPads and explains anything you need
to make use of them.
In addition to the supplied example Files there and to the SourceCode,
now an example of constructing a ControlPad-File (>>> marks the beginning
and <<< the end : both are not part of the file) :
FileName : e.g. JPEG.svobject
>>>
/* Set the Input/Output ColorDepth for JPEG encoding/decoding (8/24) : */
COLORDEPTH=8
/* Show thumbnails, so that the main picture may be dropped ? */
THUMBNAIL=yes
/* How should the written data be encoded ? */
ENCODING=HUFF
/* Switch temporary directory */
USE_JPEGTMP
<<<