Handling Carbon Windows and Controls
PDF
Introduction
Window and Control Concepts
Anatomy of a Window
Dialogs
Controls
Window Classes
Window Attributes
Windows, Controls, and the Appearance Manager
Control Types
Button Controls
Push Buttons
Checkboxes
Radio Buttons
Bevel Buttons
Round Buttons
Little Arrows
Pop-Up Controls
Scroll Bars and Sliders
Scroll Bars
Sliders
List Boxes
Scrolling Text Fields
Visual Feedback Controls
Progress Indicators
Chasing Arrows
Relevance Controls
Text Controls
Static Text Fields
Editable Text Fields
Editable Unicode Text Fields
Image Controls
Icon Controls
Picture Controls
Image Wells
Embedding Controls
The Root Control
Group Boxes
Radio Groups
Panes and Tab Controls
Disclosure Controls
Disclosure Triangles
Disclosure Buttons
Visual Aids
Separator Lines
Pop-Up Arrows
Miscellaneous Controls
Data Browser
Placards
Window Headers
Clocks
Using Small Versions of Controls
Events in Windows and Controls
Carbon Event Manager Overview
Activate and Deactivate Events
Drawing Events
Tracking the Mouse
Command Events
Modality With Carbon Events
Accessibility and Section 508 Compliance
Window and Control Tasks
Using Interface Builder
The Nib File
The Layout Palettes
The Menus Palette
The Controls Palette
The Enhanced Controls Palette
The Data Views Palette
The Windows Palette
The Info Window
The Layout Menu and the Aqua Guides
Designing a Simple Preferences Window
Creating the Window
Adding Controls
Creating a Window From a Nib file
Handling Events
Event Parameters
Window Events
Window Activation and Deactivation Events
Window Bounds Changed Events
The Drawing Event
The Content Region Click Event
The Window Close Event
Control Events
Control Activation and Deactivation Events
The Control Hit Event
The Control Track Event (Mac OS X Only)
The Control Draw Event
The Control Bounds Changed Event
Command Events
Calling Functions to Create Windows and Controls
Creating Windows and Controls From Resources
Window Creation Functions
Creating an Alert
Creating and Displaying Sheets
Creating a Sheet Alert
Creating Controls
Functions That Correspond to Interface Builder Options
Window Options
Control Options
Basic Window Manipulation
Window Activation
Finding Windows
Window Visibility
Changing the Modification State
Ordering Windows
Cycling Through Windows (Mac OS X 10.2 and Later)
The Standard Window Menu
Window Reference Constants
Adding Window Proxy Icons
Window Groups (Mac OS X Only)
Manipulating Drawers (Mac OS X 10.2 and later)
Basic Control Manipulation
Activating Controls
Enabling Controls
Showing and Hiding Controls
Drawing Controls
Embedding Controls
Control Implementation Examples
Live Scrolling
Scrolling and the Control Action Callback Function
Scrolling a Simple Picture
Using Tab Controls
Custom Windows and Controls
Drawing Using the Appearance Manager
Creating a Custom Window
Drawing Using Quartz
Creating a Custom Control
Custom Control Tracking
Registering Your Custom Control
Introducing HIObject and HIView (Mac OS X 10. 2 and Later)
Appendix A: Carbon Events Versus Classic DefProc Messages
Revision History
Glossary