LayerAV_Layer
ObjectAVAlert

AVAlert provides platform-independent support for displaying simple dialog boxes.



Define Summary
 Define
 ALERT_CAUTION
AVAlertIcons
 ALERT_NOICON
AVAlertIcons
 ALERT_NOTE
AVAlertIcons
 ALERT_QUESTION
AVAlertIcons
 ALERT_STOP
AVAlertIcons
Typedef Summary
 Typedef
 AVAlertParams
 AVAlertParamsRec
Enumeration Summary
 Enumeration
  AVAlertType
Alert Types
Structure Summary
 Structure
 _t_AVAlertParams
A data structure containing information about the format of an Alert dialog box.
 AVAlertButtonInfo
A data structure containing information about a button used in an Alert dialog box.
 AVAlertCheckBoxInfo
A data structure containing information about a checkbox used in an Alert dialog box.
Method Summary
 Method
 
ASInt32 AVAlert(ASInt32 iconType, const char* msg, const char* button1, const char* button2, const char* button3, ASBool beep)
Displays an alert containing the specified message, icon, and one to three buttons with the specified titles.
 
ASBool AVAlertConfirm(const char* msg)
Displays a dialog box containing the ALERT_CAUTION icon, the specified message, and OK and Cancel buttons. The method also performs a system beep. See AVAlert() for more information.
 
ASInt32 AVAlertGetPref(const char* name)
Retrieves the value stored under name in the AVAlert preference store. The AVAlert preference store is intended to be used by clients to store user preferences regarding whether to display an alert prior to execution of a particular operation. The store is persistent across Acrobat sessions. This routine would typically be used when implementing a dialog box that contains a check box saying, "Do not show this dialog again."
 
void AVAlertNote(const char* msg)
Displays a dialog box containing the ALERT_NOTE icon, the specified message and an OK button. The method also performs a system beep.
 
Resets the entire AVAlert preference store. Specific preference entries can be cleared by passing a value of 0 to AVAlertSetPref().
 
void AVAlertSetPref(const char* name, ASInt32 nAnswer)
Stores a value under name in the AVAlert preference store. The AVAlert preference store is intended to be used by clients to store user preferences regarding whether an alert is displayed prior to execution of a particular operation. The store is persistent across Acrobat sessions. This routine would typically be used when implementing a dialog box that contains a check box saying, "Do not show this dialog again."
 
Displays an alert dialog box with a feature set as described by the supplied AVAlertParams.
Defines Detail
ALERT_CAUTION 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ALERT_CAUTION 2

File: AVExpT.h
Line: 5372
ALERT_NOICON 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ALERT_NOICON 0

File: AVExpT.h
Line: 5366
ALERT_NOTE 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ALERT_NOTE 3

File: AVExpT.h
Line: 5375
ALERT_QUESTION 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ALERT_QUESTION 4

File: AVExpT.h
Line: 5378
ALERT_STOP 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ALERT_STOP 1

File: AVExpT.h
Line: 5369

Typedefs Detail
AVAlertParams 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_AVAlertParams AVAlertParams;

File: AVExpT.h
Line: 5496
AVAlertParamsRec 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_AVAlertParams AVAlertParamsRec;

File: AVExpT.h
Line: 5496

Enumeration Detail
AVAlertType
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AVAlertType {
 kAVAlertTypeNone = 0,
 
 kAVAlertTypeOk,
 
 kAVAlertTypeOkCancel,
 
 kAVAlertTypeYesNo,
 
 kAVAlertTypeYesNoCancel
}

File: AVExpT.h
Line: 5382


Structure Detail
_t_AVAlertParams
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct _t_AVAlertParams {
 ASSize_t size; 
 
 AVDoc parentDoc; 
 
 ASText windowTitle; 
 
 AVIconType iconType; 
 
 ASText message; 
 
 ASBool beep; 
 
 AVAlertButtonInfo button1; 
 
 AVAlertButtonInfo button2; 
 
 AVAlertButtonInfo button3; 
 
 AVAlertCheckBoxInfo checkbox; 
 
 AVAlertType alertType; 
 
 AVWindow parentWindow; 
}

A data structure containing information about the format of an Alert dialog box.

See Also


File: AVExpT.h
Line: 5446

Elements
size  

The size of the structure. It must be set to sizeof(AVAlertParamsRec).

 
parentDoc  

The AVDoc that is the modal parent of the alert dialog box. It may be NULL. The parentDoc can be NULL, in which case the alert dialog box' parent is the currently active doc, if there is one. The parentDoc is a no-op on Mac OS.

 
windowTitle  

The title of the dialog box. It may be NULL, in which case the default title, "Adobe Acrobat", is used.

 
iconType  

The icon to display. It must be one of the AVAlert Icons.

 
message  

The message to display.

 
beep  

Set to true to trigger a beep when the dialog box is shown.

 
button1  

An AVAlertButtonInfo structure describing the dialog box' buttons. Any or all of these buttons may be NULL. If all are NULL, the dialog box is shown with an OK button.

 
button2  

An AVAlertButtonInfo structure describing the dialog box' buttons. Any or all of these buttons may be NULL. If all are NULL, the dialog box is shown with an OK button.

 
button3  

An AVAlertButtonInfo structure describing the dialog box' buttons. Any or all of these buttons may be NULL. If all are NULL, the dialog box is shown with an OK button.

 
checkbox  

An AVAlertCheckBoxInfo structure describing the dialog box' checkbox. It may be NULL.

 
alertType  

The type of the alert.

 
parentWindow  

The window to be the parent of the alert. It is ignored if parentDoc is non-NULL. It is ignored on Mac OS.

AVAlertButtonInfo 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct AVAlertButtonInfo {
 ASBool show; 
 
 ASText title; 
}

A data structure containing information about a button used in an Alert dialog box.

See Also


File: AVExpT.h
Line: 5407

Elements
show  

Pass true to show the button.

 
title  

If non-NULL this text is used as the button caption, otherwise the default is used. The default values for button1, button2 and button3 are "OK", "Cancel", and "" respectively.

AVAlertCheckBoxInfo 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct AVAlertCheckBoxInfo {
 ASBool show; 
 
 ASText title; 
 
 ASBool value; 
}

A data structure containing information about a checkbox used in an Alert dialog box.

See Also


File: AVExpT.h
Line: 5423

Elements
show  

Pass true to show the button.

 
title  

If non-NULL this text is used as the checkbox caption, otherwise the default is used. The default value for the checkbox is "Do not show this message again".

 
value  

Pass true to initially check the box. The chosen value is returned in this parameter.


Method Detail
AVAlert()
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 AVAlert(ASInt32 iconType, const char* msg, const char* button1, const char* button2, const char* button3, ASBool beep)

Displays an alert containing the specified message, icon, and one to three buttons with the specified titles.

You can replace this method with your own version, using HFTReplaceEntry().

Parameters

iconType — 

IN The icon to display. It must be one of the AVAlert Icons. Mac OS users: These constants are defined as per the standard Mac user interface guidelines.

  • Use NULL for a button title to suppress a button's display.

  • At least button1 must be non-NULL.

  • button3 is not displayed if button2 is NULL.

 
msg — 

IN The message to display.

 
button1 — 

IN The title for the first button.

 
button2 — 

IN The title for the second button.

 
button3 — 

IN The title for the third button.

 
beep — 

IN Pass true to perform a system beep when the alert is shown.

Returns

The button number (1, 2, or 3) on which the user clicked.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 126
AVAlertConfirm() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVAlertConfirm(const char* msg)

Displays a dialog box containing the ALERT_CAUTION icon, the specified message, and OK and Cancel buttons. The method also performs a system beep. See AVAlert() for more information.

Parameters

msg — 

IN The message to display.

Returns

true if the user clicks OK, false if the user clicks Cancel.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 154
AVAlertGetPref() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 AVAlertGetPref(const char* name)

Retrieves the value stored under name in the AVAlert preference store. The AVAlert preference store is intended to be used by clients to store user preferences regarding whether to display an alert prior to execution of a particular operation. The store is persistent across Acrobat sessions. This routine would typically be used when implementing a dialog box that contains a check box saying, "Do not show this dialog again."

Parameters

name — 

The name of the entry to retrieve. It is limited to alphanumeric characters only.

Returns

The value stored under the name, or 0 if the key was not found.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00050000

File: AVProcs.h
Line: 5823
AVAlertNote() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVAlertNote(const char* msg)

Displays a dialog box containing the ALERT_NOTE icon, the specified message and an OK button. The method also performs a system beep.

Parameters

msg — 

IN The message to display.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 140
AVAlertResetPrefs() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVAlertResetPrefs()

Resets the entire AVAlert preference store. Specific preference entries can be cleared by passing a value of 0 to AVAlertSetPref().

See Also

Since

PI_ACROVIEW_VERSION >= 0x00050000

File: AVProcs.h
Line: 5834
AVAlertSetPref() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVAlertSetPref(const char* name, ASInt32 nAnswer)

Stores a value under name in the AVAlert preference store. The AVAlert preference store is intended to be used by clients to store user preferences regarding whether an alert is displayed prior to execution of a particular operation. The store is persistent across Acrobat sessions. This routine would typically be used when implementing a dialog box that contains a check box saying, "Do not show this dialog again."

Parameters

name — 

The name of the entry. It is limited to alphanumeric characters only.

 
nAnswer — 

The value to store; pass 0 (zero) to clear this specific entry.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00050000

File: AVProcs.h
Line: 5803
AVAlertWithParams() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 AVAlertWithParams(AVAlertParams params)

Displays an alert dialog box with a feature set as described by the supplied AVAlertParams.

Parameters

params — 

IN/OUT A description of the alert feature set.

Returns

The button number (1, 2, or 3) on which the user clicked.

Since

PI_ACROVIEW_VERSION >= 0x00050000

File: AVProcs.h
Line: 5783