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:
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).
| 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:
The cards are discussed in the “RapidApp Preferences Dialog” section. | |
| Exit | Exits RapidApp. |
| 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. |
| 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 |
| |
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. |
| 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. |
| 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 |
| |
| 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 |
| |
| Edit Installation |
| |
| Run Application |
|
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”—allows you to specify application file and class names and various application characteristics.
“RapidApp Card”—allows you to set preferences controlling RapidApp operation.
“Code Style Card”—allows you to specify various options that affect code generation.
“Merge Options Card”—allows you to specify how RapidApp merges code in various files.
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.
The following options are available:
| Directory Path (field at the top of the card) |
| |
| Application name |
| |
| Library name | The name of a library. RapidApp generates a Makefile that creates libraries of all the classes you create. | |
| VkApp subclass |
| |
| Library headers |
| |
| 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 |
| |
| Message system |
| |
| Header 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. |
The RapidApp card (Figure A-9) allows you to customize the behavior of RapidApp itself.
The following options are available:
| Auto-dismiss start screen |
| |
| Show tips on startup |
| |
| 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 |
| |
| Confirm before deleting shells |
| |
| Confirm before deleting containers |
| |
| Save when generating code |
| |
| Warn about unnamed Classes |
| |
| Generate Cvstatic Database |
| |
| Automatically label controls |
| |
| Automatically add callbacks |
| |
| Create window for standalone classes |
|
The Code Style card (Figure A-10) allows you to specify various options that affect code generation.
The following options are available:
| Use pure virtuals |
| |
| Use VkEZ | If set, the generated code includes the VkEZ headers and libraries. | |
| Non-SGI target |
| |
| Place resources in classes |
| |
| Strip dimensions from code |
| |
| Split classes into UI/Derived |
| |
| Force window children to be classes |
| |
| Use IRIS GL widget |
| |
| Add support for dynamic loading |
| |
| Header Comments |
| |
| 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. |
The Merge Option card (Figure A-11) affects how RapidApp merges code in various files.
The following options are available:
| Report backups |
| |
| Save backups | If set, RapidApp creates backups when any changes are made to code. | |
| Do block merge |
| |
| UI classes | The base UI classes | |
| Derived 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. |
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 |
| ||
| Library to be Linked |
| ||
| Header File | The header file for the component, specified relative to /usr/include | ||
| Other Required Headers |
| ||
| Palette | The name of the palette on which this component should appear | ||
| Icon Name |
| ||
| Desktop Icon Drop List |
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:
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.
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.
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 |
| |
| Click on selected menu |
| |
| 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 |
| |
| Middle mouse button |
| |
| Ctrl+Left mouse button |
| |
| Drag-and-drop from desktop |
|
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
The Windows palette (see Figure A-13) contains window interface elements.
The user interface elements available through this palette are described in the following sections.
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.
Following are the VkSimpleWindow resources:
| autoRouteCallbacks |
| |
| coprimaryWindow |
| |
| disableIconify | If True, the user's ability to iconify the window is disabled. | |
| disableWindowResize |
| |
| forceChildClass |
| |
| hideTitleBar | If True, do not display this window's title. | |
| hideWMBorder |
| |
| showPopupHelp (version 6.2 only) |
| |
| title | The title that appears in the window manager border. |
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.
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 |
| |
| autoRouteCallbacks |
| |
| forceChildClass |
| |
| minimizeDialogs |
|
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.
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.
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.
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.
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.
The Containers palette (see Figure A-14) includes container interface elements such as bulletin boards and radio button boxes.
The user interface elements available through this palette are described in the following sections.
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.
Following are the Bulletin Board resources:
| XmNmarginHeight |
| |
| XmNmarginWidth |
|
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:
Make the Rubber Board as small as it could ever reasonably be.
Position all children as they would be positioned and sized for the current Rubber Board size.
Select the Rubber Board and set the XmNsetInitial resource to True, to take a “snapshot” of the current layout.
Resize the Rubber Board to its largest reasonable size.
Lay out the children again and resize them as you would expect them to appear for the current Rubber Board size.
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.
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. |
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.
Following are the Spring Box resources:
| XmNmarginHeight |
| |
| XmNmarginWidth |
| |
| XmNminSpacing |
| |
| XmNorientation |
| |
| XmNdefaultVerticalLayout, XmNdefaultHorizontalLayout |
|
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 |
| |
| XmNtopSpring | Sets the relative springiness of the space above the widget. | |
| XmNbottomSpring |
| |
| XmNverticalSpring |
| |
| XmNhorizontalSpring |
|
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 |
| |
| Right mouse button |
| |
| Shift+left mouse button |
|
The following resource affects the behavior of the Form container itself.
| XmNfractionBase |
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. |
These resources are supported by all children of a Form container.
| XmNbottomAttachment, XmNtopAttachment, XmNleftAttachment, XmNrightAttachment |
| |
| XmNBottomOffset, XmNtopOffset, XmNleftOffset, XmNrightOffset |
| |
| XmNtopPosition, XmNbottomPosition, XmNleftPosition, XmNrightPosition |
|
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 |
| |
| Use Keep Parent Mode |
| |
| Drop on the Sash |
|
The following is the Paned and HPanedWindow resource:
| XmNseparatorOn |
|
The following are the resources supported by any child of a Paned Window:
| XmNallowResize |
| |
| XmNpaneMinimum |
| |
| XmNpaneMaximum |
|
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)
Following are the Row Column resources:
| XmNadjustLast |
| |
| XmNentryAlignment |
| |
| 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 |
| |
| XmNorientation |
| |
| 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:
|
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.
Following are the resources supported by the Scrolled Window container:
| XmNscrollBarDisplayPolicy |
| |
| XmNscrollingPolicy |
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 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.
Following are the resources supported by both the Drawing Area and Visual Drawing containers:
| XmNexposeCallback |
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 |
| |
| XmNresizeCallback |
|
Following are the resources supported by the Visual Drawing container only:
| SgNditherBackground |
| |
| SgNinstallColormap |
|
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.
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.
Following is the Frame resource:
| XmNshadowType |
|
Following are the Frame constraint resources:
| XmNchildType |
The Frame geometry manager ignores any child of type XmFRAME_GENERIC_CHILD. | |
| XmNchildHorizontalAlignment |
| |
| XmNchildVerticalAlignment |
|
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 |
| |
| GLwNginitCallback |
| |
| GLwNinputCallback |
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 |
|
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 |
| |
| installBackground |
|
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.
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.
The Controls palette (see Figure A-15) contains control interface elements such as the text field, finder, and scroll bar.
The user interface elements available through this palette are described in the following sections.
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.
Following are the resources supported by the Push Button widget:
| XmNactivateCallback |
| |
| XmNalignment |
| |
| XmNlabelPixmap |
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 |
| |
| XmNlabelType |
Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource. | |
| XmNrecomputeSize |
|
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:
XmString xmstr; char *text; XtVaGetValues( widget, XmNlabelString, &xmstr, NULL); text = XmStringGetLtoR(xmstr, XmFONTLIST_DEFAULT_TAB); |
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);
|
EZ(widget) = "text"; |
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.
Following are the Toggle Button resources:
| XmNalignment |
| |
| XmNindicatorOn |
| |
| XmNlabelPixmap |
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 |
| |
| XmNlabelType |
Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource. | |
| XmNrecomputeSize |
| |
| 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 |
| |
| XmNvalueChangedCallback |
|
Following are examples of Toggle Button use:
XtVaSetValues(widget, XmNset, newBooleanValue, NULL); |
XmToggleButtonSetState(widget, newBooleanValue, True); |
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.
Following are the Drawn Button resources:
| XmNactivateCallback |
| |
| XmNalignment |
| |
| XmNexposeCallback |
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 |
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 |
| |
| XmNlabelType |
Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource. | |
| XmNpushButtonEnabled |
| |
| XmNrecomputeSize |
|
The Arrow Button widget is similar to the Push Button widget, but is displayed as a directional arrow.
The Label widget can contain non-editable text or a pixmap.
The Label widget supports the following resources:
| XmNalignment |
| |
| XmNlabelPixmap |
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 |
| |
| XmNlabelType |
Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource. | |
| XmNrecomputeSize |
|
Following are examples of Label use:
XmString xmstr; char *text; XtVaGetValues( widget, XmNlabelString, &xmstr, NULL); text = XmStringGetLtoR(xmstr, XmFONTLIST_DEFAULT_TAB); |
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);
|
EZ(widget) = "text"; |
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.
The Separator widget supports the following resources:
| XmNorientation |
| |
| XmNseparatorType |
|
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.
The following resources are available for the Scroll Bar widget from within RapidApp:
| XmNdragCallback |
| |
| XmNorientation |
| |
| XmNvalueChangedCallback |
|
Following are examples of Scroll Bar use:
int value; XtVaGetValues(widget, XmNvalue, &value, NULL); |
int value = EZ(widget); |
XtVaSetValues(widget, XmNvalue, 100, NULL); |
EZ(widget) = 100; |
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.
The Scale widget supports the following resources:
| XmNdecimalPoints |
| |
| XmNdragCallback |
| |
| 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 |
| |
| XmNscaleHeight |
| |
| XmNscaleWidth |
| |
| XmNshowValue |
| |
| XmNtitleString |
| |
| 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 |
|
Following are examples of Scale use:
int value; XtVaGetValues(widget, XmNvalue, &value, NULL); |
int value = EZ(widget); |
XtVaSetValues(widget, XmNvalue, 100, NULL); |
EZ(widget) = 100; |
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.
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 |
| |
| XmNscrollingPolicy |
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. |
The following resources are supported by the List widget. Click in the list area to access these resources.
| XmNbrowseSelectionCallback |
| |
| XmNdefaultActionCallback |
| |
| XmNextendedSelectionCallback |
| |
| 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 |
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 |
| |
| XmNselectionPolicy |
| |
| XmNsingleSelectionCallback |
| |
| XmNvisibleItemCount |
|
The Scrolled Text widget provides a simple multiline scrollable text editor.
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 |
| |
| XmNmotionVerifyCallback |
| |
| 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 |
| |
| XmNvalue | Specifies the initial contents of the Text widget. | |
| XmNvalueChangedCallback |
|
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.
Following are the resources supported by the Text Field widget:
| XmNactivateCallback |
| |
| 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 |
| |
| XmNmotionVerifyCallback |
| |
| XmNvalue | Specifies the initial contents of the Text widget. | |
| XmNvalueChangedCallback |
|
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.
Following are the resources supported by the Finder widget:
| XmNactivateCallback |
| |
| XmNvalueChangedCallback |
|
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.
Following are the resources supported by the Thumb Wheel widget:
| SgNhomePosition |
| |
| 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 |
| |
| SgNangleRange |
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 |
| |
| XmNunitsPerRotation |
| |
| XmNvalue | Specifies the current position of the thumb wheel, between XmNminimum and XmNmaximum if the thumb wheel is not infinite. | |
| XmNvalueChangedCallback |
|
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.
Following are the resources supported by the Dial widget:
| SgNangleRange |
| |
| SgNdialMarkers |
| |
| 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 |
| |
| SgNmarkerLength |
| |
| SgNangleRange |
| |
| SgNdialVisual | Specifies the look of the dial, either SgKNOB or SgPOINTER. | |
| XmNshadowThickness |
| |
| XmNdragCallback |
| |
| XmNvalue | Specifies the current position of the dial, between XmNminimum and XmNmaximum. | |
| XmNvalueChangedCallback |
|
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.
Following are the LED Button resources:
| XmNalignment |
| |
| XmNindicatorOn |
| |
| XmNlabelPixmap |
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 |
| |
| XmNlabelType |
Changing either the XmNlabelString or XmNlabelPixmap in RapidApp automatically sets the resource. | |
| XmNrecomputeSize |
| |
| 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 |
|
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.
Following are the resources for Drop Pocket:
| SgNiconUpdateCallback |
| |
| SgNname | Specifies the name of the current icon. This resource can be set to specify the initial icon that appears in the Drop Pocket. |
The Menus palette (see Figure A-16) contains menu interface elements such as pulldown menu, option menu, and menu separator.
The user interface elements available through this palette are described in the following sections.
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).
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. |
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).
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).
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.
Following are the MenuEntry resources available through RapidApp:
| XmNaccelerator |
| |
| XmNacceleratorText |
| |
| XmNactivateCallback |
| |
| XmNlabelString |
| |
| XmNmnemonic |
| |
| XmNundoCallback |
|
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.
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.
Following are the MenuToggle resources available through RapidApp:
| XmNaccelerator |
| |
| XmNacceleratorText |
| |
| XmNvalueChangedCallback |
| |
| XmNlabelString |
| |
| XmNmnemonic |
| |
| XmNundoCallback |
| |
| XmNset | Determines whether this item is selected by default. |
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.
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.
Following are the MenuToggle resources available through RapidApp:
| XmNaccelerator |
| |
| XmNacceleratorText |
| |
| XmNactivateCallback |
| |
| XmNlabelString |
| |
| XmNmnemonic |
|
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.
The ViewKit palette (see Figure A-17) contains ViewKit interface elements such as tab panel, tick marks, and graph.
The user interface elements available through this palette are described in the following sections.
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.
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.
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.
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 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 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 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.
The Inventor palette (see Figure A-18) contains Inventor interface elements such as material list, light slider set, and render area.
The user interface elements available through this palette are described in the following sections.
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.
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.
Following are the SoXtExaminerViewer resources available through RapidApp:
| animationEnabled |
| |
| 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 |
| |
| sceneGraph | Specifies a filename of a scene graph to be displayed. | |
| feedbackVisibility |
| |
| feedbackSize | Set the point of rotation feedback size in pixels (default 20 pixels). |
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.
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 |
| |
| sceneGraph | Specifies a filename of a scene graph to be displayed. |
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.
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 |
| |
| 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). |
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.
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 |
| |
| sceneGraph | Specifies a filename of a scene graph to be displayed. |
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.
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.
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 |
| |
| 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). |