XMFRAME(3)

πŸ“¦
version 2.3.8 Β· 3 versions
, in arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– 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 time
  • S β€” can be set by using XtSetValues
  • G β€” can be retrieved by using XtGetValues
  • N/A β€” not applicable

XmFrame Resource Set πŸ‘‘

  • XmNmarginWidth β€” Class: XmCMarginWidth, Type: Dimension, Default: 0, Access: CSG
  • XmNmarginHeight β€” Class: XmCMarginHeight, Type: Dimension, Default: 0, Access: CSG
  • XmNshadowType β€” 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 of XmNshadowThickness. 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 of XmNshadowThickness.

XmFrame Constraint Resource Set 🌟

  • XmNchildType β€” Class: XmCChildType, Type: unsigned char, Default: XmFRAME_WORKAREA_CHILD, Access: CSG
  • XmNchildHorizontalAlignment β€” Class: XmCChildHorizontalAlignment, Type: unsigned char, Default: XmALIGNMENT_BEGINNING, Access: CSG
  • XmNchildHorizontalSpacing β€” Class: XmCChildHorizontalSpacing, Type: Dimension, Default: dynamic, Access: CSG
  • XmNchildVerticalAlignment β€” Class: XmCChildVerticalAlignment, Type: unsigned char, Default: XmALIGNMENT_CENTER, Access: CSG
  • XmNframeChildType β€” Class: XmCFrameChildType, Type: unsigned char, Default: XmFRAME_WORKAREA_CHILD, Access: CSG

and the deets on those πŸ‘‡

  • XmNchildType β€” Refer to the XmNframeChildType resource description. The XmNchildType resource is obsoleted by XmNframeChildType, 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_BEGINNING
    • XmALIGNMENT_CENTER
    • XmALIGNMENT_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_CHILD
    • XmFRAME_WORKAREA_CHILD
    • XmFRAME_GENERIC_CHILD The Frame geometry manager literally ignores any child of type XmFRAME_GENERIC_CHILD. This resource replaces XmNchildType. 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 β€” class XmCAccelerators, type XtAccelerators, default dynamic, access CSG
  • XmNancestorSensitive β€” class XmCSensitive, type Boolean, default dynamic, access G
  • XmNbackground β€” class XmCBackground, type Pixel, default dynamic, access CSG
  • XmNbackgroundPixmap β€” class XmCPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG
  • XmNborderColor β€” class XmCBorderColor, type Pixel, default XtDefaultForeground, access CSG
  • XmNborderPixmap β€” class XmCPixmap, type Pixmap, default XmUNSPECIFIED_PIXMAP, access CSG
  • XmNborderWidth β€” class XmCBorderWidth, type Dimension, default 0, access CSG
  • XmNcolormap β€” class XmCColormap, type Colormap, default dynamic, access CG
  • XmNdepth β€” class XmCDepth, type int, default dynamic, access CG
  • XmNdestroyCallback β€” class XmCCallback, type XtCallbackList, default NULL, access C
  • XmNheight β€” class XmCHeight, type Dimension, default dynamic, access CSG
  • XmNinitialResourcesPersistent β€” class XmCInitialResourcesPersistent, type Boolean, default True, access C
  • XmNmappedWhenManaged β€” class XmCMappedWhenManaged, type Boolean, default True, access CSG
  • XmNscreen β€” class XmCScreen, type Screen *, default dynamic, access CG
  • XmNsensitive β€” class XmCSensitive, type Boolean, default True, access CSG
  • XmNtranslations β€” class XmCTranslations, type XtTranslations, default dynamic, access CSG
  • XmNwidth β€” class XmCWidth, type Dimension, default dynamic, access CSG
  • XmNx β€” class XmCPosition, type Position, default 0, access CSG
  • XmNy β€” class XmCPosition, type Position, default 0, access CSG

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. ✨


Here's the whole friend group β€” go read these next, they're all iconic in their own way:


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 πŸ‘‘βœ¨