XgPEXSimple(3X)
NAME
XgPEXSimple − of the XgPEXSimple widget class.
SYNOPSIS
#include "PEXSimple.h"
DESCRIPTION
The XgPEXSimple widget class is specifically designed to display graphics created by the PEXlib library. The XgPEXSimple widget class is also a composite widget and subclass of XmDrawingArea that supports minimal geometry management for multiple widget or gadget children.
Classes
The XgPEXSimple widget class inherits behavior and resources from the Core, Composite, Constraint, XmManager, and XmDrawingArea classes.
The class pointer is xgPEXSimpleWidgetClass.
The class name is XgPEXSimple.
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 the resource file(s) (e.g., the .Xdefaults file and "/usr/lib/Xll/app-defaults"), remove the XgN or XgC prefix and use the remaining letters. To specify one of the defined values for a resource in the resource 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 how the given resource can be set or retrieved. These codes mean the following:
C — This resource can be set at creation time.
S — This resource can be set any time by using XtSetValues.
G — This resource can be retrieved by using XtGetValues.
| XgPEXSimple Resource Set | ||||
| Name | Class | Type | Default | Access |
| XgNrenderer | XgCRenderer | PEXRenderer | dynamic | CSG |
| XgNoverlay | XgCOverlay | Boolean | False | CG |
| XgNtransparent | XgCTransparent | int | dynamic | G |
| XgNvisual | XmCVisual | Visual * | dynamic | CG |
| XgNwmCmap | XgCWmCmap | XgWmCmap | XgWM_CMAP_HIGH_PRIORITY | CSG |
| XgNrescalePolicy | XgCRescalePolicy | XgRescalePolicy | XgRESCALE_MINOR | CSG |
XgNrenderer
Specifies the resource ID of the PEX renderer used for PEX operations in this widget. Unless this resource is set to an existing renderer or to the special value XgDONT_CREATE_RENDERER before the widget is realized, a new renderer will be created when the widget is realized. Note that a renderer is created for a particular visual. If the application specifies an existing renderer for XgNrenderer before the widget is realized, the corresponding visual must be specified in the XgNvisual resource and should be checked again after the widget is realized to ensure that the widget actually used that visual. The XgNrenderer resource can be reset by the application after the widget is realized. The renderer created for the widget is created with default renderer attributes, which can be changed using PEXChangeRendererAttributes. Because a widget’s renderer can be reused by other widgets, the renderer is not automatically deallocated when the widget is destroyed. The application is responsible for deallocating the renderer if needed (for example, if the widget is destroyed before the application terminates and memory consumption is an issue). The XmNdestroyCallback resource and PEXFreeRenderer() can be used to free the renderer when the widget is destroyed. Specifying this resource in an application defaults file, while theoretically possible, is strongly discouraged. A renderer ID value can only be determined at runtime, therefore setting this value in an application defaults file is meaningless.
XgNoverlay
Specifies whether the widget should be placed in an overlay− plane visual. Some X servers support overlay−plane visuals that have a transparent color which, when rendered, allows any image−plane visual "below" to be viewed. If the XgNoverlay resource is set to False, the widget window will not use an overlay−plane visual (False is the default case). If the XgNoverlay resource is set to True, the visual selection process will report whether an overlay−plane visual was selected. If an overlay−plane visual is not selected because it is not the best visual for PEX, the XgNoverlay resource will be set to False when the widget is realized.
XgNtransparent
This resource is only readable by the application and specifies a pixel value that will be transparent in an overlay−plane visual. If there is no transparent color in the widget window’s visual, this resource will have a default value of negative 1.
XgNvisual
The visual of a window is established at window creation time (widget realization time), and is not changeable thereafter. The visual is used to determine how color is used in the window. The application can specify a preferred visual as this resource value prior to the XtRealizeWidget call. This visual will be used if it supported on the display; however, if it is not supported, the XgNvisual resource will be set to the visual that was actually assigned to the window. It is not possible to specify this value in an application defaults file.
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(s) installed. Possible values of this resource include:
XgWM_CMAP_HIGH_PRIORITY
Add this window at highest priority. This is the default.
XgWM_CMAP_LOW_PRIORITY
Add this window at lowest priority
XgWM_CMAP_NONE
Don’t set WM_COLORMAP_WINDOWS
Changing this resource with XtSetValues causes the priority of the window to be updated within the list.
XgNrescalePolicy
Enables the application to control the behavior of the window when it is resized. It is used in the XmNresizeCallback inherited from the XmDrawingArea widget class, which is triggered when a ResizeRequest event type is encountered. Possible values of this resource include:
XgRESCALE_MINOR
Isotropic (non-distorting) rubbersheet to the smallest side (width or height) of the window, meaning there may be an unused portion of the window. This is the default.
This resource is included for compatibility reasons (other graphics widgets define this resource), even though it currently supports only one resource value. Additional values may be added in the future.
Inherited Callbacks and Resources
In addition, the XgPEXSimple widget class inherits callbacks and resources from the following superclasses. For a complete description of each callback or 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 |
| XmNinitialResources- | XmCInitialResources- | Boolean | True | CG |
| Persistent | Persistent | |||
| 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 XgPEXSimple widget class inherits translations from XmDrawingArea. For information about these translations see the XmDrawingArea(3X) man page.
Virtual Bindings
The bindings for virtual keys are vendor specific. For information about bindings for virtual buttons and keys, see the VirtualBindings(3X) man page.
RESTRICTIONS
The XgPEXsimple widget requires Motif Release 1.2 or later. The XgPEXSimple widget cannot be used in the same application program as the XgPhigsDraw or XgStarbase widgets.
RELATED INFORMATION
Composite(3X), Constraint(3X), Core(3X), XmCreateDrawingArea(3X), XmManager(3X), and XmDrawingArea(3X).
Hewlett-Packard Company — HP-PEX5 Release 1.0: December 1992