Mac OS 9
ControlStrip.h
Go to the documentation of this file.
1 
19 #ifndef __CONTROLSTRIP__
20 #define __CONTROLSTRIP__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __MENUS__
27 #include <Menus.h>
28 #endif
29 
30 #ifndef __DIALOGS__
31 #include <Dialogs.h>
32 #endif
33 
34 #if PRAGMA_ONCE
35 #pragma once
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 #if PRAGMA_IMPORT
44 #pragma import on
45 #endif
46 
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align = mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
50 #pragma pack(push, 2)
51 #elif PRAGMA_STRUCT_PACK
52 #pragma pack(2)
53 #endif
54 
55  /**********************************************************************************************
56 
57  messages passed to the modules
58 
59  *********************************************************************************************/
60  enum
61  {
62  sdevInitModule = 0,
69  6,
71  7,
73  8
74  };
75 
76  /**********************************************************************************************
77 
78  Features supported by the module. If a bit is set, it means that feature is
79  supported. All undefined bits are reserved for future use by Apple, and should
80  be set to zero.
81 
82  *********************************************************************************************/
83  enum
84  {
85  sdevWantMouseClicks = 0,
89  };
90 
91  /**********************************************************************************************
92 
93  Result values returned by the sdevPeriodicTickle and sdevIconMouseClick
94  selectors. If a bit is set, the module can request that a specific function is
95  performed by the Control Strip. A result of zero will do nothing. All
96  undefined bits are reserved for future use by Apple, and should be set to zero.
97 
98  *********************************************************************************************/
99  enum
100  {
101  sdevResizeDisplay = 0,
104  2,
105  sdevCloseNow = 3
106  };
107 
108  /**********************************************************************************************
109 
110  miscellaneous
111 
112  *********************************************************************************************/
113  enum
114  {
115  sdevFileType = FOUR_CHAR_CODE('sdev')
116  };
117 
118  enum
119  {
120  sdevMenuItemMark = 0xA5
121  };
122 
125  enum
126  {
127  BarGraphSlopeLeft = -1,
129  BarGraphSlopeRight = 1
130  };
131 
132 /**********************************************************************************************
133 
134  utility routines to provide standard interface elements and support for
135 common functions
136 
137 *********************************************************************************************/
138 #if CALL_NOT_IN_CARBON
147  Boolean
149 
158  void
160 
169  Boolean
171 
180  short
181  SBOpenModuleResourceFile(OSType fileCreator);
182 
191  OSErr
192  SBLoadPreferences(ConstStr255Param prefsResourceName, Handle *preferences);
193 
202  OSErr
203  SBSavePreferences(ConstStr255Param prefsResourceName, Handle preferences);
204 
213  void
214  SBGetDetachedIndString(StringPtr theString, Handle stringList,
215  short whichString);
216 
225  OSErr
226  SBGetDetachIconSuite(Handle *theIconSuite, short theResID,
227  unsigned long selector);
228 
237  short
238  SBTrackPopupMenu(const Rect *moduleRect, MenuRef theMenu);
239 
248  short
249  SBTrackSlider(const Rect *moduleRect, short ticksOnSlider, short initialValue);
250 
259  OSErr
260  SBShowHelpString(const Rect *moduleRect, StringPtr helpString);
261 
270  short
271  SBGetBarGraphWidth(short barCount);
272 
281  void
282  SBDrawBarGraph(short level, short barCount, short direction,
283  Point barGraphTopLeft);
284 
293  void
294  SBModalDialogInContext(ModalFilterUPP filterProc, short *itemHit);
295 
305  OSErr
306  SBGetControlStripFontID(short *fontID);
307 
316  OSErr
317  SBSetControlStripFontID(short fontID);
318 
327  OSErr
328  SBGetControlStripFontSize(short *fontSize);
329 
338  OSErr
339  SBSetControlStripFontSize(short fontSize);
340 
349  OSErr
350  SBGetShowHideHotKey(short *modifiers, unsigned char *keyCode);
351 
360  OSErr
361  SBSetShowHideHotKey(short modifiers, unsigned char keyCode);
362 
371  OSErr
373 
382  OSErr
384 
394  short
395  SBHitTrackSlider(const Rect *moduleRect, short ticksOnSlider,
396  short initialValue, Boolean *hit);
397 
398 #endif
400 #if PRAGMA_STRUCT_ALIGN
401 #pragma options align = reset
402 #elif PRAGMA_STRUCT_PACKPUSH
403 #pragma pack(pop)
404 #elif PRAGMA_STRUCT_PACK
405 #pragma pack()
406 #endif
407 
408 #ifdef PRAGMA_IMPORT_OFF
409 #pragma import off
410 #elif PRAGMA_IMPORT
411 #pragma import reset
412 #endif
413 
414 #ifdef __cplusplus
415 }
416 #endif
417 
418 #endif
@ sdevDontAutoTrack
Definition: ControlStrip.h:86
@ sdevKeepModuleLocked
Definition: ControlStrip.h:88
@ sdevHasCustomHelp
Definition: ControlStrip.h:87
void SBDrawBarGraph(short level, short barCount, short direction, Point barGraphTopLeft)
OSErr SBSetShowHideHotKey(short modifiers, unsigned char keyCode)
void SBGetDetachedIndString(StringPtr theString, Handle stringList, short whichString)
short SBHitTrackSlider(const Rect *moduleRect, short ticksOnSlider, short initialValue, Boolean *hit)
OSErr SBLoadPreferences(ConstStr255Param prefsResourceName, Handle *preferences)
@ BarGraphFlatRight
Definition: ControlStrip.h:128
@ BarGraphSlopeRight
Definition: ControlStrip.h:129
OSErr SBGetDetachIconSuite(Handle *theIconSuite, short theResID, unsigned long selector)
@ sdevCloseNow
Definition: ControlStrip.h:105
@ sdevHelpStateChange
Definition: ControlStrip.h:103
@ sdevNeedToSave
Definition: ControlStrip.h:102
OSErr SBSavePreferences(ConstStr255Param prefsResourceName, Handle preferences)
short SBGetBarGraphWidth(short barCount)
OSErr SBSetControlStripFontSize(short fontSize)
short SBTrackPopupMenu(const Rect *moduleRect, MenuRef theMenu)
OSErr SBGetControlStripFontSize(short *fontSize)
void SBShowHideControlStrip(Boolean showIt)
Boolean SBIsControlStripVisible(void)
short SBTrackSlider(const Rect *moduleRect, short ticksOnSlider, short initialValue)
OSErr SBIsShowHideHotKeyEnabled(Boolean *enabled)
OSErr SBShowHelpString(const Rect *moduleRect, StringPtr helpString)
OSErr SBGetShowHideHotKey(short *modifiers, unsigned char *keyCode)
OSErr SBEnableShowHideHotKey(Boolean enabled)
OSErr SBSetControlStripFontID(short fontID)
Boolean SBSafeToAccessStartupDisk(void)
OSErr SBGetControlStripFontID(short *fontID)
void SBModalDialogInContext(ModalFilterUPP filterProc, short *itemHit)
short SBOpenModuleResourceFile(OSType fileCreator)
@ sdevFeatures
Definition: ControlStrip.h:64
@ sdevMouseClick
Definition: ControlStrip.h:68
@ sdevShowBalloonHelp
Definition: ControlStrip.h:72
@ sdevDrawStatus
Definition: ControlStrip.h:67
@ sdevGetDisplayWidth
Definition: ControlStrip.h:65
@ sdevCloseModule
Definition: ControlStrip.h:63
@ sdevPeriodicTickle
Definition: ControlStrip.h:66
@ sdevSaveSettings
Definition: ControlStrip.h:70
Dialog Manager interfaces.
Basic Macintosh data types.
unsigned char * StringPtr
Definition: MacTypes.h:477
unsigned char Boolean
Definition: MacTypes.h:318
Menu Manager Interfaces.
Definition: Menus.h:753
Definition: MacTypes.h:520
Definition: MacTypes.h:527