Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 5 - Control Panel Extensions / Control Panel Extensions Reference
Control Panel Extension-Defined Routines


Managing Panel Components

A control panel extension should respond to the kPanelGetDitlSelect, kPanelInstallSelect, kPanelGetTitleSelect, and kPanelRemoveSelect request codes. You typically define subroutines that the main program of your control panel extension calls (using CallComponentFunctionWithStorage) to handle these requests. You can choose any name for these subroutines, but by convention they're called MyPanelGetDITL, MyPanelInstall, MyPanelGetTitle, and MyPanelRemove.

When the appropriate control panel prepares to add a control panel extension's items to a control panel, it obtains a list of those items by calling the extension and specifying the kPanelGetDitlSelect request code. The control panel extension typically responds by calling a subroutine (for example, MyPanelGetDITL) to handle the request. Once the control panel has installed the items, it calls the extension and specifies the kPanelInstallSelect request code to give the extension the opportunity to set any default values in the panel. The extension's MyPanelInstall function responds to this request code.

Before the control panel removes the panel from its display, it calls the extension and specifies the kPanelRemoveSelect request code. The extension's MyPanelRemove function responds to this request code. The kPanelGetTitleSelect request code is currently optional for control panel extensions. If your extension responds to this request code, it should return the name that the control panel should display for the panel in the control panel's pop-up menu. The extension's MyPanelGetTitle function responds to this request code.


Subtopics
MyPanelGetDITL
MyPanelInstall
MyPanelGetTitle
MyPanelRemove

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996