EXERCISE 8.6 [extra - not in book]
(a) How do old character-based systems
differ from graphical systems in terms of the low-level
operations through which they can be programmed?
(b) In principle a programmer could build
an interface using these low-level primitives. What
do window managers and toolkits offer over and above
this level of programming.
answer available for tutors only
(a) Some features are obvious:
character-based input: only characters,
cursor and function keys
graphical input: the above + mouse clicks at
particular coordinates, continuous mouse movement
character-based output: print
string or put characters at specific locations; some
also allow colours, flashing characters, special box
characters, etc; characters are laid out in a fixed
graphical output: set any pixel colour, possibly
primitives for line drawing, area filling, etc. Character
printing may not be primitive, but where it is it
allows proportionate (non-fixed-width) fonts.
- N.B. windowing operations such as
'show/hide window', 'redraw', etc. are not correct
answers to this part, which is about the low-level
- In addition, the programming style
differs in that older character-based applications
are more likely to offer a fixed dialog - input-print-input-print
etc - whereas graphical ones tend to be more user
driven. However, this is as much an issue of the
toolkits and window managers used.
Some character-based systems are very user driven
and it is possible to have question-answer style
windowed dialogs (as in many install programs).
(b) (see beginning of section 8.2 and
8.4 of Human-Computer Interaction)
Window managers and toolkits:
- manage the sharing of the screen by
- often include more sophisticated graphics
and text operations
- isolate the application from the device-specific
primitives of different hardware
- supply common widgets such as buttons,
textfields, scrollbars, etc.
- help to obtain a consistent look and
feel across different applications