![]() | InDesign SDK 20.5 |
#include <IDialog.h>

Public Types | |
| enum | { kDefaultIID = IID_IDIALOG } |
| enum | DialogType { kModal = 0, kMovableModal, kModeless } |
| enum | DialogPosition { kNoPosition = 0, kAutoCenter, kCenterNearTop, kRememberPosition } |
| enum | DialogFocus { kNoAutoFocus = 0, kFirstTextBox } |
Public Member Functions | |
| virtual void | SetDialogType (DialogType dialogType)=0 |
| virtual DialogType | GetDialogType () const =0 |
| virtual void | Open (IControlView *ownerPanel=nil, bool16 doWait=kTrue)=0 |
| virtual void | OpenWithModalCursorType (int16 modalCursorType, IControlView *ownerPanel=nil)=0 |
| virtual void | Close ()=0 |
| virtual void | WaitForDialog (bool16 bSupressScheduled=kFalse)=0 |
| virtual bool16 | GetBufferCommands () const =0 |
| virtual void | SetBufferCommands (bool16 bufferCommands)=0 |
| virtual void | SetDialogPositioningAlgorithm (DialogPosition dialogPosition)=0 |
| virtual DialogPosition | GetDialogPositioningAlgorithm () const =0 |
| virtual void | SetDialogFocusingAlgorithm (DialogFocus dialogFocus)=0 |
| virtual DialogFocus | GetDialogFocusAlgorithm () const =0 |
| virtual bool16 | IsOpen () const =0 |
| virtual bool16 | HasPreviewButton () const =0 |
| virtual IControlView * | GetDialogPanel () const =0 |
| virtual WidgetID | SetDefaultButton (const WidgetID buttonID)=0 |
| virtual WidgetID | GetDefaultButton () const =0 |
| virtual void | PressDefaultButton ()=0 |
| virtual void | CleanUpBeforeClose ()=0 |
| virtual void | CleanUpAfterClose ()=0 |
| virtual void | SetDialogPanelID (const WidgetID panelID)=0 |
| virtual void | DialogCancelled ()=0 |
| virtual void | SetDeleteOnClose (bool16 deleteOnClose)=0 |
| virtual bool16 | GetDeleteOnClose () const =0 |
| virtual void | PostDelayedWaitForDialog () const =0 |
| virtual void | AddResizingGripperIcon ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Main interface for dialogs. This interface is usually on the same boss as the dialog window, which is a parent of the dialog controller boss.
| enum IDialog::DialogFocus |
Dialog Item Focus kFirstTextBox is the default focusing algorithm. This means that when the dialog is opened, the first visible enabled textbox (if there is one) will get the keyboard focus. kNoAutoFocus tells the dialog not to grab the keyboard focus at all.
Dialog Position enums kNoPosition doesn't move the dialog at all on open. Client must specify position. kAutoCenter centers the dialog on the main monitor. Default for first time dialog comes up. kCenterNearTop centers the dialog near top of screen (1/4 of the way down). Use for progress bars. kRememberPosition is the default positioning algorithm if one is not specified before opening the dialog. If dialog has never been moved by user, or first time dialog opens, kAutoCenter logic is used.
| enum IDialog::DialogType |
Dialog Type
| pure virtual |
Adds the gripper icon at corners for resizable dialogs
| pure virtual |
Called after the dialog is closed. Custom dialog impls can do clean up in this method
| pure virtual |
Called before the dialog is closed. Custom dialog impls can do clean up in this method
| pure virtual |
Remove the dialog from the screen.
| pure virtual |
Called if the dialog was cancelled. Custom dialog impls can implement this to do cleanup.
| pure virtual |
Check if we should buffer commands for this dialog.
| pure virtual |
Check which widget a default action is assigned to
| pure virtual |
Returns the flag set by SetDeleteOnClose. By default, this function returns kFalse.
| pure virtual |
Check the current dialog keyfocus algorithm
| pure virtual |
Returns the main dialog panel installed in the dialog window. You can use the returned controlview to get to your dialog observer and controller.
| pure virtual |
Check the dialog positioning algorthim.
| pure virtual |
Get the type of the dialog
| pure virtual |
Returns true if the dialog has a preview button
| pure virtual |
Returns true if the dialog is currently open
| pure virtual |
Place the dialog on the screen. You can pass in the owner panel (i.e. the panel who opens the dialog). This will make the panel available in the dialog controller. OpenWithModalCursorType allows for non standard modal cursor behavior to be specified. Open by default now calls WaitForDialog(kFalse) i.e. not supressing the scheduled commands.
| ownerPanel | The panel which opened this dialog. |
| doWait | kFalse if you want to override the default wait behavior, and call WaitForDialog yourself. |
| pure virtual |
Place the dialog on the screen. OpenWithModalCursorType allows for non standard modal cursor behavior to be specified.
| modalCursorType | A constant indicating which modal cursor to use. |
| ownerPanel | The panel which opened this dialog. |
| pure virtual |
Press the default button, if any. If none, simply cancel and close the dialog.
| pure virtual |
This function helps in converting a panel into a modal dialog. Most of the controls in a panel have an observer that fires off a command when the control is actuated. When a panel is converted into a modal dialog, the developer would have to remove each of these observers and create a dialog observer that fires off a command when the user hits the dialog's ok button. In order to save the developer a lot of time, simply call this function BEFORE calling Open. The result will be that the dialog command manager will buffer all the commands fired off by the individual commands. If the user hits "ok", all the commands will be combined into a single compound command and executed.
| bufferCommands | Should we buffer commands for this dialog? |
Associate default action to push button. Usual values for actionButUsually called like so:
iDialog->SetDefaultButton(kMyCustomOKButtonWidgetID);
| buttonID | WidgetID of the newdefault button for the specified action |
| pure virtual |
If this is called with kTrue, the dialog is completely deleted out of saved data when the dialog is closed. This is used when creating the 2..nth copies of an open dialog. Rarely needed by client code.
| pure virtual |
You must call this function BEFORE calling Open() if you want to change the key focus algorithm used when we open the dialog window.
| pure virtual |
Internal use only
| pure virtual |
You must call this function BEFORE calling Open() if you want to change the window positioning algorithm used when we open the dialog window.
| pure virtual |
Set the type of the dialog. No effect if called after the dialog has been shown
| pure virtual |
WaitForDialog takes control of the event loop until the dialog is dismissed. In other words, once WaitForDialog is called, control will not be returned until the dialog is dismissed. This actually starts up another event loop. Use sparingly.
| bSuppressScheduled | Set to true to supress the processing of scheduled commands in the event loop, which in some cases could help supress processing and/or dialogs that have been scheduled but are unwanted while the current dialog is being displayed. |