Solutions to these exercises are supplied in Section B.2.2
Describe Figure 7-6, a state diagram that describes the states and transitions between states for a window, as used in Microsoft Windows. Identify the states and transitions shown in the diagram.
Update Figure 7-6 stepwise to show the following details. After each step, check your answers against the solutions shown in Appendix B:
If a window receives a Restore
event, indicating
that the window should be restored or displayed, as one of many
windows taking a portion of the space on the user screen, and the
window is in the Minimized
or
Maximized
state, it will be changed to the
Restored
state.
If a window receives a Minimize
event, indicating
that the window should be minimized or displayed as an icon taking a
minimal amount of space on the user screen, and the window is in the
Restored
or Maximized
state, it
will be in the Minimized
state.
If a window receives a Maximize
event, indicating
that the window should be maximized or displayed as the only window
taking all the space on the user screen, and the window is in the
Minimized
or Restored
state, it
will be in the Maximized
state.
Every time a window is being restored or maximized it performs a
Redraw
action to render itself.
Every time a window is being minimized it requests that the OS reduce
its application priority using the LowPriority
action so that other restored or maximized application windows can
have more of the computer’s power. The
LowPriority
action requires that the
ApplicationID
argument be passed to it so that the
operating system can identify the application whose priority is
lower.