Geneva saves all of its settings in a file called GENEVA.CNF. This file can contain information stored by other programs, as well. It can be read by using the x_shel_get() function, and written to by using x_shel_put().
When writing to the file, the following conventions should be followed:
The program name passed during the X_SHOPEN phase must not contain the characters [ or ]. It can contain any other characters, though, and the use of lowercase is encouraged.
The shel_get() function always reads NEWDESK.INF or DESKTOP.INF from the directory Geneva was loaded from (or the root of the default drive, in the case of it being run from the AUTO folder). It does not use a static buffer in memory. shel_put() does nothing, since it is dependent on the old desktop anyway.
shel_envrn() uses the environment pointer passed when the application was executed. shel_find() (and, for that matter, rsrc_load()) use Geneva's internal idea of the PATH env. var. (which can be modified with shel_write()) or the value "," if there is no PATH. shel_read() always works, even for applications that were not run with shel_write().
beginning of section
top of page
The files here are intended for use primarily by people who are interested in programming.
GNVA_DB.PRG (in the PROGRAM folder on the Master disk) is a special version of GENEVA.PRG that includes debugging alerts which will appear when an application uses an AES function call incorrectly. It traps things like a bad parameter to wind_set(), a program attempting to close windows that do not belong to it, etc. These things are simply ignored by the normal version of Geneva. In some cases, Atari's AES will do unexpected things when you pass bad values, so GNVA_DB can be quite useful. To disable a particular alert, click on Ignore All. From that point on (until you reboot), all alerts of that specific type will be ingored.
SETMOUSE.C is the C source code for the SETMOUSE.PRG which appears in the GENEVA folder of ths disk.
NEW_GEM.LIB is a Pure C library containing all AES and VDI functions, as well as Geneva's extended AES functions. It can be directly substituted for the PCGEMLIB.LIB that comes with Pure C.
XWIND.H is an ANSI C include file which defines Geneva's extended functions.
XWINDGFA.LST is a GFA BASIC file with the contents of XWIND.H translated into BASIC.
NEW_AES.H is an ANSI C include file which defines several helpful extensions to AES functions, and attempts to bring Pure C's AES.H up to date with MultiTOS 5.0.
The MAKEHELP folder contains the MakeHelp utility for compiling context-sensitive help files. See MAKEHELP.HLP for more info.
The TASKMAN folder contains the entire C source and resource definition (HRD) for the Task Manager.
The SKELETON folder contains a C source file for creating new programs that use Geneva's functions. By changing the #defines, you can modify the program to work as a desk accessory and/or a program. You may find it helpful to remove most of the unused #ifs once you have decided how you want the code to be implemented.
The VECTEST folder contains source code for using Geneva's vectors. It demonstrates how to access the vectors and use them properly.
beginning of section
top of page
The instructions for creating source files to be compiled into HLP files are contained in the file MAKEHELP.HLP. To view this file, you need to use GNVAHELP.PRG.
Either run GNVAELP and use its File->Open menu entry to load MAKEHELP.HLP, or, if using NeoDesk, drag MAKEHELP.HLP to GNVAHELP.PRG.
Geneva Makehelp Utility
This program allows you to create context-sensitive help files for use in your own programs. It works by reading a source text file which includes various directives to specify how the text should be split up into individual screens, and where references to other screens occur.
Source Format
The basic format for a help file source is a straight ASCII file containing one or more blocks:
\screen_type1 screen_name1Any text appearing after an \end directive, but before the next screen directive, is ignored. This is a good way to add comments to the help file source.
[\screen_type2 screen_name2]
...
[Help text]
\end \screen_type3
screen_name3
...
Each screen definition can have one or more names associated with it. Which directive you use affects how the name (or "keyword") is treated by the help compiler, and the help viewer. The screen_name can contain up to 43 characters, including any character (spaces, too.) The actual text of a help screen can include up to 100 lines of 100 characters each.
Screen Types
When Makehelp encounters a keywords at the start of a line in the source file, it knows that a new screen of help text is being defined, or an additional keyword is being added to the current screen.
A The following table summarizes the three main directives, whether or not the keywords they define would appear in the index, and if a search using the string "Abc" would match if the keyword defined by each was "aBc".
\screen
\casesens
\hidden
\index
Special Sequences
\@ Identifies a function.
This option allows you to select a path which contains other help files. These files are searched when a particular topic is not found in the current help file. Most likely, you will want to have this path point to the \GENEVA\HELP folder on the disk where Geneva is stored.
For example, to link to the screen named "Screen Name" using the text "click here" as the underlined hypertext, this would work: The placement of function calls is not important. All functions are evaluated by the Help Viewer after any text in the help screen is displayed. However, order is very important, since many function calls affect the output from other calls. To make calculating coordinates of graphics objects easier, it is best to place all function calls at the end of a screen, after any normal text. Since each line holding a function call still counts against the 100 lines-per-screen limit, it is often helpful to put multiple function calls on the same line, like so: is the same as: Each function call accepts one or more parameters, and in some cases a certain number of parameters is required. Parameters should be separated by one or more spaces in the source file. Numeric parameters can be either in hexadecimal (preceded with $ or 0x), or decimal (preceded by nothing). These lines are all the same: Many of the graphics functions simply set options that affect other drawing functions. Because there is no way to know what order the user might access help screens in, the options are all reset to their default values every time a new screen is encountered. In order to get the desired effect, it may be necessary to include the same function calls in each of your screens, to initialize the options before any actual drawing takes place. A .HLP file which uses functions cannot be loaded by older versions of GNVAHELP. The version which accompanies release 004 of Geneva (or newer) must be used.
And * this one is at 4 2. In order to draw most objects using character coordinates in a consistent way, a compromise has to be made. When an object is actually drawn, its coordinates are adjusted so that they lie in the middle of the appropriate character. An object's width and height specify the number of character cells the object will be part of; they are not the true size of the object. For instance, drawing a box with the function call
This function includes one or more GEM image (IMG or XIMG) files in the source. Unlike all other graphics functions, the coordinates for this function really do define the outer size of the entire graphic. Furthermore, the aspect ratio of an image is corrected if the user is in a video mode whose aspect differs from that of the image itself. For instance, to display an ST High resolution image in ST Medium resolution, GNVAHELP compresses the image vertically by 1/2. This prevents the
image from looking stretched-out. By specifying more than one image file name, you are providing alternate versions of the same image, to be used depending on the quality of the user's video display. XIMG files with any number of bitplanes, up to 24-bit true color, can be used. When GNVAHELP displays the screen, it chooses the image that contains the closest number of bitplanes to the current screen mode, without going over. This means that you should always have at least a 2-color (1 bitplane) image in the list; otherwise anyone looking at your help file in ST High resolution will get a blank spot instead of a picture. Makehelp does not interpret the contents of an IMG file that is included in a HLP file, it simply stores it inside the HLP file. GNVAHELP will not display any picture if there is an error in the format of the IMG.
Instead of using normal text, you can also provide a named link by enclosing the location to link to in {}'s.
Example:
Set the "writing mode" that will be used by all graphics functions except for \@image (which always uses Replace mode.) By writing on top of existing graphics or text with the various writing modes, different effects can be produced.
Set the color of filled objects, drawn by \@bar, \@rfbox, and \@recfl.
Set the fill interior type, drawn by \@bar, \@rfbox, and \@recfl.
Set the fill interior style, drawn by \@bar, \@rfbox, and \@recfl. When \@sfillint is set to 2 (Pattern), valid
Set the color of lines, drawn by \@bar, \@rfbox, \@rbox, and \@line.
Set the type of ends that are used on lines, as drawn by \@line, \@bar, \@rbox, and \@rfbox. The following values are supported for
Set the appearance of lines, as drawn by \@line, \@bar, \@rbox, and \@rfbox. This can be used to produce a dashed or dotted effect on lines. The style is a single number in the range 0 to 255 ($0 to $FF) whose bits give the pattern of the new line.
Set the thickness of lines drawn with \@line, \@bar, \@rbox, and \@rfbox. Only odd numbers 1 or greater cause the actual appearance of the line to change. Higher numbers produce a thicker line.
Makehelp can be called from the desktop as a TTP program, or from a command line interpreter. It has two distinct modes. The first mode is used to automatically highlight all hypertext links that were not already pre-defined:
Usage: makehelp -s <source> <newsource>
In this case, <source> is the name of a help source (usually ending in ".HS") file. <newsource> is the name of a new .HS file which is generated by Makehelp. The new file contains all screens in the source file, with all new hypertext links starting with the sequence \## (as opposed to \#).
If the same keyword appears more than once in a given screen, only the first occurence is marked, so as to avoid too much clutter in the help screen. Since there may be cases where you do not want a particulpu link, the \## allows you to easily pick out which references were generated by Makehelp, and remove the ones that are unwanted. Note that all \## sequences must be either completely removed or replaced with \# before compiling the <newsource>!! You should also be aware that the order of the \screens in <newsource> will most likely be different from the order they were in in the <source> file, and that any comments in <source> will not carry over to <newsource>. There may also be other formatting differences which do not affect the final .HLP file. The other mode is used to generate a finished help (.HLP) file. It has two required parameters, and two optional ones:
Usage: makehelp [-m] [-n<lines>] <source> <hlpfile>
The \screen
\casesens
\hidden
\index
Directive In Index? Match Case On Match Case Off
\screen yes yes yes
\casesens yes no yes
\hidden no no no
This directive defines a default screen. The name appearing after the directive will appear in the help file index, and can be found during a search in GNVAHELP regardless of whether the user provides upper or lowercase letters in the search specification.
This defines aOase-sensitive name. The name will appear in the help file index, and can be found during a search only if the case exactly matches what the user types, or if he has turned the "Match upper/lowercase" option Off.
The purpose of this directive is to provide a way for the programmer to reference a help screen whose name will not appear in the index and will not be considered during searches. The individual "A.." through "Z.." entries of a multiple screen help file index are examples of hidden screens.
This directive is optional. It instructs Makehelp to use the screen following it as a replacement for the normal index. Only one \index can be specified per help file. Screens of this type can also be aliased with other names by follwing the \index line with one or more of the other types of screen directives. An index should contain all of the important screen n%es contained throughout the help file, so that the user can easily see the range of help topics.
Example:
\index Index
\screen Alternate Name
This is the body of the screen. Here is a reference to another screen: \#Another Screen\#
\end
For the most part, any character can be entered. There are several special control sequences, though:
\\ Substitute a single backslash \ character.
\x Substitute the ASCII character with the hexadecimal value that follows.
One or two characters comprise the hex value.
Examples:
This \x7f is the delta character.
\x3 This is the right arrow.
\# This encloses one or more words which denote the name of a screen appearing either somewhere else in the help text source, or in
another help file. The name will appear underlined when viewed in the Help Text Viewer. Double-clicking on the name will jump to the
appropriate help screen. If the name is not in the current help file, then the Help Viewer will search in the path set by the user with the Set Help File Path option in the Help Viewer. A preferred filename can be set for missing keywords with the \@extern function.
If the keyword is not found in the current help source, you will receive a warning message from Makehelp. This serves as a reminder to verify that the keyword was not mis-typed.
Set Help File Path
Named Links
Sometimes, it is preferable to link to another screen without having to use the destination's screen name as the text of the hypertext link. A named link looks like a regular link, except it includes the name of the destination screen in curly braces {}. To jump somewhere else \#{Screen Name} click here\#!!
Functions
Any word beginning with the sequence \@ is evaluated for function calls. Each call performs a specific purpose, doing something like drawing a particular type of graphic within the help screen.
Function calls are part of a screen; they must appear between one of the screen directives and an \end directive.\@line 1 1 5 5
\@line 2 2 6 6
\@line 1 1 5 5 \@line 2 2 6 6\@line 20 10 9 11
\@line $14 10 9 0xb
\@line 0x14 $a $9 $B
Character Coordinates
Many of the functions use character coordinates to describe the position and size of a graphic. The first line after any \screen, \casesens, \hidden, and \index directives is line 0. The upper-left corner of a screen is coordinate 0 0. Coordinate 5 0 is the width of 5 text characters to the right. For example: \screen Example
* This asterisk is at coordinate 0 0.
\end
\@box 1 0 2 2 would actually produce something like this blown-up diagram:
Function Descriptions
In the function descriptions, required parameters appear within < > brackets, and optional parameters appear within [ ] brackets. The following functions are available:
\@image A GEM XIMG graphic
\@image <x> <y> <width> <height> <IMG file1> [IMG file2] [IMG file3]...
The width and height are treated as a maximum: the image is expanded until either its width or height hits one of these two values.
Example: \@image 3 31 99 3 c:\images\2color.img
4color.img 256COLOR.IMG
\@button A selectable button that links to another screen
\@button <x> <y> <width> <screen name>
This function draws a dialog button in the help screen at the chosen coordinates. When the user clicks on the button, GNVAHELP will try to access a help screen with the name
Example: \@button 4 9 14 Screen Types
\@button 4 16 14 {Screen Types}Same Thing
\@bar A filled, outlined box
\@bar <x> <y> <width> <height>
Display a filled, outlined box. See also: \@sfill, \@swrite, \@slinecol, \@slineends, \@slinestyle, and \slinewidth.
Example: \@bar 4 6 10 2
\@rbox A hollow, rounded, outlined box
\@rbox <x> <y> <width> <height>
Display a rounded, outlined box with no interior. See also: \@swrite, \@slinecol, \@slineends, \@slinestyle, and \@slinewidth. Example: \@rbox 4 6 10 2
\@rfbox A rounded, filled, outlined box
\@rfbox <x> <y> <width> <height>
Display a rounded, filled, outlined box. See also: \@sfill, \@swrite, \@slinecol, \@slineends, \@slinestyle, and \@slinewidth.
Example: \@rfbox 4 6 10 2
\@recfl A filled rectangle
\@recfl <x> <y> <width> <height>
Display a filled rectangle, without an outline. See also: \@sfill and \@swrite.
Example: \@recfl 4 6 10 2
\@line One or more straight lines
\@line <x1> <y1> [x2 y2] [x3 y3]...
Draw a single point, or a continuous line from coordinate to coordinate. See also: \@swrite, \@slinecol, \@slineends, \@slinestyle, and \@slinewidth.
Example:\@line 9 7 14 9 9 11 4 9 9 7
\@swrite Set the writing mode
\@swrite <mode>    1 (Replace) by default
Replace 1 (default)
Transparent 2
XOR 3
Erase 4
For examples of these modes, refer to GRAPHICS.HLP: Writing Modes
\@sfillcol Set the fill color
\@sfillcol
White 0 Gray 8
Black (default) 1 Dark Gray 9
Red 2 Dark Red 10
Green 3 Dark Green 11
Blue 4 Dark Blue 12
Cyan 5 Dark Cyan 13
Yellow 6 Dark Yellow 14
Magenta 7 Dark Magenta 15
For examples of the colors, refer to GRAPHICS.HLP: Lines
\@sfillint Set the fill interior type
\@sfillint <type>    2 (pattern) by default
Hollow 0
Solid 1
Pattern 2 (default)
Hatch 3
A call to \@sfillstyle will set the style of the fill when mode 2 or mode 3 is used. For examples of the types, refer to GRAPHICS.HLP: Fills
\@sfillstyle Set the fill style
\@sfillstyle <style>    7 (solid) by default
\@slinecol Set the line color
\@slinecol <color>    1 (black) by default
White 0 Gray 8
Black (default) 1 Dark Gray 9
Red 2 Dark Red 10
Green 3 Dark Green 11
Blue 4 Dark Blue 12
Cyan 5 Dark Cyan 13
Yellow 6 Dark Yellow 14
Magenta 7 Dark Magenta 15
For examples of the colors, refer to GRAPHICS.HLP: Lines
\@slineends Set the line start/end types
\@slineends <start> <end>    both 0 (square) by default
Square (default)0 Arrow 1 Rounded 2
Example: Use arrows at start and end of line segments: \@slineends 1 1
For examples of the start/end types, refer to GRAPHICS.HLP: Lines
\@slinestyle Set the line style
\@slinestyle <style>    0xFF (solid) by default
Examples:
\@slinestyle 0xFF XXXXXXXX (solid line, the default)
\@slinestyle 0x55 X.X.X.X.
\@slinestyle 0xF0 XXXX....
\@slinestyle 0xCC XX..XX..
For examples of styles, refer to GRAPHICS.HLP: Lines
\@slinewidth Set the line width
\@slinewidth <width>    1 by default
For examples of the thicknesses, refer to GRAPHICS.HLP: Lines
\@extern Define the default file for external keywords
\@extern <HLP file name>
When a help file contains references to screen names that are not contained in that help file, GNVAHELP searches all .HLP files in the path the user has specified in the Set Help File Path menu entry of GNVAHELP. This function speeds up the search for an external reference by allowing you to tell GNVAHELP the name of the file to look in first. The filename should not contain any path or drive information, but should have the .HLP extension on the end.
Example: This is an external reference to Geneva's main help level:
\#Geneva\# \@extern geneva.hlp Only one \@extern can be specified per help screen. If the help topic is not found in the specified file, or the file does not exist, the remaining .HLP files are searched, as normal.
Types of Index
By default, Makehelp tries to generate an index for the help file which consists of all keywords listed alphabetically on one screen. If this would exceed 100 lines, or if you use an optional commandline switch, Makehelp will instead generate a main level index with just the entires "A.." through "Z.." and will also provide as many individual help screens as are necessary for these categories.
Commandline Arguments
-m: force multiple-screen index
-n: maximum number of lines per screen (default=200)