Important: The information in this document is obsolete and should not be used for new development.
PATH![]() |
![]() ![]() |
The following Control Manager functions for displaying controls are new, changed, or not recommended with Appearance Manager 1.0:
DrawOneControl
draws a control and any embedded controls that are currently visible in the specified window. Changed with Appearance Manager 1.0.DrawControlInCurrentPort
draws a control in the current graphics port. New with Appearance Manager 1.0.SetUpControlBackground
sets the background for a control. New with Appearance Manager 1.0.Draws a control and any embedded controls that are currently visible in the specified window.
pascal void DrawOneControl (ControlHandle theControl);
theControl
Although you should generally use the function UpdateControls
to update controls, you can use the DrawOneControl
function to update a single control. If an embedding hierarchy exists and the control passed in has embedded controls, DrawOneControl
draws the control and embedded controls. If the root control for a window is passed in, the result is the same as if DrawControls
was called.
Draws a control in the current graphics port.
pascal void DrawControlInCurrentPort (ControlHandle inControl);
Typically, controls are automatically drawn in their owner's graphics port with DrawControls
, DrawOneControl
, and UpdateControls
. DrawControlInCurrentPort
permits easy offscreen control drawing and printing. All standard system controls support this function.
Available with Appearance Manager 1.0 and later.
Sets the background for a control.
pascal OSErr SetUpControlBackground (
ControlHandle inControl,
SInt16 inDepth,
Boolean inIsColorDevice);
inControl
inDepth
inIsColorDevice
true
to indicate that you are drawing on a color device; set to false
for a monochrome device.
The SetUpControlBackground
function allows you to set the background of a control. This function is typically called by control definition functions that are embedded in other controls. You might call SetUpControlBackground
in response to an application-defined function installed in a user pane control; see Defining Your Own User Pane Functions
. SetUpControlBackground
ensures that the background color is always correct when calling EraseRect
and EraseRgn
. If your control spans multiple monitors, SetUpControlBackground
should be called for each device that your control is drawing on; see "Graphics Devices" in
Imaging With QuickDraw
for more details on handling device loops.