Appendix A. RapidApp Reference

Reference

This appendix describes in the function of each window, menu, widget, and display in the RapidApp's graphical user interface (GUI). RapidApp consists of several palettes, each one containing several user interface elements. Each palette and its interface elements are described in detail in their own sections in this chapter:

Global Objects

This section describes RapidApp's global objects—the objects that are common across all palettes. These objects are the menu bar items, the dialogs, and the palette tabs (see Figure A-1).

Figure A-1. RapidApp Main Window


File Menu

Figure A-2. File Menu


The File menu (see Figure A-2) allows you to open and save RapidApp files. You can also quit RapidApp through the File menu. The File menu contains the following selections:

Open 

Displays the Open File dialog to allow you to open a file.

Import 

Displays the Open File dialog to allow you to import a file. RapidApp adds the contents of the file to the current interface.

New  

Clears the current interface in preparation for creating a new one. RapidApp gives you the option of retaining the current user-defined components.

Save 

Saves your current session to a file. If you haven't provided a filename previously, RapidApp uses the default filename save.uil.

Save As 

Displays the Save File dialog, which allows you to save your current session to a file with a filename of your choice.

Preferences 

Displays the RapidApp Preferences dialog which contains the following cards:

  • Project—allows you to specify application file and class names and various application characteristics.

  • RapidApp—allows you to set preferences controlling RapidApp operation.

  • Code Style—allows you to specify various options that affect code generation.

  • Merge Options—allows you to specify how RapidApp merges code in various files.

The cards are discussed in the “RapidApp Preferences Dialog” section.

Exit  

Exits RapidApp.

Edit Menu

Figure A-3. Edit Menu


The Edit menu (see Figure A-3) supports cut, copy, and paste operations, as well as commands for manipulating a selected interface element. The Edit menu contains the following selections:

Cut 

Cuts the currently selected element (and, if it's a container, all of its children) and places it on the clipboard.

Copy 

Copies the currently selected element (and, if it's a container, all of its children) to the clipboard.

Paste 

Pastes the element currently on the clipboard (and, if it's a container, all of its children) into your interface.

Delete 

Deletes the currently selected element (and, if it's a container, all of its children). This option doesn't place the element on the clipboard.

Up/Left 

In containers where the creation order of its child elements determines their position, moves the currently selected child one position up or left.

Down/Right 

In containers where the creation order of its child elements determines their position, moves the currently selected child one position down or right.

Select Parent 

Selects the parent of the currently selected element.

Natural Size 

Resize the currently selected element to its default size. Note that this option has no effect if the element is a child of a container that controls its size (for example, a Row Column widget).

Grow Widget 

Increases the horizontal and vertical size of the selected element by 20 pixels.

Show Menu 

If the currently selected element is a menu cascade button, displays or hides its corresponding menu pane.

View Menu

Figure A-4. View Menu


The View menu (see Figure A-4) controls the build/play mode selection as well as determining constraints for placing elements. The View menu contains the following selections:

Build Mode 

Enables build mode, the mode you must be in when creating a new application. Toggling on build mode toggles off the Play Mode toggle.

Play Mode 

Enables play mode, which allows you to run your application to check its functionality. Toggling on play mode toggles off the Build Mode toggle.

Color by Depth 


When toggled on, RapidApp displays nested containers in different colors to indicate their depth.

Figure A-5. Snap To Grid Toggles


Snap To Grid
 

Submenu (see Figure A-5) allows you to set your snap to grid value to one of five settings through a list of toggles: Off, 2, 5, 10, and 20.

Keep Parent 

Toggles explicit selection mode. When the toggle is on, RapidApp limits selection of new elements to those accepted by the currently selected element. Also, new elements that you create are added to the selected element instead of any other container on which you drop them.

Classes Menu

Figure A-6. Classes Menu


The Classes menu (see Figure A-6) allows you to create and edit user-defined components. The Classes menu contains the following selections:

Make Class 

Displays the Make Class dialog. This dialog allows you to convert the currently selected element and all of its children into a C++ class.

Edit Classes 

When this toggle is on, RapidApp hides your current interface and displays all user-defined components. You can then select, edit, and manipulate the individual elements composing the classes.

Install Class 

Displays the RapidApp Component Installer dialog for loading a user-defined component onto a RapidApp palette. See “Loading Components Into RapidApp” for more information.

Project Menu

Figure A-7. Project Menu


The Project menu (see Figure A-7) allows you to generate code, browse and edit files, build an application, run the program under a debugger, and so on. The Project menu contains the following selections:

Generate C++ 

Converts the application that you created with RapidApp into C++ code.

Edit File 

Displays the Edit File dialog, which allows you to open and edit a file.

View Changes 

Displays the Select File to Compare dialog, which allows you to select a file and compare it to the previously saved version. You can also use this option to manually merge changes.

Build Application 


Launches the Developer Magic Build Manager. If you are currently using the debugger, the executable is automatically detached from the debugger and reattached when the compilation is completed.

Browse Source 

Launches the Static Analyzer to analyze the structure of your application. To use this option, you first must create a static analysis fileset and database for your application.

Debug Application 


Launches the Developer Magic Debugger. If your application isn't up-to-date, RapidApp automatically invokes the Build Manager to update the executable.

Edit Installation 


Launches Software Packager, a graphical tool for creating and editing installable images.

Run Application 


Runs your application. If your application isn't up-to-date, RapidApp automatically invokes the Build Manager to update the executable.

RapidApp Preferences Dialog

The RapidApp Preferences Dialog provides several tabbed-cards that allow you to set options to determine how RapidApp behaves when working with your application. The following cards are included:

Project Card

The Project card (Figure A-8) controls various code generation options that affect the way an application behaves or is built. Most of these options do not take effect until the next time code is generated.

Figure A-8. The Project Card


The following options are available:

Directory Path (field at the top of the card) 


Enter the directory in which the application source are placed when generated. If the directory does not exist, RapidApp posts a question asking if it should be created.

Application name 


The name of the program to be created. Following X conventions, RapidApp automatically determines the application class from this setting by capitalizing the first letter of the application name.

Library name 

The name of a library. RapidApp generates a Makefile that creates libraries of all the classes you create.

VkApp subclass 


The name of a class. RapidApp creates a subclass of VkApp using the subclass name you specify for the application instead of directly instantiating a VkApp object. This allows you to modify the VkApp subclass to handle application-specific needs (for example, parsing command-line options).

Library headers 


The pathname, relative to /usr/include, where RapidApp installs the header files for your user-defined component library.

Desktop tag 

The name of a workspace tag to be used with the desktop.

Inst directory 

The name of the directory where RapidApp puts the inst-able images for your application.

Use RunOnce 

If set, the program uses the VkRunOnce facility, which ensures that only one instance of the application is running at any one time. See the VkRunOnce(3Vk) reference page for details.

Desktop directory 


The directory in which to place all desktop support files.

Message system 


If set to Tooltalk, the application supports basic ToolTalk™ communication using the ViewKit VkMsg facility.

Header directory 


The name of the directory where your header files are saved. Typically a subdirectory of your project directory.

License system 

If set to Net LS, RapidApp generates an application that includes the code to set up the application to use the NetLS™ license system. See the VkNLS(3Vk) reference pages for details.

If set to Flex LM, RapidApp generates an application that includes the code to set up the application to use the FlexLM™ license system. See the VkFLM(3VK) reference pages for details.

If set to None, RapidApp doesn't generate code to license the application.

RapidApp Card

The RapidApp card (Figure A-9) allows you to customize the behavior of RapidApp itself.

Figure A-9. The RapidApp Card


The following options are available:

Auto-dismiss start screen 


If set, the start screen disappears as soon as the program is ready to run without the need to manually dismiss it.

Show tips on startup 


If set, show a random tip on the start screen about how to use RapidApp.

Enable sound 

If set, RapidApp uses soundscheme to provide audio feedback for various operations. You can also disable sound from the desktop control panel on the Toolchest.

Use $WINEDITOR  


If set, “Edit File” on the Project menu launches the window-based editor indicated by the WINEDITOR environment variable. If unset, RapidApp launches the Developer Magic Source View editor.

Confirm before deleting shells 


If set, RapidApp posts a warning dialog if you attempt to dismiss a top-level user interface element using the Close option of the window manager menu.

Confirm before deleting containers 


If set, RapidApp posts a warning dialog whenever you delete a container, to avoid accidental deletions of elements that might be hard to reconstruct.

Save when generating code 


If set, RapidApp saves your interface automatically whenever you generate C++ code.

Warn about unnamed Classes 


If set, RapidApp posts a warning before creating any classes automatically. RapidApp forces elements such as windows and dialogs to be classes and generates a name if you haven't provided one by declaring the element as a class. The warning offers you a chance to abort the creation and specify your own name.

Generate Cvstatic Database 


If set, RapidApp automatically creates a static analysis database whenever you compile your application.

Automatically label controls 


If set, RapidApp generates a labelString automatically the first time you name a label or label subclass (e.g. a button), unless you've already provided a labelString. The algorithm is to capitalize the first letter of the name and split at any capital letters. For example, RapidApp computes the labelString for a button named openFile to be “Open File.”

Automatically add callbacks 


If set, RapidApp generates a callback function automatically the first time you name a label or a label subclass (e.g. a button), unless you've already provided a callback. The algorithm is to capitalize the first letter of the name and add “do” to activateCallbacks and “set” to valueChanged callbacks. For example, RapidApp computes the callback for a button named openFile to be “doOpenFile( ).”

Create window for standalone classes 


If True, any user interface element that is in a toplevel shell is treated as a child of a VkSimpleWindow. Setting this to False allows the creation of stand-alone classes that are not created as part of any top-level window.

Code Style Card

The Code Style card (Figure A-10) allows you to specify various options that affect code generation.

Figure A-10. The Code Style Card


The following options are available:

Use pure virtuals 


If set, RapidApp generates pure virtual functions in base classes.

Use VkEZ  

If set, the generated code includes the VkEZ headers and libraries.

Non-SGI target 


If set, RapidApp generates a Makefile that doesn't use the macros found in /usr/include/make. This provides a Makefile that you can use and modify to compile code for systems other than Silicon Graphics.

Place resources in classes 


When True, RapidApp places default resources for classes in class data structures rather than an application resource file. This allows you to encapsulate the resources with their corresponding classes when creating class libraries.

Strip dimensions from code 


Strip all width and height resources from code.

Split classes into UI/Derived 


If set, RapidApp splits created classes into a base and a derived class. This can be overridden on a per-class basis through the Make Classes dialog.

Force window children to be classes 


If set, windows, dialogs, and the VkTabbedDeck force their single child to be a class. This can be overridden on a per-object basis.

Use IRIS GL widget 


If set, the IRIS GL widget is used for the GLDrawing area container in place of OpenGL widget.

Add support for dynamic loading 


If set, RapidApp allows you to create components that can be loaded back onto the RapidApp palette as first class objects. To support this, RapidApp adds two simple functions to each class, to allow them to be dynamically loaded. This can be overridden on a per-class basis through the Make Classes dialog.

Header Comments 


A file name. The file is inserted at the top of each generated file. For example, this file can be used to supply a company standard header.

Source Suffix 

A suffix. The source suffix can be any valid suffix supported by the C++ compiler and Silicon Graphics standard Makefiles. The accepted file extensions are: .c, .C, .cxx, and .c++.

Header Suffix 

A suffix. The header suffix can be any valid suffix supported by the C++ compiler and Silicon Graphics standard Makefiles. The accepted file extension is .h.

Merge Options Card

The Merge Option card (Figure A-11) affects how RapidApp merges code in various files.

Figure A-11. The Merge Options Card


The following options are available:

Report backups 


If set, RapidApp posts a dialog detailing the files that changed after it made a backup or merged code.

Save backups 

If set, RapidApp creates backups when any changes are made to code.

Do block merge 


If set, RapidApp replaces all sections in the newly generated code that lie between editable code blocks with the code from the same section of the current file.

UI classes 

The base UI classes

Derived classes 


The classes derived from the UI classes

Makefile 

The Makefile used to compile your application

Aux files 

Auxiliary files such as the application resources file, the desktop icon, the FTR file, and the files used by Software Packager to generate an installable image.

For each type of file, you can specify one of three methods for handling code generation:

Merge 

RapidApp attempts to merge any changes you have made to the existing file with the new file that it is generating. The merge process is described below. Typically, this is the best choice if you have edited any of the files (for example, to add functional code).

Don't Merge 

RapidApp writes all the new files with a .rapidApp extension. You must then merge the files by hand. You might want to specify this method if you make complex changes to files (for example, creating a highly customized Makefile) and want to be certain that your changes are preserved.

Overwrite 

RapidApp simply overwrites the existing file with the newly generated file. In this case, RapidApp always backs up the old file to the project's .backup directory even if you have turned off the backup feature by toggling off the Save backup copies option in the Code Generation Options dialog. This is the fastest method of the three and is usually appropriate for the UI classes unless you have made changes to those files by hand.

RapidApp Component Importer Dialog

The RapidApp Component Importer dialog allows you to load a user-defined component from a library onto a RapidApp palette. To load a class, you must fill in the following dialog fields:

Class Name 

The name of the component to import

Library Path and Name 


The complete pathname of the library containing the component

Library to be Linked 


The link specification that you use to link with this library

Header File 

The header file for the component, specified relative to /usr/include

Other Required Headers 


Any other header files required to use the component, specified relative to /usr/include. If the component requires multiple header files, separate the file names with spaces or commas.

Palette 

The name of the palette on which this component should appear

Icon Name 


The name that should appear on the palette. For long names, you can use an underscore to separate words. RapidApp converts the underscore to a newline when displaying the component.

Desktop Icon Drop List 


It's possible to set various resources of an interface element or class by dragging items from the desktop onto the element or class. For example, you can set the labelPixmap resource of a button by dragging a pixmap file onto the button. You can set the fileName resource of a scene viewer by dragging an inventor file onto the scene viewer.

To give this capability to a user-defined component, provide a list of file types and the corresponding “resource.” The file type must be a name recognized by the SGI Indigo Magic desktop. The resource must be the name of a resource which corresponds to a method that accepts a filename. File types and resources are separated by colons, and pairs are separated by commas. For example:

TiffImageFile:setImageFile, XPMPixmapFile:setPixmap

Some components take advantage of this feature to make it easier to manipulate the component in RapidApp. For others, it's ignored. This feature does not affect programs built with the component.

If you want to install the component on your local system so that RapidApp can use it, click the Install Locally button. RapidApp saves the information in several files in your personal $HOME/.rapidappdir directory. RapidApp also saves the files in the current directory and updates the files used by Software Packager so that the installable image you create will contain the files as well. “Loading a Component Onto a RapidApp Palette” describes these files in more detail.

If you only want to save the component information to the current directory, but don't want to install the files in your personal $HOME/.rapidappdir directory, click the Save/Generate button.

Click the Quit button when you are finished specifying components to load.

See “Loading Components Into RapidApp” for more information on loading components into RapidApp.

Palette Tabs

You access the RapidApp palettes through the palette tabs (see Figure A-12) at the bottom of the RapidApp window. Click a tab to display the corresponding palette.

Figure A-12. Palette Tabs


Keys and Shortcuts

This section describes the accelerator keys available in RapidApp.

Shift+F1 

Displays context-sensitive help for the item you click.

Ctrl+O 

Opens a file.

Ctrl+I 

Imports a file.

Ctrl+N 

Starts a new project, deleting all current elements.

Ctrl+S 

Saves a file.

Ctrl+A 

Saves a file as a new name.

Ctrl+P 

Selects the parent of the currently selected element.

Shift+Ctrl+Left mouse 


Selects the parent of the currently selected element.

Click on selected menu 


Displays the menu pane.

Ctrl+G 

Increases the size of the currently selected element.

Ctrl+X 

Cuts the currently selected element and places it on the clipboard.

Ctrl+C 

Copies the currently selected element to the clipboard.

Ctrl+V 

Pastes the contents of the clipboard.

Delete 

Deletes the currently selected element without placing it on the clipboard.

Backspace 

Deletes the currently selected element without placing it on the clipboard.

Ctrl+U 

Repositions a widget inside a Row Column widget, moving it up, if the parent's orientation is vertical.

Ctrl+D 

Repositions a widget inside a Row Column widget, moving it down, if the parent's orientation is vertical.

Ctrl+K 

Toggles Keep Parent mode.

Arrow keys 

Moves an element in the corresponding direction.

Left mouse button 


Selects an element and moves it within the same container.

Middle mouse button 


Drags an object between containers.

Ctrl+Left mouse button 


Allows you to manipulate the currently selected element without accidentally selecting other elements.

Drag-and-drop from desktop 


Bitmaps, pixmaps, and various other files can be dragged from the Indigo Magic desktop directly onto various widgets to set the associated resource.

In a child of a Form, the following accelerators are enabled:

  • Right mouse button over an attachment icon pops up a menu of attachments

  • Shift-left mouse over an attachment icon adjusts the offset

  • Left mouse button over an offset drags the attachment to another location

Windows Palette

The Windows palette (see Figure A-13) contains window interface elements.

Figure A-13. Windows Palette


The user interface elements available through this palette are described in the following sections.

Simple Window

The VkSimpleWindow class implements a simple top-level window to be used by IRIS ViewKit applications. Use VkSimpleWindow when you don't want a menu bar.

VkSimpleWindow Resources

Following are the VkSimpleWindow resources:

autoRouteCallbacks 


If True, then for each menu item in the window's menu bar for which you've defined an activateCallback function, RapidApp adds a member function of the same name to the window's child component or generated class.

coprimaryWindow 


If True, this window is treated as a co-primary (secondary) window as defined by the SGI Style guide. The window is not be created by default on startup, and the application is responsible for creating and displaying it when it is needed.

disableIconify 

If True, the user's ability to iconify the window is disabled.

disableWindowResize 


If True, the user's ability to resize the window is disabled.

forceChildClass 


If True, this window's child is implemented as a C++ class.

hideTitleBar 

If True, do not display this window's title.

hideWMBorder 


If True, do not display this window's border. This option works when the title bar is also hidden.

showPopupHelp (version 6.2 only) 


If True, show popup help for items that set the popupMsgHelp resource.

title 

The title that appears in the window manager border.

VkWindow

The VkWindow class behaves similarly to VkSimpleWindow except that it provides additional support for a menu bar, based on the VkMenuBar class and related VkMenuItem classes.

Dialog Window

The Dialog Window provides a top-level dialog window for constructing custom dialogs that conform to the API provided by the VkDialogManager class. To create a dialog, add a single container, then populate that container with the interface of your choice. The container you place in the dialog window should represent a class, and is forced to be a class if you do not explicitly make it so. This class automatically contains the ok(), cancel(), and apply() member functions, which are called as needed when the user interacts with the dialog.

The actual buttons displayed by the dialog are determined dynamically as with all VkDialogManager subclasses.

Dialogs can be posted programmatically by calling post(), postBlocked(), postModal(), or postAndWait(). See the VkDialogManager(3Vk) reference page for more information.

The Dialog Window has the following resources:

allowMultipleDialogs 


If True, the dialog manager class can create multiple instances. If False, only one instance of this dialog can be created. Calling post() multiple times reuses the same dialog instance.

autoRouteCallbacks 


If this resource is set to True, then for each menu item in the window's menu bar for which you've defined an activateCallback function, RapidApp adds a member function of the same name to the window's child component or generated class.

forceChildClass 


If True, this window's child is implemented as a C++ class.

minimizeDialogs 


If True, the dialog manager class attempts to minimize the number of dialog instances created. This resource is similar to the allowMultipleDialogs resource except that, in some cases, it may create multiple instance,

File Dialog

The File Dialog provides a file selection dialog for you to customize by adding an optional menu bar and/or adding a single child element. RapidApp creates the dialog as a subclass of VkFileSelectionDialog, which is a subclass of VkDialogManager. See the VkFileSelectionDialog(3Vk) reference page for more information.

You can post the file selection dialog programmatically by calling post(), postBlocked(), postModal(), or postAndWait(). Each function accepts arguments for setting the dialog message, callback functions for each button on the dialog, and other parameters. The VkDialogManager class also offers functions for setting the dialog's title, setting the labels for its buttons, programmatically dismissing the dialog, and other actions. Consult the VkDialogManager(3Vk) reference page for more information on the functions provided by the VkDialogManager class.

Info Dialog

The Info Dialog provides an information dialog for you to customize by adding an optional menu bar and/or adding a single child element. RapidApp creates the dialog as a subclass of VkInfoDialog, which is a subclass of VkDialogManager. See the VkInfoDialog(3Vk) reference page for more information.

You can post the information dialog programmatically by calling post(), postBlocked(), postModal(), or postAndWait(). Each function accepts arguments for setting the dialog message, callback functions for each button on the dialog, and other parameters. The VkDialogManager class also offers functions for setting the dialog's title, setting the labels for its buttons, programmatically dismissing the dialog, and other actions. Consult the VkDialogManager(3Vk) reference page for more information on the functions provided by the VkDialogManager class.

Error Dialog

The Error Dialog provides an error dialog for you to customize by adding an optional menu bar and/or adding a single child element. RapidApp creates the dialog as a subclass of VkErrorDialog, which is a subclass of VkDialogManager. See the VkErrorDialog(3Vk) reference page for more information.

You can post the error dialog programmatically by calling post(), postBlocked(), postModal(), or postAndWait(). Each function accepts arguments for setting the dialog message, callback functions for each button on the dialog, and other parameters. The VkDialogManager class also offers functions for setting the dialog's title, setting the labels for its buttons, programmatically dismissing the dialog, and other actions. Consult the VkDialogManager(3Vk) reference page for more information on the functions provided by the VkDialogManager class.

Warning Dialog

The Warning Dialog provides a warning dialog for you to customize by adding an optional menu bar and/or adding a single child element. RapidApp creates the dialog as a subclass of VkWarningDialog, which is a subclass of VkDialogManager. See the VkWarningDialog(3Vk) reference page for more information.

You can post the warning dialog programmatically by calling post(), postBlocked(), postModal(), or postAndWait(). Each function accepts arguments for setting the dialog message, callback functions for each button on the dialog, and other parameters. The VkDialogManager class also offers functions for setting the dialog's title, setting the labels for its buttons, programmatically dismissing the dialog, and other actions. Consult the VkDialogManager(3Vk) reference page for more information on the functions provided by the VkDialogManager class.

Question Dialog

The Question Dialog provides a question dialog for you to customize by adding an optional menu bar and/or adding a single child element. RapidApp creates the dialog as a subclass of VkQuestionDialog, which is a subclass of VkDialogManager. See the VkQuestionDialog(3Vk) reference page for more information.

You can post the question dialog programmatically by calling post(), postBlocked(), postModal(), or postAndWait(). Each function accepts arguments for setting the dialog message, callback functions for each button on the dialog, and other parameters. The VkDialogManager class also offers functions for setting the dialog's title, setting the labels for its buttons, programmatically dismissing the dialog, and other actions. Consult the VkDialogManager(3Vk) reference page for more information on the functions provided by the VkDialogManager class.

Containers Palette

The Containers palette (see Figure A-14) includes container interface elements such as bulletin boards and radio button boxes.

Figure A-14. Containers Palette


The user interface elements available through this palette are described in the following sections.

Bulletin Board

The Bulletin Board is a container widget that has no layout algorithm. The location and size of each child is based solely on where and how the child is placed using RapidApp. Layouts based on the Bulletin Board cannot be resized and do not respond to changes to individual interface elements.

Bulletin Board layouts are not appropriate for programs that are customized or internationalized. This container is most suitable for beginners and for quick prototypes.

Bulletin Board Resources

Following are the Bulletin Board resources:

XmNmarginHeight 


Specifies the minimum spacing in pixels between the top or bottom edge of Bulletin Board and any child widget. You must be careful when positioning children using RapidApp, because the Bulletin Board enforces this margin only at creation time. The Bulletin Board allows you to use RapidApp to place children in the margin area interactively. However, when the children are initially created in the final program, the Bulletin Board moves the children out of the margin area when the child is initially created.

XmNmarginWidth 


Specifies the minimum spacing in pixels between the left or right edge of Bulletin Board and any child widget. The same restrictions apply as in the XmNmarginHeight resource.

Rubber Board

The Rubber Board container employs a novel layout algorithm that relies on you teaching the container how its children should be positioned, as well as how they should behave when the Rubber Board is resized. Using the Rubber Board requires the following simple steps, which must be performed exactly in sequence:

  1. Make the Rubber Board as small as it could ever reasonably be.

  2. Position all children as they would be positioned and sized for the current Rubber Board size.

  3. Select the Rubber Board and set the XmNsetInitial resource to True, to take a “snapshot” of the current layout.

  4. Resize the Rubber Board to its largest reasonable size.

  5. Lay out the children again and resize them as you would expect them to appear for the current Rubber Board size.

  6. Select the Rubber Board and set the XmNsetFinal resource to True.

From this point, the children will resize and reposition based on an interpolation of the two layouts you have provided.

Rubber Board Resources

Following are the resources supported by the Rubber Board container:

XmNsetFinal 

Switching this resource to True forces the container to record the final positions and sizes of all children.

XmNsetInitial 

Switching this resource to True forces the container to record the initial positions and sizes of all children.

Spring Box

The Spring Box is a container widget that arranges its children in a single row or column based on a set of spring resources associated with the child. The Spring Box allows layouts similar to those supported by the Form container, but is sometimes easier to set up and allows you to create some layouts that cannot be achieved with the Form container. For example, centering a column of interface elements is very easy to do with the Spring Box, but nearly impossible using the Form.

Each child of an Spring Box container has the following constraints associated with it:

  • Each child has a “springiness” in both the vertical and horizontal directions that determines how much the child may be resized in each direction. The XmNverticalSpring and XmNhorizontalSpring resources control the degree of “springiness” in each child. A value of zero means the child cannot be resized in that direction. For non-zero values, the values are compared to the values of other springs in the overall system to determine the proportional effects of any resizing. The default value of both resources is zero.

  • Each child also has a spring between its left, right, top, and bottom sides and whatever boundary it is adjacent to. The value of any spring resource can be altered inRapidApp's resource editor. Selecting any child displays its resources in the resource editor.

Several common default layouts can be created using the XmNdefaultVerticalLayout and XmNdefaultHorizontalLayout resources supported by the Spring Box. More complex layouts can be achieved by editing the constraint resources of the individual children.

Spring Box Resources

Following are the Spring Box resources:

XmNmarginHeight 


Specifies the minimum spacing in pixels between the top and bottom edges of the Spring Box and any child widget.

XmNmarginWidth 


Specifies the minimum spacing in pixels between the left or right edge of the Spring Box and any child widget.

XmNminSpacing 


Specifies the minimum spacing between the children of the Spring Box.

XmNorientation 


The XmNorientation resource determines whether the Spring Box is vertical or horizontal. If you change this resource after children have been added, you may have to reset individual spring values for the new layout. The existing resources retain their current values when orientation changes. No attempt is made to map existing settings to account for the new orientation.

XmNdefaultVerticalLayout, XmNdefaultHorizontalLayout 


These resources provide a convenient way to apply a collection of resource settings to all current children of a Spring Box. Each resource is independent and controls only the resources that apply vertically or horizontally. The meaning of these resources does not change with the XmNorientation resource. That is, vertical is always vertical. Possible layouts include:

  • XmCENTER: Centers all children in the middle of the Spring Box, with equal spacing on either side of the entire group of children.

  • XmSPAN: Stretches all children equally to fill the entire space of the Spring Box.

  • XmLEFT: Sets all children to their natural size and moves them to the left edge of the Spring Box. Applies only to XmNdefaultHorizontalLayout.

  • XmRIGHT: Sets all children to their natural size and moves them to the right edge of the Spring Box. Applies only to XmNdefaultHorizontalLayout.

  • XmTOP: Sets all children to their natural size and moves them to the top edge of the Spring Box. Applies only to XmNdefaultVerticalLayout.

  • XmBOTTOM: Sets all children to their natural size and moves them to the bottom edge of the Spring Box. Applies only to XmNdefaultVerticalLayout.

  • XmDISTRIBUTE: Sets all children to their natural size and distributes them evenly across any open space in the Spring Box.

  • XmSTRETCH_FIRST: Allows the first (left most or top most) child to stretch freely to fill any available space. All others are set to their natural size.

  • XmSTRETCH_LAST: Allows the last (right most or bottom most) child to stretch freely to fill any available space. All others are set to their natural size.

  • XmIGNORE: Ignores the default setting and uses the custom values of each individual widget's spring resources

Spring Box Constraint Resources

Following are constraint resources that are added to children of a Spring Box. These resources determine the stretchability of the space adjacent to the associated side of the widget. The larger the value, the more this space can be resized relative to other “springs” contained in the Spring Box.

XNleftSpring 

Sets the relative springiness of the space to the left of the widget.

XmNrightSpring 


Sets the relative springiness of the space to the right of the widget.

XmNtopSpring 

Sets the relative springiness of the space above the widget.

XmNbottomSpring 


Sets the relative springiness of the space below the widget.

XmNverticalSpring 


Sets the relative springiness of the widget in the vertical direction

XmNhorizontalSpring 


Sets the relative springiness of the widget in the horizontal direction

Form

The Form is a container widget that arranges its children based on constraint resources associated with each child. Resources supported by each child of the Form define attachments for each of the child's four sides. These attachments can be to the Form, another child widget or gadget, a relative position within the Form, or the initial position of the child. The attachments determine the layout behavior of the Form when resizing occurs.

Attachments are made in RapidApp directly on each child of a Form. Each Form child has small attachment handles on each of its four sides. These attachment handles support several operations:

Left mouse button 


You can click the left mouse button on an attachment handle and drag an attachment from the current widget to any other widget, including its parent (the Form). This indicates either an XmATTACH_WIDGET (see “Form Constraint Resources”) or XmATTACH_FORM value for the attachment.

Right mouse button  


Posts a menu that allows you to choose from the various attachment types for each side.

Shift+left mouse button 


Posts a menu that shows the current offset for an attachment. Moving the mouse while holding down <Shift>+left-button changes the offset.

Form Resources

The following resource affects the behavior of the Form container itself.

XmNfractionBase 


Specifies the denominator used in calculating the relative position of a child widget that uses an XmATTACH_POSITION attachment. The value must not be 0.

If the value of a child's attachment resource is XmATTACH_POSITION, the position of the corresponding side of the child is relative to the left (or top) side of the Form and is a fraction of the width (or height) of the Form. This fraction is the value of the child's position resource divided by the value of the Form's XmNfractionBase.

Form Constraint Resources

These resources are supported by all children of a Form container.

XmNbottomAttachment, XmNtopAttachment, XmNleftAttachment, XmNrightAttachment 


These resources specify the attachment of the bottom, top, left, or right side, respectively, of the child. Each resource can have the following values, which can be selected from a popup menu posted by pressing the right mouse button over the bottom attachment icon:

  • XmATTACH_NONE: Do not attach this side of the child.

  • XmATTACH_FORM: Attach this side of the child to the near side of its parent.

  • XmATTACH_OPPOSITE_FORM: Attach this side of the child to the far side of its parent. The corresponding offset resource also affects the final position of the child.

  • XmATTACH_WIDGET: Attach this side of the child to the near side of another widget. Normally, XmATTACH_WIDGET is specified by pressing the left mouse button over the attachment icon and dragging out the attachment to the desired widget. Once an attachment is made, the popup menu can be used to switch between XmATTACH_WIDGET and XmATTACH_OPPOSITE_WIDGET. The corresponding offset resource also affects the final position of the child.

  • XmATTACH_OPPOSITE_WIDGET: Attach this side of the child to the far side of another widget. The corresponding offset resource also affects the final position of the child.

  • XmATTACH_POSITION: Attach this side of the child to a position that is relative to the left (or top) side of the Form and in proportion to the width (or height) of the Form. The actual position is determined by the XmNbottomPosition, XmNtopPosition, XmNleftPosition, or XmNrightPosition resources in conjunction with the XmNfractionBase resource. The corresponding offset resource also affects the final position of the child.

XmNBottomOffset, XmNtopOffset, XmNleftOffset, XmNrightOffset 


Specifies the constant offset between the corresponding side of the child and the object to which it is attached. The relationship established remains, regardless of any resizing operations. RapidApp allows you to enter this value in the resource editor, alter the value by repositioning the child, or change the value by holding down the <Shift> key while pressing the left mouse button over an attachment icon and dragging the pointer. In the last case, the current offset value is displayed in a popup menu during the drag. In general, moving or resizing a child of a form in RapidApp corresponds to changing the value of one or more offsets, and only indirectly the position or size.

XmNtopPosition, XmNbottomPosition, XmNleftPosition, XmNrightPosition 


Determines the position of the corresponding side of the child when the corresponding attachment is set to XmATTACH_POSITION. In this case the position of the side of the child is relative to the left (or top) side of the Form and is a fraction of the height of the Form. This fraction is the value of the child's position resource divided by the value of the Form's XmNfractionBase. For example, if the child's XmNbottomPosition is 35, the Form's XmNfractionBase is 100, and the Form's height is 200, the position of the bottom side of the child is 70.

Paned and HPaned Windows

The Paned Window is a composite container that tiles its children vertically. Children are positioned top-to-bottom in the order in which they are created. The Paned Window grows to match the width of its widest child, and all other children are forced to this width. The height of the Paned Window is equal to the sum of the heights of all its children, the spacing between them, and the size of the top and bottom margins.

The HPaned Window is a Silicon Graphics extension to Motif that supports horizontal panes. This container is otherwise identical to Paned Window.

The user can also adjust the size of the panes using an optional sash positioned on the bottom of the pane that it controls.

The Paned Window presents an interaction problem when used in a tool such as RapidApp because it stretches its first child to cover the entire window, and you cannot drop additional interface elements directly on the Paned Window itself. There are several solutions to this issue:

Drop on a non-container child or class 


If any child of a Paned Window is a Control or a class (neither of which are children), you can drop a new child on one of these widgets. The drop falls through to the Paned Window. This suggests a work style for creating complex panes: create the collection of interface elements to be placed in each pane separately, define as a class, and add the Paned Window last.

Use Keep Parent Mode 


You can select RapidApp's Keep Parent mode from the View menu, which maintains the currently selected interface element as a parent regardless of where a new element might be dropped. In Keep Parent mode, select the Paned Window (using the Select Parent command if necessary) and then create new elements without changing the selected parent.

Drop on the Sash 


Once a Paned Window container has more than one child, you can drop new elements onto a Sash, the small control located between elements to add new panes.

Paned and HPaned Window Resources

The following is the Paned and HPanedWindow resource:

XmNseparatorOn 


Determines whether a separator is created between each of the panes. The default value is True.

Paned and HPaned Window Constraint Resources

The following are the resources supported by any child of a Paned Window:

XmNallowResize 


If this resource is set to True, the child can be resized. Otherwise, the size of the child is held constant.

XmNpaneMinimum 


The value of this resource specifies the minimum size of the child.

XmNpaneMaximum 


The value of this resource specifies the maximum size of the child.

Row Column

The Row Column is a general-purpose container capable of containing any widget type as a child. The type of layout enforced by the Row Column is controlled by how the application has set the various layout resources. It can be configured to lay out its children in either rows or columns. In addition, the application can specify that the children be laid out as follows:

  • the children are packed tightly together into either rows or columns

  • each child is placed in an identically sized box (producing a symmetrical look)

  • a specific layout (the current X and Y positions of the children control their location)

Row Column Resources

Following are the Row Column resources:

XmNadjustLast 


If XmNadjustLast is set to True, the last row of children is stretched to fill the Row Column to the bottom edge when XmNorientation is XmHORIZONTAL. The last column of children is extended to the right edge of Row Column when XmNorientation is XmVERTICAL.

XmNentryAlignment 


This resource controls the alignment type for children that are subclasses of XmLabel or XmLabelGadget when XmNisAligned is set to True. These are the possible alignment values:

  • XmALIGNMENT_BEGINNING

  • XmALIGNMENT_CENTER

  • XmALIGNMENT_END

XmNisAligned 

Specifies text alignment for each XmLabel (or subclass) child of a Row Column container. The XmNentryAlignment resource controls the type of textual alignment.

XmNnumColumns  


Specifies the number of rows or columns supported by the Row Column container. The resource controls the number of elements in the minor dimension; this resource is meaningful only when XmNpacking (described below) is set to XmPACK_COLUMN.

XmNorientation 


This resource determines whether Row Column layouts are row-major or column-major. In a column-major layout, the children of the Row Column are laid out in columns top to bottom within the widget. In a row-major layout the children of the Row Column are laid out in rows.

XmNpacking 

The value of this resource determines how the row column widget lays out its children. When a Row Column container packs the items it contains, it determines its major dimension using the value of the XmNorientation resource. These are the possible values:

  • XmPACK_TIGHT: indicates that given the current major dimension (for example, vertical if XmNorientation is XmVERTICAL), entries are placed one after the other until the Row Column container must wrap. The Row Column wraps when there is no room left for a complete child in that dimension. Wrapping occurs by beginning a new row or column in the next available space. Wrapping continues, as often as necessary, until all of the children are laid out.

  • XmPACK_COLUMN: indicates that all entries are placed in identically sized boxes. The box is based on the largest height and width values of all the children widgets. The value of the XmNnumColumns resource determines how many boxes are placed in the major dimension, before extending in the minor dimension.

  • XmPACK_NONE: indicates that no packing is performed. The X and Y attributes of each entry are left alone, and the Row Column container attempts to become large enough to enclose all entries.

Scrolled Window

The Scrolled Window is a container that combines one or two Scroll Bar widgets and a viewing area to implement a visible window onto another (usually larger) data display. The visible part of the window can be scrolled through the larger display by the use of Scroll Bars.

Scrolled Window can be configured to operate automatically so that it performs all scrolling and display actions with no need for application program involvement. It can also be configured to provide a minimal support framework in which the application is responsible for processing all user input and making all visual changes to the displayed data in response to that input.

Scrolled Window Resources

Following are the resources supported by the Scrolled Window container:

XmNscrollBarDisplayPolicy 


Controls the automatic placement of the Scroll Bars. If this resource is set to XmAS_NEEDED and if XmNscrollingPolicy is set to XmAUTOMATIC, Scroll Bars are displayed only if the workspace exceeds the clip area in one or both dimensions. A resource value of XmSTATIC causes the Scrolled Window to display the Scroll Bars whenever they are managed, regardless of the relationship between the clip window and the work area. This resource must be XmSTATIC when XmNscrollingPolicy is XmAPPLICATION_DEFINED.

XmNscrollingPolicy 


Performs automatic scrolling of the work area with no application interaction. If the value of this resource is XmAUTOMATIC, Scrolled Window automatically creates the Scroll Bars, attaches callbacks to the Scroll Bars, and automatically moves the work area through the clip window in response to any user interaction with the Scroll Bars.

When XmNscrollingPolicy is set to XmAPPLICATION_DEFINED, the application is responsible for all aspects of scrolling. The Scroll Bars must be created by the application, and it is responsible for performing any visual changes in the work area in response to user input.

Drawing Area and Visual Drawing

Drawing Area is an empty container that invokes callbacks to notify the application when graphics need to be drawn (exposure events or widget resize) and when the container receives input from the keyboard or mouse.

Applications are responsible for defining appearance and behavior as needed in response to Drawing Area callbacks. The Drawing Area is typically used to display graphics drawn using Xlib functions.

The Visual Drawing container is a Silicon Graphics extension that differs from the normal Motif Drawing Area in its support for Visual types.

Drawing Area and Visual Drawing Resources

Following are the resources supported by both the Drawing Area and Visual Drawing containers:

XmNexposeCallback 


Specifies the member function to be called when Drawing Area receives an exposure event. The callback reason is XmCR_EXPOSE. The callback structure also includes the exposure event.

The default bit gravity for this widget is NorthWestGravity, which may cause the XmNexposeCallback not to be invoked when the Drawing Area window is made smaller.

XmNinputCallback 


Specifies the member function to be called when the Drawing Area receives a keyboard or mouse event (key or button, up or down). The callback reason is XmCR_INPUT. The callback structure also includes the input event.

XmNresizeCallback 


Specifies the member function to be called when the Drawing Area is resized. The callback reason is XmCR_RESIZE.

Visual Drawing Resources

Following are the resources supported by the Visual Drawing container only:

SgNditherBackground 


If this resource is True, if the visual used with this container is a TrueColor or StaticColor visual, and if the container is unable to get an exact match for the requested background color, the container attempts to produce a dithered pixmap that produces a closer background to that requested. If one is found, it automatically sets the XmNbackgroundPixmap resource to this pixmap. See the SgVisualDrawingArea reference page for more details.

SgNinstallColormap 


If this resource is set to True, it specifies that the container should set the WM_COLORMAP_WINDOWS property on the shell that contains this widget, so the window manager installs the colormap when the application gets focus. See the SgVisualDrawingArea reference page for more details.

Radio Box

The Radio Box is really a Row Column container configured to force one-of-many behavior on its children, which must be toggle buttons. RapidApp creates a Radio Box with two default toggle buttons, which you can edit to suit your needs. You can also add more toggles. IRIS IM allows you to add arbitrary items to a Radio Box, but then issues warnings at run time. Because the “radio” behavior can be achieved only with toggles, RapidApp supports only toggle children.

Radio Box Resources

All the Radio Box resources are the same as for Row Column, with the following addition:

XmNradioAlwaysOne 


If this resource is set to True, one child must always be selected.

Frame

Frame is a very simple container used to enclose a single child in a border drawn by the Frame. The Frame container is most often used to enclose other containers to create a decorative effect. The Frame can also support a second child, generally a label, which is used as a title.

If you include a a title, it is generally best to add the title first. The title is treated as a work area child, to be framed, when initially added. Select the child and change the XmNchildType resource to XmFRAME_TITLE_CHILD.

Frame Resources

Following is the Frame resource:

XmNshadowType 


This resource controls the drawing style for the Frame container, and can have the following values:

  • XmSHADOW_IN: draws an inset border.

  • XmSHADOW_OUT: draws the Frame so that it appears outset.

  • XmSHADOW_ETCHED_IN: draws the Frame using a double line giving the effect of a line etched into the window.

  • XmSHADOW_ETCHED_OUT: draws the Frame using a double line giving the effect of a line coming out of the window.

Frame Constraint Resources

Following are the Frame constraint resources:

XmNchildType 


Specifies whether a child is a title or work area. Frame supports a single title and/or work area child. The possible values are:

  • XmFRAME_TITLE_CHILD

  • XmFRAME_WORKAREA_CHILD

  • XmFRAME_GENERIC_CHILD

The Frame geometry manager ignores any child of type XmFRAME_GENERIC_CHILD.

XmNchildHorizontalAlignment 


Specifies the alignment of the title. This resource has the following values:

  • XmALIGNMENT_BEGINNING

  • XmALIGNMENT_CENTER

  • XmALIGNMENT_END

XmNchildVerticalAlignment 


Specifies the vertical alignment of the title text, or the title area in relation to the top shadow of the Frame. It can have the following values:

  • XmALIGNMENT_BASELINE_BOTTOM: the baseline of the title aligns vertically with the top shadow of the Frame. In the case of a multiline title, the baseline of the last line of text aligns vertically with the top shadow of the Frame.

  • XmALIGNMENT_BASELINE_TOP: the baseline of the first line of the title aligns vertically with the top shadow of the Frame.

  • XmALIGNMENT_WIDGET_TOP: the top edge of the title area aligns vertically with the top shadow of the Frame.

  • XmALIGNMENT_CENTER: the center of the title area aligns vertically with the top shadow of the Frame.

  • XmALIGNMENT_WIDGET_BOTTOM: the bottom edge of the title area aligns vertically with the top shadow of the Frame.

GLDraw

The GLDraw container creates an empty window suitable for OpenGL drawing. It provides a window with the appropriate visual and colormaps needed for OpenGL, based on supplied parameters. GLDraw also provide callbacks for redraw, resize, input, and initialization.

Included in the information provided when creating a GLDraw is information necessary to determine the visual. This may be provided in three ways, all of them through resources.

  • A specific visualInfo structure may be passed in. (This visualInfo structure must have been obtained elsewhere; it is the application designer's responsibility to make sure that the structure is compatible with the OpenGL rendering done by the application).

  • An attribute list may be provided. This attribute list is formatted identically to that used for direct open GL programming.

  • Each attribute can be specified as an individual resource. This method is the simplest, and is the only method that works from resource files.

In addition to allocating the visual, the GLDraw also allocates the colormap unless one is provided by the application. (If a colormap is provided, the application writer is responsible for guaranteeing compatibility between the colormap and the visual). If an application creates multiple GLDraw containers with the same visual, the same colormap is used.

GLwNexposeCallback 


Specifies a member function to be called when the widget receives an exposure event. The callback reason is GLwCR_EXPOSE. The callback structure also includes the exposure event. You generally want the application to redraw the scene.

GLwNginitCallback 


Specifies a member function to be called when the widget is first realized. Since no OpenGL operations can be done before the widget is realized, this callback can be used to perform any appropriate OpenGL initialization such as creating a context. The callback reason is GLwCR_GINIT.

GLwNinputCallback 


Specifies a member function to be called when the widget receives a keyboard or mouse event. By default, the input callback is called on each key press and key release, on each mouse button press and release, and whenever the mouse is moved while a button is pressed. However, this can be changed by providing a different translation table. The callback structure also includes the input event. The callback reason is GLwCR_INPUT.

The input callback is provided as a programming convenience, as it provides a convenient way to catch all input events. However, a more modular program can often be obtained by providing specific actions and translations in the application rather than by using a single catchall callback. Use of explicit translations can also provide for more customizability.

GLwNresizeCallback 


Specifies the member function to be called when the GLDraw is resized. The callback reason is GLwCR_RESIZE.

The GLwDrawingArea widget requires information about the visual type to be used. This information can be passed programmatically as a visual Info structure, or the individual attributes of the visual type may be specified in RapidApp. These attributes include the following:

alphaSize 

An integer value that corresponds to the GLX_RED_SIZE attribute

blueSize 

An integer value that corresponds to the GLX_BLUE_SIZE attribute

doubleBuffer 

A Boolean value that corresponds to the GLX_DOUBLEBUFFER attribute

greenSize 

An integer value that corresponds to the GLX_GREEN_SIZE attribute.

level 

An integer value that corresponds to the GLX_LEVEL attribute.

redSize 

An integer value that corresponds to the GLX_RED_SIZE attribute.

rgba 

A Boolean value that corresponds to the GLX_RGBA attribute.

Other resources:

allocateBackground 


If TRUE, the background pixel and pixmap is allocated if appropriate using the newly calculated colormap and visual. If FALSE, they will retain values calculated using the parent's colormap and visual. Applications which wish to have X clear their background for them will usually set this to TRUE. Applications clearing their own background will often set this to FALSE, although they may set this to TRUE if they query the background for their own use. One reason to leave this resource FALSE is that if color index mode is in use this avoid using up a pixel from the newly allocated colormap. Also, on hardware that supports only one colormap, the application may need to do more careful color allocation to avoid flashing between the openGL colormap and the default X colormap. (Note that because of the way Xt works, the background colors are originally calculated using the default colormap; if this resource is set they can be recalculated correctly. If a colormap was explicitly supplied to the widget rather than being dynamically calculated, these resources are always calculated using that colormap.)

installBackground 


If set to TRUE, the background is installed on the window. If set to FALSE, the window has no background. This resource has no effect unless GLwNallocateBackground is also TRUE.

For more information about these attributes and visual types, see the reference pages for the GLwDrawingArea widget, the reference page for glxChooseVisual, and the OpenGL specification.

Tabbed Deck

The Tabbed Deck container is a composite component that combines a ViewKit VkDeck manager and a VkTabPanel. You can add items to the Tabbed Deck by simply dropping them on the container. Each new child becomes a new panel in the deck, and automatically adds a new tab that allows the user to switch to that panel.

Tabbed Deck Resources

forceChildClass 


If True, the Tabbed Deck's child is implemented as a C++ class.

Controls Palette

The Controls palette (see Figure A-15) contains control interface elements such as the text field, finder, and scroll bar.

Figure A-15. Controls Palette


The user interface elements available through this palette are described in the following sections.

Push Button

The Push Button widget issues commands within an application. It consists of a text label or pixmap surrounded by a border shadow. When a Push Button is selected, the shadow changes to give the appearance that it has been pressed in. When a Push Button is unselected, the shadow changes to give the appearance that it is out.

Push Button Resources

Following are the resources supported by the Push Button widget:

XmNactivateCallback 


Specifies the list of callbacks that is called when Push Button is activated. Push Button is activated when the user presses and releases the active mouse button while the pointer is inside that widget. Activating the Push Button also disarms it. For this callback the reason is XmCR_ACTIVATE.

XmNalignment 


Specifies the label alignment for text or pixmap. It can have the following values:

  • XmALIGNMENT_BEGINNING (left alignment): the left sides of the lines of text are vertically aligned with the left edge of the widget window. For a pixmap, its left side is vertically aligned with the left edge of the widget window.

  • XmALIGNMENT_CENTER (center alignment): the centers of the lines of text are vertically aligned in the center of the widget window. For a pixmap, its center is vertically aligned with the center of the widget window.

  • XmALIGNMENT_END (right alignment): the right sides of the lines of text are vertically aligned with the right edge of the widget window. For a pixmap, its right side is vertically aligned with the right edge of the widget window.

XmNlabelPixmap 


Specifies the pixmap when XmNlabelType is XmPIXMAP. The default value, XmUNSPECIFIED_PIXMAP, displays an empty label. Setting this resource in RapidApp automatically sets the XmNlabelType to XmPIXMAP. In RapidApp, pixmaps are specified as a filename. The file may be an XPM pixmap or an X bitmap. If the pixmap is loaded successfully, its base name is extracted and used as the name of the pixmap. The pixmap is always written out to a file, pixmaps.h in generated code, as an XPM pixmap.

Besides typing in the name of a file, you can also drop a file into the drop pocket beside the input field, or drop a pixmap file directly on the widget whose pixmap is to be set.

XmNlabelString 


Specifies the string to be displayed when the XmNlabelType is XmSTRING. In RapidApp, setting or changing this resource automatically sets the value of XmNlabelType to XmSTRING.

XmNlabelType 


Specifies the label type. It can have the following values:

  • XmSTRING: displays text using XmNlabelString.

  • XmPIXMAP: displays pixmap using XmNlabelPixmap or XmNlabelInsensitivePixmap.

Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource.

XmNrecomputeSize 


Specifies a Boolean value that indicates whether the widget shrinks or expands to accommodate its contents (label string or pixmap) as a result of an XtSetValues() resource value that would change the size of the widget. If this resource is set to True, the widget shrinks or expands to exactly fit the label string or pixmap. If this resource is set to False, the widget never attempts to change size on its own.

Code Examples

Programs most often use the Push Button widget as an input device and simply respond to a callback when the button is pushed. This is a typical member function created by RapidApp for handling a Push Button:

AClass::handlePushButton(Widget w, XtPointer callData )
{
  XmAnyCallbakStruct *cbs = (XmAnyCallbackStruct*) callData;

  //--- Comment out the following line when
  // AClass::handlePushButton is implemented

  ::VkUnimplemented ( w, "AClass::handlePushButton");

  // Add application code for AClass::handlePushButton here:

}

The first line makes the callData passed by all IRIS IM callbacks available in its generic form. For Push Button widgets, you may wish to change the cast to XmPushButtonCallbackStruct. The VkUnimplemented() call is useful when using the Developer Magic debugger and for printing a trace of this callback. You can comment it out once it is no longer needed.

A Push Button is a subclass of the Label widget, so the appearance of the Push Button can be manipulated the same as the Label widget. For example, consider the following code:

Example A-1. Retrieving Text From a Subclass of Label Using the IRIS IM API


XmString xmstr;
char *text;
XtVaGetValues( widget, XmNlabelString, &xmstr, NULL);
text = XmStringGetLtoR(xmstr, XmFONTLIST_DEFAULT_TAB);

Example A-2. Retrieving Text From a Subclass of Label Using the VkEZ API


char *text = EZ(widget);
Setting text on a Subclass of Label using the IRIS IM API
XmString xmstr;
xmstr = XmStringCreateLtoR("text", XmFONTLIST_DEFAULT_TAG);
XtVaSetValues(widget, XmNlabelString, xmstr, NULL);

The following also works:

XtVaSetValues(widget, XtVaTypedArg, XmNlabelString,
              XmRString, "text", strlen("text") + 1, NULL);

Example A-3. Setting Text on a Subclass of Label Using the VkEZ API


EZ(widget) = "text";

Toggle Button

Toggle Button is used to toggle between two states. Usually this widget consists of an indicator (square or diamond) with either text or a pixmap on one side of it. However, it can also consist of just text or a pixmap without the indicator.

The toggle graphics display a one-of-many or N-of-many selection state. When a toggle indicator is displayed, a square indicator shows an N-of-many selection state and a diamond indicator shows a one-of-many selection state.

Toggle Button Resources

Following are the Toggle Button resources:

XmNalignment 


Specifies the label alignment for text or pixmap. It can have the following values:

  • XmALIGNMENT_BEGINNING (left alignment): the left sides of the lines of text are vertically aligned with the left edge of the widget window. For a pixmap, its left side is vertically aligned with the left edge of the widget window.

  • XmALIGNMENT_CENTER (center alignment): the centers of the lines of text are vertically aligned in the center of the widget window. For a pixmap, its center is vertically aligned with the center of the widget window.

  • XmALIGNMENT_END (right alignment): the right sides of the lines of text are vertically aligned with the right edge of the widget window. For a pixmap, its right side is vertically aligned with the right edge of the widget window.

XmNindicatorOn 


Specifies that a toggle indicator is drawn to one side of the toggle text or pixmap when the resource is set to True. When the resource is set to False, no space is allocated for the indicator, and it is not displayed.

XmNlabelPixmap 


Specifies the pixmap when XmNlabelType is XmPIXMAP. The default value, XmUNSPECIFIED_PIXMAP, displays an empty label. Setting this resource in RapidApp automatically sets the XmNlabelType to XmPIXMAP. In RapidApp, pixmaps are specified as a filename. The file may be an XPM pixmap or an X bitmap. If the pixmap is loaded successfully, its base name is extracted and used as the name of the pixmap. The pixmap is always written out to a file, pixmaps.h in generated code, as an XPM pixmap.

Besides typing in the name of a file, you can also drop a file into the drop pocket beside the input field, or drop a pixmap file directly on the widget whose pixmap is to be set.

XmNlabelString 


Specifies the string to be displayed when the XmNlabelType is XmSTRING. In RapidApp, setting or changing this resource automatically sets the value of XmNlabelType to XmSTRING.

XmNlabelType 


Specifies the label type. It can have the following values:

  • XmSTRING: displays text using XmNlabelString.

  • XmPIXMAP: displays pixmap using XmNlabelPixmap or XmNlabelInsensitivePixmap.

Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource.

XmNrecomputeSize 


Specifies a Boolean value that indicates whether the widget shrinks or expands to accommodate its contents (label string or pixmap) as a result of an XtSetValues() resource value that would change the size of the widget. If this resource is set to True, the widget shrinks or expands to exactly fit the label string or pixmap. If this resource is set to False, the widget never attempts to change size on its own.

XmNselectPixmap 


Specifies the pixmap to be used as the button face if XmNlabelType is XmPIXMAP and the Toggle Button is selected. When the Toggle Button is unselected, the pixmap specified in Label's XmNlabelPixmap is used. If no value is specified for XmNlabelPixmap, that resource is set to the value specified for XmNselectPixmap.

XmNset 

Represents the state of the Toggle Button. A value of False indicates that the Toggle Button is not set. A value of True indicates that the Toggle Button is set. Setting this resource sets the state of the Toggle Button.

XmNshadowThickness 


Controls the thickness of the shadow which is useful when simulating radio buttons.

XmNvalueChangedCallback 


Specifies the list of callbacks called when the Toggle Button value is changed. To change the value, press and release the active mouse button while the pointer is inside the Toggle Button. This action also causes this widget to be disarmed. For this callback, the reason is XmCR_VALUE_CHANGED.

Code Examples

Following are examples of Toggle Button use:

Example A-4. Setting the Indicator State on a Toggle Button Without Invoking Callbacks


XtVaSetValues(widget, XmNset, newBooleanValue, NULL);

Example A-5. Setting the Indicator State on a Toggle Button and Triggering Callbacks


XmToggleButtonSetState(widget, newBooleanValue, True);

Drawn Button

The Drawn Button widget consists of an empty widget window surrounded by a shadow border. It provides the application developer with a graphics area that can have Push Button input semantics.

Callback types are defined for widget exposure and widget resize to allow the application to redraw or reposition its graphics.

Drawn Button Resources

Following are the Drawn Button resources:

XmNactivateCallback 


Specifies the list of callbacks that is called when the Drawn Button is activated. Drawn Button is activated when the user presses and releases the active mouse button while the pointer is inside that widget. Activating the Drawn Button also disarms it. For this callback, the reason is XmCR_ACTIVATE.

XmNalignment 


Specifies the label alignment for text or pixmap.It can have the following values:

  • XmALIGNMENT_BEGINNING (left alignment): the left sides of the lines of text are vertically aligned with the left edge of the widget window. For a pixmap, its left side is vertically aligned with the left edge of the widget window.

  • XmALIGNMENT_CENTER (center alignment): the centers of the lines of text are vertically aligned in the center of the widget window. For a pixmap, its center is vertically aligned with the center of the widget window.

  • XmALIGNMENT_END (right alignment): the right sides of the lines of text are vertically aligned with the right edge of the widget window. For a pixmap, its right side is vertically aligned with the right edge of the widget window.

XmNexposeCallback 


Specifies the member function to be called when Drawn Button needs to be redrawn.

Specifies the list of callbacks that is called when the widget receives an exposure event. The reason sent by the callback is XmCR_EXPOSE.

XmNlabelPixmap 


Specifies the pixmap when XmNlabelType is XmPIXMAP. The default value, XmUNSPECIFIED_PIXMAP, displays an empty label. Setting this resource in RapidApp automatically sets the XmNlabelType to XmPIXMAP. In RapidApp, pixmaps are specified as a filename. The file may be an XPM pixmap or an X bitmap. If the pixmap is loaded successfully, its base name is extracted and used as the name of the pixmap. The pixmap is always written out to a file, pixmaps.h in generated code, as an XPM pixmap.

Besides typing in the name of a file, you can also drop a file into the drop pocket beside the input field, or drop a pixmap file directly on the widget whose pixmap is to be set.

XmNlabelString 


Specifies the string to be displayed when the XmNlabelType is XmSTRING. In RapidApp, setting or changing this resource automatically sets the value of XmNlabelType to XmSTRING.

XmNlabelType 


Specifies the label type. It can have the following values:

  • XmSTRING: displays text using XmNlabelString.

  • XmPIXMAP: displays pixmap using XmNlabelPixmap or XmNlabelInsensitivePixmap.

Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource.

XmNpushButtonEnabled 


Enables or disables the three-dimensional shadow drawing as in Push Button.

XmNrecomputeSize 


Specifies a Boolean value that indicates whether the widget shrinks or expands to accommodate its contents (label string or pixmap) as a result of an XtSetValues() resource value that would change the size of the widget. If this resource is set to True, the widget shrinks or expands to exactly fit the label string or pixmap. If this resource is set to False, the widget never attempts to change size on its own.

Arrow Button

The Arrow Button widget is similar to the Push Button widget, but is displayed as a directional arrow.

Resources

Following are Arrow Button resources:

XmNarrowDirection 


Determines the arrow direction.

XmNactivateCallback 


The member function to be called when the arrow button is pressed.

Label

The Label widget can contain non-editable text or a pixmap.

Label Resources

The Label widget supports the following resources:

XmNalignment 


Specifies the label alignment for text or pixmap. It can have the following values:

  • XmALIGNMENT_BEGINNING (left alignment): the left sides of the lines of text are vertically aligned with the left edge of the widget window. For a pixmap, its left side is vertically aligned with the left edge of the widget window.

  • XmALIGNMENT_CENTER (center alignment): the centers of the lines of text are vertically aligned in the center of the widget window. For a pixmap, its center is vertically aligned with the center of the widget window.

  • XmALIGNMENT_END (right alignment): the right sides of the lines of text are vertically aligned with the right edge of the widget window. For a pixmap, its right side is vertically aligned with the right edge of the widget window.

XmNlabelPixmap 


Specifies the pixmap when XmNlabelType is XmPIXMAP. The default value, XmUNSPECIFIED_PIXMAP, displays an empty label. Setting this resource in RapidApp automatically sets the XmNlabelType to XmPIXMAP. In RapidApp, pixmaps are specified as a filename. The file may be an XPM pixmap or an X bitmap. If the pixmap is loaded successfully, its base name is extracted and used as the name of the pixmap. The pixmap is always written out to a file, pixmaps.h in generated code, as an XPM pixmap.

Besides typing in the name of a file, you can also drop a file into the drop pocket beside the input field, or drop a pixmap file directly on the widget whose pixmap is to be set.

XmNlabelString 


Specifies the string to be displayed when the XmNlabelType is XmSTRING. In RapidApp, setting or changing this resource automatically sets the value of XmNlabelType to XmSTRING.

XmNlabelType 


Specifies the label type. It can have the following values:

  • XmSTRING: displays text using XmNlabelString.

  • XmPIXMAP: displays pixmap using XmNlabelPixmap or XmNlabelInsensitivePixmap.

Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource.

XmNrecomputeSize 


Specifies a Boolean value that indicates whether the widget shrinks or expands to accommodate its contents (label string or pixmap) as a result of an XtSetValues() resource value that would change the size of the widget. If this resource is set to True, the widget shrinks or expands to exactly fit the label string or pixmap. If this resource is set to False, the widget never attempts to change size on its own.

Code Examples

Following are examples of Label use:

Example A-6. Retrieving Text From a Subclass of Label Using the IRIS IM API


XmString xmstr;
char *text;
XtVaGetValues( widget, XmNlabelString, &xmstr, NULL);
text = XmStringGetLtoR(xmstr, XmFONTLIST_DEFAULT_TAB);

Example A-7. Retrieving Text From a Subclass of Label Using the VkEZ API


char *text = EZ(widget);
Setting text on a Subclass of Label using the IRIS IM API
XmString xmstr;
xmstr = XmStringCreateLtoR("text", XmFONTLIST_DEFAULT_TAG);
XtVaSetValues(widget, XmNlabelString, xmstr, NULL);

The following is also valid:

XtVaSetValues(widget, XtVaTypedArg, XmNlabelString,
              XmRString, "text", strlen("text") + 1, NULL);

Example A-8. Setting Text on a Subclass of Label Using the VkEZ API


EZ(widget) = "text";

Separator

Separator is a primitive widget that separates items in a display. Several different line drawing styles are provided, as well as horizontal or vertical orientation.

The Separator line drawing is automatically centered within the height of the widget for a horizontal orientation and centered within the width of the widget for a vertical orientation.

Separator Resources

The Separator widget supports the following resources:

XmNorientation 


Displays Separator vertically or horizontally. This resource can have values of XmVERTICAL and XmHORIZONTAL.

XmNseparatorType 


Specifies the type of line drawing to be done in the Separator widget. It can have the following values:

  • XmSINGLE_LINE: single line.

  • XmDOUBLE_LINE: double line.

  • XmSINGLE_DASHED_LINE: single-dashed line.

  • XmDOUBLE_DASHED_LINE: double-dashed line.

  • XmNO_LINE: no line.

  • XmSHADOW_ETCHED_IN: a line whose shadows give the effect of a line etched into the window.

  • XmSHADOW_ETCHED_OUT: a line whose shadows give the effect of an etched line coming out of the window.

  • XmSHADOW_ETCHED_IN_DASH: identical to XmSHADOW_ETCHED_IN except a series of lines creates a dashed line.

  • XmSHADOW_ETCHED_OUT_DASH: identical to XmSHADOW_ETCHED_OUT except a series of lines creates a dashed line.

Scroll Bar

The Scroll Bar widget allows the user to view data that is too large to be displayed all at once. Scroll Bars are usually located inside a Scrolled Window and adjacent to the widget that contains the data to be viewed. When the user interacts with the Scroll Bar, the data within the other widget scrolls.

A Scroll Bar consists of two arrows placed at each end of a rectangle. The rectangle is called the scroll region. A smaller rectangle, called the slider, is placed within the scroll region. The data is scrolled by clicking either arrow, clicking the scroll region, or dragging the slider. When an arrow is selected, the slider within the scroll region is moved in the direction of the arrow by an amount supplied by the application. If the mouse button is held down, the slider continues to move at a constant rate.

Scroll Bar Resources

The following resources are available for the Scroll Bar widget from within RapidApp:

XmNdragCallback 


Specifies the list of callbacks that is called on each incremental change of position when the slider is being dragged. The reason sent by the callback is XmCR_DRAG.

XmNorientation 


Specifies whether the Scroll Bar is displayed vertically or horizontally. This resource can have values of XmVERTICAL and XmHORIZONTAL.

XmNvalueChangedCallback 


Specifies the list of callbacks that is called when the slider is released after being dragged. The reason passed to the callback is XmCR_VALUE_CHANGED.

Code Examples

Following are examples of Scroll Bar use:

Example A-9. Getting the Value of a Scroll Bar Using the IRIS IM API


int value;
XtVaGetValues(widget, XmNvalue, &value, NULL);

Example A-10. Getting the Value of a Scroll Bar Using the VkEZ API


int value = EZ(widget);

Example A-11. Setting the Value of a Scroll Bar Using the IRIS IM API


XtVaSetValues(widget, XmNvalue, 100, NULL);

Example A-12. Setting the Value of a Scroll Bar Using the VkEZ API


EZ(widget) = 100;

Scale

Scale is used by an application to indicate a value from within a range of values, and it allows the user to input or modify a value from the same range.

A Scale has an elongated rectangular region similar to a Scroll Bar. A slider inside this region indicates the current value along the Scale. The user can also modify the Scale's value by moving the slider within the rectangular region of the Scale. A Scale can also include a label set located outside the Scale region. These can indicate the relative value at various positions along the scale.

A Scale can be either input/output or output only. An input/output Scale's value can be set by the application and also modified by the user with the slider. An output-only Scale is used strictly as an indicator of the current value of something and cannot be modified interactively by the user.

Scale Resources

The Scale widget supports the following resources:

XmNdecimalPoints 


Specifies the number of decimal points to shift the slider value when displaying it. For example, a slider value of 2,350 and an XmNdecimalPoints value of 2 results in a display value of 23.50. The value must not be negative.

XmNdragCallback 


Specifies the list of callbacks that is called when the slider position changes as the slider is being dragged. The reason sent by the callback is XmCR_DRAG.

XmNmaximum 

Specifies the slider's maximum value. XmNmaximum must be greater than XmNminimum.

XmNminimum 

Specifies the slider's minimum value. XmNmaximum must be greater than XmNminimum.

XmNorientation 


Displays Scale vertically or horizontally. This resource can have values of XmVERTICAL and XmHORIZONTAL.

XmNscaleHeight 


Specifies the height of the slider area. The value should be in the specified unit type (the default is pixels). If no value is specified, a default height is computed.

XmNscaleWidth 


Specifies the width of the slider area. The value should be in the specified unit type (the default is pixels). If no value is specified, a default width is computed.

XmNshowValue 


Specifies whether a label for the current slider value should be displayed next to the slider. If the value is True, the current slider value is displayed.

XmNtitleString 


Specifies the title text string to appear in the Scale widget window.

XmNvalue 

Specifies the slider's current position along the scale, between XmNminimum and XmNmaximum. The value must be within these inclusive bounds. The initial value of this resource is the larger of 0 and XmNminimum.

XmNvalueChangedCallback 


Specifies the list of callbacks that is called when the value of the slider has changed. The reason sent by the callback is XmCR_VALUE_CHANGED.

Code Examples

Following are examples of Scale use:

Example A-13. Getting the Value of a Scale Using the IRIS IM API


int value;
XtVaGetValues(widget, XmNvalue, &value, NULL);

Example A-14. Getting the Value of a Scale Using the VkEZ API


int value = EZ(widget);

Example A-15. Setting the Value of a Scale Using the IRIS IM API


XtVaSetValues(widget, XmNvalue, 100, NULL);

Example A-16. Setting the Value of a Scale Using the VkEZ API


EZ(widget) = 100;

Scrolled List

Scrolled List allows a user to select one or more items from a group of choices. Items are selected from the list in a variety of ways, using both the pointer and the keyboard. Scrolled List operates on an array of compound strings that are defined by the application. Each compound string becomes an item in the Scrolled List, with the first compound string becoming the item in position 1, the second becoming the item in position 2, and so on.

Each list has one of four selection models:

  • Single Select

  • Browse Select

  • Multiple Select

  • Extended Select

In Single Select and Browse Select, only one item is selected at a time. In Single Select, pressing BSelect on an item toggles its selection state and deselects any other selected item. In Browse Select, pressing BSelect on an item selects it and deselects any other selected item; dragging BSelect moves the selection as the pointer is moved. Releasing BSelect on an item moves the location cursor to that item.

In Multiple Select, any number of items can be selected at a time. Pressing BSelect on an item toggles its selection state but does not deselect any other selected items.

In Extended Select, any number of items can be selected at a time, and the user can easily select ranges of items. Pressing BSelect on an item selects it and deselects any other selected item. Dragging BSelect or pressing or dragging BExtend following a BSelect action selects all items between the item under the pointer and the item on which BSelect was pressed. This action also deselects any other selected items outside that range.

Scrolled Window Resources

The following resources are supported by the Scrolled Window that contains the List widget. You can select the Scrolled Window by clicking on the Scroll Bar area, or using the “Select Parent” command.

XmNscrollBarDisplayPolicy 


Controls the automatic placement of the Scroll Bars. If this resource is set to XmAS_NEEDED and if XmNscrollingPolicy is set to XmAUTOMATIC, Scroll Bars are displayed only if the workspace exceeds the clip area in one or both dimensions. A resource value of XmSTATIC causes the Scrolled Window to display the Scroll Bars whenever they are managed, regardless of the relationship between the clip window and the work area. This resource must be XmSTATIC when XmNscrollingPolicy is XmAPPLICATION_DEFINED.

XmNscrollingPolicy 


Performs automatic scrolling of the work area with no application interaction. If the value of this resource is XmAUTOMATIC, Scrolled Window automatically creates the Scroll Bars, attaches callbacks to the Scroll Bars, and automatically moves the work area through the clip window in response to any user interaction with the Scroll Bars.

When XmNscrollingPolicy is set to XmAPPLICATION_DEFINED, the application is responsible for all aspects of scrolling. The Scroll Bars must be created by the application, and it is responsible for performing any visual changes in the work area in response to user input.

List Resources

The following resources are supported by the List widget. Click in the list area to access these resources.

XmNbrowseSelectionCallback 


Specifies the member function to be called when an item is selected in the browse selection mode. The reason is XmCR_BROWSE_SELECT.

XmNdefaultActionCallback 


Specifies the member function to be called when an item is double-clicked or KActivate is pressed. The reason is XmCR_DEFAULT_ACTION.

XmNextendedSelectionCallback 


Specifies the member function to be called when items are selected using the extended selection mode.

XmNitems 

Points to an array of compound strings that are to be displayed as the list items. In RapidApp, static or initial items can be entered as a comma-separated list.

XmNlistSizePolicy 


Controls the reaction of the List when an item grows horizontally beyond the current size of the List work area. If the value is XmCONSTANT, the list viewing area does not grow, and a horizontal Scroll Bar is added for a Scrolled List. If this resource is set to XmVARIABLE, the List grows to match the size of the longest item, and no horizontal Scroll Bar appears.

When the value of this resource is XmRESIZE_IF_POSSIBLE, the List attempts to grow or shrink to match the width of the widest item. If it cannot grow to match the widest size, a horizontal Scroll Bar is added for a Scrolled List if the longest item is wider than the list viewing area.

XmNmultipleSelectionCallback 


Specifies the member function to be called when an item is selected in multiple selection mode.

XmNselectionPolicy 


Defines the interpretation of the selection action. This can be one of the following:

  • XmSINGLE_SELECT: allows only single selections

  • XmMULTIPLE_SELECT: allows multiple selections

  • XmEXTENDED_SELECT: allows extended selections

  • XmBROWSE_SELECT: allows “drag and browse” functionality

XmNsingleSelectionCallback 


Specifies the member function to be called when an item is selected in single selection mode.

XmNvisibleItemCount 


Specifies the number of items that can fit in the visible space of the list work area. The List uses this value to determine its height. The value must be greater than 0.

Scrolled Text

The Scrolled Text widget provides a simple multiline scrollable text editor.

Scrolled Text Resources

Following are the resources supported by the Scrolled Text widget:

XmNcolumns 

Determines the width of the widget in terms of the number of characters that can be displayed horizontally.

XmNeditable 

Indicates that the user can edit the text string when this resource is set to True. Prohibits the user from editing the text when this resource is set to False. In RapidApp and RapidApp-generated code, the Text widget automatically changes to read-only color when XmNeditable is set to False, in conformance with the Indigo Magic user interface guidelines.

XmNmodifyVerifyCallback 


Specifies the member function to be called before text is deleted from or inserted into Text. The type of the structure whose address is passed to this callback is XmTextVerifyCallbackStruct. The reason sent by the callback is XmCR_MODIFYING_TEXT_VALUE.

XmNmotionVerifyCallback 


Specifies the member function to be called before the insert cursor is moved to a new position. The type of the structure whose address is passed to this callback is XmTextVerifyCallbackStruct. The reason sent by the callback is XmCR_MOVING_INSERT_CURSOR. It is possible for more than one XmNmotionVerifyCallback to be generated from a single action.

XmNrows 

Specifies the initial height of the text window measured in character heights. The value must be greater than 0. The default value depends on the value of the XmNheight resource. If no height is specified, the default is 1.

XmNscrollHorizontal 


Adds a Scroll Bar that allows the user to scroll horizontally through text when the Boolean value is True. This resource is forced to False when the Text widget is placed in a Scrolled Window with XmNscrollingPolicy set to XmAUTOMATIC.

XmNvalue 

Specifies the initial contents of the Text widget.

XmNvalueChangedCallback 


Specifies the member function to be called after text is deleted from or inserted into Text. The type of the structure whose address is passed to this callback is XmAnyCallbackStruct. The reason sent by the callback is XmCR_VALUE_CHANGED.

Text Field

Text Field is a simple, single line text editor. It is similar to the Scrolled Text widget, but can have only a single row of text and is not scrollable.

Text Field Resources

Following are the resources supported by the Text Field widget:

XmNactivateCallback 


Specifies the member function to be called when the user presses <Enter>. The type of the structure whose address is passed to this callback is XmAnyCallbackStruct. The reason sent by the callback is XmCR_ACTIVATE.

XmNcolumns 

Determines the width of the widget in terms of the number of characters that can be displayed horizontally.

XmNeditable 

Indicates that the user can edit the text string when this resource is set to True. Prohibits the user from editing the text when this resource is set to False. In RapidApp and RapidApp-generated code, the Text widget automatically changes to read-only color when XmNeditable is set to False, in conformance with the Indigo Magic user interface guidelines.

XmNmodifyVerifyCallback 


Specifies the member function to be called before text is deleted from or inserted into Text. The type of the structure whose address is passed to this callback is XmTextVerifyCallbackStruct. The reason sent by the callback is XmCR_MODIFYING_TEXT_VALUE.

XmNmotionVerifyCallback 


Specifies the member function to be called before the insert cursor is moved to a new position. The type of the structure whose address is passed to this callback is XmTextVerifyCallbackStruct. The reason sent by the callback is XmCR_MOVING_INSERT_CURSOR. It is possible for more than one XmNmotionVerifyCallbacks to be generated from a single action.

XmNvalue 

Specifies the initial contents of the Text widget.

XmNvalueChangedCallback 


Specifies the member function to be called after text is deleted from or inserted into Text. The type of the structure whose address is passed to this callback is XmAnyCallbackStruct. The reason sent by the callback is XmCR_VALUE_CHANGED.

Finder

The Finder widget integrates a Drop Pocket pocket, a Text Field, a ZoomBar, and a history menu into a single widget. The ZoomBar is a set of buttons above the text field that allows sections of the text to be selected. The history menu allows users to select items previously visited, or to undo operations. The Finder widget should be used for accelerating text selection of long objects such as filenames.

Clicking the History button brings up a pulldown menu. Selecting an item from the menu sets the text field to that item. Whenever the text field is set, the ZoomBar changes to reflect the text sections in the text field.

Pressing a button on the ZoomBar sets the text field to the portion of the text preceding that button. The specific behavior is customizable, but generally cuts off the portion of the text after the pressed ZoomBar button. The history menu can be used to go back to the original text.

The Finder also includes a Drop Pocket for displaying icons representing entries in the Finder's text field. These icons are Silicon Graphics' environment file icons. File icons from FrameMaker, Searchbook, or similar applications can be dropped on the Drop Pocket.

Finder Resources

Following are the resources supported by the Finder widget:

XmNactivateCallback 


This callback is called when a ZoomBar button is pushed, when the text field generates an activateCallback (in other words, pressing <Enter> in the text field), or if the text field is set by SgFinderSetTextString(). The type of the structure whose address is passed to this callback is XmAnyCallbackStruct. The reason sent by the callback is XmCR_ACTIVATE.

XmNvalueChangedCallback 


The value changed callback specifies the list of callbacks that is called after text is deleted from or inserted into the text field. The type of the structure whose address is passed to this callback is XmAnyCallbackStruct. The reason sent by the callback is XmCR_VALUE_CHANGED.

Thumb Wheel

Thumb Wheel is used by an application to allow the user to input or modify a value either from within a range of values or from an unbounded (infinite) range.

A Thumb Wheel has an elongated rectangular region within which a wheel graphic is displayed. The user can modify the Thumb Wheel's value by spinning the wheel. A Thumb Wheel can also include a Home button located outside the wheel region. This button allows the user to set the Thumb Wheel's value to a known position.

Thumb Wheel Resources

Following are the resources supported by the Thumb Wheel widget:

SgNhomePosition 


Specifies the known value to which the thumb wheel's value is set when the Home button is clicked.

XmNmaximum 

Specifies the thumb wheel's maximum value. XmNmaximum must be greater than or equal to XmNminimum. Setting XmNmaximum equal to XmNminimum indicates an infinite range.

XmNminimum 

Specifies the thumb wheel's minimum value. XmNmaximum must be greater than or equal to XmNminimum. Setting XmNmaximum equal to XmNminimum indicates an infinite range.

XmNdragCallback 


Specifies a member function to be called continuously as the value of the thumb wheel changes.

SgNangleRange 


Specifies the angular range, in degrees, through which the thumb wheel is allowed to rotate. This, in conjunction with XmNmaximum and XmNminimum, controls the fineness or coarseness of the wheel control when it is not infinite. If this value is set to zero, the thumb wheel has an infinite range.

The default of 150 represents roughly the visible amount of the wheel. Thus clicking at one end of the wheel and dragging the mouse to the other end gives roughly the entire range from XmNminimum to XmNmaximum.

XmNorientation 


Displays Thumb Wheel vertically or horizontally. This resource can have values of XmVERTICAL and XmHORIZONTAL.

XmNunitsPerRotation 


Specifies the number of units in a rotation.

XmNvalue  

Specifies the current position of the thumb wheel, between XmNminimum and XmNmaximum if the thumb wheel is not infinite.

XmNvalueChangedCallback 


Specifies the member function to be called when the value of the thumb wheel has changed. The reason sent by the callback is XmCR_VALUE_CHANGED.

Dial

The Dial widget allows a user to modify a value from within a range of values. A Dial has a rectangular region within which a knob or pointer graphic is displayed. The user can modify the Dial's value by spinning this knob or pointer.

Dial Resources

Following are the resources supported by the Dial widget:

SgNangleRange 


Determines how far the valuator can move.

SgNdialMarkers 


Specifies the number of divisions around the perimeter of the dial. A “tick mark” is drawn at each division.

XmNmaximum 

Specifies the dial's maximum value. XmNmaximum must be greater than or equal to XmNminimum.

XmNminimum 

Specifies the dial's minimum value. XmNmaximum must be greater than or equal to XmNminimum.

SgNstartAngle 

Specifies the whole number angle (0-360) where the dial starts increasing.

XmNhighlightThickness 


Controls the thickness of the highlight area around the dial.

SgNmarkerLength 


Specifies the size of the dial's markers. To hide the markers, set this to zero.

SgNangleRange 


Specifies the angular range, in degrees, through which the dial is allowed to rotate. This, with XmNmaximum and XmNminimum, controls the fineness or coarseness of the dial control.

SgNdialVisual 

Specifies the look of the dial, either SgKNOB or SgPOINTER.

XmNshadowThickness 


Controls the thickness of the shadow.

XmNdragCallback 


Specifies a member function to be called when the dial position changes as the dial is being spun. The reason sent by the callback is XmCR_DRAG.

XmNvalue 

Specifies the current position of the dial, between XmNminimum and XmNmaximum.

XmNvalueChangedCallback 


Specifies a member function to be called when the value of the dial has changed. The reason sent by the callback is XmCR_VALUE_CHANGED.

LED Button

LED Button is similar to a toggle button in that it is a two-state button. However, instead of a square or diamond-shaped indicator to the left of text or a pixmap, the LED Button is a pushbutton-style widget with a built-in indicator “light.” When the LED Button is set, the indicator is bright; when it is unset, the indicator is dim.

LED Button Resources

Following are the LED Button resources:

XmNalignment 


Specifies the label alignment for text or pixmap.

  • XmALIGNMENT_BEGINNING (left alignment): the left sides of the lines of text are vertically aligned with the left edge of the widget window. For a pixmap, its left side is vertically aligned with the left edge of the widget window.

  • XmALIGNMENT_CENTER (center alignment): the centers of the lines of text are vertically aligned in the center of the widget window. For a pixmap, its center is vertically aligned with the center of the widget window.

  • XmALIGNMENT_END (right alignment): the right sides of the lines of text are vertically aligned with the right edge of the widget window. For a pixmap, its right side is vertically aligned with the right edge of the widget window.

XmNindicatorOn 


Specifies that a indicator light is drawn to one side of the toggle text or pixmap when set to True. When set to False, no space is allocated for the indicator, and it is not displayed.

XmNlabelPixmap 


Specifies the pixmap when XmNlabelType is XmPIXMAP. The default value, XmUNSPECIFIED_PIXMAP, displays an empty label. Setting this resource in RapidApp automatically sets the XmNlabelType to XmPIXMAP. In RapidApp, pixmaps are specified as a filename. The file may be an XPM pixmap or an X bitmap. If the pixmap is loaded successfully, its base name is extracted and used as the name of the pixmap. The pixmap is always written out to a file, pixmaps.h in generated code, as an XPM pixmap.

Besides typing in the name of a file, you can also drop a file into the drop pocket beside the input field, or drop a pixmap file directly on the widget whose pixmap is to be set.

XmNlabelString 


Specifies the string to be displayed when the XmNlabelType is XmSTRING. In RapidApp, setting or changing this resource automatically sets the value of XmNlabelType to XmSTRING.

XmNlabelType 


Specifies the label type.

  • XmSTRING: displays text using XmNlabelString.

  • XmPIXMAP: displays pixmap using XmNlabelPixmap or XmNlabelInsensitivePixmap.

Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource.

XmNrecomputeSize 


Specifies a Boolean value that indicates whether the widget shrinks or expands to accommodate its contents (label string or pixmap) as a result of an XtSetValues() resource value that would change the size of the widget. If this resource is set to True, the widget shrinks or expands to exactly fit the label string or pixmap. If this resource is set to False, the widget never attempts to change size on its own.

XmNselectPixmap 


Specifies the pixmap to be used as the button face if XmNlabelType is XmPIXMAP and the LED Button is selected. When the LED Button is unselected, the pixmap specified in Label's XmNlabelPixmap is used. If no value is specified for XmNlabelPixmap, that resource is set to the value specified for XmNselectPixmap.

XmNset 

Represents the state of the LED Button. A value of False indicates that the LED Button is not set. A value of True indicates that the LED Button is set. Setting this resource sets the state of the LED Button.

XmNvalueChangedCallback 


Specifies the list of callbacks called when the LED Button value is changed. To change the value, press and release the active mouse button while the pointer is inside the LED Button. This action also causes this widget to be disarmed. For this callback, the reason is XmCR_VALUE_CHANGED.

Drop Pocket

The Drop Pocket widget is designed to receive desktop icons from the IRIS Indigo Magic desktop. The Drop Pocket displays the file icon as a visual reminder of the file associated with the Drop Pocket. See the SgDropPocket reference page for more details.

Drop Pocket Resources

Following are the resources for Drop Pocket:

SgNiconUpdateCallback 


The member function to be invoked when an icon is dropped in the Drop Pocket. See the SgDropPocket reference page for more details.

SgNname 

Specifies the name of the current icon. This resource can be set to specify the initial icon that appears in the Drop Pocket.

Menus Palette

The Menus palette (see Figure A-16) contains menu interface elements such as pulldown menu, option menu, and menu separator.

Figure A-16. Menus Palette


The user interface elements available through this palette are described in the following sections.

Pulldown Menu

The Pulldown menu item adds a pulldown menu to a menu bar. By default several items are included. These can be edited or removed as needed. A Pulldown menu is created by calling the ViewKit member function addSubMenu().

You can display the menu pane by selecting it, and then clicking once again. Once the menu is displayed, you can add items (MenuEntry, MenuLabel, MenuToggle, MenuSeparator, ConfirmFirst, or other pulldowns) by dropping new elements on the displayed menu area. You can dismiss the menu by clicking the pulldown (not the displayed menu pane).

Pulldown Resources

Resources in the Pulldown menu correspond to the visible menu entry for this pulldown. The following resources are available:

XmNlabelString 


The string displayed for this menu pane.

XmNmnemonic 


The mnemonic used to post this menu item.

Cascade Menu

The Cascade menu item adds a pull-right menu to an existing menu pane. By default several items are included. These can be edited or removed as needed.

You can display the menu pane by selecting it, and then clicking once again. Once the menu is displayed, you can add items (MenuEntry, MenuLabel, MenuToggle, MenuSeparator, ConfirmFirst, or other pulldowns) by dropping new elements on the displayed menu area. You can dismiss the menu by clicking the pulldown (not the displayed menu pane).


Note: For experienced IRIS IM developers: This item is identical to the Pulldown menu item, and is present as an aid to those less familiar with the IRIS IM menu structure.


Cascade Resources

Resources in the Cascade menu correspond to the visible menu entry for this menu pane. The following resources are available:

XmNlabelString 


The string displayed for this menu pane.

XmNmnemonic 


The mnemonic used to post this menu item.

Radio Pulldown

A RadioPulldown menu item can be added to an existing menu bar or menu pane. It is meant to hold sets of toggle items that exhibit radio (one-of-many) behavior. By default, two initial toggles are created for each new RadioPulldown. These can be edited or removed as needed.

You can display the menu pane by selecting it, and then clicking once again. Once the menu is displayed, you can add items (MenuEntry, MenuLabel, MenuToggle, MenuSeparator, ConfirmFirst, or other pulldowns) by dropping new elements on the displayed menu area. You can dismiss the menu by clicking the pulldown (not the displayed menu pane).

RadioPulldown Resources

Resources in the RadioPulldown menu correspond to the visible menu entry for this menu pane. The following resources are available:

XmNlabelString 


The string displayed for this menu pane.

XmNmnemonic 


The mnemonic used to post this menu item.

OptionMenu

The OptionMenu item creates a menu that can be used to select one item from a set of choices. The OptionMenu is created with two initial options which can be edited or removed as needed. You can display the option menu by selecting it, and then clicking once again. Once the menu is displayed, you can add items (MenuEntry elements) by dropping new elements on the displayed menu area. You can dismiss the option menu by clicking on the menu button (not the displayed menu pane).

OptionMenu Resources

The following OptionMenu resource is available:

XmNlabelString 


Determines the value of an optional string to be displayed to the left of the option menu as a title. If this resource is left empty, the title is not visible.

Menu Entry

The MenuEntry corresponds to an XmPushButtonGadget, and is intended to be added to a menu pane or OptionMenu as a selectable command entry. The MenuEntry is represented in the program as a ViewKit VkMenuAction object.

MenuEntry Resources

Following are the MenuEntry resources available through RapidApp:

XmNaccelerator 


A description of the accelerator keys that can be used to invoke this menu item.

XmNacceleratorText 


The text to be displayed in the item to remind the user of the accelerator.

XmNactivateCallback 


The member function to be invoked when this menu item is selected.

XmNlabelString 


The label to be displayed in this menu item.

XmNmnemonic 


The mnemonic that can be used to select this item.

XmNundoCallback 


The optional member function that should be called if this item is reversed using the ViewKit undo mechanism.

Menu Label

The MenuLabel corresponds to an XmLabelGadget, and is intended to be added to a menu pane or OptionMenu as a nonselectable entry. The MenuLabel is represented in the program as a ViewKit VkMenuLabel object.

MenuLabel Resources

The following MenuLabel resource is available:

XmNlabelString 


The label to be displayed in this menu item.

Menu Toggle

The MenuToggle corresponds to an XmToggleButtonGadget, and is intended to be added to a menu pane as a selectable two-state entry. The MenuToggle is represented in the program as a ViewKit VkMenuToggle object. When added to a RadioPulldown, this entry has one-of-many behavior. Otherwise, all toggles can be selected independently.

MenuToggle Resources

Following are the MenuToggle resources available through RapidApp:

XmNaccelerator 


A description of the accelerator keys that can be used to invoke this menu item.

XmNacceleratorText 


The text to be displayed in the item to remind the user of the accelerator.

XmNvalueChangedCallback 


The member function to be invoked when this menu item is selected.

XmNlabelString 


The label to be displayed in this menu item.

XmNmnemonic 


The mnemonic that can be used to select this item.

XmNundoCallback 


The optional member function that should be called if this item is reversed using the ViewKit undo mechanism.

XmNset 

Determines whether this item is selected by default.

Menu Separator

The MenuSeparator corresponds to an XmSeparatorGadget, and is intended to be added to a menu pane as a decorative item to separate other entries.

MenuSeparator is represented in the program as a ViewKit VkMenuSeparator object.

Confirm First

The ConfirmFirst corresponds to an XmPushButtonGadget, and is intended to be added to a menu pane as a selectable command entry that asks the user for confirmation before executing the command. The ConfirmFirst is represented in the program as a ViewKit VkMenuConfirmFirstAction object.

MenuToggle Resources

Following are the MenuToggle resources available through RapidApp:

XmNaccelerator 


A description of the accelerator keys that can be used to invoke this menu item.

XmNacceleratorText 


The text to be displayed in the item to remind the user of the accelerator.

XmNactivateCallback 


The member function to be invoked when this menu item is selected.

XmNlabelString 


The label to be displayed in this menu item.

XmNmnemonic 


The mnemonic that can be used to select this item.

Menu Bar

The Menu Bar item creates a menu bar for use in a custom dialog. You can add this menu bar to dialogs only. If you want a menu bar in a main window, create a VkWindow.

This menu bar doesn't contain the standard menu bar entries provided with a VkWindow menu bar; instead, it contains only two dummy menu panes with three dummy menu entries each. You can display a menu pane by selecting it, and then clicking it once again. Once displayed, you can add additional items (MenuEntry elements) by dropping new elements on the displayed menu area. You can dismiss the menu pane by clicking the menu button (not the displayed menu pane) again.

ViewKit Palette

The ViewKit palette (see Figure A-17) contains ViewKit interface elements such as tab panel, tick marks, and graph.

Figure A-17. ViewKit Palette


The user interface elements available through this palette are described in the following sections.

VkOutline

The VkOutline class allows you to display a tree of strings in an outline fashion. Each string is displayed in a line with an indentation proportional to its depth in the tree. Each non-leaf string has a control icon displayed to its left. The control icon denotes whether the subtree under the string is displayed (open) or not (closed). Control icons can be left-clicked by users to toggle between open and closed states.

This component cannot be manipulated via RapidApp, but can be added and positioned using RapidApp and manipulated programmatically. See the VkOutline reference page for details.

VkCompletionField

The VkCompletionField component is a text input field that supports name expansion. If the user types a space, the component attempts to complete the current contents of the text field, based on a known list of possible expansions.

Applications must provide the list of possible expansions. These can be provided programmatically, or they can be entered using RapidApp by providing a comma-separated list of strings as the completionList resource.

Applications that wish to be notified when you press <Enter> in the text field can register a ViewKit C++-style callback using the VkCompletionFiled::enterCallback() hook. This can be done only programmatically.

VkGraph

The VkGraph class is a component that provides a high-level interface to an underlying SgGraph widget. Graphs are constructed by specifying parent/child parents of objects, represented by the VkNode class. The VkGraph class constructs an abstract graph from these objects and allows applications or users to specify which portions of the graph to display at any one time. In this way, the VkGraph component supports graphs that can be larger than it is practical to display at one time.

Nodes must be created programmatically. A number of resources that affect either VkGraph or the underlying SgGraph widget can be set using RapidApp.

VkPie

This class is derived from VkMeter and displays data in the same way as that class. Values are added programmatically, one at a time, and displayed by calling an update() member function. The range of values displayed can be specified by calling the reset() member function with a new value.

VkTabPanel

VkTabPanel presents a row or column of overlaid tabs. One tab is always selected and appears on top of all the others. The user can left-click on a tab to select it. When the tabs do not fit within the provided space, end-indicators appear as necessary to represent a set of collapsed tabs. When the user left-clicks or right-clicks in an end-indicator, a popup menu appears listing all the tabs. The user may choose an item to select the corresponding tab.

Tabs can be added programmatically, or they can be entered as a comma-separated set of strings in the “tabs” resource input area.

RapidApp currently supports only a horizontal orientation.

VkVUMeter

VkVUMeter presents a vertical set of segments as a meter display, similar to that used by hi-fi audio displays. Its value ranges from 0 to 110, with 0 showing the most segments and 110 showing the least.

VkTickMarks

VkTickMarks presents a vertical set of tick marks. It is most commonly used next to a vertical XmScale widget. The tick marks can be right-justified with the labels to the left (the default), or left justified with the labels to the right. The former is used when the component is to the left of the scale, and the latter when the component is to the right.

Inventor Palette

The Inventor palette (see Figure A-18) contains Inventor interface elements such as material list, light slider set, and render area.

Figure A-18. Inventor Palette


The user interface elements available through this palette are described in the following sections.

Directional Light

This Inventor class is used to edit a SoDirectionalLight node (color, intensity, and direction are changed). In addition to directly editing directional light nodes, the editor can also be used with callbacks that are called whenever the light is changed. The component consists of a render area and a value slider in the main window, with controls to display a color picker. In the render area there appears a sphere representing the world, and a directional light manipulator representing the direction of the light. Picking on the manipulator and moving the mouse provides direct manipulation of the light direction. The color picker is used to edit the color, and the value slider edits the intensity. See the SoDirectionalLight(3) reference page or the Inventor Mentor for more details.

Examiner Viewer

An Inventor scene viewer. The Examiner viewer component allows you to rotate the view around a point of interest using a virtual trackball. The viewer uses the camera focalDistance field to figure out the point of rotation, which is usually set to be at the center of the scene. In addition to allowing you to rotate the camera around the point of interest, this viewer also allows you to translate the camera in the viewer plane, as well as dolly (move forward and backward) to get closer to or farther away from the point of interest. The viewer also supports seek to quickly move the camera to a desired object or point. See the SoXtExaminerViewer(3) reference page or the Inventor Mentor for more details.

Examiner Viewer Resources

Following are the SoXtExaminerViewer resources available through RapidApp:

animationEnabled 


Enable or disable the spinning animation feature of the viewer.

antialiasing 

Set the antialiasing for rendering. If this resource is set to True, “smoothing” is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points.

border 

Toggles the border around the viewer on or off.

bufferingType 

Sets the current buffering type.

decoration 

Toggles the controls surrounding the viewer on or off.

drawStyle 

Sets the current drawing style in the main view. See the SoXtViewer(3) reference page for more details.

headlight 

Turns the headlight on/off.

popupMenuEnabled 


Activates or deactivates the right mouse button popup menu over the viewer.

sceneGraph 

Specifies a filename of a scene graph to be displayed.

feedbackVisibility 


Show/hide the point of rotation feedback, which appears only while in viewing mode (default is off).

feedbackSize 

Set the point of rotation feedback size in pixels (default 20 pixels).

Walk Viewer

An Inventor scene viewer. The paradigm for this viewer is a walkthrough of an architectural model. Its primary behavior is forward, backward, and left/right turning motion while maintaining a constant “eye level.” It is also possible to stop and look around at the scene. The eye level plane can be disabled, allowing the viewer to proceed in the “look at” direction, as if on an escalator. The eye level plane can also be translated up and down—similar to an elevator. See the SoXtWalkViewer(3) reference page or the Inventor Mentor for more details.

Walk Viewer Resources

Following are the SoXtWalkViewer resources available through RapidApp:

antialiasing 

Set the antialiasing for rendering. If this resource is set to True, “smoothing” is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points.

border 

Toggles the border around the viewer on or off.

bufferingType 

Sets the current buffering type.

decoration 

Toggles the controls surrounding the viewer on or off.

drawStyle 

Sets the current drawing style in the main view. See the SoXtViewer(3) reference page for more details.

headlight 

Turns the headlight on/off.

popupMenuEnabled 


Activates or deactivates the right mouse button popup menu over the viewer.

sceneGraph 

Specifies a filename of a scene graph to be displayed.

Render Area

This Inventor class provides Inventor rendering and event handling inside a GLX Motif widget. There is a routine to specify the scene to render. The scene is automatically rendered whenever anything under it changes (a data sensor is attached to the root of the scene), unless explicitly told not to do so (manual redraws). Users can also set Inventor rendering attributes such as the transparency type, antialiasing on or off, etc. This class employs a SoSceneManager to manage rendering and event handling. See the reference page or the Inventor Mentor for more details.

Render Area Resources

Following are the SoXtRenderArea resources available through RapidApp:

antialiasing 

Set the antialiasing for rendering. If this resource is set to True, “smoothing” is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points.

border 

Toggles the border around the viewer on or off.

bufferingType 

Sets the current buffering type.

decoration 

Toggles the controls surrounding the viewer on or off.

drawStyle 

Sets the current drawing style in the main view. See the SoXtViewer(3) reference page for more details.

headlight 

Turns the headlight on/off.

popupMenuEnabled 


Activates or deactivates the right mouse button popup menu over the viewer.

sceneGraph 

Specifies a filename of a scene graph to be displayed.

viewing 

Sets whether the viewer is turned on or off. When it is turned on, events are consumed by the viewer. When viewing is off, events are processed by the viewer's render area. This means events are sent down to the scene graph for processing (in other words, picking can occur).

Plane Viewer

An Inventor scene viewer. The Plane viewer component allows the user to translate the camera in the viewing plane, as well as dolly (move forward/backward) and zoom in and out. The viewer also allows the user to roll the camera (rotate around the forward direction) and seek to objects that specify a new viewing plane. This viewer could be used for modeling, in drafting, and architectural work. The camera can be aligned to the X, Y or Z axis. See the SoXtPlaneViewer(3) reference page or the Inventor Mentor for more details.

Plane Viewer Resources

Following are the SoXtPlaneViewer resources available through RapidApp:

border 

Toggles the border around the viewer on or off.

bufferingType 

Sets the current buffering type.

decoration 

Toggles the controls surrounding the viewer on or off.

drawStyle 

Sets the current drawing style in the main view. See the SoXtViewer(3) reference page for more details.

headlight 

Turns the headlight on/off.

popupMenuEnabled 


Activates or deactivates the right mouse button popup menu over the viewer.

sceneGraph 

Specifies a filename of a scene graph to be displayed.

Material Editor

This Inventor class is used to edit the material properties of a SoMaterial node. The editor can also be used directly with callbacks instead of attaching it to a node. The component consists of a render area displaying a test sphere, some sliders, a set of radio buttons, and a menu. The sphere displays the current material being edited. There is one slider for each material coefficient. Those fields are ambient, diffuse, specular, emissive (all of which are colors); and transparency and shininess (which are scalar values). A color editor can be opened to edit the color slider base color. A material list displays palettes of predefined materials from which to choose.

The editor can currently be attached to only one material at a time. Attaching two different materials will automatically detach the first one before attaching the second. See the SoXtMaterialEditor(3) reference page or the Inventor Mentor for more details.

SoFly Viewer

This Inventor scene viewer is intended to simulate flight through space, with a constant “world up” direction. The viewer only constrains the camera to keep the user from flying upside down. No mouse buttons need to be pressed in order to fly. The mouse position is used only for steering, while mouse clicks are used to increase or decrease the viewer speed.

The viewer allows you to tilt your head up/down/right/left and move in the direction you are looking (forward or backward). The viewer also supports seek to quickly move the camera to a desired object or point. See the SoXtFlyViewer(3) reference page or the Inventor Mentor for more details.

SoFly Viewer Resources

Following are the SoXtFlyViewer resources available through RapidApp:

antialiasing 

Set the antialiasing for rendering. If this resource is set to True, “smoothing” is enabled. Smoothing uses OpenGL's line- and point-smoothing features to provide cheap antialiasing of lines and points.

border 

Toggles the border around the viewer on or off.

bufferingType 

Sets the current buffering type.

decoration 

Toggles the controls surrounding the viewer on or off.

drawStyle 

Sets the current drawing style in the main view. See the SoXtViewer(3) reference page for more details.

headlight 

Turns the headlight on/off.

popupMenuEnabled 


Activates or deactivates the right mouse button popup menu over the viewer.

sceneGraph 

Specifies a filename of a scene graph to be displayed.

viewing 

Sets whether the viewer is turned on or off. When it is turned on, events are consumed by the viewer. When viewing is off, events are processed by the viewer's render area. This means events are sent down to the scene graph for processing (in other words, picking can occur).