![]() |
Scrolling Text Box Control Definition IDs |
Header: ControlDefinitions.h |
enum { kControlScrollTextBoxProc = 432, kControlScrollTextBoxAutoScrollProc = 433 };
Identifies the standard variant of the scrolling text box ('CDEF' resource ID 27), which contains a scroll bar. Your application can use the kControlScrollTextBoxProc ID to create a scrolling box of non-editable text, such as is used for an About box. You must pass the NewControl function the ID of a 'TEXT' resourceand, optionally, a 'styl' resourceto be used for the initial value of the control. The minimum and maximum values are reserved for the kControlScrollTextBoxProc variant and should be set to 0.
Identifies the auto-scrolling variant of the scrolling text box ('CDEF' resource ID 27); this variant does not contain a scroll bar. Your application can use the kControlScrollTextBoxAutoScrollProc ID to create a scrolling box of non-editable text, such as is used for an About box. You must pass the NewControl function the ID of a 'TEXT' resourceand, optionally, a 'styl' resourceto be used for the initial value of the control. For the minimum value of the control, pass a value equal to the delay, in ticks, before the control begins scrolling; this delay will also be used between when scrolling completes and when it begins again. For the maximum value of the control, pass a value equal to the delay, in ticks, between each unit of scrolling. The unit of scrolling for the auto-scrolling text box control is one pixel at a time, unless your application changes this value by calling the SetControlData function. Note that in order to advance the content of the text boxthat is, to scroll the contentyou must call the IdleControls function on a periodic basis, such as whenever you receive a null event.
The Mac OS 8.5 Control Manager defines these new control definition IDs.
When creating a control, your application supplies a control definition ID to one of the Control Manager control-creation functions or to the control resource; see 'CNTL'. The control definition ID indicates the type of control to create. A control definition ID is an integer that contains the resource ID of a control definition function in its upper 12 bits and a variation code in its lower 4 bits. A control definition ID is derived as follows:
control definition ID = 16 * ('CDEF' resource ID) + variation code
A control definition function determines how a control generally looks and behaves. Control definition functions are stored as resources of type 'CDEF'. Various Control Manager functions call a control definition function whenever they need to perform some control-dependent action, such as drawing the control on the screen. For more information on how to create a control definition function, see
A control definition function, in turn, can use a variation code to describe variations of the same basic control. For example, all pop-up arrows share the same basic control definition function, which is stored in a resource of type 'CDEF' and has a resource ID of 12. The standard pop-up arrow is large and points to the right; it has a control definition ID of 192. A variation of this is a large, left-pointing arrow, which has a control definition ID of 193. Still another variation, in which the arrow points up, has a control definition ID of 194.
Your application can use the constants listed here in place of control definition IDs. These constants, and their associated IDs, are not supported unless the Appearance Manager is available.
© 2000 Apple Computer, Inc. (Last Updated 5/8/2000)