Motif Programmer's Guide


Table of Contents

Preface
Audience
Applicability
Purpose
Document Usage
Related Documents
What DocBook SGML Markup Means
Problem Reporting

1. Introduction
The X Window System
Xlib, Xt, and Motif
Widget Classes and Hierarchy
Header Files and Libraries

2. The Motif Programming Model
A User-Centered Model
Separating Interface from Application
Building Blocks: Primitive Widgets and Gadgets
Managers
Shells
Applications, Top-Level Widgets, and Dialogs
Resources: User and Program Customization
Handling Input and Output

3. Structure of a Motif Program
Including Header Files
Initializing the Intrinsics
Creating Widgets
Adding Callback Procedures
Making Widgets Visible
Entering the Event Loop
Writing Threaded Applications

4. Structure of a Program Using UIL and MRM
Structure of a UIL Module
Structure of a Program Using MRM

5. Basic Controls
Core, RectObj, XmPrimitive, and XmGadget Classes
Labels, Buttons, and Separators
ScrollBar
Scale
List
Text and TextField

6. Menus and Options
Menu Components: Buttons, RowColumn, MenuShell
MenuBar
PopupMenu
PulldownMenu
OptionMenu
RadioBox and CheckBox
TearOffMenus
ComboBox
SpinBox
SimpleSpinBox

7. Dialogs
BulletinBoard and DialogShell
Making a Selection: SelectionBox
Choosing a Pathname: FileSelectionBox
Command
MessageBox
Form

8. Scrolling, Panes, Frames, Containers, and Notebooks
ScrolledWindow
Automatic Scrolling
Application-Defined Scrolling
MainWindow
Container
Notebook
Frame
PanedWindow

9. Compound Strings
The Structure of a Compound String
Renditions
Horizontal Tabs
Parse Tables
Compound Strings in UIL

10. Text
Text and TextField
Data Transfer in Text
Text Editing and Callbacks
Text Resources and Geometry
Convenience Routines
ScrolledText
Storing Text in a File
Sharing Text Sources

11. Internationalization
Issues in Internationalized Applications
Localizing Applications
Layout Direction
Internationalization and Text Input
Compound Strings and Compound Text

12. Color and Pixmaps
Default Colors and Pixmaps
Application-Defined Color Generation
Colormaps
Using Pixmaps

13. Input, Focus, and Keyboard Navigation
Focus Models
Controlling Keyboard Navigation
Translations and Actions
Mnemonics and Accelerators
Event Handlers
Guidelines for Grabs

14. Managing Geometry
Shells and Their Children
Manager Widgets and Their Children
Managing Geometry Using RowColumn
Managing Geometry Using BulletinBoard and DrawingArea
Managing Geometry Using Form

15. Graphics and Text in a DrawingArea
DrawingArea: A General-Purpose Widget
Event Handling and Callbacks
Using a DrawingArea in a ScrolledWindow
Using a DrawingArea for Graphics
DrawingArea and Advanced Text Editing

16. Data Transfer with UTM
What is UTM?
Why Use UTM?
Ideas For Applications
Implementation Overview
Case Study: Adding an Extra Target to XmText

17. Drag and Drop
User Overview of Drag and Drop
Application Programmer's Overview of Drag and Drop
Drag and Drop Protocols
Drop Receiver Responsibilities for Dragging
Drag Initiator Responsibilities for Dragging
Drop Receiver Responsibilities for Dropping
Drag Initiator Responsibilities for Dropping

18. MWM and the ICCCM
Window Managers, ICCCM, and Shells
MWM Properties and Resources
Atom and Protocol Management

19. Printing
The Printing APIs
Motif Widget Printing

A. The Motif Clipboard
Copying Data to the Clipboard
Retrieving Data from the Clipboard
Utility Routines

B. Data Transfer in the Motif Toolkit

Glossary