Page 118 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 118
Introduction to Microprocessors
Notes visual indicators such as secondary notation, as opposed to text-based interfaces, typed command
labels or text navigation. The actions are usually performed through direct manipulation of the
graphical elements
A short outline of input devices and the implementation of a graphical user interface is given:
• Physical input devices used in graphics
• Virtual devices
• Polling is compared to event processing
• UI toolkits are introduced by generalizing event processing
8.2.1 Physical Devices
Actual, physical input devices include:
• Dials (Potentiometers)
• Selectors
• Pushbuttons
• Switches
• Keyboards (collections of pushbuttons called “keys”)
• Trackballs (relative motion)
• Mice (relative motion)
• Joysticks (relative motion, direction)
• Tablets (absolute position) etc.
8.2.2 Virtual Devices
Devices can be classified according to the kind of value they return:
Button: Return a Boolean value; can be depressed or released.
Key: Return a “character”; that is, one of a given set of code values.
String: Return a sequence of characters.
Selector: Return an integral value (in a given range).
Choice: Return an option (menu, callback).
Valuator: Return a real value (in a given range).
Locator: Return a position in (2D/3D) space (e.g. several ganged valuators).
Stroke: Return a sequence of positions.
Pick: Return a scene component.
Each of the above is called a virtual device.
8.2.3 Polling and Sampling
In polling,
• Value of input device constantly checked in a tight loop
• Wait for a change in status
112 LOVELY PROFESSIONAL UNIVERSITY