
- Jerry Garcia, Bob Weir, Phil Lesh and Robert Hunter
Display
Display Methods
| Display() | Constructor for the Display class |
| Connect() | Connects the Display object to a UI Display Server executing on a remote machine. |
| Close() | Closes the connection to the UI Display Server |
| IsValid() | Returns true if the Display connection is valid |
| Width() | Returns the width of the display in pixels |
| Height() | Returns the height of the display in pixels |
| Name() | Returns the Name associated with the Display |
| MessageDialog() | Displays a modal message dialog using OK/Cancel or Yes/No buttons |
| TextEditDialog() | Displays a modal text edit dialog |
| FileDialog() | Displays a modal file selection dialog |
| FolderDialog() | Displays a modal folder/directory selection dialog |
| DialogCancelled() | Returns true if the previous modal dialog was "cancelled" |
Derived Classes
None
See Also
Class Hierarchy, Window, WindowEvent
public method Display()
Parameters
None
Return Value
None
Description
Constructor for the Display class. The display object will be treated as "invalid" until a successful connection is made to a remote UI display server. The display server is executed on the remote machine by running "Aztec -display PortNumber".
The local Display object is created internally by the VM and is available using "GetDisplay()" and "Script.Display()".
Display Class
public method<bool> Connect(string Address,int PortNumber)
Parameters
Address
Name or IP address of the remote machine
PortNumber
Port number of the UI display server on the remote machine
Return Value
True if the display connection process is successful
Description
This method attempts to connect to a remote UI display server process using the specified name and port number. It returns true if successful and false if not.
The Aztec Engine needs to be executed on the remote machine in the special "UI Display Server" mode (e.g. "Aztec -display 1081").
Once a successul connection is made, the Display reference is passed to the constructors of all top level windows such as Dialog, Frame and ParentFrame. That is all that's necessary to display the UI on a machine other than the machine on which the Aztec program is running.
The UI is displayed remotely, but all UI events are still processed within the local Aztec program.
An Aztec program can connect to any number of machine/port combinations, and can interact with all of them simultaneously.
Display Class
public method<bool> Close()
Parameters
None
Return Value
True if the display connection was successfully closed
Description
This method attempts to close the connection between the Display object running in this Aztec VM script/application and the UI Display Server running remotely. This will also close any existing windows on the remote UI that are tied to this Display connection. No other windows can be created using the Display object, unless a new Display connection is made.
As long as the Display connection is valid when calling this method, this method should always return true. A return value of false typically indicates a network or server issue.
Display Class
public method<bool> IsValid()
Parameters
None
Return Value
True if the display connection is valid
Description
This method returns true if the underlying display connection is valid and false if not. Will allways be true for the local display.
Display Class
public method<int> Width()
Parameters
None
Return Value
Returns the width of the display
Description
Returns the total width of the display in pixels.
Display Class
public method<int> Height()
Parameters
None
Return Value
Returns the height of the display
Description
Returns the total height of the display in pixels.
Display Class
public method<string> Name()
Parameters
None
Return Value
Returns the 'name' of the display
Description
Returnsa name associated with the Display object. If it is the local Display, the name will be "Local". If it is a remote display, the name or address of the remote computer will be used.
Display Class
public method<int> MessageDialog(string Prompt, string DialogTitle, int IconType = Dialog.IconInfo, bool UseYes/No = false, bool UseCancel = true)
Parameters
Prompt
Text prompt to display to the user
DialogTitle
Title for the modal dialog
IconType
Type of icon (info, warning, error)
UseYesNo
Use the Yes/No/Cancel form of the dialog
UseCancel
Display a Cancel button if true
Return Value
Indicates how dialog was closed by user (OK, Cancel, etc.)
Description
This method displays a modal message dialog and this VM thread waits for the user to respond. The prompt to display to the user is specified, along with the title of the dialog. The "UseYesNo" flag indicates whether to show an OK/Cancel dialog (default) or a Yes/No/Cancel dialog. Regardless of the type of dialog, the "UseCancel" flag dictates whether the Cancel button will be displayed.
If the Display object is connected to a remote UI Display Server process, the message dialog will be created on the remote machine.
The icon type can be Dialog.IconInfo, Dialog.InfoWarning or Dialog.IconError.
The return type indicates which button was used to close the dialog, and can be Dialog.OK, Dialog.Yes, Dialog.No or Dialog.Cancel. If the ESC key is pressed within the dialog, the Dialog.Cancel value will be returned (as well as the DialogCancelled() method being true).
Display Class
public method<string> TextEditDialog(string Prompt, string InitValue, string DialogTitle, bool AllowBlanks = true, bool UseCancel = true)
Parameters
Prompt
Text prompt to display to the user
InitValue
Initial value for the edit string
DialogTitle
Title for the modal dialog
AllowBlanks
Allow leading and trailing blanks if true
UseCancel
Display a Cancel button
Return Value
The text string entered by the user
Description
This method displays a modal text edit dialog and this VM thread waits for the user to enter the data and to respond. The prompt to display to the user is specified, along with the inital value of the text string and the title of the dialog. The "AllowBlanks" flag indicates whether to retain leading and trailing blanks, and the "UseCancel" flag dictates whether the Cancel button will be displayed.
If the Display object is connected to a remote UI Display Server process, the edit dialog will be created on the remote machine.
The text string entered by the user is returned by the method. If "Cancel" was pressed by the user, the return string will be reset to the InitValue string, and the DialogCancelled() method will return true.
Display Class
public method<string> FileDialog(string InitFile, string FileFilters, string DialogTitle, bool OpenFile = true, bool UseCancel = true)
Parameters
InitFile
Initial file name to be displayed in the dialog
FileFilters
List of file filters
DialogTitle
Title for the modal dialog
OpenFile
Display a "File Open" dialog if true, and "File Save" if false.
UseCancel
Display a Cancel button
Return Value
The file name selected by the user
Description
This method displays a modal file selection dialog and this VM thread waits for the user to select a file. The prompt to display to the user is specified, along with the inital file name and the title of the dialog. The "OpenFile" flag indicates whether to it is a "File Open" dialog (true) or a "File Save" dialog (false), and the "UseCancel" flag dictates whether the Cancel button will be displayed.
If the Display object is connected to a remote UI Display Server process, the file dialog will be created on the remote machine.
The "File Filters" string is a tab delimited string which contains a set of description/filters for each type of file to support. An example filter string which provides two filters ("*.aztec" and "*.*"):
Filter = "Aztec Source Files" + string.HT + "*.aztec" + string.HT + "All Files" + string.HT + "*.*"
The file name selected by the user is returned by the method. If "Cancel" was pressed by the user, the return string will be reset to the InitFile string, and the DialogCancelled() method will return true.
Display Class
public method<string> FolderDialog(string InitFolder, string DialogTitle, bool UseCancel = true)
Parameters
InitFolder
Initial folder name to be displayed in the dialog
DialogTitle
Title for the modal dialog
UseCancel
Display a Cancel button
Return Value
The folder/directory name selected by the user
Description
This method displays a modal folder selection dialog and this VM thread waits for the user to select a folder/directory. The prompt to display to the user is specified, along with the inital folder name and the title of the dialog. The "UseCancel" flag dictates whether the Cancel button will be displayed.
If the Display object is connected to a remote UI Display Server process, the folder dialog will be created on the remote machine.
The directory name selected by the user is returned by the method. If "Cancel" was pressed by the user, the return string will be reset to the InitFolder string, and the DialogCancelled() method will return true.
Display Class
public method<bool> DialogCancelled()
Parameters
None
Return Value
True if the previous dialog was cancelled
Description
This method returns true if the previous dialog which was displayed and processed by this Display object was cancelled by the user (either the 'Cancel' button was pressed (if appropriate) or the ESC key was pressed.
Display Class