XbaeCaption(3)
β¨ XbaeCaption(3) β Library Functions Manual β¨
okay bestie, gather round, because today we're talking about XbaeCaption β the Bellcore Application Environment (BAE) XbaeCaption widget class. yes, it's a whole manual page in the Library Functions section and yes it's lowkey iconic π
πΈ NAME πΈ
XbaeCaption β the Bellcore Application Environment (BAE) XbaeCaption widget class. that's it, that's the name, she's simple and she knows it π
π¦ SYNOPSIS π¦
#include <Xbae/Caption.h>
one include and you're in, no cap β¨
π DESCRIPTION π
okay so XbaeCaption is a simple manager whose whole entire job is to associate a label with its single child. that's the assignment. one label, one child, no drama π
the label can be either an XmString or a Pixmap β pick your fighter β and it can be displayed in any one of twelve positions around the edge of the child. twelve!! a whole dozen placements, the versatility is giving main character energy fr fr π
XbaeCaption also does geometry management, meaning its size always matches its child's size plus the size of the label and label offset. so you never have to do the math yourself, she handles it, periodt.
and here's the tea: if you use XbaeCaption with an XmFrame child, you can label groups of related widgets in a visually appealing manner. obsessed. it's also useful for associating labels with individual XmTextFields β so like, one field, one cute little label, we love a personalized touch πΈ
π Classes π
XbaeCaption inherits behavior and resources from the Core, Composite, Constraint and XmManager widget classes.
- the class pointer is
xbaeCaptionWidgetClass - the class name is
XbaeCaption
yes bestie, she comes from a long line of distinguished widget ancestors and she carries all of them with her π
π New Resources π
these are the brand new resources XbaeCaption brings to the table. and listen, about the Access codes β they tell you how you're allowed to touch each resource:
Cβ you can set it at creation timeSβ you can set it withXtSetValuesGβ you can retrieve it withXtGetValues
now the whole resource set, laid out for you like a lil shopping list ποΈ:
π XbaeCaption Resource Set π
XmNfontListβ classXmCFontList, typeFontList, defaultdynamic, accessCSGXmNlabelAlignmentβ classXmCLabelAlignment, typeXbaeLabelAlignment, defaultXbaeAlignmentCenter, accessCSGXmNlabelOffsetβ classXmCLabelOffset, typeInt, default0, accessCSGXmNlabelPixmapβ classXmCLabelPixmap, typePrimForegroundPixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNlabelPositionβ classXmCLabelPosition, typeXbaeLabelPosition, defaultXbaePositionLeft, accessCSGXmNlabelStringβ classXmCXmString, typeXmString, defaultwidget name, accessCSGXmNlabelTextAlignmentβ classXmCAlignment, typeAlignment, defaultXmALIGNMENT_CENTER, accessCSGXmNlabelTypeβ classXmCLabelType, typeLabelType, defaultXmString, accessCSG
and now, one by one, the lore on each π
XmNfontList specifies the font of the text used in the caption label. here's the important bit: if this value is NULL at initialization, it gets initialized by looking up the parent hierarchy of the widget for an ancestor that is a subclass of the XmBulletinBoard, VendorShell or XmMenuShell widget class. and if such an ancestor is found, the font list is initialized to the appropriate default font list of the ancestor widget β that's XmNdefaultFontList for VendorShell and XmMenuShell, and XmNlabelFontList or XmNbuttonFontList for XmBulletinBoard. refer to XmFontList(3X) for more info on the creation and structure of a font list. oh and heads up bestie: this resource is copied. π
XmNlabelAlignment specifies the alignment of the caption label along the side of the caption child. it must be one of the enumerated XbaeLabelAlignment types: XbaeAlignmentTopOrLeft, XbaeAlignmentCenter, XbaeAlignmentBottomOrRight. three options, pick one, don't get creative π
XmNlabelOffset specifies the offset, in pixels, of the caption label from the caption child. and if the offset is negative, then the caption label will overlap the caption child by that many pixels. so like, negative offset = she's leaning in, they're besties now π«Ά
XmNlabelPixmap specifies the caption label pixmap when XmNlabelType is XmPIXMAP. that's the whole thing. π
XmNlabelPosition specifies on which side of the caption child the caption label should be placed. must be one of the enumerated XbaeLabelPosition types: XbaePositionLeft, XbaePositionRight, XbaePositionTop, XbaePositionBottom. four sides, twelve total arrangements, geometry is her passion π
XmNlabelString specifies the compound string when the XmNlabelType is XmSTRING. if this value is NULL, it is initialized by converting the name of the widget to a compound string. refer to XmString(3X) for more info on the creation and structure of compound strings. β¨
XmNlabelTextAlignment specifies the text alignment for the caption label. ngl, this resource is only useful for multi line caption labels β single line girlies can scroll past. valid values are:
XmALIGNMENT_BEGINNINGβ left alignment causes the left sides of the lines of text to be vertically alignedXmALIGNMENT_CENTERβ center alignment causes the centers of the lines of text to be vertically alignedXmALIGNMENT_ENDβ right alignment causes the right sides of the lines of text to be vertically aligned
XmNlabelType specifies the caption label type. valid values are:
XmSTRINGβ the caption label will display theXmNlabelStringXmPIXMAPβ the caption label will display theXmNlabelPixmap
text or picture, bestie, that's the choice and honestly both slay π₯
π Inherited Resources π
the following resources are the ones XbaeCaption inherits from its superclasses XmManager, Composite and Core. for a complete description of each resource, refer to the man page for that superclass β she's not gonna re-explain her family's whole deal, that's what the family man pages are for π€
and the Access column codes mean the same thing they did up there: C for set at creation time, S for set using XtSetValues, G for retrieved using XtGetValues. (the actual inherited resource table follows in the next part, so don't go anywhere bestie π¦)
okay so before we get to the caption's own little resource glow-up, we gotta meet the β¨inheritedβ¨ crew β everything that comes down the family line. The original page puts all of this in big fancy tables, but tables are giving spreadsheet-at-a-family-reunion energy, so imma lay it out as lists. Every name, class, type, default and access code stays exactly where it belongs. No cap. π«Ά
Every resource below is listed as: resource name, its class, its type, its default, and its access code β all of them, no skipping, bestie. π
π XmManager Resource Set π
XmNbottomShadowColorβ classXmCBottomShadowColor, typePixel, default dynamic, accessCSGXmNbottomShadowPixmapβ classXmCBottomShadowPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNforegroundβ classXmCForeground, typePixel, default dynamic, accessCSGXmNhelpCallbackβ classXmCCallback, typeCallback, defaultNULL, accessCSGXmNhighlightColorβ classXmCHighlightColor, typePixel, default dynamic, accessCSGXmNhighlightPixmapβ classXmCHighlightPixmap, typePixmap, default dynamic, accessCSGXmNnavigationTypeβ classXmCNavigationType, typeXmNavigationType, defaultXmTAB_GROUP, accessCSGXmNshadowThicknessβ classXmCShadowThickness, typeDimension, default2, accessCSGXmNstringDirectionβ classXmCStringDirection, typeXmStringDirection, default dynamic, accessCG(yeah bestie, this one'sCG, notCSGβ she's built different π )XmNtopShadowColorβ classXmCTopShadowColor, typePixel, default dynamic, accessCSGXmNtopShadowPixmapβ classXmCTopShadowPixmap, typePixmap, default dynamic, accessCSGXmNtraversalOnβ classXmCTraversalOn, typeBoolean, defaultTrue, accessCSGXmNunitTypeβ classXmCUnitType, typeUnsignedChar, default dynamic, accessCSGXmNuserDataβ classXmCUserData, typePointer, defaultNULL, accessCSG
π¦ Composite Resource Set π¦
XmNchildrenβ classXmCReadOnly, typeWidgetList, default private, accessGXmNinsertPositionβ classXmCInsertPosition, typeFunction, defaultNULL, accessCSGXmNnumChildrenβ classXmCReadOnly, typeCardinal, default4, accessG
and that's the whole inherited buffet, plated and served π next up we get into the caption's own resources, so stay with me bestie, we're so close to the good part.
π Core Resource Set π
okay bestie, gather round, because this is the entire core resource lineup and we are not skipping a single one π . Each bullet goes: name β class, type, default, access. Read it like a menu, except the drinks are X resources and every single one is lowkey iconic β¨.
XmNacceleratorsβ classXmCAccelerators, typeAcceleratorTable, defaultNULL, accessCSGXmNancestorSensitiveβ classXmCSensitive, typeBoolean, default dynamic, accessCSGXmNbackgroundβ classXmCBackground, typePixel, default dynamic, accessGXmNbackgroundPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNborderColorβ classXmCBorderColor, typePixel, defaultXtDefaultForeground, accessCSGXmNborderPixmapβ classXmCPixmap, typePixmap, defaultXmUNSPECIFIED_PIXMAP, accessCSGXmNborderWidthβ classXmCBorderWidth, typeDimension, default0, accessCSGXmNcolormapβ classXmCColormap, typeColormap, default dynamic, accessCGXmNdepthβ classXmCDepth, typeInt, default dynamic, accessCGXmNdestroyCallbackβ classXmCCallback, typeCallback, defaultNULL, accessCSGXmNheightβ classXmCHeight, typeDimension, default dynamic, accessCSGXmNinitialResourcesPersistentβ classXmCInitialResourcesPersistent, typeBoolean, defaultTrue, accessCGXmNmappedWhenManagedβ classXmCMappedWhenManaged, typeBoolean, defaultTrue, accessCSGXmNscreenβ classXmCScreen, typeScreen, default dynamic, accessCGXmNsensitiveβ classXmCSensitive, typeBoolean, defaultTrue, accessCSGXmNtranslationsβ classXmCTranslations, typeTranslationTable, default internal, accessCSGXmNwidthβ classXmCWidth, typeDimension, default dynamic, accessCSGXmNxβ classXmCPosition, typePosition, default0, accessCSGXmNyβ classXmCPosition, typePosition, default0, accessCSG
π¦ Translations π¦
XbaeCaption is not out here inventing its own choreography, bestie β it inherits its translations from XmManager. Whatever XmManager is doing, that's the vibe. periodt π«Ά
πΈ Type Converters πΈ
So besides the standard type converters that Xt and Motif already went and registered (their work, not ours π
), XbaeCaption registers these extra ones:
CvtStringToLabelAlignment()β takes aStringand converts it into the enumeratedXbaeLabelAlignmenttype. The stringsTopOrLeft,TopandLeftall get converted toXbaeAlignmentTopOrLeft. The stringCenterconverts toXbaeAlignmentCenter. And the stringsBottomOrRight,BottomandRightconvert toXbaeAlignmentBottomOrRight. Why do we care? Because this converter is literally what lets you specify theXmNlabelAlignmentresource in a resource file β¨. Oh and it's case insensitive, so don't panic about your caps.CvtStringToLabelPosition()β takes aStringand converts it into the enumeratedXbaeLabelPositiontype. The stringLeftconverts toXbaePositionLeft. The stringRightconverts toXbaePositionRight. The stringTopconverts toXbaePositionTop. The stringBottomconverts toXbaePositionBottom. Same energy as above: this is the converter that lets you specify theXmNlabelPositionresource in a resource file π. Also case insensitive. no cap.
π Public Functions π
These are the external entry points to XbaeCaption class methods, and yes we're listing them all:
XbaeCreateCaption()
Widget XbaeCreateCaption()
Widget parent;
String name;
ArgList arglist;
Cardinal argcount;
- parent β specifies the parent widget ID π
- name β specifies the name of the created widget
- arglist β specifies the argument list
- argcount β specifies the number of attribute/value pairs in the argument list (
arglist)
XbaeCreateCaption() creates an instance of an XbaeCaption widget and hands you back the associated widget ID. that's it, that's the whole function, slay π₯
π Virtual Bindings π
The bindings for virtual keys are vendor specific β so like, that's a your-vendor question, not a me question π. For the full tea on bindings for virtual buttons and keys, go read VirtualBindings(3X).
π AUTHOR π
- Andrew Wason, Bellcore, Piscataway NJ; author (
aw@bae.bellcore.com) - Andrew Lister (
lister@db.com)
β RELEASE β
This document describes XbaeCaption from Xbae Version 4.9.
π¦ SEE ALSO π¦
ok so if you wanna go deeper (and bestie, you know you do), go bother these other pages, they're the whole friend group:
Core(3X)Composite(3X)XmManager(3X)XmLabel(3X)
π Notice of Limitation π
ok so here's the part where the grown-ups talk. ngl it's a lot of capital letters, but it matters, so let's get into it π
Bellcore, plus the previous and current maintainers of the Xbae widgets (together they're calling themselves the 'authors'), are handing you this info only for professionals who already have the right amount of experience to read it and interpret it according to generally accepted engineering standards (or other professional standards) and whatever regulations apply. And no β nothing here is a recommendation about any products or vendors, and you shouldn't read it like it is. π
The info in here was put together from sources they consider reliable, and the authors reserve the right to revise it whenever, without telling you first β but they're under no obligation to do that. Also, unless you've been expressly granted a license by Bellcore in a separate, applicable written agreement with Bellcore, then no license is granted to you β express or implied β under any patents, copyrights or other intellectual property rights. Using this info is entirely your call, and it shall not be deemed an inducement by Bellcore to infringe any existing or later-issued patent, copyrights, or other intellectual property right. π«
and then, the part in the big scary letters:
THE AUTHORS MAKE NO REPRESENTATIONS AND EXTENDS NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE INFORMATION, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE, AND THE WARRANTY AGAINST INFRINGEMENT OF PATENTS OR OTHER INTELLECTUAL PROPERTY RIGHTS. THE INFORMATION IS PROVIDED ``AS IS'', AND IN NO EVENT SHALL THE AUTHORS OR ANY OF ITS AFFILIATES BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELATING TO THE INFORMATION.
so yeah β no promises, no warranties, no taking them to court over lost profits or incidental or consequential damages. it's giving "as is" and that's the whole vibe. π
The copyright situation, laid out:
- Copyright 1991 Bellcore. All Rights Reserved.
- Copyright 1995-99 Andrew Lister All Rights Reserved.
- Copyright 1999-2002 LessTif Developers
and the no-warranty thing above covers all the additions and contributions too. No contributor shall be held liable; this work is provided ``as is''. And fr fr, if that's a problem for you? Then don't use this software. π«Ά
and that's a wrap bestie!! π this page came from xbae, version 4.60.4, and it's the XbaeCaption(3) manual page. go forth and caption things, you absolute icon πβ¨π
π¦ where this page comes from
- debian bookworm: libxbae-dev 4.60.4-9
- debian trixie: libxbae-dev 4.60.4-11
- ubuntu jammy: libxbae-dev 4.60.4-9
- ubuntu noble: libxbae-dev 4.60.4-9build2
- ubuntu questing: libxbae-dev 4.60.4-11
- ubuntu resolute: libxbae-dev 4.60.4-11build1
- ubuntu stonking: libxbae-dev 4.60.4-11build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms