Index Index for
Section 3X
Index Alphabetical
listing for X
Bottom of page Bottom of
page

XmMainWindow(3X)

OSF/Motif

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, a MessageWindow, 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 and MessageWindow. 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 MessageWindow is below the work region. Any space remaining below the MessageWindow 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 MessageWindow, a horizontal ScrollBar, and a vertical ScrollBar widget, and then call XmMainWindowSetAreas with those widget IDs. MainWindow can also create three Separator widgets that provide a visual separation of MainWindow's four components. The user can specify resources in a resource file for the automatically created gadgets that contain the MainWindow separators. The name of the first separator gadget is "Separator1"; the second is "Separator2"; and the third is "Separator3". 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 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). XmMainWindow Resource Set XmNcommandWindow Class: XmCCommandWindow Default: NULL Type: Widget Access: CSG XmNcommandWindowLocation Class: XmCCommandWindowLocation Default: ABOVE (See DESCRIPTION) Type: unsigned char Access: CG XmNmainWindowMarginHeight Class: XmCMainWindowMarginHeight Default: 0 Type: Dimension Access: CSG XmNmainWindowMarginWidth Class: XmCMainWindowMarginWidth Default: 0 Type: Dimension Access: CSG XmNmenuBar Class: XmCMenuBar Default: NULL Type: Widget Access: CSG XmNmessageWindow Class: XmCMessageWindow Default: NULL Type: Widget Access: CSG XmNshowSeparator Class: XmCShowSeparator Default: False Type: Boolean Access: 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. XmNcommandWindowLocation Controls the position of the command window. XmCOMMAND_ABOVE_WORKSPACE locates the command window between the menu bar and the work window. XmCOMMAND_BELOW_WORKSPACE locates the command window between the work window and the message window. 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. XmNmessageWindow Specifies the widget to be laid out as the MessageWindow. This widget must have been previously created and managed as a child of MainWindow. The MessageWindow is positioned at the bottom of the MainWindow. If this value is NULL, no message window is included in the 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 each resource, refer to the man page for that superclass. XmScrolledWindow Resource Set XmNclipWindow Class: XmCClipWindow Default: dynamic Type: Widget Access: G XmNhorizontalScrollBar Class: XmCHorizontalScrollBar Default: dynamic Type: Widget Access: CSG XmNscrollBarDisplayPolicy Class: XmCScrollBarDisplayPolicy Default: dynamic Type: unsigned char Access: CSG XmNscrollBarPlacement Class: XmCScrollBarPlacement Default: XmBOTTOM_RIGHT Type: unsigned char Access: CSG XmNscrolledWindowMarginHeight Class: XmCScrolledWindowMarginHeight Default: 0 Type: Dimension Access: N/A XmNscrolledWindowMarginWidth Class: XmCScrolledWindowMarginWidth Default: 0 Type: Dimension Access: N/A XmNscrollingPolicy Class: XmCScrollingPolicy Default: XmAPPLICATION_DEFINED Type: unsigned char Access: CG XmNspacing Class: XmCSpacing Default: 4 Type: Dimension Access: CSG XmNtraverseObscuredCallback Class: XmCCallback Default: NULL Type: XtCallbackList Access: CSG XmNverticalScrollBar Class: XmCVerticalScrollBar Default: dynamic Type: Widget Access: CSG XmNvisualPolicy Class: XmCVisualPolicy Default: dynamic Type: unsigned char Access: G XmNworkWindow Class: XmCWorkWindow Default: NULL Type: Widget Access: CSG XmManager Resource Set XmNbottomShadowColor Class: XmCBottomShadowColor Default: dynamic Type: Pixel Access: CSG XmNbottomShadowPixmap Class: XmCBottomShadowPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG XmNforeground Class: XmCForeground Default: dynamic Type: Pixel Access: CSG XmNhelpCallback Class: XmCCallback Default: NULL Type: XtCallbackList Access: C XmNhighlightColor Class: XmCHighlightColor Default: dynamic Type: Pixel Access: CSG XmNhighlightPixmap Class: XmCHighlightPixmap Default: dynamic Type: Pixmap Access: CSG XmNinitialFocus Class: XmCInitialFocus Default: NULL Type: Widget Access: CSG XmNnavigationType Class: XmCNavigationType Default: XmTAB_GROUP Type: XmNavigationType Access: CSG XmNshadowThickness Class: XmCShadowThickness Default: 0 Type: Dimension Access: CSG XmNstringDirection Class: XmCStringDirection Default: dynamic Type: XmStringDirection Access: CG XmNtopShadowColor Class: XmCTopShadowColor Default: dynamic Type: Pixel Access: CSG XmNtopShadowPixmap Class: XmCTopShadowPixmap Default: dynamic Type: Pixmap Access: CSG XmNtraversalOn Class: XmCTraversalOn Default: True Type: Boolean Access: CSG XmNunitType Class: XmCUnitType Default: dynamic Type: unsigned char Access: CSG XmNuserData Class: XmCUserData Default: NULL Type: XtPointer Access: CSG Composite Resource Set XmNchildren Class: XmCReadOnly Default: NULL Type: WidgetList Access: G XmNinsertPosition Class: XmCInsertPosition Default: NULL Type: XtOrderProc Access: CSG XmNnumChildren Class: XmCReadOnly Default: 0 Type: Cardinal Access: G Core Resource Set XmNaccelerators Class: XmCAccelerators Default: dynamic Type: XtAccelerators Access: CSG XmNancestorSensitive Class: XmCSensitive Default: dynamic Type: Boolean Access: G XmNbackground Class: XmCBackground Default: dynamic Type: Pixel Access: CSG XmNbackgroundPixmap Class: XmCPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG XmNborderColor Class: XmCBorderColor Default: XtDefaultForeground Type: Pixel Access: CSG XmNborderPixmap Class: XmCPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG XmNborderWidth Class: XmCBorderWidth Default: 0 Type: Dimension Access: CSG XmNcolormap Class: XmCColormap Default: dynamic Type: Colormap Access: CG XmNdepth Class: XmCDepth Default: dynamic Type: int Access: CG XmNdestroyCallback Class: XmCCallback Default: NULL Type: XtCallbackList Access: C XmNheight Class: XmCHeight Default: dynamic Type: Dimension Access: CSG XmNinitialResourcesPersistent Class: XmCInitialResourcesPersistent Default: True Type: Boolean Access: C XmNmappedWhenManaged Class: XmCMappedWhenManaged Default: True Type: Boolean Access: CSG XmNscreen Class: XmCScreen Default: dynamic Type: Screen * Access: CG XmNsensitive Class: XmCSensitive Default: True Type: Boolean Access: CSG XmNtranslations Class: XmCTranslations Default: dynamic Type: XtTranslations Access: CSG XmNwidth Class: XmCWidth Default: dynamic Type: Dimension Access: CSG XmNx Class: XmCPosition Default: 0 Type: Position Access: CSG XmNy Class: XmCPosition Default: 0 Type: Position Access: CSG Translations MainWindow inherits translations from ScrolledWindow.

SEE ALSO

Composite(3X), Constraint(3X), Core(3X), XmCreateMainWindow(3X), XmMainWindowSep1(3X), XmMainWindowSep2(3X), XmMainWindowSep3(3X), XmMainWindowSetAreas(3X), XmManager(3X), XmScrolledWindow(3X)

Index Index for
Section 3X
Index Alphabetical
listing for X
Top of page Top of
page