4.9. Notification Loop ............................................................................................................... 4-8 4.10. Cleanup ................................................................................................................................. 4-8 4.11. Review.................................................................................................................................... 4-9 0 Chapter S Writing a Simple Canvas Program .............................................................. S-1 5.1. The canvaaftaah Code ...................................................................................................... 5-2 5.2.
External Declarations ...................................................................................................... 5-3 6 .3. Initialization .......................................................................................................................... 5-4 6.4. Display Loop ......................................................................................................................... 5-6 5.6. Cleanup .................................................................................................................................... 5-6 5.6.
Review ...................................................................................................................................... 5-6 Chapter 8 Writing a More Sophisticated Tool .............................................................. 8-1 6.1. Overview or the Mouse Tool Processing .............................................................. 6-2 6.2. The mouaetool Code ......................................................................................................... 6-2 6.3. External Declarations...................................................................................................... 6-7 6.4.
Global Data Definitions .................................................................................................. 6-8 6.4.1. Tool- and Sunwindow!I-Specific Data .......................................................... 6-8 6.4.2. Other Global Data .................................................................................................. 6-9 6.5. Main Procedure ................................................................................................................... 6-10 6.6. Initializing the Mouse Tool .......................................................................................... 6-10 6.6.1.
Creating the Mouse Tool .................................................................................... 6-10 6.6.2. Creating and Initializing the Message Subwindow ............................. 6-11 6.6.3. Creating and Initializing the Option Subwindow ................................ 6-12 6.6.4. Creating and Initializing the Range Subwindow ................................. 6-13 0 6.6.5. Remaining Initialization and Utilities ......................................................... 6-15 6.7. Normal Tool Processing ................................................................................................. 6-15 6.7.1.
Responding to Damage to the Range Subwindow .............................. 6-16 6.7.2. Notification from the Option Subwindow ................................................ 6-17 6.7.3. Responding to User Inputs in the Target Range ................................. 6-19 6.8. Terminating the Tool ...................................................................................................... 6-22 Chapter 't Writing a More Sophisticated Canvas Program ................................... 7-1 7 .1. The canvaainput Code ..................................................................................................... 7-2 7.2.
External Declarations...................................................................................................... 7-4 7 .3. Defining the Menu ............................................................................................................. 7-4 7 .4. Initialization .......................................................................................................................... 7-5 7.5. Notification Manager....................................................................................................... 7-6 7.6. Handling Notifications .................................................................................................... 7-6 7.7.
Termination and Cleanup............................................................................................. 7-7 7.8. Review ...................................................................................................................................... 7-8 Chapter 8 Additional Topics ................................................................................................... 8-1 8.1. Implementing-a Subwindow Package .................................................................... 8-1 8.1.1. Facilities Provided By All Subwindows ..................................................... 8-1 0 - viii -