Jump To:
Leopard Reference Library: Carbon
The Human Interface Toolbox is an object-oriented C API for implementing user interfaces, available in Mac OS X v10.2 and later. Controls, windows, and menus are subclassed from the HIObject base class or the HIView subclass; the HIObject object acts as the data store (instance), and Carbon event handlers are the methods. The standard toolbox managers (Window Manager, Control Manager, and so on) work seamlessly with this new model, while its object-oriented nature makes it much easier to create custom user interface elements.

Document Descriptions
On Off
Display

Sort by
Title
Sort by
Resource Type
Sorted by
Date
HIFramework (HTML) (DMG) (ZIP)
Contains C++ classes which are used by other HIToolbox sample code releases.
Sample Code 2003-02-06
Obtaining and Using Icons With Icon Services (HTML) (PDF)
Explains how to obtain and display icons for a Carbon application or extension.
Guides 2003-02-01
CalendarView (HTML) (DMG) (ZIP)
Shows how to subclass HIView using C, as well as drawing and hit testing.
Sample Code 2003-01-30
CarbonMDEF (HTML) (DMG) (ZIP)
A Mac OS X-compatible, Appearance-savvy sample menu definition function (MDEF).
Sample Code 2003-01-30
ClockView (HTML) (DMG) (ZIP)
An HIView sample that uses the HIFramework to implement a scalable analog clock.
Sample Code 2003-01-30
ColoredCheckBox (HTML) (DMG) (ZIP)
Demonstrates how to create a colored check box on a gray window backgrounds.
Sample Code 2003-01-30
ColorSwatchView (HTML) (DMG) (ZIP)
Implements a color well control as an HIView using HIFramework C++ Carbon Event wrapper classes.
Sample Code 2003-01-30
ControlBackground (HTML) (DMG) (ZIP)
Shows how to affect the background color of a control when drawing it.
Sample Code 2003-01-30
CustomWindow (HTML) (DMG) (ZIP)
Demonstrates how to create a custom window in Mac OS X.
Sample Code 2003-01-30
CustomWindowWidget (HTML) (DMG) (ZIP)
Demonstrates two ways of adding a custom window widget to the window frame of a standard document window.
Sample Code 2003-01-30
GetDragHiliteColor (HTML) (DMG) (ZIP)
Shows how to obtain the color that Drag Manager uses to hilite regions when calling ShowDragHilite.
Sample Code 2003-01-30
HexEditorView (HTML) (DMG) (ZIP)
HIView subclass which implements a hex editor similar to those found in resource editors.
Sample Code 2003-01-30
HideMenuBar (HTML) (DMG) (ZIP)
Shows how to hide the menu bar.
Sample Code 2003-01-30
HIViewTest (HTML) (DMG) (ZIP)
An HIView with rudimentary drawing and hit testing.
Sample Code 2003-01-30
icon cache demo (HTML) (DMG) (ZIP)
Demonstrates the use of an icon cache to limit the search for icon resource to one resource file.
Sample Code 2003-01-30
Icon Play (HTML) (DMG) (ZIP)
Demonstrates the use of icon utilities and popup control cdef in a program using modal dialogs.
Sample Code 2003-01-30
IconUtilCheck (HTML) (DMG) (ZIP)
Shows how to determine whether the Icon Utilities are available.
Sample Code 2003-01-30
Password (HTML) (DMG) (ZIP)
Deprecated - Illustrates three different ways to implement password fields in dialogs.
Sample Code 2003-01-30
PopUpMenuWithCurFont (HTML) (DMG) (ZIP)
Deprecated - Demonstrates what must be done to control the font used by MDEF 0 during PopUpMenuSelect.
Sample Code 2003-01-30
SetWindBackColor (HTML) (DMG) (ZIP)
Demonstrates how to programmatically set the background color of a window without flicker without the Appearance Manager.
Sample Code 2003-01-30
SplitView (HTML) (DMG) (ZIP)
An HIView sample that uses the HIFramework and implements a scalable split view.
Sample Code 2003-01-30
TickerView (HTML) (DMG) (ZIP)
HIView subclass which implements a scrolling, live stock ticker.
Sample Code 2003-01-30
URLTextView (HTML) (DMG) (ZIP)
An HIView subclass which uses LaunchServices to open the URL attached to the view.
Sample Code 2003-01-30
Are the root control, the root view, and the content view the same entity? (HTML) (日本語 HTML)
QA1214: Details the differences and similitudes between the root control, the root view, and the content view of windows.
Technical Q&As 2002-11-12
CGContext parameter missing in my kEventControlDraw event (HTML) (日本語 HTML)
QA1212: Explains in which case your kEventControlDraw handler wouldn't receive a CGContext parameter.
Technical Q&As 2002-11-12
Do I have to call CreateRootControl after creating my window? (HTML) (日本語 HTML)
QA1215: Explains when and when not to call CreateRootControl after creating a window.
Technical Q&As 2002-11-12
HIObjectRegisterSubclass returns paramErr (HTML) (日本語 HTML)
QA1213: Explains in which case HIObjectRegisterSubclass would return paramErr and gives a work around.
Technical Q&As 2002-11-12
What is the minimal set of Carbon Events I need to override in order to implement a simple custom push button? (HTML) (日本語 HTML)
QA1210: Details the minimal set of Carbon Events needed to implement a simple custom push button HIView.
Technical Q&As 2002-11-12
Process Carbon Events Not Delivered in 10.2 (HTML) (日本語 HTML)
QA1181: Work around for a bug in Mac OS X 10.2 that prevents the delivery of process Carbon events.
Technical Q&As 2002-08-27
Resource forks in Mach-O binaries (HTML) (日本語 HTML)
QA1175: Advises against using resource forks in Mach-O binaries.
Technical Q&As 2002-08-07
Using Navigation Services to filter QuickTime files (HTML) (日本語 HTML)
QA1152: Using the CanQuickTimeOpenFile function in a Navigation Services filter to display files that QuickTime can open.
Technical Q&As 2002-07-15
My ListBox control works fine on Mac OS X but I get a crash on Mac OS 9 when I click in the scrollbar (HTML) (日本語 HTML)
QA1156: Explains the requirements for the use of the Listbox Control on Mac OS 9 and Mac OS X.
Technical Q&As 2002-07-12
How can I set the default location with the modern Navigation APIs NavCreatexxx? (HTML) (日本語 HTML)
QA1151: Explains how to set the default location with a NavCustomControl call using the kNavCtlSetLocation message in the Event Proc.
Technical Q&As 2002-07-01
Why isn't my Static Text Control deactivating when my other controls are? (HTML) (日本語 HTML)
QA1125: Explains why a Static Text Control is not deactivating when the other controls are.
Technical Q&As 2002-03-11
How to use the ATSUI Low Level APIs to get glyph outlines (HTML) (日本語 HTML)
TN2033: Covers the ATSUI low-level APIs.
Technical Notes 2001-11-26
Programming with the Appearance Manager (HTML)
Explains how to make an application's user interface look like the Mac OS user interface.
Guides 2001-11-20
Adding an automated Window menu to your application (HTML)
QA1080: Explains how to add an automated Window menu to your Carbon application.
Technical Q&As 2001-10-30
Enabling the application menu's "Preferences..." menu item on Mac OS X (HTML)
QA1079: Explains how to enable the application menu's "Preferences..." menu item on Mac OS X.
Technical Q&As 2001-10-30
The intermittent behavior of SetDialogItemText (HTML)
Deprecated - QA1082: Explains why SetDialogItemText may seem to not work correctly if you have embedding turned on.
Technical Q&As 2001-10-30
Installing input methods on Mac OS X (HTML)
QA1054: Describes how to install and use input methods on Mac OS X.
Technical Q&As 2001-09-14
QDFlushPortBuffer (HTML) (日本語 HTML)
QD65: Describes a possible solution for window update problems under Carbon.
Technical Q&As 2000-11-08
Dialog Manager Helper Functions (HTML) (日本語 HTML)
TN1148: Discusses Dialog Manager calls available since System 7.0 that minimize work in managing dialogs.
Technical Notes 2000-08-14
On Drag Manager Additions (Release 1.1) (HTML)
TN1043: Explains how to take advantage of the new Drag Manager features, including the translucent dragging.
Technical Notes 2000-08-14
Pending Update Perils (HTML) (日本語 HTML)
Deprecated - TN1147: Discusses potential problems when pending update events for windows behind modal dialogs are not serviced.
Technical Notes 2000-08-14
Setting a UserPane's feature (HTML) (日本語 HTML)
TB64: Explains how to set up the control attributes when creating controls, and UserPanes in particular.
Technical Q&As 1999-09-27
Setting a Control's Variant Field (HTML) (日本語 HTML)
Deprecated - TB63: Details how to change the variant of a custom control after creating the control.
Technical Q&As 1999-05-03
Moving the Menu Bar (HTML) (日本語 HTML)
Deprecated - TB54: Describes how to move the menubar to another Macintosh Display and why this move is unadvisable.
Technical Q&As 1998-12-22
Using the Drag Manager to Interact with and Manipulate File System Entities (HTML) (日本語 HTML)
TN1085: Details the data flavors provided by the Drag Manager for interacting with and manipulating file system entities.
Technical Notes 1996-12-01
Multiple Resources with the Same Type and ID (HTML) (日本語 HTML)
TB30: Explains why Resource IDs should be unique within a given resource type within a given resource file.
Technical Q&As 1996-11-27
How PBDTGetAPPL Chooses Which Copy of an App to Launch (HTML) (日本語 HTML)
Deprecated - TB19: Explains how PBDTGetAppl() chooses which application copy to launch, and how to deal with the trash.
Technical Q&As 1996-05-14
Using the Wide Routines in <FixMath.h> (HTML)
TB14: Details the Wide routines listed in the FixMath.h header (WideDivide, WideCompare, WideBitShift, WideShift, etc.).
Technical Q&As 1995-06-01