SGI Sgm Widgets

Silicon Graphics Incorporated (SGI) Sgm widgets are included on the Palette when you run Builder Xcessory on an SGI platform. The following sections provide descriptions of each SGI widget in alphabetical order (refer to your SGI documentation for more detailed information):



The SgColumn widget displays its children stacked in column with an optional associated label.


· Useful for displaying labeled data-entry fields.

· Offers several resources to set various characteristics of the label.



The SgDial widget allows the user to specify or change a value in a given range. Users change the current value by direct manipulation of the dial (dragging or clicking on the appropriate tick mark that represents the desired value). The appearance and the behavior of the dial can be modified. For example, the angular range in degrees through which the dial is allowed to rotate and the color of the dial and tick marks can be changed.


· Use dials as an alternative to scales for setting parameters. Dials are best for numeric parameters where the range of allowable values is small and the values are discrete.

· In a group of dials, place each dial label in the same position relative to its dial (that is, either all the labels should be below the dials, or all the labels should be above the dials).

Drop Pocket


The SgDropPocket widget displays the desktop icon that represents the current file or directory that has been dropped on it. Fully implements drag and drop protocol with the Indigo Magic desktop.


The user can drop a desktop icon into the drop pocket to automatically update data in an application.

Dyna Menu


Use the SgDynaMenu widget for entries that are not always available. Entries are placed in a menu and disabled when they are not available.


Because menu entries are visible only when the application is in a specific state, dynamic menu entries do not allow the user to learn what entries are in each of the menus.



The SgFinder widget allows users to find an application or file using drag and drop or by entering the application or file name. Combines a Drop Pocket with a text field and a Dyna Menu to hold recent entries.


Useful for allowing a user to quickly change the file system component (file, directory, and so forth) that the application is operating on.



The SgGraph widget allows you to display any group of widgets as a graph, with each widget representing a node. The graph can be disconnected, as well as contain cycles. Arcs used to connect the nodes are instances of an SgArc widget, developed specifically for use with the SgGraph widget. Can arrange all nodes either horizontally or vertically according to an internal layout algorithm, and supports an edit mode in which arcs and nodes may be interactively repositioned as well as created.


· Arcs may be undirected, directed, or bi-directed.

· Does not understand arc direction semantics (for layout and editing purposes, an arc always has a parent and a child regardless of direction).

· In read-only mode, all events are passed directly to its children.

· In edit mode, SgGraph takes all device events for editing commands.



SgGrid is a container widget that has no input semantics of its own. Arranges its children in a two dimensional grid of arbitrary size. Each row and column of this grid may be separately designated as having a fixed size or as having some degree of stretchability. Each child may be resizable in either or both directions, or forced to a fixed size. If a child is a fixed size, and smaller than the cell that contains it, the child's position within the cell is determined by an XmNgravity resource.


· The position of each child must be set using the XmNrow and XmNcolumn resources. If no position is specified, the child is placed in an unspecified free cell.

· The resizability of each row and column must be set using convenience functions SgGridSetRowResize and SgGridSetColumnResize. The default is for all rows and columns to be resizable. All widgets are resized according to their relative natural size.

· Unmapping a child does not affect Grid.

Horizontal Paned Window


SgHorizontalPanedWindow is a composite widget that lays out children in a horizontally tiled format and allows the user to horizontally resize various portions of the application interface. The first child is inserted at the left side of the Horizontal Paned Window and each successive child is inserted to the right.

The Horizontal Paned Window grows to match the height of its tallest child and all other children are forced to this height. The width of the Horizontal Paned Window is equal to the sum of the widths of all its children, the spacing between them, and the size of the left and right margins.


· Each child object that the Horizontal Paned Window controls is associated with a sash that the user can move to change the size of the child.

· Various constraint resources control the resizing behavior of children when the Horizontal Paned Window is resized.

IRIS GL Draw or Open GL Draw


Depending on whether you are using the IRIS GL proprietary 3-D graphics standard or the Open GL non-proprietary 3-D graphics standard, the following widget is displayed on the Palette:

· GlxMDraw--Displayed when running the IRIS GL standard. This is the default, and you can also explicitly set it with the +openGL flag on the bx command line.

· GLwMDrawingArea--Displayed when running the OpenGL standard. You can also explicitly set it with the -openGL flag on the bx command line.

Note: Although these widgets are not actual SGI Sgm widgets, they are included with the SGI Sgm widgets for your convenience.


· Note the state of the openGL flag is preserved between sessions.

· If you are unsure of which object to load and use, the Open GL Draw is recommended. The IRIS GL Draw object is really only included for backwards-compatibility purposes.

· OpenGL and IRIS GL cannot be used in the same application.

Icon Gadget


The SgIconGadget widget displays a labeled pixmap. Does not accept any button or key input, and the help callback is the only callback defined. Receives enter and leave events. Can be displayed in colors other than that provided by its parent, a restriction that limits the usefulness of gadgets in many situation.


· Can contain both text and a pixmap.

· SgIconGadget text is a compound string.

· The text can be multi-directional, multiline, and/or multi-font.

· When a SgIconGadget is insensitive, its text is stippled, or the user-supplied insensitive pixmap is displayed.

LED Button


SgLEDButton is an SGI enhanced XmToggleButton that allows the user to set an on/off choice. The LED Button adds two new indicator types to those of the standard Motif Toggle Button: Xm3D_N_OF_MANY and Xm3D_ONE_OF_MANY. These types cause the indicator to be drawn like an LED with on/off state indicated by a "lit/unlit" color selection.


Apart from indicator types, LED Button is identical to an XmToggleButton.

Rubber Board


SgRubberBoard allows the user to set up initial and final layout states for an interface and interpolates any intervening layouts.


Exercise caution when using this manager. Adjustments are not made by the Rubber Board for any changes initiated by its children. Therefore, changes to a child's size due to localization, and so forth, are not taken into account when the Rubber Board recalculates child size and location when the Rubber Board itself is resized.

Spring Box


SgSpringBox is a container widget with no input semantics of its own. Arranges its children in a single row or column based on a set of spring constraints assigned to each child. Allows layouts similar to those supported by the XmForm widget, but usually easier to set up. Possible to create some layouts that cannot be achieved with the XmForm widget (for example, centering a column of widgets is very easy to do with the SgSpringBox widget, but nearly impossible using the XmForm).


· Each child of an SgSpringBox widget has six constraints associated with it.

· The resources XmNverticalSpring and XmNhorizontalSpring 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 has a spring between its left, right, top, and bottom sides and whatever boundary it is adjacent to.

Thumb Wheel


The SgThumbWheel widget allows users to specify or modify a value from within a range of values or from an infinite range. Users change the current value by clicking and dragging (spinning) the wheel. Can also include a home button that returns the thumbwheel to a default value. Thumbwheels can be oriented horizontally or vertically.


· Use to change the values of continuous variables.

· Use with finite ranges for zooming operations.

· Use with an infinite range for rotating objects.

· Use when screen real estate is limited.

· Update the object or value as the user moves the thumbwheel to imply direct, continuous manipulation.

Visual Draw


The SgVisualDraw widget allows its X Visual to be set such that graphics may be rendered using a visual different from the surrounding widget.


Almost identical to the Motif Drawing Area widget.