ViewKit ObjectPak 1.3 Release Notes


Integrated Computer Solutions Incorporated

Copyright © 1996 Integrated Computer Solutions, Inc.

The ViewKit ObjectPak 1.3 Release NotesTM is copyrighted by Integrated Computer Solutions, Inc., with all rights reserved. No part of this book may be reproduced, transcribed, stored in a retrieval system, or transmitted in any form or by any means electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Integrated Computer Solutions, Inc.

Integrated Computer Solutions, Inc.

201 Broadway, Cambridge, MA 02139

Tel: 617.621.0060

Fax: 617.621.9555




Builder Xcessory, BX, BX/Ada, Builder Xcessory PRO, BX PRO, BX/Win Software Development Kit, BX/Win SDK, Database Xcessory, DX, DatabasePak, DBPak, EnhancementPak, EPak, ViewKit ObjectPak, VKit, and ICS Motif are trademarks of Integrated Computer Solutions, Inc.

All other trademarks are properties of their respective owners.

First printing

December 1996

Documentation Type: 

Additional Information Sources

The following sections describe sources for additional information on ViewKit.

Object-Oriented Programming with C++ and OSF/Motif

"Object-Oriented Programming with C++ and OSF/Motif" by Douglas Young. 2nd Edition, 1995 Prentice Hall, ISBN: 0-13-209255-7. Describes the method which ViewKit employs to use Motif and C++ together effectively. Part 1 introduces the mechanics of the process, and Part 2 covers the philosophy of components and frameworks. This philosophy is the basis of ViewKit ObjectPak, which was originally developed by Mr. Young and others at Silicon Graphics, Inc.

ICS and SGI staff are active on the list, but the intent of the list is to allow customers to contact each other, providing different perspectives and viewpoints. This list is intended to complement Technical Support.

If you have any questions relating to the ViewKit product, send mail to

ICS Website

ICS's website provides information on products as well as product updates, tips and techniques. Also available from our site are diagrams of the ViewKit ObjectPak class hierarchy.

Component Documentation

A number of Components are not documented in the printed "ViewKit Programmer's Guide". The manual pages for these components are included on-line with the other ViewKit component manual pages.

Enhancements in Version 1.3



Fallback resources

VkApp has a new static method, setFallbacks() that you can use to set the fallback resources for an application. The fallback resources provided to the method are passed to XtAppSetFallbackResources() during initialization in the VkApp constructor.

Event handling

VkApp::run() now allows the application more control over how the X event loop is handled.

Application Exit

VkApp::quitYourself() now uses the new resource "quitMode" to determine its action after calling okToQuit() on each window. In the past, and by default, the application quits if any of the windows returns TRUE. Now, if "quitMode" is set to "all", the application quits only if all windows agree to exit.


Default resources

VkComponent::setDefaultResources() now supports an extended syntax (a prepended `+' or `-') that further qualifies the resource string entered in the resource database. This is useful for overriding such things as SGI's resource schemes.

VkSimpleWindow and VkWindow

Get Window method

The getWindow(VkComponent *) method has been added to both the VkSimpleWindow and VkWindow classes. The method returns the VkSimpleWindow/VkWindow (or subclass) object that contains the given VkComponent.

Get Menu method

The getMenu(VkComponent *) method has been added to the VkWindow class. It returns the VkMenuBar object used by the window that contains the given VkComponent.


3-D Look

VkTabPanel now provides a 3-D appearance for the tabs. The 3-D appearance is controlled by the new resource "use3DTabs".

Color management for tab pixmaps

Two new methods, getSelectedTabBg() and getUnselectedTabBg() can be used by applications that construct pixmaps for tab labels to retrieve the appropriate background colors for the pixmaps.

ViewKit Menus

Default client data on menu bars

The VkMenu::setMenuBar() method has been overloaded to allow the setting of default client data.

Menu item label

VkMenuItem::getLabel() has been added for symmetry with the existing VkMenuItem::setLabel().


Separators in menus can now have names to allow manipulation like other menu items.

Menu bar help pane

VkMenuBar::showHelpPane() is a new method that allows programmatic control over the visibility of the VkHelpPane.

XPM Library

The XPM library has been upgraded to version 3.4.

IRIS ViewKit(tm) Compatibility


ICS ViewKit ObjectPak is based on IRIS ViewKit from Silicon Graphics, Incorporated. Applications written for IRIS ViewKit can be built with ViewKit ObjectPak with these few restrictions:

  • The VkNLS class is not supported in ICS ViewKit ObjectPak
  • The VkMsg... classes are not supported on all platforms since ToolTalk is not available on all platforms.

New in Version 1.3



All known ViewKit-induced memory leaks and allocation problems have been fixed using PurifyTM.

Cut, Copy, Paste, and Drag and Drop

VkCutPaste provides you with a simple and consistent API for implementing cut, copy, and paste as well as Motif drag and drop in your applications.

Window Manager Configuration

VkConfigureWM() is a new function that allows you to control the window manager options by setting the window manager hints on a VkSimpleWindow (or subclass).

New Components

VkProgressDialog is a new class for displaying the approximate amount of a task completed.

VkTabbedDeck combines the VkTabPanel and VkDeck classes to easily create a collection of components with the appearance of a set of tabbed cards.

VkRunOnce2 is a new class that adds several new methods to VkRunOnce and does error checking not performed by VkRunOnce.

Status Line and Balloon Help (experimental)

QuickHelp provides a status line at the bottom of the window and/or popup balloon help for individual components. You can easily control and configure QuickHelp through the X resource database.

The interface to QuickHelp is experimental. See the QuickHelp example for usage (located in the <$INSTALLTREE>/examples/QuickHelp directory).

Platform-Specific Notes



The xlC compiler automatically adds extern "C" statements around any include file found in the /usr/include/... directory hierarchy. When you install ViewKit ObjectPak on an AIX system, no links for the ViewKit header files will be made in /usr/include. If you are not using imake to construct your makefiles, you must add an include directive for the ViewKit header files on your compile line.


On HP-UX systems, ICS provides two versions of the ViewKit ObjectPak libraries -- one with exception handling enabled (compiled with +eh) and one without exception handling enabled.

The HP C++ compiler does not support mixing object files compiled with exception handling enabled with object files compiled without exception handling enabled. You must choose which version of the libraries you plan to use at installation time.


On SunOS 4 and Solaris 2 platforms, ICS provides libraries for versions 2.0 (cfront-based) and 3.0/4.0 (native) of the SunSoft C++ compiler as well as version 2.7.2 of the GNU C++ compiler (g++). You must select the variant of the library you want when it is installed. Using a compiler version which does not match the libraries will result in link errors regarding undefined symbols.

Platforms without ToolTalk

On all platforms which do not support the ToolTalk messaging service, the ToolTalk messaging classes are not currently supported or provided. The ToolTalk classes are currently provided on the following systems:

AIX 4.1+, DEC UNIX 4.0+, HP-UX 10.10+, Solaris 2.4+, and SunOS 4.1+

System Requirements



ViewKit ObjectPak, 
Motif, and X Toolkit Intrinsics

ViewKit ObjectPak requires a Motif 1.2 development system. Typically, a Motif 1.2 development system includes Motif 1.2 libraries and include files and X11 Release 5 libraries and include files. Some vendors may supply a Motif 1.2 development system with the X11 Release 6 libraries. Both of these combinations are compatible with the ViewKit ObjectPak libraries. You must already have an X and Motif distribution installed on your system in order to use ViewKit ObjectPak.


Supported compilers

C++ compiler technology has not yet achieved the industry-wide compatibility found in today's C compilers. Because of this, C++ binary objects are not portable. The following table lists currently supported compilers. ICS will expand our support to additional compilers in subsequent releases of ViewKit.


Vendor Hardware OS Supported Compilers
Sun  SPARC SunOS 4.1+ Solaris 2.4+  SunSoft C++ 2.0+,3.0+,4.0+ GNU g++ 2.7.2 
HP  PA-RISC  HP-UX 9.0+  HP C++ A.03.50+ 
HP-UX 10.10+  HP C++ A.10.09+ 
IBM  RS/6000 PowerPC AIX 4.1+  xlC, CSet++ 3.0+ 
DEC  Alpha/AXP Digital UNIX 3.2  DEC C++ 5.1+ 
Digital UNIX 4.0  DEC C++ 5.3+ 


Compilers from the same vendor which the vendor supports as backward compatible are supported by ICS. Compilers from vendors other than those listed in the table might work, but cannot be supported by ICS.

Source is available for customers wishing to use ViewKit on additional platforms or with additional compilers.


ViewKit 1.3 Table of Contents


ViewKit Example Applications


The following sections describe how to build the ViewKit ObjectPak application examples.

Copying the Example Code Source Tree

Before you build the examples you will want to copy the source tree into a location that is writable by you. For example, to build the examples in /usr/src/viewkit:

% cd <$INSTALLTREE>/examples
% tar cf - . | (cd /usr/src/viewkit; tar xvf -)

where <$INSTALLTREE> is the directory where you installed ViewKit ObjectPak.

Building the Examples

All examples may be built using the imake tool or by modifying and using the supplied Makefile.noimake.

Using Imake

Note: You must install imake support for ViewKit ObjectPak to use imake.

Using Imake

To use Imake, perform the following steps:

  1. Change to the directory that contains your copy of the examples source code tree:
    % cd examples

  2. Use xmkmf to create the top-level Makefile:
    % xmkmf

    If you don't have an xmkmf command, use the imake command directly:

    % imake -DUseInstalled -DUseInstalledMotif 

    Note: Here, ${X11} is the directory where the X configuration files are stored. The config sub-directory holds the imake configuration files.

  3. Build the remaining Makefiles.
    % make Makefiles

  4. Build the examples tree:
    % make

    or, if you do not want to build all of the demos, you may build the subdirectories individually. For example, to build the PhoneBook example, enter:

    % cd Applications/PhoneBook
    % make

Imakefiles and Makefiles

Included with the examples are a set of Imakefiles that enable you to create Makefiles customized to your system. These files are provided for your convenience. You may need to modify several flags in the Makefiles, Imakefiles, or imake configuration files in order to build the demos correctly on your system. For further information on Imakefiles, refer to the X11R5 man pages on imake.

Using Makefile.noimake

If you did not install the ViewKit ObjectPak imake configuration files, or if your system does not have imake fully configured, you may want to use the Makefile.noimake files supplied in each of the example subdirectories. These Makefiles will need to be customized for your build environment before building any of the examples.

Customizing Makefiles

To customize the Makefiles, perform the following steps:

  1. Go to the directory which contains the example you want to build, for example, the PhoneBook demo application.
    cd examples/Applications/PhoneBook

  2. Copy Makefile.noimake to Makefile.
    % cp Makefile.noimake Makefile

  3. Edit Makefile by changing the definitions for the following:
    • Set CXX to your C++ compiler command.
    • Set VKTOP to the directory into which you installed ViewKit ObjectPak.

LOCAL_LIBRARIES contains the libraries to link the application against. You might require additional libraries depending on your platform. CXXEXTRA_INCLUDES contains any include directives required to build the application. By default, it contains only a directive for the ViewKit include files. Your platform might need additional include directives.

  1. Build the example:
    % make

ViewKit ObjectPak Binary Distribution


Once installed, the full ViewKit ObjectPak distribution consists of the directories and files shown in the following figure:


Figure 1. ViewKit ObjectPak Directories and Files


The form required for submitting bug reports on ViewKit ObjectPak.

config directory

Contains imake templates and rules files for use when constructing Imakefiles for ViewKit ObjectPak applications.

examples directory

Contains numerous sub-directories holding examples of various features of ViewKit ObjectPak as well as code examples from the ViewKit ObjectPak Programmer's Guide.

include directory

Contains the ViewKit ObjectPak header files.

lib directory

Contains the ViewKit ObjectPak libraries.

man directory

Contains the files man3, cat.VK, or man3.Z which are the man pages for the ViewKit ObjectPak classes and utility functions.

Note: Refer to the BX PRO 2.1 Installation Notes for complete instructions about loading ViewKit ObjectPak software onto your development system.