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



Chapter 11. How to Write a Motif Button Widget

Button widgets, like label widgets, display some noneditable visual such as text or a pixmap. Unlike label widgets, button widgets can be activated by a user. When a user activates a button widget, an application callback is typically triggered.

This chapter explains how to write a Motif button widget. It begins by examining the kinds of buttons we expect you to write, and the kinds of buttons we recommend that you not write. Then, this chapter examines the following three button demonstration widgets:

  1. The ExmCommandButton widget acts as a button in a DialogBox.

  2. The ExmMenuButton widget acts as a menu button. It can be the child of any XmRowColumn widget whose XmNrowColumnType is set to some value other than XmWORK_AREA.

  3. The ExmTabButton widget is meant to serve as a tab child of an XmNotebook widget.

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