
Dialog
IDialog

Dialog Methods
| Dialog() | Constructor for theDialog class |
| AddCloseButton() | Specified button will be treated as a "close" button for the dialog |
| AddCancelButton() | Specified button will be treated as a "cancel" button for the dialog |
| AddWindowCloseHandler() | Registers an event handler for closing the dialog window using a method reference |
| AddWindowCloseHandler() | Registers an event handler for closing the dialog window using an IDialog reference |
| AddWindowCancelHandler() | Registers an event handler for cancelling the dialog window using a method reference |
| AddWindowCancelHandler() | Registers an event handler for cancelling the dialog window using an IDialog reference |
| OnWindowClose() | Virtual method to handle WindowClose events by default - can be overridden |
| OnWindowCancel() | Virtual method to handle WindowCancel events by default - can be overridden |
IDialog Methods
| OnWindowClose() | Abstract method to handle WindowClose events - must be overridden |
| OnWindowCancel() | Abstract method to handle WindowCancel events - must be overridden |
Derived Classes
None
See Also
Class Hierarchy, Frame, Control, WindowCloseEvent, WindowCancelEvent
public method Dialog(Display TargetDisplay, Window Parent, int XPos, int YPos, int Width, int Height, string Title, bool IsModal = false)
Parameters
TargetDisplay
The Display object where the top-level dialog is displayed (null for local Display)
Parent
Parent window for the dialog (must be other Dialog) or null
XPos
One based X position of window relative to parent
YPos
One based Y position of window relative to parent
Width
Initial width of the entire dialog window in pixels
Height
Initial height of the entire dialog window in pixels
Title
Title for the frame window
IsModal
Modal if true, not modal if false
Return Value
None
Description
Constructor for the Dialog class. The target Display is passed in (null means local Display) and the Parent window is also specified (null means top-level frame). Base information such as position and size is also passed in.
If the Display object is connected to a remote UI Display Server process, the dialog window will be created on the remote machine. All child windows of the dialog will automatically be displayed on the remote machine as well. All UI events from the remote UIs are handled in the local Aztec program.
If the IsModal flag is true, the dialog will be treated as modal, meaning that no other top-level UI windows for this script can be accessed until this dialog is closed. If the IsModal flag is false, the user can freely switch back and forth between the top-level windows within the script.
If the XPos and YPos are zero, the dialog window will be centered within the Display.
Note that the Dialog window is created in a "hidden" state, so the 'Show()' method must be called to display the window. This allows the script to create and initialize the entire UI before actually displaying it on the screen.
Dialog Class
public method AddCloseButton(Button CloseButton)
Parameters
CloseButton
Button to be treated as a "close" button
Return Value
NONE
Description
This method registers the button to be treated specially as a "close" button for the dialog. Any number of buttons can be defined this way for the dialog. If one of the buttons specified as a "close" button is pressed, the dialog is automatically closed, resulting in a WindowCloseEvent for the dialog.
Dialog Class
public method AddCancelButton(Button CancelButton)
Parameters
CancelButton
Button to be treated as a "cancel" button
Return Value
NONE
Description
This method registers the button to be treated specially as a "cancel" button for the dialog. Any number of buttons can be defined this way for the dialog. If one of the buttons specified as a "cancel" button is pressed, the dialog is automatically closed, resulting in a WindowCancelEvent for the dialog. The
Dialog Class
public method AddWindowCloseHandler(WindowCloseHandler Handler, Base ExtraObject = null)
Parameters
Handler
Method reference to be executed when the event occurs
ExtraObject
Optional object which will be sent along to each event handler when it is executed
Return Value
NONE
Description
This method registers a method reference to be executed when the dialog window is closed. The OS close icon in the dialog frame (X) will cause this event, as will pressing the button registered as a "close" button with this dialog. An optional object can also be registered which will be sent to each event handler as it is executed.
As is true with all Aztec event handling, this method can be called by any thread. When the event occurs, each registered event handler is scheduled to execute within the thread that registered it. So an event sent to one thread can be handled by event handlers executing in one or more other threads.
The WindowCloseHandler data type represents a method reference specific to a handler for WindowCloseEvent. WindowCloseHandler is defined as follows:
public type<method<WindowCloseEvent,Base>> WindowCloseHandler
Given this definition, the method handler must be defined with the following signature (name can be anything):
public method WindowCloseMethod(WindowCloseEvent event, Base Extra) { }.
Dialog Class
public method AddWindowCloseHandler(IFrame Interface, Base ExtraObject = null)
Parameters
Interface
Reference to an IFrame object
ExtraObject
Optional object which will be sent along to each event handler when it is executed
Return Value
NONE
Description
This method registers an IDialog interface object to be executed when the dialog window is closed. The OS close icon in the dialog frame (X) will cause this event, as will pressing the button registered as a "close" button with this dialog. An optional object can also be registered which will be sent to each event handler as it is executed.
As is true with all Aztec event handling, this method can be called by any thread. When the event occurs, each registered event handler is scheduled to execute within the thread that registered it. So an event sent to one thread can be handled by event handlers executing in one or more other threads.
When the dialog window is closed, the OnWindowClose() method within the IDialog object will be executed.
Dialog Class
public method AddWindowCancelHandler(WindowCancelHandler Handler, Base ExtraObject = null)
Parameters
Handler
Method reference to be executed when the event occurs
ExtraObject
Optional object which will be sent along to each event handler when it is executed
Return Value
NONE
Description
This method registers a method reference to be executed when the dialog window is cancelled. Pressing the button registered as a "cancel" button with this dialog will cause this event, as will pressing the ESC key if the AllowEscKey flag is true for this dialog. An optional object can also be registered which will be sent to each event handler as it is executed.
As is true with all Aztec event handling, this method can be called by any thread. When the event occurs, each registered event handler is scheduled to execute within the thread that registered it. So an event sent to one thread can be handled by event handlers executing in one or more other threads.
The WindowCancelHandler data type represents a method reference specific to a handler for WindowCancelEvent. WindowCancelHandler is defined as follows:
public type<method<WindowCancelEvent,Base>> WindowCancelHandler
Given this definition, the method handler must be defined with the following signature (name can be anything):
public method WindowCancelMethod(WindowCancelEvent event, Base Extra) { }.
Dialog Class
public method AddWindowCancelHandler(IDialog Interface, Base ExtraObject = null)
Parameters
Interface
Reference to an IDialog object
ExtraObject
Optional object which will be sent along to each event handler when it is executed
Return Value
NONE
Description
This method registers an IDialog interface object to be executed when the dialog window is cancelled. Pressing the button registered as a "cancel" button with this dialog will cause this event, as will pressing the ESC key if the AllowEscKey flag is true for this dialog. An optional object can also be registered which will be sent to each event handler as it is executed.
As is true with all Aztec event handling, this method can be called by any thread. When the event occurs, each registered event handler is scheduled to execute within the thread that registered it. So an event sent to one thread can be handled by event handlers executing in one or more other threads.
When the dialog window is cancelled, the OnWindowCancel() method within the IDialog object will be executed.
Dialog Class
public method virtual OnWindowClose(WindowCloseEvent CloseEvent, Base ExtraObject)
Parameters
CloseEvent
WindowCloseEvent object associated with the event
ExtraObject
Optional object sent along from when it was registered
Return Value
NONE
Description
This method is the default event handler for WindowCloseEvent within the dialog. It is invoked internally as a result of the frame window associated with this object being closed. This method in turn executes every registered handler with the same argument list which comes in. Both implementations of the Dialog.AddWindowCloseHandler() method register the event handlers which get invoked by this method.
If this method is overridden by a class derived from Dialog, it must call this implementation of the method if it needs to execute handlers registered with the Dialog.AddWindowCloseHandler() methods.
Dialog Class
public method virtual OnWindowCancel(WindowCancelEvent CancelEvent, Base ExtraObject)
Parameters
CancelEvent
WindowCancelEvent object associated with the event
ExtraObject
Optional object sent along from when it was registered
Return Value
NONE
Description
This method is the default event handler for WindowCancelEvent within the dialog. It is invoked internally as a result of the dialog being cancelled ("cancel" button or ESC key). This method in turn executes every registered handler with the same argument list which comes in. Both implementations of the Dialog.AddWindowCancelHandler() method register the event handlers which get invoked by this method.
If this method is overridden by a class derived from Dialog, it must call this implementation of the method if it needs to execute handlers registered with the Dialog.AddWindowCancelHandler() methods.
Dialog Class
public method abstract OnWindowClose(WindowCloseEvent CloseEvent, Base ExtraObject)
Parameters
CloseEvent
WindowCloseEvent object associated with the event
ExtraObject
Optional object sent along from when it was registered
Return Value
NONE
Description
This abstract method is the event handler for WindowCloseEvent within the IDialog interface class. The method which overrides it is invoked for WindowCloseEvent within a Dialog object when the interface object is registered with the Dialog.AddWindowCloseHandler() method.
IDialog Class
public method abstract OnWindowCancel(WindowCancelEvent CancelEvent, Base ExtraObject)
Parameters
CancelEvent
WindowCancelEvent object associated with the event
ExtraObject
Optional object sent along from when it was registered
Return Value
NONE
Description
This abstract method is the event handler for WindowCancelEvent within the IDialog interface class. The method which overrides it is invoked for WindowCancelEvent within a Dialog object when the interface object is registered with the Dialog.AddWindowCancelHandler() method.
IDialog Class