Skip to content
SysTutorials
  • SysTutorialsExpand
    • Linux & Systems Administration Academy
    • Web3 & Crypto Academy
    • Programming Academy
    • Systems & Architecture Academy
  • Subscribe
  • Linux Manuals
  • Search
SysTutorials
Linux Manuals / Linux Manuals session 3

XmDrawnButton (3) Linux Manual Page

ByLinux Manual Posted onApr 22, 2026May 19, 2026 Updated onMay 19, 2026

XmDrawnButton — The DrawnButton widget class

Synopsis

#include <Xm/DrawnB.h>

Description

The DrawnButton widget consists of an empty widget window surrounded by a shadow border. It provides the application developer with a graphics area that can have PushButton input semantics.

Callback types are defined for widget exposure and widget resize to allow the application to redraw or reposition its graphics. If the DrawnButton widget has a highlight and shadow thickness, the application should not draw in that area. To avoid drawing in the highlight and shadow area, create the graphics context with a clipping rectangle for drawing in the widget. The clipping rectangle should take into account the size of the widget’s highlight thickness and shadow. DrawnButton uses the XmQTmenuSystem and XmQTspecifyRenderTable traits, and holds the XmQTactivatable trait.

Classes

DrawnButton inherits behavior, resources, and traits from the Core, Primitive, and XmLabel classes.

The class pointer is xmDrawnButtonWidgetClass.

The class name is XmDrawnButton.

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 .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 indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A).

XmDrawnButton Resource Set
Name Class Type Default Access





XmNactivateCallback XmCCallback XtCallbackList NULL C





XmNarmCallback XmCCallback XtCallbackList NULL C





XmNdisarmCallback XmCCallback XtCallbackList NULL C





XmNexposeCallback XmCCallback XtCallbackList NULL C





XmNmultiClick XmCMultiClick unsigned char dynamic CSG





XmNpushButtonEnabled XmCPushButtonEnabled Boolean False CSG





XmNresizeCallback XmCCallback XtCallbackList NULL C





XmNshadowType XmCShadowType unsigned char XmSHADOW_ETCHED_IN CSG





XmNactivateCallback

Specifies the list of callbacks that is called when the widget becomes selected. The reason sent by the callback is XmCR_ACTIVATE. This callback uses the XmQTactivatable trait.

XmNarmCallback

Specifies the list of callbacks that is called when the widget becomes armed. The reason sent by the callback is XmCR_ARM.

XmNdisarmCallback

Specifies the list of callbacks that is called when the widget becomes disarmed. The reason sent by the callback is XmCR_DISARM.

XmNexposeCallback

Specifies the list of callbacks that is called when the widget receives an exposure event. The reason sent by the callback is XmCR_EXPOSE.

XmNmultiClick

If a button click is followed by another button click within the time span specified by the display’s multiclick time, and this resource is set to XmMULTICLICK_DISCARD, the second click is not processed. If this resource is set to XmMULTICLICK_KEEP, the event is processed and click_count is incremented in the callback structure. When the button is not in a menu, the default value is XmMULTICLICK_KEEP.

XmNpushButtonEnabled

Enables or disables the 3-dimensional shadow drawing as in PushButton.

XmNresizeCallback

Specifies the list of callbacks that is called when the widget receives a resize event. The reason sent by the callback is XmCR_RESIZE. The event returned for this callback is NULL.

XmNshadowType

Describes the drawing style for the DrawnButton. This resource can have the following values:

XmSHADOW_IN

Draws the DrawnButton so that the shadow appears inset. This means that the bottom shadow visuals and top shadow visuals are reversed.

XmSHADOW_OUT

Draws the DrawnButton so that the shadow appears outset.

XmSHADOW_ETCHED_IN

Draws the DrawnButton using a double line. This gives the effect of a line etched into the window. The thickness of the double line is equal to the value of XmNshadowThickness.

XmSHADOW_ETCHED_OUT

Draws the DrawnButton using a double line. This gives the effect of a line coming out of the window. The thickness of the double line is equal to the value of XmNshadowThickness.

Inherited Resources

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

XmLabel Resource Set
Name Class Type Default Access





XmNaccelerator XmCAccelerator String NULL N/A





XmNacceleratorText XmCAcceleratorText XmString NULL N/A





XmNalignment XmCAlignment unsigned char dynamic CSG





XmNfontList XmCFontList XmFontList dynamic CSG





XmNlabelInsensitivePixmap XmCLabelInsensitivePixmap Pixmap XmUNSPECIFIED_PIXMAP CSG





XmNlabelPixmap XmCLabelPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG





XmNlabelString XmCXmString XmString "

Post navigation

Previous Previous
XmDrawingArea (3) Linux Manual Page
NextContinue
XmDropDown (3) Linux Manual Page

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AI Engineering (4)
  • Algorithms & Data Structures (14)
  • Blockchain & Cryptocurrency (16)
  • Code Optimization (8)
  • Databases & Storage (11)
  • Design Patterns & Architecture (18)
  • Development Best Practices (104)
  • Functional Programming (4)
  • Languages & Frameworks (97)
  • Linux & Systems Administration (726)
  • Linux Manuals (56,856)
    • Linux Manuals session 1 (13,267)
    • Linux Manuals session 2 (502)
    • Linux Manuals session 3 (32,502)
    • Linux Manuals session 4 (117)
    • Linux Manuals session 5 (1,724)
    • Linux Manuals session 7 (887)
    • Linux Manuals session 8 (4,721)
    • Linux Manuals session 9 (3,136)
  • Linux System Configuration (33)
  • Object-Oriented Programming (4)
  • Programming Languages (129)
  • Scripting & Utilities (68)
  • Security & Cryptography (17)
  • System Administration & Cloud (33)
  • Systems & Architecture (36)
  • Testing & DevOps (33)
  • Web Development (25)

SysTutorials, Terms, Privacy

  • SysTutorials
    • Linux & Systems Administration Academy
    • Web3 & Crypto Academy
    • Programming Academy
    • Systems & Architecture Academy
  • Subscribe
  • Linux Manuals
  • Search