XMFRAME(3)
π XmFrame π
okay bestie, welcome to XmFrame β the Frame widget class, aka the little border-drawing icon that wraps your fave child widget in a cute little outline. library call, we're in there. π
β¨ SYNOPSIS β¨
#include <Xm/Frame.h>
πΈ DESCRIPTION πΈ
So, Frame is a very simple manager, and honestly? That's its whole charm. Its one job is to enclose a single work area child inside a border that Frame itself draws. Periodt. π
It pulls the Manager class resources for the border drawing, and it does geometry management so that its size always matches its child's outer size plus the Frame's margins and shadow thickness. Like, the math is math-ing, always. β¨
Frame is most often used to enclose other managers when the app developer wants that manager to have the same border appearance as the primitive widgets. It can also enclose primitive widgets that don't support the same type of border drawing. The whole point? visual consistency when you're building apps across diverse widget sets. Obsessed, honestly. π«Ά
Constraint resources are used to:
- designate a child as the Frame title,
- align its text,
- and control its vertical alignment in relation to Frame's top shadow.
And just so you know β the title only shows up at the top of the Frame. That's the vibe.
If the Frame's parent is a Shell widget, the XmNshadowType resource defaults to XmSHADOW_OUT, and the Manager's XmNshadowThickness resource defaults to 1.
If the Frame's parent is not a Shell widget, the XmNshadowType resource defaults to XmSHADOW_ETCHED_IN, and the Manager's XmNshadowThickness resource defaults to 2.
π Classes π
Frame inherits behavior and resources from the Core, Composite, Constraint, and XmManager classes. Family tree moment. π
- The class pointer is
xmFrameWidgetClass. - The class name is
XmFrame.
π¦ New Resources π¦
The following set of widget resources is what the programmer uses to specify data. You 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 mean:
Cβ can be set at creation timeSβ can be set by usingXtSetValuesGβ can be retrieved by usingXtGetValuesN/Aβ not applicable
XmFrame Resource Set π
XmNmarginWidthβ Class:XmCMarginWidth, Type:Dimension, Default:0, Access:CSGXmNmarginHeightβ Class:XmCMarginHeight, Type:Dimension, Default:0, Access:CSGXmNshadowTypeβ Class:XmCShadowType, Type:unsigned char, Default:dynamic, Access:CSG
the deets on those π
XmNmarginWidthβ Specifies the padding space on the left and right sides between Frame's child and Frame's shadow drawing. π«§XmNmarginHeightβ Specifies the padding space on the top and bottom sides between Frame's child and Frame's shadow drawing. When a title is present, the top margin equals the value specified by this resource plus the distance (if any) that the title extends below the top shadow. no cap.XmNshadowTypeβ Describes the drawing style for Frame. This resource can have the following values:XmSHADOW_INβ Draws Frame so that it appears inset. This means that the bottom shadow visuals and top shadow visuals are reversed.XmSHADOW_OUTβ Draws Frame so that it appears outset. This is the default if Frame's parent is a Shell widget.XmSHADOW_ETCHED_INβ Draws Frame using a double line giving the effect of a line etched into the window. The thickness of the double line is equal to the value ofXmNshadowThickness. This is the default when Frame's parent is not a Shell widget.XmSHADOW_ETCHED_OUTβ Draws Frame using a double line giving the effect of a line coming out of the window. The thickness of the double line is equal to the value ofXmNshadowThickness.
XmFrame Constraint Resource Set π
XmNchildTypeβ Class:XmCChildType, Type:unsigned char, Default:XmFRAME_WORKAREA_CHILD, Access:CSGXmNchildHorizontalAlignmentβ Class:XmCChildHorizontalAlignment, Type:unsigned char, Default:XmALIGNMENT_BEGINNING, Access:CSGXmNchildHorizontalSpacingβ Class:XmCChildHorizontalSpacing, Type:Dimension, Default:dynamic, Access:CSGXmNchildVerticalAlignmentβ Class:XmCChildVerticalAlignment, Type:unsigned char, Default:XmALIGNMENT_CENTER, Access:CSGXmNframeChildTypeβ Class:XmCFrameChildType, Type:unsigned char, Default:XmFRAME_WORKAREA_CHILD, Access:CSG
and the deets on those π
XmNchildTypeβ Refer to theXmNframeChildTyperesource description. TheXmNchildTyperesource is obsoleted byXmNframeChildType, but is kept here for backward compatibility. (grandfathered in, we respect the elders π)XmNchildHorizontalAlignmentβ Specifies the alignment of the title. This resource has the following values:XmALIGNMENT_BEGINNINGXmALIGNMENT_CENTERXmALIGNMENT_END
See the description of XmNalignment in the XmLabel reference page for an explanation of these values.
XmNchildHorizontalSpacingβ Specifies the minimum distance between either edge of the title text and the inner edge of the Frame shadow. Clipping of the title text occurs in order to maintain this spacing. The default value is the margin width of the Frame.XmNchildVerticalAlignmentβ Specifies the vertical alignment of the title text, or the title area in relation to the top shadow of the Frame.XmALIGNMENT_BASELINE_BOTTOMβ Causes the baseline of the title to align vertically with the top shadow of the Frame. In the case of a multi-line title, the baseline of the last line of text aligns vertically with the top shadow of the Frame.XmALIGNMENT_BASELINE_TOPβ Causes the baseline of the first line of the title to align vertically with the top shadow of the Frame.XmALIGNMENT_CHILD_TOPβ Causes the top edge of the title area to align vertically with the top shadow of the Frame.XmALIGNMENT_CENTERβ Causes the center of the title area to align vertically with the top shadow of the Frame.
XmALIGNMENT_CHILD_BOTTOMβ okay so this one makes the bottom edge of the title area line up vertically with the top shadow of the Frame. Iconic alignment behavior, periodt. πXmNframeChildTypeβ this tells you whether a child is a title or a work area. Frame supports a single title and/or work area child, bestie. The possible values are:XmFRAME_TITLE_CHILDXmFRAME_WORKAREA_CHILDXmFRAME_GENERIC_CHILDThe Frame geometry manager literally ignores any child of typeXmFRAME_GENERIC_CHILD. This resource replacesXmNchildType. No cap, it's giving upgrade energy. β¨
Inherited Resources π«Ά
Frame inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the reference page for that superclass. Like, go read the superclass page if you need the full tea. π
XmManager Resource Set π
Here's the whole resource squad β Name, Class, Type, Default, Access:
XmNbottomShadowColorβ Class:XmCBottomShadowColor; Type:Pixel; Default:dynamic; Access:CSGπXmNbottomShadowPixmapβ Class:XmCBottomShadowPixmap; Type:Pixmap; Default:XmUNSPECIFIED_PIXMAP; Access:CSGβ¨XmNforegroundβ Class:XmCForeground; Type:Pixel; Default:dynamic; Access:CSGπΈXmNhelpCallbackβ Class:XmCCallback; Type:XtCallbackList; Default:NULL; Access:CπXmNhighlightColorβ Class:XmCHighlightColor; Type:Pixel; Default:dynamic; Access:CSGπXmNhighlightPixmapβ Class:XmCHighlightPixmap; Type:Pixmap; Default:dynamic; Access:CSGπ¦XmNinitialFocusβ Class:XmCInitialFocus; Type:Widget; Default:NULL; Access:CSGπXmNlayoutDirectionβ Class:XmCLayoutDirection; Type:XmDirection; Default:dynamic; Access:CGβXmNnavigationTypeβ Class:XmCNavigationType; Type:XmNavigationType; Default:XmTAB_GROUP; Access:CSGπXmNpopupHandlerCallbackβ Class:XmCCallback; Type:XtCallbackList; Default:NULL; Access:CπXmNshadowThicknessβ Class:XmCShadowThickness; Type:Dimension; Default:dynamic; Access:CSGπXmNstringDirectionβ Class:XmCStringDirection; Type:XmStringDirection; Default:dynamic; Access:CGπ§XmNtopShadowColorβ Class:XmCTopShadowColor; Type:Pixel; Default:dynamic; Access:CSGπXmNtopShadowPixmapβ Class:XmCTopShadowPixmap; Type:Pixmap; Default:dynamic; Access:CSGπ₯XmNtraversalOnβ Class:XmCTraversalOn; Type:Boolean; Default:True; Access:CSGπXmNunitTypeβ Class:XmCUnitType; Type:unsigned char; Default:dynamic; Access:CSGπΈXmNuserDataβ Class:XmCUserData; Type:XtPointer; Default:NULL; Access:CSGβ¨
Composite Resource Set π¦
XmNchildrenβ Class:XmCReadOnly; Type:WidgetList; Default:NULL; Access:GπXmNinsertPositionβ Class:XmCInsertPosition; Type:XtOrderProc; Default:NULL; Access:CSGπXmNnumChildrenβ Class:XmCReadOnly; Type:Cardinal; Default:0; Access:Gπ
Core Resource Set π
Okay bestie, this is the whole entire resource table and I am not skipping a single row. Every resource, its class, its type, its default, and who's allowed to touch it. The Access column is giving which access modes work β C = create only, S = set at any time, G = gettable. No cap, that's just how it is. π
XmNacceleratorsβ classXmCAccelerators, typeXtAccelerators, defaultdynamic, accessCSGXmNancestorSensitiveβ classXmCSensitive, typeBoolean, defaultdynamic, accessGXmNbackgroundβ classXmCBackground, typePixel, defaultdynamic, accessCSGXmNbackgroundPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNborderColorβ classXmCBorderColor, typePixel, defaultXtDefaultForeground, accessCSGXmNborderPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNborderWidthβ classXmCBorderWidth, typeDimension, default0, accessCSGXmNcolormapβ classXmCColormap, typeColormap, defaultdynamic, accessCGXmNdepthβ classXmCDepth, typeint, defaultdynamic, accessCGXmNdestroyCallbackβ classXmCCallback, typeXtCallbackList, defaultNULL, accessCXmNheightβ classXmCHeight, typeDimension, defaultdynamic, accessCSGXmNinitialResourcesPersistentβ classXmCInitialResourcesPersistent, typeBoolean, defaultTrue, accessCXmNmappedWhenManagedβ classXmCMappedWhenManaged, typeBoolean, defaultTrue, accessCSGXmNscreenβ classXmCScreen, typeScreen *, defaultdynamic, accessCGXmNsensitiveβ classXmCSensitive, typeBoolean, defaultTrue, accessCSGXmNtranslationsβ classXmCTranslations, typeXtTranslations, defaultdynamic, accessCSGXmNwidthβ classXmCWidth, typeDimension, defaultdynamic, accessCSGXmNxβ classXmCPosition, typePosition, default0, accessCSGXmNyβ classXmCPosition, typePosition, default0, accessCSG
Translations πΈ
Girl, this one's short and sweet: XmFrame doesn't invent its own translation table, it just inherits translations from XmManager. So whatever your Manager knows, your Frame knows too. Periodt. β¨
RELATED π¦
Here's the whole friend group β go read these next, they're all iconic in their own way:
Composite(3)Constraint(3)Core(3)XmCreateFrame(3)XmManager(3)XmVaCreateFrame(3)XmVaCreateManagedFrame(3)
And that's a wrap on XmFrame π this whole thing lives in the XmFrame(library call) corner of the man pages β the library-call set, no date stamp on it, just vibes and widget lore. Go forth and build your frames, bestie, you're literally the main character of your own widget hierarchy πβ¨
π¦ where this page comes from
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms