SmeBSB Object


Application Header file <Xraw/SmeBSB.h>
Class Header file <Xraw/SmeBSBP.h>
Class smeBSBObjectClass
Class Name SmeBSB
Superclass Sme --> RectObj

The SmeBSB object is used to create a menu entry that contains a string, and optional bitmaps in its left and right margins. Since each menu entry is an independent object, the application is able to change the font, color, height, and other attributes of the menu entries, on an entry by entry basis.


New Resources

The resources associated with the SmeBSB object are defined in this section, and affect only the single menu entry specified by this object.

Name Class Type Notes Default Value
callback Callback Callback NULL
font Font FontStruct XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
justify Justify Justify XtjustifyLeft
label Label String NULL
leftBitmap LeftBitmap Pixmap XtUnspecifiedPixmap
leftMargin leftMargin Dimension 4
rightBitmap RightBitmap Pixmap XtUnspecifiedPixmap
rightMargin rightMargin Dimension 4
vertSpace VertSpace int 25
callback All callback functions on this list are called when the SimpleMenu notifies this entry that the user has selected it.
font The font used to display the text label.
foreground A pixel value which indexes the SimpleMenu's colormap to derive the foreground color of the menu entry's window. This color is also used to render all 1's in the left and right bitmaps. Keep in mind that the SimpleMenu widget will force the width of all menu entries to be the width of the longest entry.
justify How the label is to be rendered between the left and right margins when the space is wider than the actual text. This resource may be specified with the values XtJustifyLeft, XtJustifyCenter, or XtJustifyRight. When specifying the justification from a resource file the values left, center, or right may be used.
label This is a the string that will be displayed in the menu entry. The exact location of this string within the bounds of the menu entry is controlled by the leftMargin, rightMargin, vertSpace, and justify resources.
leftBitmap
rightBitmap
This is a name of a bitmap to display in the left or right margin of the menu entry. All 1's in the bitmap will be rendered in the foreground color, and all 0's will be drawn in the background color of the SimpleMenu widget. It is the programmers responsibility to make sure that the menu entry is tall enough, and the appropriate margin wide enough to accept the bitmap. If care is not taken the bitmap may extend into another menu entry, or into this entry's label.
leftMargin
rightMargin
This is the amount of space (in pixels) that will be left between the edge of the menu entry and the label string.
vertSpace This is the amount of vertical padding, expressed as a percentage of the height of the font, that is to be placed around the label of a menu entry.. The label and bitmaps are always centered vertically within the menu. The default value for this resource (25) causes the default height to be 125% of the height of the font.


[Xraw home] [Xraw widget class hierarchy]
Vladimir T. Romanovski
romsky@hp1.oea.ihep.su