[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Widget Writer's Guide



Writing Your Own Tab Button

An application program can attach one or more tab children to an XmNotebook widget. In most applications, the tab children are usually XmLabel widgets, but nothing prevents widget writers from creating their own tab children widgets. The ExmTabButton demonstration widget is one possible tab child widget.

All tab children widgets should install the XmQTjoinSide trait. Widgets holding this trait can affix themselves directly onto the side of another widget. Widgets with this trait look almost as if they have been melded onto the side of another widget. This appearance is especially useful for tab buttons, so the ExmTabButton widget installs the XmQTjoinSide trait.

Widgets holding the XmQTjoinSide trait usually have a somewhat irregular shape. This irregular shape makes it much harder for a widget writer to draw suitable window decorations (border highlights and shadows). In other words, since the window is not a standard rectangular shape, the border highlights and shadows cannot be rectangular either. See the BorderHighlight, BorderUnhighlight, and DrawShadows routines of ExmTabButton for details.


[ Previous | Next | Contents | Glossary | Home | Search ]