XmLabel man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

XmLabel(3X)							   XmLabel(3X)

NAME
       XmLabel - The Label widget class

SYNOPSIS
       #include <Xm/Label.h>

DESCRIPTION
       Label  is  an  instantiable widget and is also used as a superclass for
       other button widgets, such as PushButton and ToggleButton.   The	 Label
       widget  does  not accept any button or key input, and the help callback
       is the only callback defined.  Label  also  receives  enter  and	 leave
       events.

       Label  can  contain  either text or a pixmap.  Label text is a compound
       string.	Refer to the OSF/Motif Programmer's Guide for more information
       on  compound  strings.  The text can be multilingual, multiline, and/or
       multifont.  When a Label is insensitive, its text is stippled,  or  the
       user-supplied insensitive pixmap is displayed.

       Label  supports	both  accelerators  and mnemonics primarily for use in
       Label subclass widgets that  are	 contained  in	menus.	Mnemonics  are
       available  in a menu system when the button is visible. Accelerators in
       a menu system are accessible even when the button is not	 visible.  The
       Label  widget  displays	the mnemonic by underlining the first matching
       character in the text string.  The accelerator is displayed as  a  text
       string adjacent to the label text or pixmap.

       Label  consists	of  many margin fields surrounding the text or pixmap.
       These margin fields are resources that may be  set  by  the  user,  but
       Label  subclasses and Manager parents also modify some of these fields.
       They tend to modify the	XmNmarginLeft,	XmNmarginRight,	 XmNmarginTop,
       and  XmNmarginBottom  resources	and  leave the XmNmarginWidth and XmN‐
       marginHeight resources as set by the application.

       Label takes into account XmNshadowThickness in determining  its	layout
       but  does  not  draw  the  shadow.   That  is, if XmNshadowThickness is
       greater than 0, Label leaves space for the shadow, but the shadow  does
       not appear.

       In  a  Label XmNtraversalOn and XmNhighlightOnEnter are forced to False
       inside Popup MenuPanes, Pulldown MenuPanes, and OptionMenus.  Otherwise
       these resources default to False.

   Classes
       Label  inherits	behavior  and  resources  from	Core  and  XmPrimitive
       Classes.

       The class pointer is xmLabelWidgetClass.

       The class name is XmLabel.

   New Resources
       The following table defines a set of widget resources used by the  pro‐
       grammer to specify data.	 The programmer can also set the resource val‐
       ues 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).

       XmLabel Resource Set

       Class: XmCAccelerator
       Default: NULL
       Type:  String
       Access: CSG
       Class: XmCAcceleratorText
       Default: NULL
       Type:  XmString
       Access: CSG
       Class: XmCAlignment
       Default: dynamic
       Type:  unsigned char
       Access: CSG
       Class: XmCFontList
       Default: dynamic
       Type:  XmFontList
       Access: CSG
       Class: XmCLabelInsensitivePixmap
       Default: XmUNSPECIFIED_PIXMAP
       Type:  Pixmap
       Access: CSG
       Class: XmCLabelPixmap
       Default: XmUNSPECIFIED_PIXMAP
       Type:  Pixmap
       Access: CSG
       Class: XmCXmString
       Default: dynamic
       Type:  XmString
       Access: CSG
       Class: XmCLabelType
       Default: XmSTRING
       Type:  unsigned char
       Access: CSG
       Class: XmCMarginBottom
       Default: 0
       Type:  Dimension
       Access: CSG
       Class: XmCMarginHeight
       Default: 2
       Type:  Dimension
       Access: CSG
       Class: XmCMarginLeft
       Default: 0
       Type:  Dimension
       Access: CSG
       Class: XmCMarginRight
       Default: 0
       Type:  Dimension
       Access: CSG
       Class: XmCMarginTop
       Default: 0
       Type:  Dimension
       Access: CSG
       Class: XmCMarginWidth
       Default: 2
       Type:  Dimension
       Access: CSG
       Class: XmCMnemonic
       Default: NULL
       Type:  KeySym
       Access: CSG
       Class: XmCMnemonicCharSet
       Default: XmFONTLIST_DEFAULT_TAG
       Type:  String
       Access: CSG
       Class: XmCRecomputeSize
       Default: True
       Type:  Boolean
       Access: CSG
       Class: XmCStringDirection
       Default: dynamic
       Type:  XmStringDirection
       Access: CSG

	      Sets the accelerator on a button widget in a menu,  which	 acti‐
	      vates  a visible or invisible, but managed, button from the key‐
	      board. This resource is a string that describes a set  of	 modi‐
	      fiers  and  the  key  that may be used to select the button. The
	      format of this string is identical to that used by the  transla‐
	      tions  manager,  with the exception that only a single event may
	      be specified and only KeyPress events are allowed.

	      Accelerators for buttons are supported only for PushButtons  and
	      ToggleButtons  in	 Pulldown  and Popup MenuPanes.	 Specifies the
	      text displayed for the accelerator. The text is displayed	 adja‐
	      cent to the label string or pixmap. Accelerator text for buttons
	      is displayed only for PushButtons and ToggleButtons in  Pulldown
	      and  Popup  Menus.   Specifies  the  label alignment for text or
	      pixmap.  XmALIGNMENT_BEGINNING (left alignment)--causes the left
	      sides  of	 the  lines  of text to be vertically aligned with the
	      left edge of the widget window.  For a pixmap, its left side  is
	      vertically  aligned  with	 the  left  edge of the widget window.
	      XmALIGNMENT_CENTER (center alignment)--causes the centers of the
	      lines of text to be vertically aligned in the center of the wid‐
	      get window.  For a pixmap, its center is vertically aligned with
	      the  center of the widget window.	 XmALIGNMENT_END (right align‐
	      ment)--causes the right sides of the lines of text to be	verti‐
	      cally  aligned  with the right edge of the widget window.	 For a
	      pixmap, its right side is vertically aligned with the right edge
	      of the widget window.

	      The above descriptions for text are correct when XmNstringDirec‐
	      tion  is	XmSTRING_DIRECTION_L_TO_R.   When  that	 resource   is
	      XmSTRING_DIRECTION_R_TO_L,   the	 descriptions	for   XmALIGN‐
	      MENT_BEGINNING and XmALIGNMENT_END are switched.

	      If the parent is a  RowColumn  whose  XmNisAligned  resource  is
	      True,  XmNalignment  is  forced to the same value as the RowCol‐
	      umn's XmNentryAlignment if the RowColumn's  XmNrowColumnType  is
	      XmWORK_AREA  or  if  the widget is a subclass of XmLabel. Other‐
	      wise, the default is XmALIGNMENT_CENTER.	Specifies the font  of
	      the  text used in the widget.  If this value is NULL at initial‐
	      ization, the font	 list is 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.
	      If  such	 an ancestor is found, the font list is initialized to
	      the XmNbuttonFontList   (for  button  subclasses)	 or  XmNlabel‐
	      FontList	of the ancestor widget.	 If no such ancestor is found,
	      the   default   is   implementation   dependent.	   Refer    to
	      XmFontList(3X)  for  more information on the creation and struc‐
	      ture of a font list.  Specifies a pixmap used as the button face
	      if  XmNlabelType	is XmPIXMAP and the button is insensitive. The
	      default value, XmUNSPECIFIED_PIXMAP, displays  an	 empty	label.
	      Specifies	 the pixmap when XmNlabelType is XmPIXMAP. The default
	      value, XmUNSPECIFIED_PIXMAP, displays an empty label.  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
	      information on the creation and structure of  compound  strings.
	      Specifies	 the label type.  XmSTRING--displays text using XmNla‐
	      belString.  XmPIXMAP--displays pixmap  using  XmNlabelPixmap  or
	      XmNlabelInsensitivePixmap.   Specifies  the  amount  of  spacing
	      between the bottom of the label text and the top of  the	bottom
	      margin  specified	 by  XmNmarginHeight.  This may be modified by
	      Label's subclasses.  For	example,  CascadeButton	 may  increase
	      this  field  to  make room for the cascade pixmap.  Specifies an
	      equal amount of spacing above the margin defined by XmNmarginTop
	      and below the margin defined by XmNmarginBottom. XmNmarginHeight
	      specifies the amount of spacing between the top edge of the mar‐
	      gin  set	by XmNmarginTop and the bottom edge of the top shadow,
	      and the amount of spacing between the bottom edge of the	margin
	      specified	 by  XmNmarginBottom  and  the	top edge of the bottom
	      shadow.  Specifies the amount of spacing between the  left  edge
	      of  the label text and the right side of the left margin (speci‐
	      fied by XmNmarginWidth). This may be modified  by	 Label's  sub‐
	      classes.	 For  example, ToggleButton may increase this field to
	      make room for the toggle indicator and for spacing  between  the
	      indicator	 and label.  Whether this actually applies to the left
	      or right side of the label may  depend  on  the  value  of  XmN‐
	      stringDirection.	 Specifies  the	 amount of spacing between the
	      right edge of the label text and the left side of the right mar‐
	      gin  (specified  by  XmNmarginWidth).  This  may	be modified by
	      Label's subclasses.  For	example,  CascadeButton	 may  increase
	      this  field  to  make  room for the cascade pixmap. Whether this
	      actually applies to the left or right  side  of  the  label  may
	      depend on the value of XmNstringDirection.  Specifies the amount
	      of spacing between the top of the label text and the  bottom  of
	      the  top	margin specified by XmNmarginHeight. This may be modi‐
	      fied by Label's  subclasses.   For  example,  CascadeButton  may
	      increase this field to make room for the cascade pixmap.	Speci‐
	      fies an equal amount of  spacing	to  the	 left  of  the	margin
	      defined  by XmNmarginLeft and to the right of the margin defined
	      by XmNmarginRight.  XmNmarginWidth specifies the amount of spac‐
	      ing between the left edge of the margin set by XmNmarginLeft and
	      the right edge of the left shadow, and  the  amount  of  spacing
	      between the right edge of the margin specified by XmNmarginRight
	      and the left edge of the right shadow.  Provides the  user  with
	      an  alternate  means  of	activating  a  button.	A  button in a
	      MenuBar, a Popup MenuPane, or a Pulldown	MenuPane  can  have  a
	      mnemonic.

	      This  resource contains a keysym as listed in the X11 keysym ta‐
	      ble. The first  character	 in  the  label	 string	 that  exactly
	      matches  the  mnemonic  in  the character set specified in XmNm‐
	      nemonicCharSet is underlined when the button is displayed.

	      When a mnemonic has been specified, the user activates the  but‐
	      ton by pressing the mnemonic key while the button is visible. If
	      the button is a CascadeButton in a MenuBar and the MenuBar  does
	      not  have	 the  focus, the user must use the MAlt modifier while
	      pressing the mnemonic.  The user	can  activate  the  button  by
	      pressing	either	the  shifted  or  the  unshifted mnemonic key.
	      Specifies the character set of the mnemonic for the label.   The
	      default  is  XmFONTLIST_DEFAULT_TAG.   Specifies a Boolean value
	      that indicates whether the widget shrinks or expands to accommo‐
	      date  its	 contents  (label  string or pixmap) as a result of an
	      XtSetValues resource value that would change  the	 size  of  the
	      widget.	If  True, the widget shrinks or expands to exactly fit
	      the label string or pixmap. If False, the widget never  attempts
	      to change size on its own.  Specifies the direction in which the
	      string  is  to  be  drawn.   The	following  are	 the   values:
	      XmSTRING_DIRECTION_L_TO_R--left	 to    right   XmSTRING_DIREC‐
	      TION_R_TO_L--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 XmSTRING_DIRECTION_L_TO_R.

   Inherited Resources
       Label  inherits behavior and resources from the following superclasses.
       For a complete description of each resource, refer to the man page  for
       that superclass.

       XmPrimitive Resource Set

       Class: XmCBottomShadowColor
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCBottomShadowPixmap
       Default: XmUNSPECIFIED_PIXMAP
       Type:  Pixmap
       Access: CSG
       Class: XmCForeground
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCHighlightColor
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCHighlightOnEnter
       Default: False
       Type:  Boolean
       Access: CSG
       Class: XmCHighlightPixmap
       Default: dynamic
       Type:  Pixmap
       Access: CSG
       Class: XmCHighlightThickness
       Default: 0
       Type:  Dimension
       Access: CSG
       Class: XmCNavigationType
       Default: XmNONE
       Type:  XmNavigationType
       Access: CSG
       Class: XmCShadowThickness
       Default: 0
       Type:  Dimension
       Access: CSG
       Class: XmCTopShadowColor
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCTopShadowPixmap
       Default: dynamic
       Type:  Pixmap
       Access: CSG
       Class: XmCTraversalOn
       Default: False
       Type:  Boolean
       Access: CSG
       Class: XmCUnitType
       Default: dynamic
       Type:  unsigned char
       Access: CSG
       Class: XmCUserData
       Default: NULL
       Type:  XtPointer
       Access: CSG

       Core Resource Set

       Class: XmCAccelerators
       Default: dynamic
       Type:  XtAccelerators
       Access: CSG
       Class: XmCSensitive
       Default: dynamic
       Type:  Boolean
       Access: G
       Class: XmCBackground
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCPixmap
       Default: XmUNSPECIFIED_PIXMAP
       Type:  Pixmap
       Access: CSG
       Class: XmCBorderColor
       Default: XtDefaultForeground
       Type:  Pixel
       Access: CSG
       Class: XmCPixmap
       Default: XmUNSPECIFIED_PIXMAP
       Type:  Pixmap
       Access: CSG
       Class: XmCBorderWidth
       Default: 0
       Type:  Dimension
       Access: CSG
       Class: XmCColormap
       Default: dynamic
       Type:  Colormap
       Access: CG
       Class: XmCDepth
       Default: dynamic
       Type:  int
       Access: CG
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCHeight
       Default: dynamic
       Type:  Dimension
       Access: CSG
       Class: XmCInitialResourcesPersistent
       Default: True
       Type:  Boolean
       Access: C
       Class: XmCMappedWhenManaged
       Default: True
       Type:  Boolean
       Access: CSG
       Class: XmCScreen
       Default: dynamic
       Type:  Screen *
       Access: CG
       Class: XmCSensitive
       Default: True
       Type:  Boolean
       Access: CSG
       Class: XmCTranslations
       Default: dynamic
       Type:  XtTranslations
       Access: CSG
       Class: XmCWidth
       Default: dynamic
       Type:  Dimension
       Access: CSG
       Class: XmCPosition
       Default: 0
       Type:  Position
       Access: CSG
       Class: XmCPosition
       Default: 0
       Type:  Position
       Access: CSG

   Translations
       XmLabel	includes translations from Primitive. The XmLabel translations
       are listed below. These translations may not directly correspond	 to  a
       translation table.  BDrag Press:	 ProcessDrag() KHelp:	     Help()

       The  translations  used by subclasses of XmLabel for menu traversal are
       listed below. These translations	 may  not  directly  correspond	 to  a
       translation    table.	 KLeft:		  MenuTraverseLeft()   KRight:
       MenuTraverseRight()     KUp:		  MenuTraverseUp()	KDown:
       MenuTraverseDown() MAny KCancel:	 MenuEscape()

   Action Routines
       The XmLabel action routines are described below: In a Popup or Pulldown
       MenuPane, unposts all menus in the menu hierarchy and, when the shell's
       keyboard	 focus	policy	is  XmEXPLICIT, restores keyboard focus to the
       widget that had the focus before the menu system was entered. Calls the
       callbacks  for XmNhelpCallback if any exist. If there are no help call‐
       backs for this widget, this action calls the  help  callbacks  for  the
       nearest	ancestor that has them.	 In a MenuBar, disarms the CascadeBut‐
       ton and the menu and, when the shell's keyboard focus policy  is	 XmEX‐
       PLICIT, restores keyboard focus to the widget that had the focus before
       the menu was entered.

	      In a toplevel Pulldown MenuPane  from  a	MenuBar,  unposts  the
	      menu,  disarms  the  MenuBar CascadeButton and the MenuBar, and,
	      when the shell's keyboard focus policy is	 XmEXPLICIT,  restores
	      keyboard	focus  to  the	widget	that  had the focus before the
	      MenuBar was entered. In other Pulldown  MenuPanes,  unposts  the
	      menu and moves the focus to its CascadeButton.

	      In a Popup MenuPane, unposts the menu and, when the shell's key‐
	      board focus policy is XmEXPLICIT, restores keyboard focus to the
	      widget from which the menu was posted.  If the current menu item
	      has a submenu and is in a MenuBar, then this  action  posts  the
	      submenu,	disarms	 the current menu item, and arms the submenu's
	      first traversable menu item.

	      If the current menu item is in a MenuPane, then this action dis‐
	      arms  the	 current  menu	item and arms the item below it.  This
	      action wraps within the MenuPane.	 When the current menu item is
	      at  the  MenuPane's  bottom  edge, then this action wraps to the
	      topmost menu item in the column to the  right,  if  one  exists.
	      When the current menu item is at the bottom, rightmost corner of
	      the MenuPane, then this action wraps to the tear-off control, if
	      present,	or  to	the top, leftmost menu item.  When the current
	      menu item is in a MenuBar, then this action disarms the  current
	      item  and	 arms  the MenuBar item to the left. This action wraps
	      within the MenuBar.

	      In MenuPanes, if the current menu item is not at the  left  edge
	      of a MenuPane, this action disarms the current item and arms the
	      item to its left.	 If the current menu item is at the left  edge
	      of  a  submenu  attached	to  a  MenuBar	item, then this action
	      unposts the submenu and traverses to the	MenuBar	 item  to  the
	      left,  wrapping  if  necessary.  If that MenuBar item has a sub‐
	      menu, it posts the submenu and arms the first  traversable  item
	      in  the submenu. If the current menu item is at the left edge of
	      a submenu not directly attached to a  MenuBar  item,  then  this
	      action unposts the current submenu only.

	      In Popup or Torn-off MenuPanes, when the current menu item is at
	      the left edge, this  action wraps within the MenuPane.   If  the
	      current menu item is at the left edge of the MenuPane and not in
	      the top row, this action wraps to the rightmost menu item in the
	      row  above.   If the current menu item is in the upper, leftmost
	      corner, this action wraps to the tear-off control,  if  present,
	      or else it wraps to the bottom, rightmost menu item in the Menu‐
	      Pane.  If the current menu item  is  in  a  MenuBar,  then  this
	      action disarms the current item and arms the MenuBar item to the
	      right. This action wraps within the MenuBar.

	      In MenuPanes, if the current menu item is a CascadeButton,  then
	      this  action  posts  its associated submenu. If the current menu
	      item is not a CascadeButton and is not at the right  edge	 of  a
	      MenuPane, this action disarms the current item and arms the item
	      to its right, wrapping if necessary. If the current menu item is
	      not  a  CascadeButton and is at the right edge of a submenu that
	      is a descendent of a MenuBar, then this action unposts all  sub‐
	      menus  and  traverses  to the MenuBar item to the right. If that
	      MenuBar item has a submenu, it posts the submenu	and  arms  the
	      submenu's first traversable item.

	      In  Popup	 or  Torn-off menus, if the current menu item is not a
	      CascadeButton and is at the right edge of a row (except the bot‐
	      tom row), this action wraps to the leftmost menu item in the row
	      below.  If the current menu item is not a CascadeButton  and  is
	      in the bottom, rightmost corner of a Popup or Pulldown MenuPane,
	      this action wraps to the tear-off control, if present,  or  else
	      it  wraps	 to the top, leftmost menu item of the MenuPane.  When
	      the current menu item is in a MenuPane, then this action disarms
	      the  current  menu item and arms the item above it.  This action
	      wraps within the MenuPane.  When the current menu item is at the
	      MenuPane's  top  edge,  then this action wraps to the bottommost
	      menu item in the column to the left, if one  exists.   When  the
	      current  menu  item  is at the top, leftmost corner of the Menu‐
	      Pane, then  this	action	wraps  to  the	tear-off  control,  if
	      present,	or to the bottom, rightmost menu item.	Drags the con‐
	      tents of a Label, identified by  pressing	 BDrag.	  This	action
	      creates  a DragContext object whose XmNexportTargets resource is
	      set to COMPOUND_TEXT for a label type  of	 XmSTRING;  otherwise,
	      PIXMAP  if the label type is XmPIXMAP.  This action is undefined
	      for Labels used in a menu system.

   Virtual Bindings
       The bindings for virtual keys  are  vendor  specific.  For  information
       about bindings for virtual buttons and keys, see VirtualBindings(3X).

SEE ALSO
       Core(3X),  XmCreateLabel(3X),  XmFontListAppendEntry(3X),  XmStringCre‐
       ate(3X), XmStringCreateLtoR(3X), XmPrimitive(3X)

								   XmLabel(3X)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net