AlertCritical Dialogs - Predefined 

Declaration:

PROCEDURE   AlertCritical
(   text :STRING;
    advice :STRING
) ;

Description:

Informs the user of a serious problem that requires intervention or correction before work can continue.

Parameters:

text The information to be displayed.
advice The text to be added in a smaller font under the main information message

Example:

AlertCritical('Out of Memory', '');

See Also:

AlertInform   AlertQuestion  



  AlertInform Dialogs - Predefined 

Declaration:

PROCEDURE   AlertInform
(   text :STRING;
    advice :STRING;
    minorAlert :BOOLEAN
) ;

Description:

Displays an alert dialog which provides the user an information about the result of a command. It offers no user choices.

Parameters:

text The information to be displayed.
advice The text to be added in a smaller font under the main information message.
minorAlert The severity of the alert: minor(true) or major(false).

Example:

AlertInform('That item is not a valid item', '',isMinorAlert);

See Also:

AlertQuestion   AlertCritical  



  AlertQuestion Dialogs - Predefined 

Declaration:

FUNCTION   AlertQuestion
(   question :STRING;
    advice :STRING;
    defaultButton :INTEGER;
    OKOverrideText :STRING;
    CancelOverrideText :STRING;
    customButtonAText :STRING;
    customButtonBText :STRING
) :INTEGER ;

Description:

Displays an alert dialog which alerts the user to a condition or situation that requires the user's decision and input before preceding; such as an impending action with potentially destructive or irreversible consequences. The message can be in the form of a question.

Parameters:

question The question to display
advice The text to be added in a smaller font under the main information/message
defaultButton Specifies which button is to be made the default
0: the negative button is the default
1: the positive button is the default
2: custom button A is the default
3: custom button B is the default
OKOverrideText Specifies a string to use in overriding the 'OK' string
CancelOverrideText Specifies a string to use in overriding the 'Cancel' string
customButtonAText Specifies a string to use for an optional custom button A
customButtonBText Specifies a string to use for a second optional custom button B

Result:

Return Values
0: the negative button was hit
1: the positive button was hit
2: custom button A was hit
3: custom button B was hit

See Also:

AlertInform   AlertCritical  



  AlrtDialog Dialogs - Predefined 

Declaration:

PROCEDURE   AlrtDialog
( message:STRING ) ;

Description:

Procedure AlrtDialog displays an alert dialog to the user.

Parameters:

message The alert message to be displayed.

Example:

AlrtDialog('No objects are selected for this operation.');



  AngDialog Dialogs - Predefined 

Declaration:

FUNCTION   AngDialog
(   request :STRING;
    default :STRING
) :REAL ;

Description:

Function AngDialog displays a dialog box which requests the user to enter an angle value. The dialog automatically screens for valid numeric input, and will accept supported angle formats.

Parameters:

request Dialog user prompt string.
default Default value for input field.

Example:

AngleValue := AngDialog('Enter an angle value:', '0d');



  AngDialog3D Dialogs - Predefined 

Declaration:

PROCEDURE   AngDialog3D
(   displayStr :STRING;
    xStr :STRING;
    yStr :STRING;
    zStr :STRING;
  VAR  xAngleResult :REAL;
  VAR  yAngleResult :REAL;
  VAR  zAngleResult :REAL
) ;

Description:

Function AngDialog3D displays a dialog box which requests the user to enter three angle values. AngDialog3D will accept angle values in any supported angle format.

Parameters:

displayStr Dialog user prompt string.
xStr Default value for input field.
yStr Default value for input field.
zStr Default value for input field.
xAngleResult Returns user input X value.
yAngleResult Returns user input Y value.
zAngleResult Returns user input Z value.

Example:

AngDialog3D('Enter the angle values:','0','0','0',x,y,z);



  DidCancel Dialogs - Predefined 

Declaration:

FUNCTION   DidCancel
:BOOLEAN ;

Description:

Function DidCancel detects whether the Cancel button in a predefined dialog was pressed. DidCancel is intended for use with conditional statements to signal that a cancel event has occurred.

Example:

PROCEDURE Example;
VAR
	i : INTEGER;
BEGIN
	i := IntDialog('Enter an integer:', '0');
	IF NOT DidCancel THEN BEGIN
		i := i*3;
		Message(i);
	END;
END;
RUN(Example);



  DistDialog Dialogs - Predefined 

Declaration:

FUNCTION   DistDialog
(   request :STRING;
    default :STRING
) :REAL ;

Description:

Function DistDialog displays a dialog box which requests the user to enter a distance value.

DistDialog automatically screens for valid numeric input.

Parameters:

request Dialog user prompt string.
default Default value for input field.

Example:

DistValue := DistDialog('Enter a distance value:','0','0"');



  FormatTextDialog Dialogs - Predefined 

Declaration:

PROCEDURE   FormatTextDialog
( VAR  fontName :STRING;
  VAR  style :INTEGER;
  VAR  size :REAL;
  VAR  spacing :INTEGER;
  VAR  leading :REAL;
  VAR  hAlignment :INTEGER;
  VAR  vAlignment :INTEGER;
    disableMask :INTEGER
) ;

Description:

Displays the text formatting dialog and returns the selected text formatting options.

Table - Text Style

Style Constant
Plain 0
Bold 1
Italic 2
Underline 4
Outline 8
Shadowed 16


disableMask Values

Description Constant
Font 1
Size 2
Spacing 4
Style 8
hAlign 16
vAlign 32

Parameters:

fontName The name of the selected font.
style The selected style options. 0 for plain text. Bit 1 is on for bold, bit 2 for italic, bit 3 for underline, bit 4 for outline and bit 5 for shadow.
size The selected size (in points).
spacing The selected spacing option. 0 for custom leading, 2 for single spacing, 3 for 1 1/2 spacing and 4 for double spacing.
leading The selected leading value (in points) for custom spacing or -1 for a standard spacing.
hAlignment The selected horizontal alignment options. 0 for general justify (used only on worksheets), 1 for left, 2 for center and 3 for right.
vAlignment The selected vertical alignment options. 1 for top, 2 for top baseline, 3 for center, 4 for bottom baseline and 5 for bottom.
disableMask Disables controls and indicates for worksheet. Bit 1 disables font name, bit 2 size, bit 3 spacing, bit 4 style, bit 5 h align, bit 6 v align and bit 7 worksheet.

Example:

PROCEDURE Example;
VAR 
	font    :STRING; 
	style   :INTEGER;
	size    :REAL;
	spacing :INTEGER; 
	leading :REAL;
	hAlign  :INTEGER;
	vAlign  :INTEGER;
	disable :INTEGER;
BEGIN
	{Set some dialog defaults.}
	font := 'Arial';
	style := 1;
	size := 12;
	spacing := 2;

	{Bit values for disableMask: 
         1: font
         2: size
         4: spacing
         8: style
        16: hAlign
        32: vAlign}
	disable := 32;

	{Now get the user's selections.}
	FormatTextDialog(font, style, size, spacing, leading, hAlign, vAlign, disable);
END;
RUN(Example);



  IntDialog Dialogs - Predefined 

Declaration:

FUNCTION   IntDialog
(   request :STRING;
    default :STRING
) :INTEGER ;

Description:

Function IntDialog displays a dialog box which requests the user to enter an integer value.

IntDialog automatically screens for valid numeric input.

Parameters:

request Dialog user prompt string.
default Default value for input field.

Example:

distValue := IntDialog('Enter an integer value:','0');



  NonUndoableActionOK Dialogs - Predefined 

Declaration:

FUNCTION   NonUndoableActionOK
:BOOLEAN ;

Description:

Function NonUndoableActionOK displays a dialog informing the user that the action that is about to be performed cannot be undone. If the user selects OK, the function returns TRUE. If the "Show Undo Warnings" preference is turned off, this function just returns TRUE and does not display a dialog.



  PtDialog Dialogs - Predefined 

Declaration:

PROCEDURE   PtDialog
(   request :STRING;
    defaultX :STRING;
    defaultY :STRING;
  VAR  x :REAL;
  VAR  y :REAL
) ;

Description:

Procedure PtDialog displays a dialog box which requests the user to enter a coordinate (point) value.

Parameters:

request Dialog user prompt string.
defaultX Default value for input field.
defaultY Default value for input field.
x Returns user input X value.
y Returns user input Y value.

Example:

PtDialog('Enter a coordinate.','0','0',cX,cY);



  PtDialog3D Dialogs - Predefined 

Declaration:

PROCEDURE   PtDialog3D
(   displayStr :STRING;
    xStr :STRING;
    yStr :STRING;
    zStr :STRING;
  VAR  xPt :REAL;
  VAR  yPt :REAL;
  VAR  zPt :REAL
) ;

Description:

Procedure PtDialog3D displays a dialog box which requests the user to enter a 3D coordinate (point) value.

Parameters:

displayStr Dialog user prompt string.
xStr Default value for input field.
yStr Default value for input field.
zStr Default value for input field.
xPt Returns user input X value.
yPt Returns user input Y value.
zPt Returns user input Z value.

Example:

PtDialog3D('Enter the 3D location:','0','0','0',x,y,z);



  RealDialog Dialogs - Predefined 

Declaration:

FUNCTION   RealDialog
(   request :STRING;
    default :STRING
) :REAL ;

Description:

Function RealDialog displays a dialog box which requests the user to enter a REAL value. RealDialog automatically screens for valid numeric input.

Parameters:

request Dialog user prompt string.
default Default value for input field.

Example:

RealValue:=RealDialog('Enter a real value:','0.00');



  StrDialog Dialogs - Predefined 

Declaration:

FUNCTION   StrDialog
(   request :STRING;
    default :STRING
) :STRING ;

Description:

Function StrDialog, displays a dialog box which requests the user to enter a string value.

Parameters:

request Dialog user prompt string.
default Default value for input field.

Example:

PROCEDURE Example;
VAR
   request, default, result :STRING;
BEGIN
   request := 'Enter some text...';
   default := 'the default value';
   result := StrDialog(request, default);
END;
RUN(Example);



  YNDialog Dialogs - Predefined 

Declaration:

FUNCTION   YNDialog
( s:STRING ) :BOOLEAN ;

Description:

Function YNDialog displays a dialog box which requests the user to select a Yes or No value. If the user selects the Yes button in the dialog box, the value returned by YNDialog is TRUE; if the user selects No, the function returns FALSE.

Parameters:

s Dialog user prompt string.

Example:

Answer := YNDialog('Do you wish to continue');