Previous | Contents | Index | Next
Here we look at tailoring Zap's display characteristics so they will suit you. In this section, we introduce the options available to you, and how to use them - if you want to know how to set up Zap so that it will always use these options, see section 12.2.1.
These display options affect how Zap lays out your window - whether it prints line numbers, the space between each line, the display width - and the characters taken to mean 'end of line' and 'tab'.
You can set the display width from Display->Width
. Note that, depending on your wrapping mode, this may or may not actually affect how the display system works (see section 6.3). Typically, however, it sets the window width to that number of characters.
There is also an option to automatically determine the width you need. This is Display->Misc->Auto width
, and it simply finds the longest line in your file and sets the display width to that. (This won't be available in some modes - for instance, it clearly isn't useful in Code mode.) This option is most useful saved as a permanent option for a particular mode which might need it - see section 12.2.1.
You can set the maximum and minimum widths that auto-width can use - see section 12.3.1 for more information. Note that auto width does not operate if soft wrap is turned on.
Zap can display line numbers or addresses at the left hand edge of the window. By default this is only turned on in BASIC and Code modes, but can be useful in others. This is configured from the Display->Line numbers
submenu; you have the options of no line numbers, logical line numbers, physical line numbers and addresses. The first and last are fairly clear, but we should explain the difference between the middle two.
Each row in a window in Zap is a different physical line. This means that if you have one long line, with no line breaks, and Zap wraps it so you can see it all (either because it is longer than your display width, or because you have one of the wrapping modes turned on), it will appear as several physical lines. (In the goto line/address dialogue box (F5
), physical lines are paired with columns to get the "coordinates" option.)
Logical lines, on the other hand, are a function of the file rather than of the way Zap is displaying things: a logical line is something which ends with a line break - then you start a new logical line. (In BASIC mode, a logical line is something with its own line number, but that effectively works in the same way.)
That covered, you can easily choose which line numbering you want. If you choose physical, every single row in the window will have a line number; with logical, only those at the start of a logical line will have one.
You can choose whether or not to have your line numbers or addresses displayed as hexadecimal instead of decimal using the Hex nos
option; you can also set the width available for them at the left hand edge with the Margin width
option. A value of 8 will give enough space for any line number or address, and if you set the width to 1, a star *
will be displayed in place of a line number or address (this is mostly of use with logical line numbers, as it quickly shows you where logical lines start without taking up much space in your window). If the width is too small for the line number or address otherwise, Zap will just display the right hand segment of the number. You can also opt for a colon to be printed between the line numbers and the main text if you wish.
The two remaining line number options cannot be configured per-mode, although they can be set independently for each window. These allow you to set the starting line and address for numbering. These can be used, for instance, in Code mode so that disassembly is done relative to the correct file base (most executables are loaded and run at &8000
, but sometimes they might be loaded somewhere else in memory, in which case you'd want to set the starting address to something different to guarantee correct disassembly).
Line spacing can be configured independently for each window, and is given in pixels.
(Line spacing cannot be configured per-mode.)
These can be configured independently for each window, and specify which characters Zap considers to define the end of a line and the tab character. If you set these to the same thing, tabs will never be displayed in a normal text mode.
(EOL and Tab characters cannot be configured per-mode.)
The font used in a Zap window is determined by the Display->Font
menu. There are basically three different options, set from the Display->Font->Font display settings
submenu:
Bitmap font
- Drawn by Zap; this is the fastest method, and is the default. There is currently a limit of four sub-styles when using this mode (see section 7.3.1). Zap comes with a small number of bitmap fonts; see section 2.2.2 for information on how to install more. See section 7.2.1 for the variations on bitmap font display.System font
- Drawn by the operating system; this is rather drab and boring, but requires less memory. It also doesn't allow for sub-styles.Anti-aliased fonts
; the normal RISC OS outline fonts. See section 7.2.2 for the variations on outline font display.You can select which bitmap font to use from the Display->Font->Bitmap font
submenu, which is arranged by font size and then font name.
For anti-aliased fonts, the menu tree (Display->Font->Anti-aliased font
) is arranged by font name; Display->Font->Font display settings->Anti-aliased size
sets the font size in points, and Display->Font->Font display settings->Aspect ratio x100
sets the anti-aliased y:x font ratio in percent.
Note that the default fonts used cannot be configured from within Zap; you need to edit its textual settings file directly. See section 12.3.1 for more information.
You can plot bitmap fonts in one of three modes: scaled, 1dpp and 2dpp. Usually you should use scaled, since this will automatically scale font heights if necessary. Zap basically uses two types of fonts: low res ones, where the y size will be roughly the same as the x size, and hi res ones where the y size is double the x size. Low res fonts need to be plotted at 2dpp in hi res (square pixel) modes, but at 1dpp in low res (rectangular pixel) modes; hi res fonts need to be plotted at 1dpp in hi res modes, and don't work well in low res modes - they always look too tall. The scaled option automatically compensates to get the best display possible.
Zap has two default bitmap fonts: one for hi res modes, and one for low res. See section 12.3.1 for more information.
Outline fonts can be drawn in two different ways, Anti-aliased VDU
and Anti-aliased DSA
.
VDU is outline fonts drawn by the operating system. It is the slowest of all Zap's options, but allows eight sub-styles (see section 7.3.1).
DSA stands for Direct Screen Access; this is outline fonts drawn by Zap. It is still fairly experimental, and there is no support for font sub-styles. It will also only anti-alias the foreground and background colours; other colours will be drawn, but not anti-aliased.
The colours Zap uses to display your file is changed using the Display->Colour
submenu. The first nine colours are 'system colours', in that they are the same for all modes. They are:
Background1
- The colour used for sections containing no text.Background2
- The background colour used for sections containing text.Foreground
- The standard foreground colour.Selection-B
- The background colour for the selection.Selection-F
- The foreground colour for the selection.Cursor-Bac
- The background colour for the cursor (this is the colour in which the cursor itself will be drawn).Cursor-For
- The foreground colour for the cursor (this is the colour in which the character(s) at the cursor position will be drawn).Line nums
- The colour used for line numbers and addresses.Ctrl chars
- The colour used for control characters (ASCII 0-31).If the All modes
option at the top of the menu is set, then when you change a system colour, it is changed in all modes (but see below), rather than just the one you are using at the time. Other colours are mode dependent, and lie below a dotted line on the colours menu; since each mode uses the mode-specific colours differently, the All modes
option does nothing for them.
All modes, as used here, means all modes which were loaded when the window was opened or have since been loaded and used in that window; specifically, modes which have since been loaded but not used in that window will not be affected by colour configuration changes in said window. This is complicated slightly by the fact that a new view created from an existing window initially has an identical configuration to the original window.
To learn how to save the colours you have set up so that they will always be used for that mode, see section 12.2.1.
As well as being able to define the colour, each colour Zap uses can have an associated group of font sub-styles; these alter the way that Zap draws the characters in question. Currently, the sub-styles are bold, italic, underline, strikethrough and inverse (which reverses the foreground and background colours). You won't be able to set font sub-styles for a colour where it would be inappropriate (for instance for a background colour).
In order to use font sub-styles, the font you are using must actually support them. Many of the bitmap fonts don't support all of them, although most of the more common ones do.
By now you'll probably have looked at some of Zap's modes other than Text. If not, don't worry (it's all covered in chapter 10 in case you want to look now); however you've probably gathered that some modes (for instance, Code mode, which is an ARM disassembly mode), don't display the file you are editing as the contents of the file - rather they display it in a more useful form.
This is clearly a good thing, but what is sometimes useful is the ability to take that display and save it off as text. This is called dumping the file, and is achieved by pressing scCopy
; a new text file is opened containing the dump. You can then save or edit that file as you would any other.
There are three ways you can print from Zap. The first is simply to open the printer:$
filing system by pressing cPrint
, and then saving the file into it. (You can close the printer:$
filing system again by pressing scPrint
.)
The first of the other two methods is 'quick print'; pressing the Print
key opens a small dialogue box which allows you to specify the part of the file you want to print (when it opens, it is set so that it will print the entire file), and to set whether or not you want a page header. Zap sends the display to the printer directly, with a LFCR
pair at the end of each line. You can change this 'end of line' string (as well as strings that Zap sends at the start and end of the entire file) - see section 12.3.1 for more information.
The second method is 'fancy print'; if you have a RISC OS printer driver loaded, pressing sPrint
will open a dialogue box allowing you to configure how Zap will print the file. Zap uses the current outline font (set in Display->Font->Anti-aliased
), and has an option to preserve syntax colouring (although if you have black as your background colour you'll end up using a lot of ink :-). (If the option to print in colour is not selected, Zap will still print using font sub-styles.) Note that the default setting for the option controlling printing in colour is taken directly from the options of the currently-installed printer driver.
The display quality of this method is not yet perfect, and there may still be some problems when using it with Computer Concepts' Turbo drivers.
The next section in the manual is chapter 8, which looks at Zap's powerful search and replace system. It is strongly advised that at some stage you read this section carefully, especially if you are only used to using Edit to edit text files, since there are many things which you can do with Zap's search system which might not immediately spring to mind.
Previous | Contents | Index | Next