HUMAN-COMPUTER INTERACTION
SECOND EDITION
select-line --> mouse-off start-line highlight-line
click-point start-line --> mouse-off rest-line rubber-band-on
click-point rest-line --> mouse-off draw-line
double-click rest-line --> mouse-off menu draw-line rubber-band-off
The persistence of attributes has some rather odd effects on the user's input events. Each rule has to reset the Mouse attribute explicitly. Consider what would
Where production rules are used as the dialog description within a UIMS or other prototyping tool, various extensions to the simple forms described are used. Variables are added to the state to describe numeric values such as the mouse position. We saw this in CCT with the 'binding' of the variables %LINE and %COL. Different precedence rules are used to decide which of several production rules, which could potentially fire, will fire first. This enables help systems and pre-emptive dialog boxes to be programmed. For example, in a word processor, we may give rules for the help system higher priority than those for the normal system. Hence an event, such as a cursor movement, which would normally refer to the movement of the cursor in the document, would instead be 'caught' by the rules for the help system.
The events marked with a question mark are the user's mouse actions, the rest being internal system events. The description is built using four symbols ' = ' meaning
The definition of Do-circle is a pure sequence. When the system executes Do-circle, it first takes a user mouse click, then does an internal event, set-centre, to record the mouse position, accepts a second click, draws the circle and is finished (shown by the special process symbol skip). Do-line is a sequence too, but has been written using the process sequencing symbol ';'. This is used between two processes, as opposed to 'Æ' which is used after an event.
The event select-bold? represents the user selecting the bold toggle with a mouse. So, the process Bold-toggle then turns the bold style on and off with alternate selections. The italic and underline options behave similarly. The dialog box as a whole can then be represented as the parallel composition of the individual toggles:
Dialog-box
= Bold-toggle || Italic-toggle || Under-toggle -->
Concurrent processes can also be used as a way of organizing the internal structure of the interface. For example, returning to the drawing tool, we may decide that we would like to allow keyboard short cuts activated by the alt key. As the line and circle options can be operated by the mouse or by the keyboard, we have a process for each. The mouse process simply waits for the user to select one or other menu option, and then performs an internal event depending on the choice. The keyboard process monitors the alt key, and performs the same internal events depending on whether the user enters alt-C or alt-L:
Mouse = ( select-circle? Æ int-sel-circle Æ Mouse
[] select-line? Æ int-sel-line Æ Mouse )
Keyboard = alt-key-down? Æ ( Alt ; Keyboard )
Alt = ( alt-key-up? Æ skip
[] c-key? Æ int-sel-circle Æ Alt
[] l-key? Æ int-sel-line Æ Alt ) -->
processed in 0.003 seconds
| |
HCI Book 3rd Edition || old HCI 2e home page || search
|
|
feedback to feedback@hcibook.com | hosted by hiraeth mixed media |
|