XmMainWindow(3Xm) — UNIX Programmer’s Manual
NAME
XmMainWindow — the MainWindow widget class.
SYNOPSIS
#include <Xm/MainW.h>
DESCRIPTION
MainWindow provides a standard layout for the primary window of an application. This layout includes a MenuBar, a CommandWindow, a work region, and ScrollBars. Any or all of these areas are optional. The work region and ScrollBars in the MainWindow behave identically to the work region and ScrollBars in the ScrolledWindow widget. The user can think of the MainWindow as an extended ScrolledWindow with an optional MenuBar and optional CommandWindow.
In a fully-loaded MainWindow, the MenuBar spans the top of the window horizontally. The CommandWindow spans the MainWindow horizontally just below the MenuBar, and the work region lies below the CommandWindow. The space remaining below the CommandWindow, if any, is managed in a manner identical to ScrolledWindow. The behavior of ScrolledWindow can be controlled by the ScrolledWindow resources. To create a MainWindow, first create the work region elements, a MenuBar, a CommandWindow, a horizontal ScrollBar, and a vertical ScrollBar widget, and then call XmMainWindowSetAreas with those widget IDs.
MainWindow can also create two Separator widgets that provide a visual separation of MainWindow’s three components.
Classes
MainWindow inherits behavior and resources from Core, Composite, Constraint, XmManager, and ScrolledWindow classes.
The class pointer is xmMainWindowWidgetClass.
The class name is XmMainWindow.
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 XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters (in either lower case or upper case, 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).
| XmMainWindow Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNcommandWindow | XmCCommandWindow | Widget | NULL | CSG |
| XmNmainWindowMarginHeight | XmCMainWindowMarginHeight | Dimension | 0 | CSG |
| XmNmainWindowMarginWidth | XmCMainWindowMarginWidth | Dimension | 0 | CSG |
| XmNmenuBar | XmCMenuBar | Widget | NULL | CSG |
| XmNshowSeparator | XmCShowSeparator | Boolean | False | CSG |
XmNcommandWindow
Specifies the widget to be laid out as the CommandWindow. This widget must have been previously created and managed as a child of MainWindow.
XmNmainWindowMarginHeight
Specifies the margin height on the top and bottom of MainWindow. This resource overrides any setting of the ScrolledWindow resource XmNscrolledWindowMarginHeight.
XmNmainWindowMarginWidth
Specifies the margin width on the right and left sides of MainWindow. This resource overrides any setting of the ScrolledWindow resource XmNscrolledWindowMarginWidth.
XmNmenuBar
Specifies the widget to be laid out as the MenuBar. This widget must have been previously created and managed as a child of MainWindow.
XmNshowSeparator
Displays separators between the components of the MainWindow when set to true. If set to False, no separators are displayed.
Inherited Resources
MainWindow inherits behavior and resources from the following superclasses. For a complete description of these resources, refer to the man page for that superclass.
| XmScrolledWindow Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNclipWindow | XmCClipWindow | Widget | NULL | G |
| XmNhorizontalScrollBar | XmCHorizontalScrollBar | Widget | NULL | CSG |
| XmNscrollBarDisplayPolicy | XmCScrollBarDisplayPolicy | unsigned char | XmSTATIC | CG |
| XmNscrollBarPlacement | XmCScrollBarPlacement | unsigned char | XmBOTTOM_RIGHT | CSG |
| XmNscrolledWindowMarginHeight | XmCScrolledWindowMarginHeight | Dimension | 0 | CSG |
| XmNscrolledWindowMarginWidth | XmCScrolledWindowMarginWidth | Dimension | 0 | CSG |
| XmNscrollingPolicy | XmCScrollingPolicy | unsigned char | XmAPPLICATION_DEFINED | CG |
| XmNspacing | XmCSpacing | int | 4 | CSG |
| XmNverticalScrollBar | XmCVerticalScrollBar | Widget | NULL | CSG |
| XmNvisualPolicy | XmCVisualPolicy | unsigned char | XmVARIABLE | CG |
| XmNworkWindow | XmCWorkWindow | Widget | NULL | CSG |
| XmManager Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNbottomShadowColor | XmCForeground | Pixel | dynamic | CSG |
| XmNbottomShadowPixmap | XmCBottomShadowPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
| XmNforeground | XmCForeground | Pixel | dynamic | CSG |
| XmNhelpCallback | XmCCallback | XtCallbackList | NULL | C |
| XmNhighlightColor | XmCForeground | Pixel | Black | CSG |
| XmNhighlightPixmap | XmCHighlightPixmap | Pixmap | dynamic | CSG |
| XmNshadowThickness | XmCShadowThickness | short | 0 | CSG |
| XmNtopShadowColor | XmCBackground | Pixel | dynamic | CSG |
| XmNtopShadowPixmap | XmCTopShadowPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
| XmNunitType | XmCUnitType | unsigned char | XmPIXELS | CSG |
| XmNuserData | XmCUserData | caddr_t | NULL | CSG |
| Composite Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNinsertPosition | XmCInsertPosition | XmRFunction | NULL | CSG |
| Core Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNaccelerators | XmCAccelerators | XtTranslations | NULL | CSG |
| XmNancestorSensitive | XmCSensitive | Boolean | True | G |
| XmNbackground | XmCBackground | Pixel | dynamic | CSG |
| XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
| XmNborderColor | XmCBorderColor | Pixel | Black | CSG |
| XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
| XmNborderWidth | XmCBorderWidth | Dimension | 0 | CSG |
| XmNcolormap | XmCColormap | Colormap | XtCopyFromParent | CG |
| XmNdepth | XmCDepth | int | XtCopyFromParent | CG |
| XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C |
| XmNheight | XmCHeight | Dimension | 0 | CSG |
| XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG |
| XmNscreen | XmCScreen | Pointer | XtCopyScreen | CG |
| XmNsensitive | XmCSensitive | Boolean | True | CSG |
| XmNtranslations | XmCTranslations | XtTranslations | NULL | CSG |
| XmNwidth | XmCWidth | Dimension | 0 | CSG |
| XmNx | XmCPosition | Position | 0 | CSG |
| XmNy | XmCPosition | Position | 0 | CSG |
Behavior
MainWindow inherits behavior from ScrolledWindow.
Keyboard Traversal
For information on keyboard traversal, see the man page for XmManager(3Xm) and its sections on behavior and default translations.
RELATED INFORMATION
Composite(3Xm), Constraint(3Xm), Core(3Xm), XmCreateMainWindow(3Xm), XmMainWindowSep1(3Xm), XmMainWindowSep2(3Xm), XmMainWindowSetAreas(3Xm), XmManager(3Xm), and XmScrolledWindow(3Xm),
7th Edition