Application Header file Class Header file Class Class Name Superclass |
<X11/XawPlus/SmeBSB.h> <X11/XawPlus/SmeBSBP.h> smeBSBObjectClass SmeBSB Sme |
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.
Insensitive entries are now shown embossed using the new color resources
inherited from the Sme object. Since release 1.4 of XawPlus the left and
right bitmaps can be color pixmaps. Support of clip masks for nonrectangular
pixmaps is available.
Since release 2.1 of XawPlus SmeBSB has installed converters for the left
and right bitmaps and its clip masks. Note that the resource type of the
clip masks changes to ClipMask. This
make it possible to install the type converters for the pixmaps and their
clip masks.
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 | Default Value |
OBJECT: | |||
destroyCallback | Callback | Pointer | NULL |
RECTANGLE: | |||
borderWidth height sensitive width x y |
BorderWidth Height Sensitive Width Position Position |
Dimension Dimension Boolean Dimension Position Position |
0 0 True 0 0 0 |
SME: | |||
callback highlightColor shadowColor |
Callback Background Background |
Pointer Pixel Pixel |
NULL grey90 grey40 |
SMEBSB: | |||
foreground font label justify vertSpace leftMargin rightMargin leftBitmap leftClipMask rightBitmap rightClipMask |
Foreground Font Label Justify VertSpace HorizontalMargins HorizontalMargins LeftBitmap LeftBitmap RightBitmap RightBitmap |
Pixel XFontStruct * String Justify int Dimension Dimension Bitmap ClipMask Bitmap ClipMask |
XtDefaultForeground XtDefaultFont Name of entry XtJustifyLeft 25 4 4 None None None None |
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. |
font | The font used to display the text label. |
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. |
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. |
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. |
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. |
leftBitmap, leftClipMask, rightBitmap, rightClipMask |
This is a name of a bitmap or pixmap to display in the left or
right margin of the menu entry. All 1's of a bitmap will be rendered
in the foreground color, and all 0's will be drawn in the background
color of the SimpleMenu widget. Color pixmaps support works a little different. The color values are copied directly into the rectangular area, reserved for the pixmap. Support of nonrectangular areas is available using the left and right clip masks. These clip masks have no meaning to normal bitmaps. 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. |