Mac OS 9
Dialogs.h File Reference

Dialog Manager interfaces. More...

#include <MacTypes.h>
#include <MixedMode.h>
#include <Events.h>
#include <MacWindows.h>
#include <TextEdit.h>
#include <Controls.h>
#include <MacErrors.h>
#include <CarbonEvents.h>

Go to the source code of this file.

Data Structures

struct  DialogRecord
 
struct  DialogTemplate
 
struct  AlertTemplate
 
struct  AlertStdAlertParamRec
 
struct  AlertStdCFStringAlertParamRec
 

Macros

#define NewSoundUPP(userRoutine)
 
#define NewModalFilterUPP(userRoutine)
 
#define NewModalFilterYDUPP(userRoutine)
 
#define NewUserItemUPP(userRoutine)
 
#define DisposeSoundUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeModalFilterUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeModalFilterYDUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeUserItemUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeSoundUPP(soundNumber, userUPP)    CALL_ONE_PARAMETER_UPP((userUPP), uppSoundProcInfo, (soundNumber))
 
#define InvokeModalFilterUPP(theDialog, theEvent, itemHit, userUPP)
 
#define InvokeModalFilterYDUPP(theDialog, theEvent, itemHit, yourDataPtr, userUPP)
 
#define InvokeUserItemUPP(theDialog, itemNo, userUPP)    CALL_TWO_PARAMETER_UPP((userUPP), uppUserItemProcInfo, (theDialog), (itemNo))
 
#define NewSoundProc(userRoutine)   NewSoundUPP(userRoutine)
 
#define NewModalFilterProc(userRoutine)   NewModalFilterUPP(userRoutine)
 
#define NewModalFilterYDProc(userRoutine)   NewModalFilterYDUPP(userRoutine)
 
#define NewUserItemProc(userRoutine)   NewUserItemUPP(userRoutine)
 
#define CallSoundProc(userRoutine, soundNumber)    InvokeSoundUPP(soundNumber, userRoutine)
 
#define CallModalFilterProc(userRoutine, theDialog, theEvent, itemHit)    InvokeModalFilterUPP(theDialog, theEvent, itemHit, userRoutine)
 
#define CallModalFilterYDProc(userRoutine, theDialog, theEvent, itemHit, yourDataPtr)    InvokeModalFilterYDUPP(theDialog, theEvent, itemHit, yourDataPtr, userRoutine)
 
#define CallUserItemProc(userRoutine, theDialog, itemNo)    InvokeUserItemUPP(theDialog, itemNo, userRoutine)
 
#define GetDialogWindow(dialog)   ((WindowRef)dialog)
 
#define GetDialogTextEditHandle(dialog)   (((DialogPeek)dialog)->textH)
 
#define GetDialogDefaultItem(dialog)   (((DialogPeek)dialog)->aDefItem)
 
#define GetDialogCancelItem(dialog)   (((DialogPeek)dialog)->editOpen)
 
#define GetDialogKeyboardFocusItem(dialog)
 
#define SetPortDialogPort(dialog)   (MacSetPort((GrafPtr)dialog))
 
#define GetDialogPort(dialog)   ((CGrafPtr)dialog)
 
#define GetDialogFromWindow(window)   ((DialogRef)window)
 

Typedefs

typedef SInt16 DITLMethod
 
typedef SInt16 StageList
 
typedef DialogPtr DialogRef
 
typedef struct DialogRecord DialogRecord
 
typedef DialogRecordDialogPeek
 
typedef struct DialogTemplate DialogTemplate
 
typedef DialogTemplateDialogTPtr
 
typedef DialogTPtrDialogTHndl
 
typedef struct AlertTemplate AlertTemplate
 
typedef AlertTemplateAlertTPtr
 
typedef AlertTPtrAlertTHndl
 
typedef SInt16 DialogItemIndexZeroBased
 
typedef SInt16 DialogItemIndex
 
typedef SInt16 DialogItemType
 
typedef EventRecordtheEvent
 
typedef EventRecord DialogItemIndex * itemHit
 
typedef EventRecord short void * yourDataPtr
 
typedef DialogItemIndex itemNo
 
typedef DialogRef theDialog
 
typedef QTModelessCallbackProcPtr QTModelessCallbackUPP
 
typedef SInt16 AlertType
 
typedef struct AlertStdAlertParamRec AlertStdAlertParamRec
 
typedef AlertStdAlertParamRecAlertStdAlertParamPtr
 
typedef struct AlertStdCFStringAlertParamRec AlertStdCFStringAlertParamRec
 
typedef AlertStdCFStringAlertParamRecAlertStdCFStringAlertParamPtr
 

Enumerations

enum  {
  kControlDialogItem = 4 , kButtonDialogItem = kControlDialogItem | 0 , kCheckBoxDialogItem = kControlDialogItem | 1 , kRadioButtonDialogItem = kControlDialogItem | 2 ,
  kResourceControlDialogItem = kControlDialogItem | 3 , kStaticTextDialogItem = 8 , kEditTextDialogItem = 16 , kIconDialogItem = 32 ,
  kPictureDialogItem = 64 , kUserDialogItem = 0 , kHelpDialogItem = 1 , kItemDisableBit = 128
}
 
enum  {
  ctrlItem = 4 , btnCtrl = 0 , chkCtrl = 1 , radCtrl = 2 ,
  resCtrl = 3 , statText = 8 , editText = 16 , iconItem = 32 ,
  picItem = 64 , userItem = 0 , itemDisable = 128
}
 
enum  { kStdOkItemIndex = 1 , kStdCancelItemIndex = 2 , ok = kStdOkItemIndex , cancel = kStdCancelItemIndex }
 
enum  {
  kStopIcon = 0 , kNoteIcon = 1 , kCautionIcon = 2 , stopIcon = kStopIcon ,
  noteIcon = kNoteIcon , cautionIcon = kCautionIcon
}
 
enum  { overlayDITL = 0 , appendDITLRight = 1 , appendDITLBottom = 2 }
 
enum  { uppSoundProcInfo = 0x00000080 }
 
enum  { uppModalFilterProcInfo = 0x00000FD0 }
 
enum  { uppModalFilterYDProcInfo = 0x00003FD0 }
 
enum  { uppUserItemProcInfo = 0x000002C0 }
 
enum  { kAlertStopAlert = 0 , kAlertNoteAlert = 1 , kAlertCautionAlert = 2 , kAlertPlainAlert = 3 }
 
enum  { kAlertDefaultOKText = -1 , kAlertDefaultCancelText = -1 , kAlertDefaultOtherText = -1 }
 
enum  { kAlertStdAlertOKButton = 1 , kAlertStdAlertCancelButton = 2 , kAlertStdAlertOtherButton = 3 , kAlertStdAlertHelpButton = 4 }
 
enum  { kDialogFlagsUseThemeBackground = (1 << 0) , kDialogFlagsUseControlHierarchy = (1 << 1) , kDialogFlagsHandleMovableModal = (1 << 2) , kDialogFlagsUseThemeControls = (1 << 3) }
 
enum  { kAlertFlagsUseThemeBackground = (1 << 0) , kAlertFlagsUseControlHierarchy = (1 << 1) , kAlertFlagsAlertIsMovable = (1 << 2) , kAlertFlagsUseThemeControls = (1 << 3) }
 
enum  {
  kDialogFontNoFontStyle = 0 , kDialogFontUseFontMask = 0x0001 , kDialogFontUseFaceMask = 0x0002 , kDialogFontUseSizeMask = 0x0004 ,
  kDialogFontUseForeColorMask = 0x0008 , kDialogFontUseBackColorMask = 0x0010 , kDialogFontUseModeMask = 0x0020 , kDialogFontUseJustMask = 0x0040 ,
  kDialogFontUseAllMask = 0x00FF , kDialogFontAddFontSizeMask = 0x0100 , kDialogFontUseFontNameMask = 0x0200 , kDialogFontAddToMetaFontMask = 0x0400
}
 
enum  { kDialogFontUseThemeFontIDMask = 0x0080 }
 
enum  { kHICommandOther }
 
enum  { kStdCFStringAlertVersionOne }
 
enum  { kStdAlertDoNotDisposeSheet = 1 << 0 , kStdAlertDoNotAnimateOnDefault = 1 << 1 , kStdAlertDoNotAnimateOnCancel = 1 << 2 , kStdAlertDoNotAnimateOnOther = 1 << 3 }
 

Functions

typedef CALLBACK_API (void, SoundProcPtr)(SInt16 soundNumber)
 
typedef CALLBACK_API (Boolean, ModalFilterProcPtr)(DialogRef theDialog
 
typedef CALLBACK_API (Boolean, ModalFilterYDProcPtr)(DialogRef theDialog
 
typedef CALLBACK_API (void, UserItemProcPtr)(DialogRef theDialog
 
typedef STACK_UPP_TYPE (SoundProcPtr) SoundUPP
 
typedef STACK_UPP_TYPE (ModalFilterProcPtr) ModalFilterUPP
 
typedef STACK_UPP_TYPE (ModalFilterYDProcPtr) ModalFilterYDUPP
 
typedef STACK_UPP_TYPE (UserItemProcPtr) UserItemUPP
 
SoundUPP NewSoundUPP (SoundProcPtr userRoutine)
 
ModalFilterUPP NewModalFilterUPP (ModalFilterProcPtr userRoutine)
 
ModalFilterYDUPP NewModalFilterYDUPP (ModalFilterYDProcPtr userRoutine)
 
UserItemUPP NewUserItemUPP (UserItemProcPtr userRoutine)
 
void DisposeSoundUPP (SoundUPP userUPP)
 
void DisposeModalFilterUPP (ModalFilterUPP userUPP)
 
void DisposeModalFilterYDUPP (ModalFilterYDUPP userUPP)
 
void DisposeUserItemUPP (UserItemUPP userUPP)
 
void InvokeSoundUPP (SInt16 soundNumber, SoundUPP userUPP)
 
Boolean InvokeModalFilterUPP (DialogRef theDialog, EventRecord *theEvent, DialogItemIndex *itemHit, ModalFilterUPP userUPP)
 
Boolean InvokeModalFilterYDUPP (DialogRef theDialog, EventRecord *theEvent, short *itemHit, void *yourDataPtr, ModalFilterYDUPP userUPP)
 
void InvokeUserItemUPP (DialogRef theDialog, DialogItemIndex itemNo, UserItemUPP userUPP)
 
typedef CALLBACK_API_C (void, QTModelessCallbackProcPtr)(EventRecord *theEvent
 
void SetModelessDialogCallbackProc (DialogRef theDialog, QTModelessCallbackProcPtr callbackProc)
 
OSErr GetDialogControlNotificationProc (void *theProc)
 
void SetDialogMovableModal (DialogRef theDialog)
 
void * GetDialogParent (DialogRef theDialog)
 
void InitDialogs (void *ignored)
 Initialize before using Dialog Manager functions. More...
 
 if (sndNum==0) return
 
 HLock (mySound)
 
 HUnlock (mySound)
 
DialogRef NewDialog (void *dStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, SInt16 procID, WindowRef behind, Boolean goAwayFlag, SInt32 refCon, Handle items)
 
DialogRef GetNewDialog (SInt16 dialogID, void *dStorage, WindowRef behind)
 
DialogRef NewColorDialog (void *dStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, SInt16 procID, WindowRef behind, Boolean goAwayFlag, SInt32 refCon, Handle items)
 
void CloseDialog (DialogRef theDialog)
 
void DisposeDialog (DialogRef theDialog)
 
void ModalDialog (ModalFilterUPP modalFilter, DialogItemIndex *itemHit)
 
Boolean IsDialogEvent (const EventRecord *theEvent)
 Check if an event belongs to a dialog window. More...
 
Boolean DialogSelect (const EventRecord *theEvent, DialogRef *theDialog, DialogItemIndex *itemHit)
 
void DrawDialog (DialogRef theDialog)
 
void UpdateDialog (DialogRef theDialog, RgnHandle updateRgn)
 
void HideDialogItem (DialogRef theDialog, DialogItemIndex itemNo)
 
void ShowDialogItem (DialogRef theDialog, DialogItemIndex itemNo)
 
DialogItemIndexZeroBased FindDialogItem (DialogRef theDialog, Point thePt)
 
void DialogCut (DialogRef theDialog)
 
void DialogPaste (DialogRef theDialog)
 
void DialogCopy (DialogRef theDialog)
 
void DialogDelete (DialogRef theDialog)
 
DialogItemIndex Alert (SInt16 alertID, ModalFilterUPP modalFilter)
 
DialogItemIndex StopAlert (SInt16 alertID, ModalFilterUPP modalFilter)
 
DialogItemIndex NoteAlert (SInt16 alertID, ModalFilterUPP modalFilter)
 
DialogItemIndex CautionAlert (SInt16 alertID, ModalFilterUPP modalFilter)
 
void GetDialogItem (DialogRef theDialog, DialogItemIndex itemNo, DialogItemType *itemType, Handle *item, Rect *box)
 
void SetDialogItem (DialogRef theDialog, DialogItemIndex itemNo, DialogItemType itemType, Handle item, const Rect *box)
 
void ParamText (ConstStr255Param param0, ConstStr255Param param1, ConstStr255Param param2, ConstStr255Param param3)
 
void SelectDialogItemText (DialogRef theDialog, DialogItemIndex itemNo, SInt16 strtSel, SInt16 endSel)
 
void GetDialogItemText (Handle item, Str255 text)
 
void SetDialogItemText (Handle item, ConstStr255Param text)
 
SInt16 GetAlertStage (void)
 
void SetDialogFont (SInt16 fontNum)
 
void ResetAlertStage (void)
 
void GetParamText (StringPtr param0, StringPtr param1, StringPtr param2, StringPtr param3)
 
DialogRef newdialog (void *dStorage, const Rect *boundsRect, const char *title, Boolean visible, SInt16 procID, WindowRef behind, Boolean goAwayFlag, SInt32 refCon, Handle items)
 
DialogRef newcolordialog (void *dStorage, const Rect *boundsRect, const char *title, Boolean visible, SInt16 procID, WindowRef behind, Boolean goAwayFlag, SInt32 refCon, Handle items)
 
void paramtext (const char *param0, const char *param1, const char *param2, const char *param3)
 
void getdialogitemtext (Handle item, char *text)
 
void setdialogitemtext (Handle item, const char *text)
 
DialogItemIndexZeroBased finddialogitem (DialogRef theDialog, Point *thePt)
 
void AppendDITL (DialogRef theDialog, Handle theHandle, DITLMethod method)
 
DialogItemIndex CountDITL (DialogRef theDialog)
 
void ShortenDITL (DialogRef theDialog, DialogItemIndex numberItems)
 
OSStatus InsertDialogItem (DialogRef theDialog, DialogItemIndex afterItem, DialogItemType itemType, Handle itemHandle, const Rect *box)
 
OSStatus RemoveDialogItems (DialogRef theDialog, DialogItemIndex itemNo, DialogItemIndex amountToRemove, Boolean disposeItemData)
 
Boolean StdFilterProc (DialogRef theDialog, EventRecord *event, DialogItemIndex *itemHit)
 
OSErr GetStdFilterProc (ModalFilterUPP *theProc)
 GetStdFilterProc Get a pointer to the Dialog Manager's standard dialog filter. More...
 
OSErr SetDialogDefaultItem (DialogRef theDialog, DialogItemIndex newItem)
 SetDialogDefaultItem Tell Dialog Mgr which item in dialog should be default item. More...
 
OSErr SetDialogCancelItem (DialogRef theDialog, DialogItemIndex newItem)
 SetDialogCancelItem Tell Dialog Mgr which item should be default cancel item. More...
 
OSErr SetDialogTracksCursor (DialogRef theDialog, Boolean tracks)
 
DialogRef NewFeaturesDialog (void *inStorage, const Rect *inBoundsRect, ConstStr255Param inTitle, Boolean inIsVisible, SInt16 inProcID, WindowRef inBehind, Boolean inGoAwayFlag, SInt32 inRefCon, Handle inItemListHandle, UInt32 inFlags)
 
OSErr AutoSizeDialog (DialogRef inDialog)
 
OSErr StandardAlert (AlertType inAlertType, ConstStr255Param inError, ConstStr255Param inExplanation, const AlertStdAlertParamRec *inAlertParam, SInt16 *outItemHit)
 
OSStatus GetStandardAlertDefaultParams (AlertStdCFStringAlertParamPtr param, UInt32 version)
 
OSStatus CreateStandardAlert (AlertType alertType, CFStringRef error, CFStringRef explanation, const AlertStdCFStringAlertParamRec *param, DialogRef *outAlert)
 
OSStatus RunStandardAlert (DialogRef inAlert, ModalFilterUPP filterProc, DialogItemIndex *outItemHit)
 
OSStatus CreateStandardSheet (AlertType alertType, CFStringRef error, CFStringRef explanation, const AlertStdCFStringAlertParamRec *param, EventTargetRef notifyTarget, DialogRef *outSheet)
 
OSStatus CloseStandardSheet (DialogRef inSheet, UInt32 inResultCommand)
 
OSErr GetDialogItemAsControl (DialogRef inDialog, SInt16 inItemNo, ControlRef *outControl)
 
OSErr MoveDialogItem (DialogRef inDialog, SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert)
 
OSErr SizeDialogItem (DialogRef inDialog, SInt16 inItemNo, SInt16 inWidth, SInt16 inHeight)
 
OSErr AppendDialogItemList (DialogRef dialog, SInt16 ditlID, DITLMethod method)
 
OSStatus SetDialogTimeout (DialogRef inDialog, SInt16 inButtonToPress, UInt32 inSecondsToWait)
 
OSStatus GetDialogTimeout (DialogRef inDialog, SInt16 *outButtonToPress, UInt32 *outSecondsToWait, UInt32 *outSecondsRemaining)
 
OSStatus SetModalDialogEventMask (DialogRef inDialog, EventMask inMask)
 
OSStatus GetModalDialogEventMask (DialogRef inDialog, EventMask *outMask)
 
WindowRef GetDialogWindow (DialogRef dialog)
 
TEHandle GetDialogTextEditHandle (DialogRef dialog)
 
SInt16 GetDialogDefaultItem (DialogRef dialog)
 
SInt16 GetDialogCancelItem (DialogRef dialog)
 
SInt16 GetDialogKeyboardFocusItem (DialogRef dialog)
 
void SetPortDialogPort (DialogRef dialog)
 
CGrafPtr GetDialogPort (DialogRef dialog)
 
void CouldDialog (SInt16 dialogID)
 
void FreeDialog (SInt16 dialogID)
 
void CouldAlert (SInt16 alertID)
 
void FreeAlert (SInt16 alertID)
 

Variables

Handle mySound
 Set up to use non-standard sounds for alerts. More...
 
OSErr err = SndNewChannel(&myChan, 0, 0, 0L)
 
</pre > *par Copyright
 

Detailed Description

Dialog Manager interfaces.

Introduced In: Mac OS 9
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1985-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ GetDialogFromWindow

DialogRef GetDialogFromWindow (   WindowRefwindow)    ((DialogRef)window)

GetDialogFromWindow()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogKeyboardFocusItem

#define GetDialogKeyboardFocusItem (   dialog)
Value:
(((DialogPeek)dialog)->editField < 0 \
? (short)(-1) \
: (short)(((DialogPeek)dialog)->editField + 1))
Definition: Dialogs.h:157

◆ InvokeModalFilterUPP

#define InvokeModalFilterUPP (   theDialog,
  theEvent,
  itemHit,
  userUPP 
)
Value:
(Boolean) CALL_THREE_PARAMETER_UPP((userUPP), uppModalFilterProcInfo, \
(theDialog), (theEvent), (itemHit))
unsigned char Boolean
Definition: MacTypes.h:318
Definition: Events.h:224
Definition: Quickdraw.h:1648

◆ InvokeModalFilterYDUPP

#define InvokeModalFilterYDUPP (   theDialog,
  theEvent,
  itemHit,
  yourDataPtr,
  userUPP 
)
Value:
(Boolean) CALL_FOUR_PARAMETER_UPP((userUPP), uppModalFilterYDProcInfo, \
(theDialog), (theEvent), (itemHit), \
(yourDataPtr))

◆ NewModalFilterUPP

#define NewModalFilterUPP (   userRoutine)
Value:
(ModalFilterUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppModalFilterProcInfo, \
GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes)

◆ NewModalFilterYDUPP

#define NewModalFilterYDUPP (   userRoutine)
Value:
(ModalFilterYDUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppModalFilterYDProcInfo, \
GetCurrentArchitecture())

pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes)

◆ NewSoundProc

#define NewSoundProc (   userRoutine)    NewSoundUPP(userRoutine)

support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewSoundUPP

#define NewSoundUPP (   userRoutine)
Value:
(SoundUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundProcInfo, \
GetCurrentArchitecture())

pascal no_return_value Func(2_bytes)

◆ NewUserItemUPP

#define NewUserItemUPP (   userRoutine)
Value:
(UserItemUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppUserItemProcInfo, GetCurrentArchitecture())

pascal no_return_value Func(4_bytes, 2_bytes)

Typedef Documentation

◆ DialogItemIndexZeroBased

typedef SInt16 DialogItemIndexZeroBased

new type abstractions for the dialog manager

◆ DialogRef

DialogPtr is obsolete. Use DialogRef instead.

◆ DITLMethod

typedef SInt16 DITLMethod

OLDROUTINENAMES Dialog Item List Manipulation Constants

◆ QTModelessCallbackUPP

typedef QTModelessCallbackProcPtr QTModelessCallbackUPP

CALL_NOT_IN_CARBON

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kControlDialogItem 

new, more standard names for dialog item types

◆ anonymous enum

anonymous enum
Enumerator
ctrlItem 

old names for dialog item types

◆ anonymous enum

anonymous enum
Enumerator
kStdOkItemIndex 

standard dialog item numbers

ok 

old names

◆ anonymous enum

anonymous enum
Enumerator
kStopIcon 

standard icon resource id's

stopIcon 

old names

◆ anonymous enum

anonymous enum

CALL_NOT_IN_CARBON !TARGET_OS_MAC ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© © Following types are valid with Appearance 1.0 and later ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©

Enumerator
kAlertStopAlert 

Alert types to pass into StandardAlert

◆ anonymous enum

anonymous enum
Enumerator
kAlertDefaultCancelText 

"OK"

kAlertDefaultOtherText 

"Cancel"

◆ anonymous enum

anonymous enum

StandardAlert alert button numbers

◆ anonymous enum

anonymous enum
Enumerator
kDialogFlagsUseThemeBackground 

Dialog Flags for use in NewFeaturesDialog or dlgx resource

◆ anonymous enum

anonymous enum
Enumerator
kAlertFlagsUseThemeBackground 

Alert Flags for use in alrx resource

◆ anonymous enum

anonymous enum

For dftb resource

◆ anonymous enum

anonymous enum

Also for dftb resource. This one is available in Mac OS X or later. It corresponds directly to kControlUseThemeFontIDMask from Controls.h.

◆ anonymous enum

anonymous enum

Summary: Flags to CreateStandardAlert that are specified in the AlertStdCFStringAlertParamRec.flags field.

Enumerator
kStdAlertDoNotDisposeSheet 

Applies to StandardSheet only. Do not dispose of the sheet window after closing it; allows the sheet to be re-used again in a later call to ShowSheetWindow.

kStdAlertDoNotAnimateOnDefault 

Applies to StandardSheet only. Causes the sheet window to be hidden immediately without animation effects when the default button is chosen by the user.

kStdAlertDoNotAnimateOnCancel 

Applies to StandardSheet only. Causes the sheet window to be hidden immediately without animation effects when the cancel button is chosen by the user.

kStdAlertDoNotAnimateOnOther 

Applies to StandardSheet only. Causes the sheet window to be hidden immediately without animation effects when the other button is chosen by the user.

Function Documentation

◆ Alert()

DialogItemIndex Alert ( SInt16  alertID,
ModalFilterUPP  modalFilter 
)

Alert()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AppendDialogItemList()

OSErr AppendDialogItemList ( DialogRef  dialog,
SInt16  ditlID,
DITLMethod  method 
)

AppendDialogItemList()

Non-Carbon CFM: in DialogsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AppendDITL()

void AppendDITL ( DialogRef  theDialog,
Handle  theHandle,
DITLMethod  method 
)

CALL_NOT_IN_CARBON AppendDITL()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AutoSizeDialog()

OSErr AutoSizeDialog ( DialogRef  inDialog)

AutoSizeDialog()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CALLBACK_API() [1/2]

typedef CALLBACK_API ( Boolean  ,
ModalFilterYDProcPtr   
)

ModalFilterYDProcPtr was previously in StandardFile.h

◆ CALLBACK_API() [2/2]

typedef CALLBACK_API ( void  ,
SoundProcPtr   
)

dialog manager callbacks

◆ CALLBACK_API_C()

typedef CALLBACK_API_C ( void  ,
QTModelessCallbackProcPtr   
)

CALL_NOT_IN_CARBON QuickTime 3.0

◆ CautionAlert()

DialogItemIndex CautionAlert ( SInt16  alertID,
ModalFilterUPP  modalFilter 
)

CautionAlert()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CloseDialog()

void CloseDialog ( DialogRef  theDialog)

CloseDialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ CloseStandardSheet()

OSStatus CloseStandardSheet ( DialogRef  inSheet,
UInt32  inResultCommand 
)

CloseStandardSheet()

Summary: Closes a standard sheet dialog and releases the dialog data structures.

Discussion: CloseStandardSheet is meant to be used when you need to remove a sheet because of a higher-priority request to close the sheet's document window. For example, you might have a Save Changes sheet open on a document window. Meanwhile, the user drags the document into the trash. When your application sees that the document has been moved to the trash, it knows that it should close the document window, but first it needs to close the sheet. CloseStandardSheet should not be used by your Carbon event handler in response to a click in one of the sheet buttons; the Dialog Manager will close the sheet automatically in that case. If kStdAlertDoNotDisposeSheet was specified when the sheet was created, the sheet dialog will be hidden but not released, and you can reuse the sheet later.

Parameters:

inSheet: The sheet to close.

inResultCommand: This command, if not zero, will be sent to the EventTarget specified when the sheet was created.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.0 and later

Mac OS X: in version 10.0 and later

◆ CouldAlert()

void CouldAlert ( SInt16  alertID)

CouldAlert()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ CouldDialog()

void CouldDialog ( SInt16  dialogID)

CouldDialog()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ CountDITL()

DialogItemIndex CountDITL ( DialogRef  theDialog)

CountDITL()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CreateStandardAlert()

OSStatus CreateStandardAlert ( AlertType  alertType,
CFStringRef  error,
CFStringRef  explanation,
const AlertStdCFStringAlertParamRec param,
DialogRef outAlert 
)

CreateStandardAlert()

Summary: Creates an alert containing standard elements and using standard formatting rules.

Discussion: CreateStandardAlert should be used in conjunction with RunStandardAlert. After CreateStandardAlert returns, the alert is still invisible. RunStandardAlert will show the alert and run a modal dialog loop to process events in the alert.

Parameters:

alertType: The type of alert to create.

error: The error string to display.

explanation: The explanation string to display. May be NULL or empty to display no explanation.

param: The parameter block describing how to create the alert. May be NULL.

outAlert: On exit, contains the new alert.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.0 and later

Mac OS X: in version 10.0 and later
Parameters
paramcan be NULL
outAlertcan be NULL

◆ CreateStandardSheet()

OSStatus CreateStandardSheet ( AlertType  alertType,
CFStringRef  error,
CFStringRef  explanation,
const AlertStdCFStringAlertParamRec param,
EventTargetRef  notifyTarget,
DialogRef outSheet 
)

CreateStandardSheet()

Summary: Creates an alert containing standard elements and using standard formatting rules, and prepares it to be displayed as a sheet.

Discussion: CreateStandardSheet should be used in conjunction with ShowSheetWindow. After CreateStandardSheet returns, the alert is still invisible. ShowSheetWindow will show the alert and then return. Events in the sheet are handled asynchronously; the application should be prepared for the sheet window to be part of its windowlist while running its own event loop. When a button in the sheet is pressed, the EventTargetRef passed to CreateStandardSheet will receive a command event with one of the command IDs kHICommandOK, kHICommandCancel, or kHICommandOther. The sheet is closed before the command is sent.

Parameters:

alertType: The type of alert to create.

error: The error string to display.

explanation: The explanation string to display. May be NULL or empty to display no explanation.

param: The parameter block describing how to create the alert. May be NULL.

notifyTarget: The event target to be notified when the sheet is closed. The caller should install an event handler on this target for the [kEventClassCommand, kEventProcessCommand] event.

outSheet: On exit, contains the new alert.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.0 and later

Mac OS X: in version 10.0 and later
Parameters
paramcan be NULL
notifyTargetcan be NULL

◆ DialogCopy()

void DialogCopy ( DialogRef  theDialog)

DialogCopy()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DialogCut()

void DialogCut ( DialogRef  theDialog)

DialogCut()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DialogDelete()

void DialogDelete ( DialogRef  theDialog)

DialogDelete()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DialogPaste()

void DialogPaste ( DialogRef  theDialog)

DialogPaste()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DialogSelect()

Boolean DialogSelect ( const EventRecord theEvent,
DialogRef theDialog,
DialogItemIndex *  itemHit 
)

DialogSelect()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDialog()

void DisposeDialog ( DialogRef  theDialog)

CALL_NOT_IN_CARBON DisposeDialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeModalFilterUPP()

void DisposeModalFilterUPP ( ModalFilterUPP  userUPP)

CALL_NOT_IN_CARBON DisposeModalFilterUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeModalFilterYDUPP()

void DisposeModalFilterYDUPP ( ModalFilterYDUPP  userUPP)

DisposeModalFilterYDUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later

◆ DisposeSoundUPP()

void DisposeSoundUPP ( SoundUPP  userUPP)

DisposeSoundUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeUserItemUPP()

void DisposeUserItemUPP ( UserItemUPP  userUPP)

DisposeUserItemUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DrawDialog()

void DrawDialog ( DialogRef  theDialog)

DrawDialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ finddialogitem()

DialogItemIndexZeroBased finddialogitem ( DialogRef  theDialog,
Point thePt 
)

finddialogitem()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ FindDialogItem()

DialogItemIndexZeroBased FindDialogItem ( DialogRef  theDialog,
Point  thePt 
)

FindDialogItem()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FreeAlert()

void FreeAlert ( SInt16  alertID)

FreeAlert()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ FreeDialog()

void FreeDialog ( SInt16  dialogID)

FreeDialog()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ GetAlertStage()

SInt16 GetAlertStage ( void  )

GetAlertStage()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogCancelItem()

SInt16 GetDialogCancelItem ( DialogRef  dialog)

GetDialogCancelItem()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogControlNotificationProc()

OSErr GetDialogControlNotificationProc ( void *  theProc)

GetDialogControlNotificationProc()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ GetDialogDefaultItem()

SInt16 GetDialogDefaultItem ( DialogRef  dialog)

GetDialogDefaultItem()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogItem()

void GetDialogItem ( DialogRef  theDialog,
DialogItemIndex  itemNo,
DialogItemType *  itemType,
Handle *  item,
Rect box 
)

GetDialogItem()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogItemAsControl()

OSErr GetDialogItemAsControl ( DialogRef  inDialog,
SInt16  inItemNo,
ControlRef outControl 
)

GetDialogItemAsControl()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ getdialogitemtext()

void getdialogitemtext ( Handle  item,
char *  text 
)

getdialogitemtext()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetDialogItemText()

void GetDialogItemText ( Handle  item,
Str255  text 
)

GetDialogItemText()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogKeyboardFocusItem()

SInt16 GetDialogKeyboardFocusItem ( DialogRef  dialog)

GetDialogKeyboardFocusItem()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogParent()

void* GetDialogParent ( DialogRef  theDialog)

GetDialogParent()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ GetDialogPort()

CGrafPtr GetDialogPort ( DialogRef  dialog)

GetDialogPort()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogTextEditHandle()

TEHandle GetDialogTextEditHandle ( DialogRef  dialog)

GetDialogTextEditHandle()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogTimeout()

OSStatus GetDialogTimeout ( DialogRef  inDialog,
SInt16 *  outButtonToPress,
UInt32 *  outSecondsToWait,
UInt32 *  outSecondsRemaining 
)

GetDialogTimeout()

Non-Carbon CFM: in DialogsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDialogWindow()

WindowRef GetDialogWindow ( DialogRef  dialog)

©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© © Accessor functions ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© GetDialogWindow()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetModalDialogEventMask()

OSStatus GetModalDialogEventMask ( DialogRef  inDialog,
EventMask *  outMask 
)

GetModalDialogEventMask()

Non-Carbon CFM: in DialogsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetNewDialog()

DialogRef GetNewDialog ( SInt16  dialogID,
void *  dStorage,
WindowRef  behind 
)

GetNewDialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetParamText()

void GetParamText ( StringPtr  param0,
StringPtr  param1,
StringPtr  param2,
StringPtr  param3 
)

APIs in Carbon GetParamText()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetStandardAlertDefaultParams()

OSStatus GetStandardAlertDefaultParams ( AlertStdCFStringAlertParamPtr  param,
UInt32  version 
)

CFString-based StandardAlert and StandardSheet APIs are only available on Mac OS X and later GetStandardAlertDefaultParams()

Summary: Fills out an AlertStdCFStringAlertParamRec with default values: - not movable - no help button - default button with title "OK" - no cancel or other buttons

Parameters:

param: The parameter block to initialize.

version: The parameter block version; pass kStdCFStringAlertVersionOne.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.0 and later

Mac OS X: in version 10.0 and later

◆ GetStdFilterProc()

OSErr GetStdFilterProc ( ModalFilterUPP *  theProc)

GetStdFilterProc Get a pointer to the Dialog Manager's standard dialog filter.

GetStdFilterProc returns a pointer to the Dialog Manager's standard dialog
filter.
theProc pointer to dialog filter procedure pointer.
Returns
error code
Note
This routine is not yet documented in any MPW header file (hence, it is not
in any THINK C or THINK Pascal header file either). The information given
above comes from Macintosh Technical Note #304. This tech. note also gives
the inline glue for the call as follows:
pascal OSErr GetStdFilterProc (ProcPtr *theProc)
= {0x303C, 0x0203, 0xAA68};
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HideDialogItem()

void HideDialogItem ( DialogRef  theDialog,
DialogItemIndex  itemNo 
)

HideDialogItem()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InitDialogs()

void InitDialogs ( void *  ignored)

Initialize before using Dialog Manager functions.

©©© end Appearance 1.0 or later stuff NOTE: Code running under MultiFinder or System 7.0 or newer should always pass NULL to InitDialogs.

InitDialogs initializes the Dialog Manager and optionally installs a routine
to get control after a fatal system error. It should be called once, after calling
InitGraf , InitFonts , InitWindows , InitMenus , TEInit (in that order),
and before using any other Dialog Manager functions.
resumeProc is the address of a caller-supplied routine. In the event of a fatal
system error, the system error alert is displayed and if the user
then selects the Resume button, resumeProc  will get control. If
you use resumeProc =NIL, no routine is installed and the Resume
button will be dimmed.
Returns
none
Note
InitDialogs installs the standard sound procedure (see ErrorSound )
and sets all text-replacement parameters to empty strings (see
ParamText ). It also stores the value of resumeProc  into the
low-memory variable ResumeProc .
During application development, you may wish to create a "resume"
procedure that jumps to some sort of diagnostic code, in an attempt to locate
where the error occurred.
The code at resumeProc  expects no parameters. When it gets control, the
stack has been discarded (reset to the value of the global variable
CurStackBase ) and A5 has been set to its position before the error
occurred. You can test your custom code by calling SysError and clicking
the Resume button when the alert appears.
See SysError , System Error Codes , and IM pg II-356-363 for
related information.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ InsertDialogItem()

OSStatus InsertDialogItem ( DialogRef  theDialog,
DialogItemIndex  afterItem,
DialogItemType  itemType,
Handle  itemHandle,
const Rect box 
)

InsertDialogItem()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeModalFilterUPP()

Boolean InvokeModalFilterUPP ( DialogRef  theDialog,
EventRecord theEvent,
DialogItemIndex *  itemHit,
ModalFilterUPP  userUPP 
)

CALL_NOT_IN_CARBON InvokeModalFilterUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeModalFilterYDUPP()

Boolean InvokeModalFilterYDUPP ( DialogRef  theDialog,
EventRecord theEvent,
short *  itemHit,
void *  yourDataPtr,
ModalFilterYDUPP  userUPP 
)

InvokeModalFilterYDUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later

◆ InvokeSoundUPP()

void InvokeSoundUPP ( SInt16  soundNumber,
SoundUPP  userUPP 
)

InvokeSoundUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeUserItemUPP()

void InvokeUserItemUPP ( DialogRef  theDialog,
DialogItemIndex  itemNo,
UserItemUPP  userUPP 
)

InvokeUserItemUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsDialogEvent()

Boolean IsDialogEvent ( const EventRecord theEvent)

Check if an event belongs to a dialog window.

IsDialogEvent should be called directly after GetNextEvent if there are
any currently-open modeless dialogs. If the return value is TRUE, the next
step is to call DialogSelect and handle the event.
theEvent is the address of an EventRecord . Normally, this will contain the
data obtained by a call to GetNextEvent in your main event loop.
Returns
a Boolean value indicating whether the event occurred in a modeless
dialog window. It is one of:
FALSE (0)theEvent  is unrelated to dialogs
TRUE (1)theEvent  occurred in a dialog; use DialogSelect to find
which dialog and to handle the event.
Note
You should call IsDialogEvent in your main event loop if you have opened
any modeless dialogs (see NewDialog and GetNewDialog ). It is OK to call
this if all such dialogs are closed or haven't yet been opened - it just
returns FALSE.
The return value is TRUE if theEvent  is an "activate" or "update" event for
any dialog window. If the active window is a dialog, the return value is
TRUE for all mouse-downs in its content region and all other events related
to the window.
In most cases, the next step is to call DialogSelect to see which dialog is
associated with theEvent  and to handle the event. However, that function
doesn't handle ␑-shifted keys or disk-insert events. Thus, you may need to
do some preprocessing of theEvent  beforehand.
If all your dialogs are modal, events are handled immediately after the
dialog is displayed by a loop that calls ModalDialog and you won't need this
function.
Note: It is normal to call IsDialogEvent and DialogSelect in your
event loop even when GetNextEvent returns FALSE (no event). This
ensures correct blinking of the caret for editText items.
DAs: This call checks the windowKind field of the relevant
WindowRecord , looking for a 2 (dialogKind). Since DAs must set their
reference number in this field, you must store 2 into dialog window's
windowKind field, call IsDialogEvent , and restore the value afterwards.
See DialogSelect for an example of usage.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ModalDialog()

void ModalDialog ( ModalFilterUPP  modalFilter,
DialogItemIndex *  itemHit 
)

ModalDialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MoveDialogItem()

OSErr MoveDialogItem ( DialogRef  inDialog,
SInt16  inItemNo,
SInt16  inHoriz,
SInt16  inVert 
)

MoveDialogItem()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ newcolordialog()

DialogRef newcolordialog ( void *  dStorage,
const Rect boundsRect,
const char *  title,
Boolean  visible,
SInt16  procID,
WindowRef  behind,
Boolean  goAwayFlag,
SInt32  refCon,
Handle  items 
)

newcolordialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NewColorDialog()

DialogRef NewColorDialog ( void *  dStorage,
const Rect boundsRect,
ConstStr255Param  title,
Boolean  visible,
SInt16  procID,
WindowRef  behind,
Boolean  goAwayFlag,
SInt32  refCon,
Handle  items 
)

NewColorDialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ newdialog()

DialogRef newdialog ( void *  dStorage,
const Rect boundsRect,
const char *  title,
Boolean  visible,
SInt16  procID,
WindowRef  behind,
Boolean  goAwayFlag,
SInt32  refCon,
Handle  items 
)

newdialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NewDialog()

DialogRef NewDialog ( void *  dStorage,
const Rect boundsRect,
ConstStr255Param  title,
Boolean  visible,
SInt16  procID,
WindowRef  behind,
Boolean  goAwayFlag,
SInt32  refCon,
Handle  items 
)

CALL_NOT_IN_CARBON NewDialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewFeaturesDialog()

DialogRef NewFeaturesDialog ( void *  inStorage,
const Rect inBoundsRect,
ConstStr255Param  inTitle,
Boolean  inIsVisible,
SInt16  inProcID,
WindowRef  inBehind,
Boolean  inGoAwayFlag,
SInt32  inRefCon,
Handle  inItemListHandle,
UInt32  inFlags 
)

©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© © Appearance Dialog Routines (available only with Appearance 1.0 and later) ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© NewFeaturesDialog()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewModalFilterUPP()

ModalFilterUPP NewModalFilterUPP ( ModalFilterProcPtr  userRoutine)

CALL_NOT_IN_CARBON NewModalFilterUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewModalFilterYDUPP()

ModalFilterYDUPP NewModalFilterYDUPP ( ModalFilterYDProcPtr  userRoutine)

NewModalFilterYDUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later

◆ NewSoundUPP()

SoundUPP NewSoundUPP ( SoundProcPtr  userRoutine)

NewSoundUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewUserItemUPP()

UserItemUPP NewUserItemUPP ( UserItemProcPtr  userRoutine)

NewUserItemUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NoteAlert()

DialogItemIndex NoteAlert ( SInt16  alertID,
ModalFilterUPP  modalFilter 
)

NoteAlert()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ paramtext()

void paramtext ( const char *  param0,
const char *  param1,
const char *  param2,
const char *  param3 
)

paramtext()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ParamText()

void ParamText ( ConstStr255Param  param0,
ConstStr255Param  param1,
ConstStr255Param  param2,
ConstStr255Param  param3 
)

ParamText()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RemoveDialogItems()

OSStatus RemoveDialogItems ( DialogRef  theDialog,
DialogItemIndex  itemNo,
DialogItemIndex  amountToRemove,
Boolean  disposeItemData 
)

RemoveDialogItems()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ResetAlertStage()

void ResetAlertStage ( void  )

ResetAlertStage()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RunStandardAlert()

OSStatus RunStandardAlert ( DialogRef  inAlert,
ModalFilterUPP  filterProc,
DialogItemIndex *  outItemHit 
)

RunStandardAlert()

Summary: Shows and runs a standard alert using a modal dialog loop.

Parameters:

inAlert: The alert to display.

filterProc: An event filter function for handling events that do not apply to the alert. May be NULL.

outItemHit: On exit, contains the item index of the button that was pressed to close the alert.

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.0 and later

Mac OS X: in version 10.0 and later
Parameters
outItemHitcan be NULL

◆ SelectDialogItemText()

void SelectDialogItemText ( DialogRef  theDialog,
DialogItemIndex  itemNo,
SInt16  strtSel,
SInt16  endSel 
)

SelectDialogItemText()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDialogCancelItem()

OSErr SetDialogCancelItem ( DialogRef  theDialog,
DialogItemIndex  newItem 
)

SetDialogCancelItem Tell Dialog Mgr which item should be default cancel item.

SetDialogCancelItem indicates to the Dialog Manager which item is the
default cancel item. It will alias the escape or "Command - period".
theDialog dialog whose default item is being set.
newItem item to make be the default cancel item.
Returns
error code
Note
This routine is not yet documented in any MPW header file (hence, it is not
in any THINK C or THINK Pascal header file either). The information given
above comes from Macintosh Technical Note #304. This tech. note also gives
the inline glue for the call as follows:
pascal OSErr SetDialogCancelItem (DialogPtr theDialog,
short newItem) = {0x303C,0x0305,0xAA68};
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDialogDefaultItem()

OSErr SetDialogDefaultItem ( DialogRef  theDialog,
DialogItemIndex  newItem 
)

SetDialogDefaultItem Tell Dialog Mgr which item in dialog should be default item.

SetDialogDefaultItem indicates to the Dialog Manager which item is the
default. It will alias the return and enter keys to this item, and also bold
border it.
theDialog dialog whose default item is being set.
newItem item to make be the default item.
Returns
error code
Note
This routine is not yet documented in any MPW header file (hence, it is not
in any THINK C or THINK Pascal header file either). The information given
above comes from Macintosh Technical Note #304. This tech. note also gives
the inline glue for the call as follows:
pascal OSErr SetDialogDefaultItem (DialogPtr theDialog,
short newItem) = {0x303C,0x0304,0xAA68};
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDialogFont()

void SetDialogFont ( SInt16  fontNum)

SetDialogFont()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDialogItem()

void SetDialogItem ( DialogRef  theDialog,
DialogItemIndex  itemNo,
DialogItemType  itemType,
Handle  item,
const Rect box 
)

SetDialogItem()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ setdialogitemtext()

void setdialogitemtext ( Handle  item,
const char *  text 
)

setdialogitemtext()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SetDialogItemText()

void SetDialogItemText ( Handle  item,
ConstStr255Param  text 
)

SetDialogItemText()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDialogMovableModal()

void SetDialogMovableModal ( DialogRef  theDialog)

SetDialogMovableModal()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ SetDialogTimeout()

OSStatus SetDialogTimeout ( DialogRef  inDialog,
SInt16  inButtonToPress,
UInt32  inSecondsToWait 
)

©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© © Dialog Routines available only with Appearance 1.1 and later ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© SetDialogTimeout()

Non-Carbon CFM: in DialogsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDialogTracksCursor()

OSErr SetDialogTracksCursor ( DialogRef  theDialog,
Boolean  tracks 
)

SetDialogTracksCursor()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetModalDialogEventMask()

OSStatus SetModalDialogEventMask ( DialogRef  inDialog,
EventMask  inMask 
)

SetModalDialogEventMask()

Non-Carbon CFM: in DialogsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetModelessDialogCallbackProc()

void SetModelessDialogCallbackProc ( DialogRef  theDialog,
QTModelessCallbackProcPtr  callbackProc 
)

SetModelessDialogCallbackProc()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ SetPortDialogPort()

void SetPortDialogPort ( DialogRef  dialog)

SetPortDialogPort()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ShortenDITL()

void ShortenDITL ( DialogRef  theDialog,
DialogItemIndex  numberItems 
)

ShortenDITL()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ShowDialogItem()

void ShowDialogItem ( DialogRef  theDialog,
DialogItemIndex  itemNo 
)

ShowDialogItem()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SizeDialogItem()

OSErr SizeDialogItem ( DialogRef  inDialog,
SInt16  inItemNo,
SInt16  inWidth,
SInt16  inHeight 
)

SizeDialogItem()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StandardAlert()

OSErr StandardAlert ( AlertType  inAlertType,
ConstStr255Param  inError,
ConstStr255Param  inExplanation,
const AlertStdAlertParamRec inAlertParam,
SInt16 *  outItemHit 
)

Regarding StandardAlert and constness: Even though the inAlertParam parameter is marked const here, there was a chance Dialog Manager would modify it on versions of Mac OS prior to 9. StandardAlert()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
Parameters
outItemHitcan be NULL

◆ StdFilterProc()

Boolean StdFilterProc ( DialogRef  theDialog,
EventRecord event,
DialogItemIndex *  itemHit 
)

StdFilterProc()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StopAlert()

DialogItemIndex StopAlert ( SInt16  alertID,
ModalFilterUPP  modalFilter 
)

StopAlert()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UpdateDialog()

void UpdateDialog ( DialogRef  theDialog,
RgnHandle  updateRgn 
)

UpdateDialog()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

Variable Documentation

◆ mySound

mySound
Initial value:
{
SndChannelPtr myChan = 0L
Definition: Sound.h:761

Set up to use non-standard sounds for alerts.

ErrorSound lets you override the standard sounds that are made when alerts
are invoked.
soundProc is the address of a pascal-style procedure. This routine will get
control at each stage of each alert. A value of NIL disables alert
beeping altogether and also disables the menu bar-blinking that
occurs when the speaker volume has been set to 0.
Returns
none
Note
If you never call this function, the alert will emit simple beeps - up to 3;
one beep for the current alert stage - at the current speaker volume
(adjustable via the control panel DA). In the event that the volume has been
set to 0, the standard "sound" is a flashing of the menu bar. See SysBeep .
If you call ErrorSound ( 0 ), beeping and flashing will not occur.
To customize the sounds, use ErrorSound ( mySounds), as illustrated in
the following example.
Note: Sound number 1 is the sound made when a user clicks outside of a
modal dialog box (as well as in a stage-1 alert).
Example
#include < Dialogs.h >
#include < Sound.h>
pascal void MySoundProc( short sndNum );
#define kSndResNum 128 // 'snd ' resource number
pascal void MySoundProc(short sndNum)
  /* sndNum will range from 0 to 3