.DT .TH "XmPaned" 3 .SH "NAME" \fBXmPaned\fP \(em The Paned widget class "XmPaned" "widget class" "Paned Window" .SH "SYNOPSIS" .PP .nf #include .fi .SH "DESCRIPTION" .PP The Paned widget manages children in a vertically or horizontally tiled fashion with each child in a separate pane. The panes may be dynamically resized by the user using "control sashes" that appear between the panes\&. .PP Application programmers have control over whether or not sashes and separators are displayed, the preferred size of each pane, and which pane will be forced to absorb size restrictions imposed by the Paned widget's parent\&. .SS Geometry Management The Paned widget usually resizes its children to their preferred sizes when a new child is managed. It will first attempt to resize itself to contain its panes exactly. If this is not possible then it will hunt through the children, from bottom to top (or right to left), for a pane to resize. .PP The Paned widget will attempt to honor the geometry request of its children. It will first attempt to resize itself to satisfy the request then go through the layout rules below to satisfy the request. Only if all panes are at their min/max values will a geometry request be refused. If the XmNallowResize resource is False for the child then all geometry requests will be denied, of course. .SS Special Considerations .PP When a user resizes a pane with the sashes, the Paned widget assumes that this new size is the preferred size of both the pane above and the pane below, unless the XmNresizeToPreferred constraint resource is True for that pane\&. .SS Layout Semantics .PP In order to make effective use of the Paned widget it is helpful to know the rules it uses to determine which child will be resized in any given situation. There are three rules used to determine which child is resized. While these rules are always the same, the panes that are searched can change depending upon what caused the change of layout. .SS Layout Rules .ta 5 .HP 5 1\&. Do not let a pane grow larger than its max or smaller than its min size\&. In addition do not let a pane without a sash shrink below its preferred size due to a grip movement of another pane\&. .HP 5 2\&. Do not adjust panes with XmNskipAdjust set\&. .HP 5 3\&. Do not adjust panes away from their preferred size, although moving one closer to its preferred size is fine\&. .PP When searching the children the Paned widget looks for panes that satisfy all the rules, and if unsuccessful then it eliminates rule 3 and then 2. Rule 1 is always enforced. .PP If the relayout is due to a resize or change in management then the panes are searched from bottom to top. If space is needed above the current sash the panes are searched from bottom to top beginning with the second pane above the grip that was moved. If space is needed below the current sash the panes are searched from top to bottom beginning with the second pane below the grip that was moved. The Paned widget never wraps its pane resizing. Therefore if space is needed below the sash then no widget above the sash will ever be resized. .PP Note: If the orientation is horizontal then substitute "right" for "bottom" and "left" for "top" in the above paragraph. .SS Resizing Panes .PP When the Paned widget is resized it must determine a new size for each pane. There are two methods of doing this. The Paned widget can either give each pane its preferred size and then resize the panes to fit, or it can use the current sizes and then resize the panes to fit. The XmNresizeToPreferred constraint resource allows the application to tell the Paned widget whether to query the child about its preferred size (subject to the XmNpreferredPaneSize) or to use the current size when refiguring the pane locations after the Paned widget has been resized\&. .PP All panes assume they should resize to their preferred size until the Paned widget becomes visible to the user\&. .SS "Classes" .PP Paned inherits behavior and resources from the \fBCore\fP, \fBComposite\fP, \fBConstraint\fP, abd \fBXmmanager\fP classes\&. .PP The class pointer of \fBxmPanedWidgetClass\fP\&. .PP The class name is \fBXmPaned\fP\&. .SS "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 \fB\&.Xdefaults\fP file, remove the \fBXmN\fP or \fBXmC\fP prefix and use the remaining letters\&. To specify one of the defined values for a resource in a \fB\&.Xdefaults\fP file, remove the \fBXm\fP 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 \fBXtSetValues\fP (S), retrieved by using \fBXtGetValues\fP (G), or is not applicable (N/A)\&. .PP .TS tab() box; c s s s s l| l| l| l| l. \fBXmPaned Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNcursorXmCursortCursorNoneCSG _____ XmNmarginHeightXmCMarginHeightDimension3CSG _____ XmNmarginWidthXmCMarginWidthDimension3CSG _____ XmNorientationXmCOrientationunsigned charXmVERTICALCSG _____ XmNrefigureModeXmCBooleanBooleanTrueCSG _____ XmNsashHeightXmCSashHeightDimension8CSG _____ XmNsashIndentXmCSashIndentPosition-10CSG _____ XmNsashShadowThicknessXmCShadowThicknessDimensiondynamicCSG _____ XmNsashTranslations%Translations%XtTranslations%see below _____ XmNsashWidthXmCSashWidthDimension10CSG _____ XmNseparatorOnXmCSeparatorOnBooleanTrueCSG _____ XmNspacingXmCSpacingDimension8CSG _____ .TE .IP "\fBXmNcursor\fP" 10 Image that will be displayed as the pointer cursor whenever the pointer is over this widget. If the children do not explicitly set their cursor attribute then this resource will be inherited by each child\&. .IP "\fBXmNmarginHeight\fP" 10 Specifies the distance between the top and bottom edges of the Paned widget and its children\&. .IP "\fBXmNmarginWidth\fP" 10 Specifies the distance between the left and right edges of the Paned widget and its children\&. .IP "\fBXmNorientation\fP" 10 Specifies the layout as either vertical (with the \fBXmVERTICAL\fP value) or horizontal (with the \fBXmHORIZONTAL\fP value)\&. In the vertical layout, the children are laid out in a vertically tiled format\&. In the horizontal layout, the children are laid out in a horizontal layout, with the sash moveable along the horizontal axis\&. .IP "\fBXmNrefigureMode\fP" 10 Determines whether the panes\&' positions are recomputed and repositioned when programmatic changes are being made to the Paned widget\&. Setting this resource to True resets the children to their appropriate positions\&. .IP "\fBXmNsashHeight\fP" 10 Specifies the height of the sash\&. .IP "\fBXmNsashIndent\fP" 10 Specifies the horizontal placement of the sash along each pane\&. A positive value causes the sash to be offset from the near (left) side of the Paned widget, and a negative value causes the sash to be offset from the far (right) side of the Paned widget\&. If the offset is greater than the width of the Paned widget minus the width of the sash, the sash is placed flush against the near side of the Paned widget\&. .IP "" 10 Whether the placement actually corresponds to the left or right side of the Paned widget depends on the \fBXmNlayoutDirection\fP resource of the widget\&. .IP "\fBXmNsashTranslations\fP" 10 Translation bindings for the sash. See below. .IP "\fBXmNsashShadowThickness\fP" 10 Specifies the thickness of the shadows of the sashes\&. .IP "\fBXmNsashWidth\fP" 10 Specifies the width of the sash\&. .IP "\fBXmNseparatorOn\fP" 10 Determines whether a separator is created between each of the panes\&. Setting this resource to True creates a Separator at the midpoint between each of the panes\&. .IP "\fBXmNspacing\fP" 10 Specifies the distance between each child pane\&. .TS tab() box; c s s s s l| l| l| l| l. T{ \fBXmPaned Constraint Resource Set\fP T} \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNallowResizeXmCBooleanBooleanFalseCSG _____ XmNpaneMaximumXmCPaneMaximumDimension1000CSG _____ XmNpaneMinimumXmCPaneMinimumDimension1CSG _____ XmNskipAdjustXmCBooleanBooleanFalseCSG _____ XmNpreferredPaneSizeXmCPreferredPaneSizeDimensionXmPanedAskChild _____ XmNresizeToPreferredXmCBooleanBooleanFalse _____ XmNshowSashXmCBooleanBooleanTrue _____ .TE .IP "\fBXmNallowResize\fP" 10 Allows an application to specify whether the Paned widget should allow a pane to request to be resized\&. This flag has an effect only after the Paned widget and its children have been realized\&. If this flag is set to True, the Paned widget tries to honor requests to alter the height of the pane\&. If False, it always denies pane requests to resize\&. .IP "\fBXmNpaneMaximum\fP" 10 Allows an application to specify the maximum size to which a pane may be resized\&. This value must be greater than the specified minimum\&. .IP "\fBXmNpaneMinimum\fP" 10 Allows an application to specify the minimum size to which a pane may be resized\&. This value must be greater than 0 (zero)\&. .IP "\fBXmNskipAdjust\fP" 10 When set to True, this Boolean resource allows an application to specify that the Paned widget should not automatically resize this pane\&. .IP "\fBXmNpreferredPaneSize\fP" 10 Preferred size of the pane. If this value is not set the paned widget will query the child for a preferred size. This resource allows the user or application to provide a new preferred size\&. .IP "\fBXmNresizeToPreferred\fP" 10 Specifies whether to resize each pane to its preferred size when the Paned window is resized. If this is False then only those panes the user has not resized with the sashes will be resized to their preferred size\&. .IP "\fBXmNshowSash\fP" 10 If True show the Sash below or to the right of this pane. .SS "Inherited Resources" .PP Paned widget inherits behavior and resources from the superclasses described in the following tables\&. For a complete description of each resource, refer to the reference page for that superclass\&. .PP .TS tab() box; c s s s s l| l| l| l| l. \fBXmManager Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG _____ XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNforegroundXmCForegroundPixeldynamicCSG _____ XmNhelpCallbackXmCCallbackXtCallbackListNULLC _____ XmNhighlightColorXmCHighlightColorPixeldynamicCSG _____ XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG _____ XmNinitialFocusXmCInitialFocusWidgetNULLCSG _____ XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG _____ XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmTAB_GROUPCSG _____ XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC _____ XmNshadowThicknessXmCShadowThicknessDimension2CSG _____ XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCG _____ XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG _____ XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG _____ XmNtraversalOnXmCTraversalOnBooleanTrueCSG _____ XmNunitTypeXmCUnitTypeunsigned chardynamicCSG _____ XmNuserDataXmCUserDataXtPointerNULLCSG _____ .TE .PP .TS tab() box; c s s s s l| l| l| l| l. \fBCore Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicCSG _____ XmNancestorSensitiveXmCSensitiveBooleandynamicG _____ XmNbackgroundXmCBackgroundPixeldynamicCSG _____ XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNborderColorXmCBorderColorPixelXtDefaultForegroundCSG _____ XmNborderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNborderWidthXmCBorderWidthDimension0CSG _____ XmNcolormapXmCColormapColormapdynamicCG _____ XmNdepthXmCDepthintdynamicCG _____ XmNdestroyCallbackXmCCallbackXtCallbackListNULLC _____ XmNheightXmCHeightDimensiondynamicCSG _____ XmNinitialResourcesPersistentXmCInitialResourcesPersistentBooleanTrueC _____ XmNmappedWhenManagedXmCMappedWhenManagedBooleanTrueCSG _____ XmNscreenXmCScreenScreen *dynamicCG _____ XmNsensitiveXmCSensitiveBooleanTrueCSG _____ XmNtranslationsXmCTranslationsXtTranslationsdynamicCSG _____ XmNwidthXmCWidthDimensiondynamicCSG _____ XmNxXmCPositionPosition0CSG _____ XmNyXmCPositionPosition0CSG _____ .TE .PP .TS tab() box; c s s s s l| l| l| l| l. \fBComposite Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNchildrenXmCReadOnlyWidgetListNULLG _____ XmNinsertPositionXmCInsertPositionXtOrderProcdefault procedureCSG _____ XmNnumChildrenXmCReadOnlyCardinal0G _____ .TE .SS "Translations" .PP \fBXmPaned widget\fP inherits translations from \fBXmManager\fP\&. .PP The translations for sashes within the Paned widget are described in the following table\&. .PP The following key names are listed in the X standard key event translation table syntax\&. This format is the one used by Motif to specify the widget actions corresponding to a given key\&. A brief overview of the format is provided under \fBVirtualBindings\fP(3)\&. For a complete description of the format, please refer to the X Toolkit Instrinsics Documentation\&. .IP "\fB\(apc \(aps \(apm \(apa\fP \fB\fP:" 10 SashAction(\fBStart\fP) .IP "\fB\(apc \(aps \(apm \(apa\fP \fB\fP:" 10 SashAction(\fBMove\fP) .IP "\fB\(apc \(aps \(apm \(apa\fP \fB\fP:" 10 SashAction(\fBCommit\fP) .IP "\fB\(apc \(aps \(apm \(apa\fP \fB\fP:" 10 SashAction(\fBStart\fP) .IP "\fB\(apc \(aps \(apm \(apa\fP \fB\fP:" 10 SashAction(\fBMove\fP) .IP "\fB\(apc \(aps \(apm \(apa\fP \fB\fP:" 10 SashAction(\fBCommit\fP) .IP "\fB:\fP\fB\fP\fB\fP:" 10 Help() .IP "\fB:c\fP \fB\fP\fB\fP:" 10 SashAction(\fBKey,10,Up\fP) .IP "\fB:\fP\fB\fP\fB\fP:" 10 SashAction(\fBKey,1,Up\fP) .IP "\fB:c\fP \fB\fP\fB\fP:" 10 SashAction(\fBKey,10,Right\fP) .IP "\fB:\fP\fB\fP\fB\fP:" 10 SashAction(\fBKey,1,Right\fP) .IP "\fB:c\fP \fB\fP\fB\fP:" 10 SashAction(\fBKey,10,Down\fP) .IP "\fB:\fP\fB\fP\fB\fP:" 10 SashAction(\fBKey,1,Down\fP) .IP "\fB:c\fP \fB\fP\fB\fP:" 10 SashAction(\fBKey,10,Left\fP) .IP "\fB:\fP\fB\fP\fB\fP:" 10 SashAction(\fBKey,1,Left\fP) .IP "\fBs \(apm \(apa\fP \fB\fP\fBTab\fP:" 10 PrevTabGroup() .IP "\fB\(apm \(apa\fP \fB\fP\fBTab\fP:" 10 NextTabGroup() .SS "Action Routines" .PP The \fBXmPaned\fP action routines are .IP "Help():" 10 Calls the callbacks for \fBXmNhelpCallback\fP if any exist\&. If there are no help callbacks for this widget, this action calls the help callbacks for the nearest ancestor that has them\&. .IP "NextTabGroup():" 10 Moves the keyboard focus to the next tab group\&. By default, each pane and sash is a tab group\&. .IP "PrevTabGroup():" 10 Moves the keyboard focus to the previous tab group\&. By default, each pane and sash is a tab group\&. .IP "SashAction(\fIaction\fP\fB)\fP\ or\ SashAction(\fBKey,\fP\fIincrement\fP\fB,\fP\fIdirection\fP\fB)\fP:" 10 The \fBStart\fP action activates the interactive placement of the pane\&'s borders\&. The \fBMove\fP action causes the sash to track the position of the pointer\&. If one of the panes reaches its minimum or maximum size, adjustment continues with the next adjustable pane\&. The \fBCommit\fP action ends sash motion\&. .IP "" 10 When sash action is caused by a keyboard event, the sash with the keyboard focus is moved according to the \fIincrement\fP and \fIdirection\fP specified\&. \fBDefaultIncr\fP adjusts the sash by one line\&. \fBLargeIncr\fP adjusts the sash by one view region\&. The \fIdirection\fP is specified as either \fBUp\fP, \fBDown\fP, \fBLeft\fP, or \fBRight\fP\&. .IP "" 10 Note that the SashAction action routine is not a direct action routine of the \fBXmPaned,\fP but rather an action of the Sash control created by the \fBXmPaned\fP\&. .SS "Additional Behavior" .PP This widget has the following additional behavior: .IP "\fB\fP:" 10 Moves the keyboard focus to the sash and highlights it .IP "\fB\fP:" 10 Unsets the keyboard focus in the sash and unhighlights it .SS "Virtual Bindings" .PP The bindings for virtual keys are vendor specific\&. For information about bindings for virtual buttons and keys, see \fBVirtualBindings\fP(3)\&. .SH "RELATED" .PP \fBComposite\fP(3), \fBConstraint\fP(3), \fBCore\fP(3), \fBXmCreatePaned\fP(3), \fBXmManager\fP(3), \fBXmPaneGetpanes\fP(3), \fBXmVaCreatePaned\fP(3), and \fBXmVaCreateManagedPaned\fP(3)\&.