9 0
H U M A N – C O M P U T E R I N T E R A C T I O N
generate pseudo-events for creating chain effects. For example, when
a
scroll bar is moved, both the window content and the scroll bar posi-
tion have to be updated [1].
5.3.2 Event-Driven Program Structure
Based on
what we have discussed so far, the event-driven program
structure generally takes the form of the structure depicted in
Figure 5.7. The first initialization part of
the program creates the nec-
essary UI objects for the application and declares the event-handler
functions and procedures for the created UI objects. Then the pro-
gram enters a loop that automatically keeps
removing an event from
the application event queue and invoking the corresponding handler
(i.e., dispatching the event). The development environment often
hides this part of the program so that the
developer does not have to
worry about such system-level implementations. However, depend-
Area to be
renewed and redrawn
System
Do'stlaringiz bilan baham: