ViewKit ObjectPak Vk Classes

ViewKit ObjectPak classes are added to the Palette when you select ViewKit as the current language. Initially, ViewKit ObjectPak classes are grouped in the following folders:

· Dialogs

VkGenericDialog, VkFileSelectionDialog, VkPromptDialog,
VkQuestionDialog, VkInfoDialog, VkWarningDialog, VkErrorDialog, VkFatalErrorDialog, VkProgressDialog, VkBusyDialog, 
and VkInterruptDialog.

· Menus

Menu Bar, Sub Menu, Option Menu, Popup Menu, Radio Sub Menu, Help Pane, Menu Action, Menu Confirm First Action, Menu Undo Manager, Menu Toggle, Menu Label, and Menu Separator.

· Components

VkSimpleWindow, VkWindow, VkTabbedDeck, VkTabPanel, VkRepeatButton, VkOutline, VkCompletionField, VkGraph, VkPie,
VkVuMeter, and VkTickMarks.

The following sections provide descriptions of each ViewKit ObjectPak class in alphabetical order (refer to the ICS ViewKit ObjectPak Programmer's Guide for more detailed information):

Busy Dialog

 

Description

The VkBusyDialog class supports a busy dialog (also called a working dialog in OSF/Motif) that is displayed when the application is busy. Used by the VkApp object to display a busy dialog when you place the application in a busy state.

Notes

· By default, does not display any buttons because the busy dialog is intended to lock out user input during a busy state.

· Does not provide any additional functions other than those offered by the VkDialogManager.

Completion Field

 

Description

The VkCompletionField class provides a text input field component that supports name expansion. While typing in the field, if the user types a space, then the component attempts to complete the current contents of the field based on a list of possible expansions provided by the application.

Notes

Derived from VkComponent.

Error Dialog

 

Description

The VkErrorDialog class supports standard OSF/Motif error dialogs. Use to inform the user of an invalid action (such as entering out-of-range data) or potentially dangerous conditions (such as the inability to create a backup file).

Notes

· Messages required in the error dialogs should not require any decision by the user.

· Does not provide any additional functions other than those offered by the VkDialogManager

Fatal Error Dialog

 

Description

The VkFatalErrorDialog class supports an error dialog that terminates the application when the user dismisses it. Use for those errors from which your program cannot recover, such as when an application terminates because it cannot open a necessary data file.

Notes

· Messages required in the error dialogs should not require any decision by the user.

· Does not provide any additional functions other than those offered by the VkDialogManager

Generic Dialog

 

Description

The VkGenericDialog class provides a convenient interface for creating custom dialogs that use the ObjectPak interface. Custom dialogs that you derive from this class automatically support caching and all other features supported by VkDialogManager. Creating an instance of this class automatically creates a subclass of VkGenericDialog.

Notes

· An abstract subclass of VkDialogManager.

· You can post and manipulate your custom dialogs using the functions provided by VkDialogManager.

· By default, ObjectPak dismisses your dialog when the user clicks on either the OK or Cancel button and continues to post the dialog when the user clicks on Apply.

Graph

 

Description

The VkGraph class displays and manipulates complex arc-and-node graphs. The graph can be disconnected and contain cycles.

Notes

· Can arrange the nodes horizontally or vertically.

· Can change the orientation interactively.

· Provides controls for interactive zooming, node repositioning, and node alignment.

Help Pane

 

Description

The VkHelpPanel class provides a simple user interface to a help system. A subclass of VkSubMenu, automatically provides five standard menu items. You must link an external help system to your application to use Help Pane.

Notes

· You can create a VkHelpPane object and add it to another menu.

· You can use the functions provided by VkSubMenu to add custom Help menu items and delete predefined Help menu items.

Info Dialog

 

Description

The VkInfoDialog class supports standard OSF/Motif information dialogs. Use to display useful information, except error messages.

Notes

· Messages required in the error dialogs should not require any decision by the user.

· Does not provide any additional functions other than those offered by the VkDialogManager.

Interrupt Dialog

 

Description

The VkInterruptDialog class supports an interruptible busy dialog that you can substitute for the normal busy dialog. Posts a dialog that includes a Cancel button that the user can click on to cancel the current action.

Notes

· You are responsible for cleanup operations required by your application if the user interrupts a process before it is finished.

· Do not directly post and unpost the interruptible busy dialog.

Menu Action

 

Description

The VkMenuAction class provides a selectable menu item that performs an action. Implemented as a PushButtonGadget. Associated with a callback function that performs an operation and, optionally, a callback function that undoes the operation.

Notes

Provides public functions in addition to those implemented by VkMenuItem.

Menu Bar

 

Description

The VkMenuBar class provides a menu bar designed to work with VkWindow and some member functions for installing a VkMenuBar object as a menu bar.

Notes

Supports all functions provided by VkMenu class.

Menu Confirm First Action

 

Description

The VkMenuConfirmFirstAction class provides a selectable menu item that performs an action. When the user selects this menu item type, the application posts a question dialog requesting confirmation. Performs the action only when user confirmed.

Notes

· Derived from VkMenuAction.

· Intended for irrecoverable actions, such as deleting a file.

· Does not support undo callback functions.

Menu Label

 

Description

The VkMenuLabel class provides a non-selectable label as a menu item. Implemented as a LabelGadget.

Notes

Does not provide any public functions other than those implemented by VkMenuItem.

Menu Separator

 

Description

The VkMenuSeparator class provides a non-selectable separator as a menu item, and is implemented as a SeparatorGadget.

Notes

Does not provide any public functions other than those implemented by VkMenuItem.

Menu Toggle

 

Description

The VkMenuToggle class provides a two-state toggle as a menu item. Exhibits simple checkbox behavior unless you add a group of toggles to a VkRadioSubMenu object to enforce radio behavior.

Notes

· Derived from VkMenuAction.

· Provides functions for setting and retrieving the toggle state in addition to the public functions provided by VkMenuItem.

Menu Undo Manager

 

Description

The VkMenuUndoManager class provides an easy method for users to undo commands that they issue to you application. You add a single menu item to one of your application's menus to create a user interface to Undo Manager. You can use the undo manager to support undoing any command, whether the user issues the command with a menu or with other interface methods.

Notes

· By default, provides multi-level undo support.

· Keeps commands on a stack.

· Must exist in an application if undoCallback is set on any menu item.

Option Menu

 

Description

The VkOptionMenu class supports option menus that can be used anywhere in your interface.

Notes

Automatically visible when created.

Outline

 

Description

The VkOutline class displays a textual outline and automatically indents items according to their depth in the outline.

Notes

· Derived from VkComponent.

· If space is insufficient to display the entire outline, automatically displays a scrollbar.

· Displays control icon to the left of each outline item that contains sub-items.

Pie

 

Description

The VkPie class displays data as a pie chart.

Notes

· Derived from VkMeter.

· Can be fixed size or attempt to resize itself dynamically as it requires more or less room to display the items it contains.

Popup Menu

 

Description

The VkPopupMenu class supports popup menus that you can attach to one or more widgets in your application. Will pop up automatically when the user clicks on any of those widgets with the right mouse button.

Notes

· Has four different constructors.

· Can also pop up the menu programmatically if you have not attached the popup menu to a widget.

Progress Dialog

 

Description

The VkProgressDialog class displays a progress meter with a percent complete scale.

Notes

Derived from VkDialogManager.

Prompt Dialog

 

Description

The VkPromptDialg class supports standard OSF/Motif prompt dialogs that allow the user to enter a text string. Use when you must prompt the user to enter a single piece of information.

Notes

By default, displays only the OK and Cancel buttons. Displays the Apply button only when you provide a callback for that button.

Question Dialog

 

Description

The VkQuestionDialog class supports standard OSF/Motif question dialogs that allow the user to select among simple choices by clicking on push buttons.

Notes

· By default, displays only the OK and Cancel buttons. Displays the Apply button only when you provide a callback for that button.

· Does note provide any additional functions other than those offered by VkDialogManager.

Radio Sub Menu

 

Description

The VkRadioSubMenu class supports pull-down menu panes, and intended to support one-of-many collections of VkToggleItem objects. Use as menu panes within a menu bar, or as cascading, pull-right menu in a popup or other pull-down menu.

Notes

· Derived from VkSubMenu.

· Can add to any VkMenuBar, VkPopupMenu, or VkSubMenu by calling their addRadioSubmenu() member functions.

Repeat Button

 

Description

The VkRepeatButton class provides an auto-repeating push button. Activates when the user clicks on the push button, and begins repeating at a given interval. Deactivates when the user releases the push button.

Notes

· Constructor takes three arguments.

· Derived from VkComponent.

Simple Window

 

Description

The VkSimpleWindow class supports a top-level window that does not include a menu bar along the top of the window and creates a popup shell as a child of the invisible shell created by your application's instance of VkApp. Also creates an XmMainWindow widget as a child of the popup shell. Sets up various properties on the shell window and provides simple hooks for window manager interactions.Registers its windows with the application's VkApp instances to support application-wide services (for example, setting the cursor for all application windows).

Notes

All top-level windows in a ViewKit application must be instances of VkSimpleWindow, VkWindow, or a subclass of one of these classes.

 

Note: The Make Class dialog is automatically displayed when you click on Simple Window from the Palette.

Sub Menu

 

Description

The VkSubMenu class supports pull-down menu panes that can be used within a menu bar, or as a cascading, pull-right menu in a popup or other pull-down menu. You can add a sub menu to any type of menu by calling the menu's addSubmenu() member function.

Notes

· Typically does not require instantiation.

· Provides additional public member functions.

Tabbed Deck

 

Description

The VkTabbedDeck class is a manager class that displays only one child at a time. Each child has an associated tab. Selecting a tab displays the associated child. Set the Generate VkTabbedDeck Source Code toggle on the Classes tab of the ViewKit Generation Preferences panel (Browser:Options:Code Generation Preferences) to cause Builder Xcessory to generate this code. See Toggle options for more detailed information.

Notes

· This class was added to ViewKit as of version 1.3.

· Build Xcessory provides source code to this class for users of ViewKit prior to version 1.3.

Tab Panel

 

Description

The VkTabPanel class displays a row or column of overlaid tabs horizontally. The tab can contain text, a pixmap, or both. Allows the user to click on a tab with the left mouse button to select the tab.

Notes

· Derived from VkComponent.

· One tab is always selected and appears above the others.

· You can register callback functions to perform actions based on the tabs selected.

Tick Marks

 

Description

The VkTickMarks class displays a vertical set of tick marks. Most frequently used next to a vertical Motif XmScale(3) widget. By default, right-justifies its tick marks and displays its labels to the left.

Notes

· Derived from VkComponent.

· Can be configured to left-justify its tick marks and display its labels to the right.

VuMeter

 

Description

The VkVuMeter class is a component for displaying a segmented meter and presents a vertical set of segments as a meter display.

Notes

· Value ranges from 0 to 110, with 0 showing the most segments and 110 showing the least.

· Can have a fixed size or attempt to resize itself dynamically.

Window

 

Description

The VkWindow class supports a top-level window that includes a menu bar along the top of the window and creates a popup shell as a child of the invisible shell created by your application's instance of VkApp. Also creates an XmMainWindow widget as a child of the popup shell. Sets up various properties on the shell window and provides simple hooks for window manager interactions. Registers its windows with the application's VkApp instances to support application-wide services (for example, setting the cursor for all application windows).

Notes

· Derived from VkSimpleWindow.

· All top-level windows in a ViewKit application must be instances of VkSimpleWindow, VkWindow, or a subclass of one of these classes.

 

Note: The Make Class dialog is automatically displayed when you click on Window from the Palette.

· The subclass created in Builder Xcessory includes several common menu entries in the menu bar, which you can delete or change as necessary.

Warning Dialog

 

Description

The VkWarningDialog supports standard OSF/Motif warning dialogs. Use to warn the user of the consequences of an action, such as warning the user that an action will irretrievably delete information.

Notes

· By default, the dialogs contain only an OK button.

· Does not provide any addition functions other than those offered by the VkDialogManager.

 

Documentation: