Configuring ProWesS

Configuring ProWesS is quite straightforward. It basically boils down to editing the configuration files which are used by PROforma and ProWesS. In fact, there is even a special program which aids you in doing this.

Another important aspect is combining ProWesS with other programs which you want to have loaded in your system. Some guides are given below about integrating ProWesS in your existing boot files.

Please note that most applications can also be configured individually. This can be done using procon or another configuration program which can handle level 2 configuration blocks.

ProWesS by default displays some buttons to call some utility or application programs. This can also be customized to allow you to select the applications that you use often, remove some items, or add other buttons to call your favorite programs...


ProWesS

ProWesS is a highly configurable system, many parameters in the system can be changed. However, these can be situated either in the ProWesS program, or in the external types. Therefore, all configurable items have been grouped in a configuration file, called ProWesS_cfg, which is loaded when ProWesS is started (this file can be found in the pws_pw directory on the program disk).

Each line in the configuration file is interpreted as a configuration command. Empty lines are discarded as comments. All the other lines are divided into two type : commands and definitions of configuration constants. The lines with a command have a fixed format : the first character is the actual command, the second character should be a space, and the rest of the line is the parameter. All lines which don't have a space as second character are considered as configuration constants.

The configuration commands currently supported by ProWesS are :

'%' and ';'
the line is considered as comment and is discarded.
'S'
set the searchpath for the following commands. The searchpath contains the directories which should be searched to open a file. The directories should be separated by a semicolon (';'). The directories are scanned from left to right. For each directory, the trailing underscore ('_') may be discarded.
'T'
specify a type definition file which should be loaded. The file is searched on the current searchpath. A type is an external module (as supported by syslib), which contains the behaviours of the objects of that type. All types in ProWesS are external, ProWesS has no builtin types.

Lines which contain the definition of a configuration constant contain the name of the configuration constant, followed by the parameter, separated by one or more spaces or tabs. Each definition is passed to the system and each of the types for processing, which can thus modify their behaviour.

By convention, the name of the configuration constant starts with the type which is intended to process the result. However, all other types also see the definition and get a chance to modify their behaviour according. As the name of the configuration constant can not contain spaces, dashes ('-') are used to separate the words. The names are case dependant.

All the coordinates and widths are given in virtual screen coordinates (called points). These pretend a screen size if 720 by 540. There are some exceptions, SYSTEM-BORDER-WIDTH, SYSTEM-SCALEBORDER-WIDTH, SYSTEM-SHADOW-RIGHT and SYSTEM-SHADOW-BOTTOM have a parameter in pixels.

Colours are normally given as RGB colours. This means that the colour is split in Red, Green and Blue components in that order. The value "100 100 100" indicates white and "0 0 0" indicates black. The exceptions to this are SYSTEM-BORDER-COLOUR and SYSTEM-SCALEBORDER-COLOUR which need system colour values (0 for black, 2 for red, 4 for green and 7 for white).

The default configuration file which is on the program disk does not contain all the possible configuration constants which are accepted by the standard types. The possible definitions depend on the type of object.

PROforma

Like ProWesS, PROforma also reads the initial configuration information from a special file called PROforma_cfg, which can be found in the pws_pf directory.

Each line in the configuration file is interpreted as a configuration command. Empty lines are discarded as comments. All the other lines are divided into two types : commands and definitions of configuration constants. The lines with a command have a fixed format : the first character is the actual command, the second character should be a space, and the rest of the line is the parameter. All lines which don't have a space as second character are considered as configuration constants.

The configuration commands currently supported by PROforma are :

'%' and ';'
the line is considered as comment and is discarded.
'S'
the parameter is now the searchpath for fonts.
's'
to set the searchpath for drivers.
'D'
will load the given PROforma driver. It is not necessary to know what kind of driver it is. The names of PROforma driver files normally end in '_pfd'. The file will be searched on the current searchpath for drivers (cfr 's').
'M'
allows you to specify the maximum amount of memory which can be used by PROforma as buffer to render a page in. If the amount given is negative, then that is the amount of memory which has to remain free (both in bytes).
'C'
specify the size of the font cache. This consists of two numbers, the actual size of the fontcache, and the minimum number of different font/size combinations that can be in the cache (one more combination can be in the cache for each gstate). Each combination of font & size uses about 1.5kB of memory, so this number should not be too big, however, if you use a large fontcache, this number should also be increased.
'c'
Define the size for the colour cache. In PROforma each gstate keeps a few colours which were last used to make sure that the pattern which is used to estimate the colour does not have to be recalculated all the time. This causes a very big speed increase in some operations, especially for drawing pictures. You can choose how many colours are retained in the colour cache. The value is restricted to stay inside the 1..256 range. The default value is 8.
'R'
load a font file as resident font. A resident font will always remain in memory (unless PROforma is removed). The first resident font is considered to be the built-in font (which is essential for proper functioning). The characters from the built-in font are (also) displayed when that character is not available in the current font. It is therefore recommended that the built-in font be as complete as possible.
The parameter is the name of the fontfile, which is searched on the searchpath for fonts. If you also want to be able to choose the resident fonts in the fontmap, then you should also include a 'P' command.
'P'
this command adds a font to the fontmap. The fontmap is a matching between font names and their filename. The fontmap is also used to figure out which fonts are available. The command has two parameters, separated by a semicolon (';'), there should be no spaces before and after the semicolon. The first parameter is the name of the font (which has to be an exact match, including case). The second parameter is the name of the font file. PROforma font files normally end in '_pff'.
'd'
selects the default printer driver. The driver can be given either as the driverid number (in ASCII, this starts with a minus sign as driverid's are negative) or as the full (case sensitive) printer driver name.

The configuration constants are only passed to the last loaded PROforma driver (or if you just selected the default printer driver, than that driver will get the configuration constants). Most printer drivers will normally understand the following configuration constants :

DEFAULT-DEVICE
The parameter if the default device for the printer driver. Some examples are ser1hr or pard. Note that PROforma only prints raw data, so translates should be switched off, hence the 'r' in ser1hr and the 'd' in pard.
PRINTABLE-AREA-SIZE
Allows you to set the size of the printable area for your printer. This is the area where output can be visible on the page. The parameters are in typographical points, which has a unit if 1/72 inch or approx. .35 mm.
PRINTABLE-AREA-ORIGIN
Allows you to set the origin of the printable area for your printer, or to put it differently, the offset of the printable area from the left and top of the page. The parameters are in typographical points, which has a unit if 1/72 inch or approx. .35 mm.

For example, if you want to configure the epson compatible 9 pins printer driver to have margins of one inch at each side, use 8.5x11 inch paper, and print to the serial port by default, then part of your PROforma_cfg should look like this :

D Epson9_pfd
PRINTABLE-AREA-SIZE 468 648
PRINTABLE-AREA-ORIGIN 72 72
DEFAULT-DEVICE ser1hr

boot file

When ProWesS is started, three files are used to give instructions about which files have to be loaded etc. These three files are the boot file, the ProWesS startup file ($PWSDIR_startup, where $PWSDIR is your ProWesS directory), and a file with your personal configuration ($PWSDIR_personal_ldr). Of these, you can both change the boot and personal_ldr files to customize your system.

These files all have a specific usage :

The boot file which is generated by ProWesS is rather generic. If you want to have other resident extensions and programs, then this is a good place to add them. The boot file contains many comments with guidelines about where to put which sort of commands. Just use the boot file as a template to customize your system.

buttons in ProWesS

The default configuration of ProWesS displays two buttons and a clock. This can easily be modified. The mine subdirectory in ProWesS contains your personal configurations. The buttons etc. which are started are defined in the personal_ldr file. A button is defined by executing cbutton. This program will create a button in the button frame. If the button is indicated with a DO, then the ProWesS loader is started with the given filename as parameter. If that file is an executable, then that file is executed, otherwise, the commands in that file are executed.

For example, the following lines, when added in your personal_ldr file, create a button which will execute the make program (to compile a program) :

%% add button for make
cbutton -name "compile all" win1_c68_make

Unfortunately, your screen would soon be too small if all applications would require their own button. So there is a utility program (mbutton), which allows you to group several items in one menu.

The utilities button for example is defined as follows :

cbutton -name "utilities" utilities_ldr
The utilities_ldr file just calls mbutton to display the menu.
mbutton utilities_mbt -name utilities

The items which have to be displayed inside the menu are defined in the utilities_mbt file. Each line in the file is an item in the menu. The line can contain the name which has to be displayed, the loader file or executable which has to be called, and the searchpath for the file. The file used above is given here.

install -path flp1_ -name "start program in flp1_"
procon -path $PWSDIR_prg -name "configure (procon) (level2)"
PWconfig -path $PWSDIR_prg -name "configure PROforma/ProWesS"
calc -name "calculator"
multiview -path $PWSDIR_prg -name "file viewer"
global -path $PWSDIR_prg -name "Global Variables"
install -path $PWSDIR_prg -name "install software"

PROGS, Professional & Graphical Software
last edited July 27, 1996