ViewKit ObjectPak Dialog Class

ObjectPak encapsulates dialog management, including caching, in the abstract VkDialogManager class that serves as a base class for other, specific dialog classes. Each type of dialog in ViewKit ObjectPak has a separate class derived from VkDialogManager. Each class is responsible for managing its own type of dialog (for example, each class maintains its own dialog cache).

The dialog classes provided by ObjectPak fall into the following three categories:

  • Information and error dialogs
  • Busy dialogs
  • Data input dialogs

Information and error dialogs

The information and error dialogs provide feedback to the user about actions or conditions in the application. The following table describes the dialog classes in this category:



Dialog Class



Displays information.


Warns the user about the consequences of an action (for example, that an action will irretrievably delete items).


Informs the user of an invalid action (such as entering out-of-range data) or a potentially dangerous condition (for example, the inability to create a backup file).


Informs the user of a fatal error; the application terminates when the user acknowledges the dialog.



Busy dialogs

The busy dialogs inform the user that an action is underway which might take considerable time. While a busy dialog is displayed, the user cannot interact with the application. The following table describes the dialog classes in this category:



Dialog Class



Busy or working dialog displayed while the application is busy.


Busy or working dialog that allows the user to interrupt the action.



Data input dialogs

The data input dialogs allow the application to request input from the user. The following table describes the dialog classes in this category:



Dialog Class



Allows the user to select among simple choices by clicking on pushbuttons


Prompts the user to enter a text string


Allows the user to interactively browse and select a file or directory


Supports preference dialogs capable of displaying a wide variety of program-configurable controls that allow the user to observe and set program values.



Additionally, ViewKit ObjectPak provides the VkGenericDialog class, an abstract class providing a convenient interface for creating custom dialogs that use the ObjectPak interface.

Do not directly instantiate dialog manager objects in your program for the predefined dialog types. ObjectPak automatically creates an instance of an appropriate dialog manager if you attempt to use a predefined dialog type in your program.

The header file for each dialog class provides a global pointer to the instance of that class's dialog manager. The name of the pointer consists of "the" followed by the dialog type. For example, the global pointer to the information dialog manager declared in <Vk/VkInfoDialog.h> is theInfoDialog, the global pointer to the error dialog manager declared in <Vk/VkErrorDialog.h> is theErrorDialog, and so forth. To access the dialog managers in your application, use these global pointers.1

Note: VkGenericDialog, being an abstract class designed for creating customized dialogs, does not automatically create a dialog manager or provide a global pointer.