.DT XmIconButton - Online Linux Manual PageSection : 3X
Updated : 15 July 1992
NAMEThe Icon Button widget
SYNOPSISDocuments the XmIconButton widget
DESCRIPTIONThe Icon Button widget is a selectable area of the screen that contains both a label and a string. When the user selects this button with the OSF/Motif select button its activateCallback is called. This widget can also be used as a Toggle button, although it will have no indicator. The placement of the icon relative to the text can be modified by using the iconPlacement resource. Note: This widget takes a String as its label, not an XmString, so there is no need to use XmStringCreate to get a properly formatted string. Internationalized text is not currently supported.
Normal ResourcesNameClassTypeInitial Value activateCallbackCallbackCallbackNULL alignmentAlignmentAlignmentXmALIGNMENT_ BEGINNING armColorArmColorPixel<dynamic> doubleClickCallbackCallbackCallbackNULL fontListFontListFontListfixed horizontalMarginSpaceHorizontalDimension2 iconTextPaddingSpaceVerticalDimension2 iconPlacementIconPlacementIconPlacementXmIconTop labelLabelStringWidget name labelStringLabelStringXmStringWidget name pixmapPixmapPixmapNone recomputeSizeBooleanBooleanTrue setBooleanBooleanFalse stringDirectionStringDirectionStringDirectionXmSTRING_ DIRECTION_L_TO_R verticalMarginSpaceVerticalDimension2 All resource names begin with XmN and all resource class names begin with XmC.
activateCallbackThis list of callback routines is called whenever the icon button is clicked on by the user. The format of the callback routines is specified below.
armColorThis is the pixel index that describes the color to fill the widget with when it is set.
doubleClickCallbackThis list of callback routines is called whenever the user double clicks on this widget. The format of the callback routines is specified below.
fontListThe default font in this list is used to render the label string of the icon button.
horizontalMargin
verticalMarginThe amount of space to be left between the edge of the shadow and the text or pixmap displayed. The vertical and horizontal spacing can be controlled independently.
iconTextPaddingThe amount of space to be left between the pixmap and the label string.
iconPlacementThe location of the pixmap (icon) with respect to the displayed text. This resource can take one of the following values: XmIconTop, XmIconBottom, XmIconLeft, XmIconRight, XmIconNone, and XmIconOnly. A type converter has been registered that converts the following strings: "top", "bottom", "left", "right", "none", and "iconOnly". If only a string is displayed in the Icon Button, this resource can be used to change the justification of the label. XmIconTop=bottom, XmIconBottom=top, XmIconRight=Left, XmIconLeft=Right, XmIconNone=Center. In order to use these options, pixmap must be set to None.
labelThe string to display in this button. This string can only have one font, but can be any number of lines long. Use the NEW_LINE character ( '\n' ) to separate lines. This resource has been superceded by labelString, but is included for backwards compatibility. If XmNlabelString is set , XmNlabel is ignored
labelStringSpecifies the compound string to be displayed in the button. If this value is NULL, the value of XmNlabel is used. If both are NULL, labelString is initialized by converting the name of the widget to a compound string. Refer to XmString(3X) in the OSD/Motif Programmers' Reference for more information on the creation and structure of compound strings.
pixmapThe pixmap to display. This pixmap may either be of depth one (1), or the same depth as the screen this widget is being displayed on. If the pixmap is of depth one then XCopyPlane is used to render the pixmap in the foreground and background colors. If the pixmap is not of depth one then XCopyArea is used and all the original colors of the pixmap are preserved. Unlike the Motif PushButton widget the pixmap is automatically stippled when the Icon Button becomes insensitive.
recomputeSizeIf this Boolean value is True then the icon button will ask its parent to resize it to be just large enough to contain the pixmap, label and shadows. If it is False then the icon button will not attempt a resize.
setThis Boolean value represents the current state of the icon button. If this value is True then the icon button is set and is rendered as depressed. Otherwise it is unset and is rendered normally.
stringDirectionSpecifies the direction in which the string is to be drawn. XmNSTRING_DIRECTION_L_TO_R is drawn left to right, while XmNSTRING_DIRECTION_R_TO_L is drawn right to left. The default for this resource is determined at creation time. If no value is specified for this resource and the widget's parent is a manager, the value is inherited from the parent; otherwise, it defaults to XmNSTRING_DIRECTION_L_TO_R.
Callback RoutinesWhenever the user selects the icon button the activate callbacks will be called. When- ever the user double clicks on this widget the first click will call the activateCallback, and if the second occurs within MultiClickTime it will call the doubleClickCallback.. These callbacks have the following parameters: void (activate_callback)(Widget w, XtPointer client_data, XtPointer call_data) wthe Icon Button widget client_datathe client data specified by the application call_dataa pointer to an XmIconButtonCallbackInfo structure void (double_click_callback)(Widget w, XtPointer client_data, XtPointer call_data) wthe Icon Button widget client_datathe client data specified by the application call_dataa pointer to an XmIconButtonCallbackInfo structure All procedures on the Icon Button's activateCallback and doubleClickCallback lists will have a pointer to an IconButtonCallbackInfo structure passed to them in the call_data field. This structure is defined in the Icon Button widget's public header file as follows: .ta 5,10,15,20,25,30,35 .df typedef struct _XmIconButtonCallbackInfo { Boolean state; /* The current state of the icon button.*/ XEvent * event; /* The event that caused this action.*/ } XmIconButtonCallbackInfo; statethe current state of the icon button. When this is used as a push button (the default) the state variable will always be True. eventthe X Event that caused this action, see Translations and Actions below for details on the events that can cause these callbacks to be called.
Convenience Routine
'>
XmCreateIconButton - Widget creation convenience routineWidget XmCreateIconButton(
Widget parent, /* Widget id of parent for IconButton */
String name, /* Name of the created widget */
ArgList args, /* argument list */
Cardinal num_args /* number of items in argument list */
)
Translations and Actions:The following are the default translation bindings used by the icon button:<Btn1Down>,<Leave>%XmToggle()
The following actions are supported by the icon button:
XmToggle() Toggles the state of the icon button.
XmNotify() Calls all routines on activateCallback list.
XmDoubleNotify() Calls all routines on the doubleClickCallback list.
XmArmAndActivated() This action will arm the button, call the actions on the activateCallback
list, wait a fraction of a second and then disarm the button.To use this button as a toggle button rather than a push button, replace the default
translation table with the following table.
COPYRIGHT
Copyright (c) 1992 by Integrated Computer Solutions, Inc. 0
Johanes Gumabo
Data Size : 27,490 byte
man-XmIconButton.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 239,366
Visitor ID : :
Visitor IP : 3.142.198.108 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|XmIconButton.3|1|DT|.DT
) (rof_nr_x|149|XmIconButton.3|97|\n' ) to separate lines. This resource has been superceded by labelString, but is included for backwards compatibility. If XmNlabelString is set , XmNlabel is ignored |any number of lines long. Use the NEW_LINE character ( '\n' ) to separate lines. This resource has been superceded by labelString, but is included for backwards compatibility. If XmNlabelString is set , XmNlabel is ignored
) (rof_unit_scale_ch|30|XmIconButton.3|161|5,10,15,20,25,30,35|.ta 5,10,15,20,25,30,35
) (rof_ta|15|XmIconButton.3|161|5,10,15,20,25,30,35|.ta 5,10,15,20,25,30,35
) (parse_manual_page_|249|XmIconButton.3|162|df|.df
) (rof_TS|42|XmIconButton.3|210|10|,%XmToggle()
) (rof_TS|42|XmIconButton.3|239|10|.PP
)