XmColorSelector(3X)
π XmColorSelector π
okay bestie, welcome to the Color Selector widget β that's XmColorSelector(3X) if you're being formal, but we're not π
β¨ SYNOPSIS β¨
#include <Xm/ColorS.h>
π DESCRIPTION π
so like. the Color Selector widget lets your user pick a color, and they've got two whole ways to do it: sliding around a set of RGB sliders, or scrolling through a list of literally every color that exists in the rgb database. and the way it just... shows them the name or the rgb value of whatever they're hovering on, live, as they pick and choose? it's giving main character energy, no cap. the color they selected gets displayed too. obsessed. π
πΈ Normal Resources πΈ
here's the whole menu, bestie. every single one:
blueSliderLabelβ classSliderLabel, typeXmString, initial value"Blue"colorListTogLabelβ classTogLabel, typeXmString, initial value"Color List"colorModeβ classColorMode, typeXiColorMode, initial valueXmScaleModecolorNameβ classString, typeString, initial valueWhitefileReadErrorβ classFileReadError, typeXmString, initial value"Could not read RGB.txt file"greenSliderLabelβ classSliderLabel, typeXmString, initial value"Green"marginHeightβ classMarginHeight, typeVerticalDimension, initial value2marginWidthβ classMarginWidth, typeHorizontalDimension, initial value2noCellErrorβ classNoCellError, typeXmString, initial value"No Color Cell Available"redSliderLabelβ classSliderLabel, typeXmString, initial value"Red"rgbFileβ classString, typeString, initial value/usr/share/X11/rgb.txtsliderTogLabelβ classTogLabel, typeXmString, initial value"Color Sliders"
quick lil note so you don't get got: every resource name starts withXmNand every resource class name starts withXmC. periodt. π
blueSliderLabel
the string that shows up as the label of the blue slider π¦
colorListTogLabel
the string that shows up as the label of the color list toggle
colorMode
the color list can run in either slider mode or list mode. acceptable values are XmListMode and XmScaleMode. this resource is how your app decides which mode the color selector should start in when it gets created. after that? the user can freely flip modes whenever, using a pair of radio buttons inside the color selector. a type converter is registered to convert the strings "ScaleMode" and "ListMode" into color modes, so you can use them straight from the resource database. cute, right? β¨
colorName
this one controls the color name currently displayed to the user. you can set it to change the color shown in the color selector, or query it to find out which color the user actually picked. what you get back is either a color name, or a pound sign (#) followed by a set of rgb values, exactly as specified in the Xlib spec. π
fileReadError
the message shown when the Color Selector can't read the rgb.txt file. it gets displayed at the top of the window where the color list would normally be. sad girl hours π
greenSliderLabel
the string that shows up as the label of the green slider π
marginHeight
marginWidth
this is how much space gets left between each of the children in the color selector, and between the outer children and the edge of the color selector widget itself. breathing room, bestie π«Ά
noCellError
this resource controls the message displayed in the sample color field when the Color Selector can't allocate a read/write color cell. π
redSliderLabel
the string that shows up as the label of the red slider π₯
rgbFile
the name of the file to be loaded, which holds the valid color names. every one of those names gets sorted and the duplicates removed before anything is shown to the user. so clean. so organized. we love a dedupe β¨
sliderTogLabel
the string that shows up as the label of the color slider toggle
π Convenience Routine π
XmCreateColorSelector β widget creation convenience routine
Widget XmCreateColorSelector(
Widget parent, /* Widget id of parent for ColorSelector */
String name, /* Name of the created widget */
ArgList args, /* argument list */
Cardinal num_args /* number of items in argument list */
)
π§ Children π§
ngl, the color selector is a whole ensemble cast of sub-widgets. like every widget, most values get passed in through the argument list at creation time or via set values, and they get passed down to each of this widget's children β but get values requests have to be made on a child-by-child basis, one at a time. no shortcuts, bestie. π€
here's the full cast list. go read each child's own documentation for its resource list, iykyk.
XmColorSelector<named by application>XmScrolledWindowscrolledXmScrollBarListvScrollBarXmScrollBarListhScrollBarXmListlistXmButtonBoxbuttonBoxXmScalescaleXmLabelGadgetscale_titleXmScrollBarscale_scrollbarXmRowColumnradioBoxXmToggleButtoncolorListToggleXmToggleButtoncolorSlidersToggleXmFramecolorFrameXmLabelcolorWindow
π COPYRIGHT π
Copyright (c) 1992 by Integrated Computer Solutions, Inc.
and that's the whole page, babe π this was XmColorSelector(3X), same manual name at the top and the bottom because consistency is iconic, and that copyright is from 1992 β truly vintage, truly a classic, we stan a legend π bye bestie, go pick a pretty color πβ¨
π¦ where this page comes from
- 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+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms