Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XgStarbase(3X) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XgStarbase(3X)

NAME

XgStarbase − the Starbase widget class

SYNOPSIS

#include <Xg/Starbase.h>

DESCRIPTION

The Starbase widget class is specifically designed to display graphics created by the Starbase library.  Callbacks notify the application when graphics need to be drawn (exposure events or widget resize) and when the widget receives input from the keyboard or mouse.  Applications are responsible for defining appearance and behavior as needed in response to Starbase widget callbacks. 

The Starbase widget class is also a composite widget and subclass of XmDrawingArea that supports minimal geometry management for multiple widget or gadget children. 

Classes

The Starbase widget class inherits behavior and resources from the Core, Composite, Constraint, XmManager, and XmDrawingArea classes. 

The class pointer is XgStarbaseWidgetClass. 

The class name is XgStarbase. 

New Resources

The following table defines a set of widget resources used by the programmer to specify data.  The programmer can also set the resource values for the inherited classes to set attributes for this widget.  To reference a resource by name or by class in a .Xdefaults file, remove the XgN or XgC prefix and use the remaining letters.  To specify one of the defined values for a resource in a .Xdefaults file, remove the Xg prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words).  The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A). 
 
 

XgStarbase Resource Set
Name Class Type Default Access
XgNopenMode XgCOpenMode XgOpenMode XgINIT|XgTHREE_D|XgMODEL_XFORM CG
XgNshadeMode XgCShadeMode XgShadeMode XgCMAP_NORMAL CG
XgNoverlay XgCOverlay Boolean False CG
XgNretained XgCRetained Boolean False CSG
XgNtransparent XgCTransparent int dynamic G
XgNvisual XmCVisual Visual * dynamic CG
XgNdriver XgCDriver String NULL CG
XgNfildes XgCFildes int dynamic G
XgNwmCmap XgCWmCmap XgWmCmap XgWM_CMAP_HIGH_PRIORITY CSG
XgNrescalePolicy XgCRescalePolicy XgRescalePolicy XgRESCALE_MINOR CSG
XgNmaxWidth XgCMaxWidth Dimension dynamic CG
XgNmaxHeight XgCMaxHeight Dimension dynamic CG

XgNopenMode
Specifies the value of the mode parameter passed to gopen. This may be set to a combination of several flag values, separated by ‘|’ characters or spaces. Possible flag values include XgINIT, XgTHREE_D, XgMODEL_XFORM, XgFLOAT_XFORM, XgINT_XFORM, XgINT_XFORM32, XgUNACCELERATED, and XgACCELERATED.  See the gopen (3G) manual entry for descriptions of these flags. 

XgNshadeMode
Specifies the shade_mode (3G) setting that the gopen should be used in.  This may affect the visual of the window that is created for the widget.  The widget window will be created with a visual that supports the shade mode if such a visual is available.  If the requested shade mode cannot be used, the XgNshadeMode resource will be set to the actual shade mode used when the widget was created.  Possible flag values include XgCMAP_NORMAL, XgCMAP_FULL, and XgCMAP_MONOTONIC. 

XgNoverlay
Specifies whether the widget should be placed in an overlay visual. Some X servers provide overlay visuals which allow one or more transparent colors which show through to any normal visual windows behind an overlay window. If the XgNoverlay resource is set to False, the widget window will not use an overlay visual.  If the XgNoverlay resource is set to True and such a visual exists, the widget window will be created with an overlay visual.  If no overlay visual is available, the XgNoverlay resource is set to False when the widget is realized.  Selecting an overlay visual may restrict the shade mode settings available. 

XgNretained
Specifies whether the widget should request backing store. If retained is False the window’s backing_store attribute is set to NotUseful. If retained is True the window’s backing_store attribute is set to Always.

XgNtransparent
Specifies a pixel value that will be transparent in an overlay visual. If there is no transparent color in the widget window’s visual, this resource will have the value -1.

XgNvisual
Specifies the visual used in creating the widget.  Setting this resource will override the visual selection of the XgNshadeMode and XgNoverlay resources.  Setting this resource may restrict the shade mode settings available. 

XgNdriver
Specifies the Starbase driver that should be requested by gopen. The default value of NULL will cause a driver to be automatically selected.

XgNfildes
Specifies the file descriptor that should be used for Starbase library calls using the widget.  If no file descriptor is available because no gopen has been done yet, this resource will have the value -2. If no file descriptor is available because a gopen failed, this resource will have the value -1.

XgNwmCmap
Specifies the policy for setting the WM_COLORMAP_WINDOWS property.  Window managers use this property to read a list of child windows of a top level window which may have private colormaps to install when the top level window has colormap focus.  The earlier windows in the list have higher priority and are more likely to have their colormap installed.  Possible values of this resource include XgWM_CMAP_NONE (don’t set WM_COLORMAP_WINDOWS), XgWM_CMAP_LOW_PRIORITY (add this window at lowest priority), and XgWM_CMAP_HIGH_PRIORITY (add this window at highest priority).  Changing this resource with XSetValues causes the priority of the window to be updated within the list. 

XgNrescalePolicy
Specifies the policy for rescaling output when the window is resized. Possible values of this resource include XgRESCALE_NONE, XgRESCALE_DISTORT, XgRESCALE_MINOR, and XgRESCALE_MAJOR. The XgRESCALE_NONE policy leaves the Starbase p1-p2 limits at the original size the widget’s window was created at.  No changes to p1-p2 or mapping_mode are made for Resize actions.  The remaining rescale policies change the Starbase p1-p2 limits and mapping_mode.  The widget will gopen Starbase with the window set to the MaxWidth and MaxHeight size.  The default values for MaxWidth and MaxHeight are the screen width and height.  The XgRESCALE_DISTORT policy changes the Starbase mapping_mode to distort the aspect ratio between x and y.  It rescales the p1-p2 limits to the full window width and height, limited by MaxWidth and MaxHeight.  The XgRESCALE_MINOR policy changes the Starbase mapping_mode to not distort the aspect ratio between x and y.  It rescales the p1-p2 limits to the full window width and height, limited by MaxWidth and MaxHeight.  If the window’s current aspect ratio does not match the MaxWidth/MaxHeight ratio, there will be unused parts of the window.  The XgRESCALE_MAJOR policy changes the Starbase mapping_mode to not distort the aspect ratio between x and y.  It may rescale the p1-p2 limits to larger than the full window width and height.  If the window is resized to a different aspect ratio than the MaxWidth/MaxHeight ratio, the p1-p2 limits will be scaled so the original aspect ratio is preserved, and the p1-p2 area exactly fits the larger of the window width or height. 

XgNmaxWidth
Specifies the maximum window width that output can be rescaled to.

XgNmaxHeight
Specifies the maximum window height that output can be rescaled to.

Inherited Resources

The Starbase widget class inherits behavior and resources from the following superclasses.  For a complete description of each resource, refer to the man page for that superclass. 

DrawingArea Resource Set
Name Class Type Default Access
XmNexposeCallback XmCCallback XtCallbackList NULL C
XmNinputCallback XmCCallback XtCallbackList NULL C
XmNmarginHeight XmCMarginHeight Dimension 10 CSG
XmNmarginWidth XmCMarginWidth Dimension 10 CSG
XmNresizeCallback XmCCallback XtCallbackList NULL C
XmNresizePolicy XmCResizePolicy unsigned char XmRESIZE_ANY CSG

 

XmManager Resource Set
Name Class Type Default Access
XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNforeground XmCForeground Pixel dynamic CSG
XmNhelpCallback XmCCallback XtCallbackList NULL C
XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
XmNnavigationType XmCNavigationType XmNavigationType XmTAB_GROUP CSG
XmNshadowThickness XmCShadowThickness Dimension 0 CSG
XmNstringDirection XmCStringDirection XmStringDirection dynamic CG
XmNtopShadowColor XmCBackgroundTopShadowColor Pixel dynamic CSG
XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
XmNtraversalOn XmCTraversalOn Boolean True CSG
XmNunitType XmCUnitType unsigned char dynamic CSG
XmNuserData XmCUserData Pointer NULL CSG

Composite Resource Set
Name Class Type Default Access
XmNchildren XmCReadOnly WidgetList NULL G
XmNinsertPosition XmCInsertPosition (*)(  ) NULL CSG
XmNnumChildren XmCReadOnly Cardinal 0 G

 

Core Resource Set
Name Class Type Default Access
XmNaccelerators XmCAccelerators XtAccelerators NULL CSG
XmNancestorSensitive XmCSensitive Boolean dynamic G
XmNbackground XmCBackground Pixel dynamic CSG
XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG
XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderWidth XmCBorderWidth Dimension 0 CSG
XmNcolormap XmCColormap Colormap dynamic CG
XmNdepth XmCDepth int dynamic CG
XmNdestroyCallback XmCCallback XtCallbackList NULL C
XmNheight XmCHeight Dimension dynamic CSG
XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True CG
XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
XmNscreen XmCScreen Screen * dynamic CG
XmNsensitive XmCSensitive Boolean True CSG
XmNtranslations XmCTranslations XtTranslations NULL CSG
XmNwidth XmCWidth Dimension dynamic CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG

Translations

The Starbase widget class inherits translations from XmDrawingArea. 

Action Routines

The Starbase widget class action routines are described below:

Additional Behavior

The Starbase widget has the additional behavior described below:

<Widget Resize>:
Changes the p1-p2 range of the Starbase file descriptor to reflect the new window size as specified by the XgNresizePolicy resource. For rescale policies other than XgRESCALE_NONE, the resize action turns off hidden_surface removal and backface culling. If you plan to leave either enabled, you must reenable it by calling hidden_surface in a resize callback. Resize also performs an Expose action.

Virtual Bindings

The bindings for virtual keys are vendor specific.  For information about bindings for virtual buttons and keys, see VirtualBindings (3X). 

Compiling

For your program to locate the include file, include the following option in the compile command (the actual path name of the directory given in angle brackets below depends on the file system structure; see the Graphics Administration Guide for details):
 
-I <sb-include>/Motif1.2

RELATED INFORMATION

Composite (3X), Constraint (3X), Core (3X), XmCreateDrawingArea (3X), XmManager (3X), and XmDrawingArea (3X). 
 
 
 
 
 

Hewlett-Packard Company  —  November 03, 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026