Motif Programming Manual

Volume Six, Motif Edition

Dan Heller

Publisher: O'Reilly, 1991, 990 pages

ISBN: 0-937175-70-6

Keywords: Programming, Graphics

Last modified: July 21, 2021, 12:24 a.m.

This book describes how to write applications using the Motif toolkit from the Open Software Foundation (OSF). The book goes into detail on every Motif widget class, with useful examples that will help programmers to develop their own code.

There is no other book that covers the ground as thoroughly or as well. In addition to information on Motif, the book is full of tips about programming in general, and about user interface design. Content include:

  • An introduction to the Motif programming model, how it it is based on the X Toolkit Intrinsics, and how it differs from them.
  • Chapters on each of the Motif widgets classes, explaining them in depth, with useful examples that will help you to improve your own code. For example, the chapter on menus shows how to develop utility functions that generalize and simplify menu creation. All of the code shown in the book is available free of charge over the Internet or via UUCP.
  • Complete quick reference appendices on Motif functions, widgets, and gadgets. This one book can serve both your tutorial and reference needs.

The book assumes competence with the C programming language, as well as familiarity with fundamental X Window System concepts. Fortunately, the Motif Programming Manual is not only the most comprehensive guide to writing appliucations with Motif, it is an integral part of the most widely-used series of books on X as a whole. It complements and builds upon the earlier books in the X Windows System series from O'reilly & Associates, as well as on OSF's own Motif Style Guide.

    • The Plot
    • Stories Not Told
    • Alternatives to the Motif Toolkit
    • User-Interface Languages
    • UIMS Packages
    • Assumptions
    • How This Book is Organized
    • Conventions Used in This Book
    • Request for Comments
    • Obtaining Motif
    • Obtaining the Example Programs
    • Copyright
    • Notes on Z-Mail
    • Use of Sexist Language
    • Acknowledgements
  1. You, Motif, and Everything
    1. A True Story
    2. Motif and Xt Libraries
    3. Programming Using Xt and Motif
    4. Summary
  2. The Motif Programming Model
    1. Basic X Toolkit Terminalogy and Concepts
    2. Motif and Xt Libraries
    3. Programming Using Xt and Motif
      1. Header Files
      2. Initilaizing the Toolkit
      3. Creating Widgets
      4. Setting and Getting Widget Resources
      5. Event Handling for Widgets
      6. Event Specifications
    4. Summary
  3. Overview of Motif Widgets
    1. The Motif Style
    2. Giving Choices to the User
      1. The Primitive Widget Class
      2. Other Application Controls
    3. Manager Widgets
      1. Manager Widget Classes
      2. Geometry Management
      3. How Gadgets Are Managed
      4. Keyboard Traversal and Tab Groups
    4. How an Application Hangs Together
      1. The Main Window
      2. Menus
      3. The Role of the Window Manager
      4. Dialogs
    5. Summary
  4. The Main Window
    1. Creating a MainWindow
    2. MenuBars
      1. Creating the PullDown Menus
      2. SimpleMenu CallBack Routines
      3. A Sample Applications
    3. The Command and Message Areas
    4. Using Resources
    5. Summary
    6. Exercises
  5. Introduction to Dialogs
    1. The Dialog's Main Purpose
    2. Dialog Widget Anatomy
      1. Action Area Buttons
    3. Creating Motif Dialogs
      1. Dialog Header Files
      2. Creating the Dialog
      3. Setting Resources
      4. Motif Dialog Management
      5. Closing the Dialog
    4. Miscellaneous Resources for Dialogs
      1. The Default Button
      2. Button Sizes
      3. The Dialog Title
      4. Dialog Resizing
      5. Button Fonts
    5. Piercing the Dialog Abstraction
      1. How Convenience Routines Work
      2. DialogShell Widgets
      3. Getting Widgets Internal to Dialogs
    6. Generating Dialog Creation
      1. Dialog Callback Routines
      2. Callback Reasons
    7. Dialog Modality
      1. Implementing Modal Dialogs
      2. Immediate Response
    8. Summary
  6. Selection Dialogs
    1. SelectionDialog Types
    2. PromptDialogs
      1. SelectionDialog Callback Structure
      2. The prompt's Text
    3. SelectionDialogs
    4. CommandDialogs
      1. Command Callback Routines
      2. Other Command Routines
    5. FileSelectionDialogs
      1. Creating FileSelectionDialogs
      2. FileSelectionDialog Callback Routines
      3. File Searching
      4. Directory Searching
      5. Miscellaneous Notes on Filesystem Searches
    6. Summary
  7. Custom Dialogs
    1. Modifying Motif Dialogs
    2. Building New Dialogs
      1. Choosing and Creating a Shell
      2. The Dialog's Manager Child
      3. Control Area
      4. Action Area
    3. Building a Dialog
      1. Dialog Titles
      2. DialogShell Children
      3. The Action Area
    4. Generalizing the Action Area
    5. Using TopLevelShellss as Dialogs
      1. Using Motif Dialogs Within TopLevelShells
    6. Positioning Dialogs
      1. Popup Notification
      2. Popped Down or Iconified?
    7. Summary
  8. Manager Widgets
    1. Manager Widget Types
    2. Creating Manager Widgets
    3. The BulletinBoard Widget
      1. BulletinBoard Geometry Management
    4. The Form Widget
      1. Form Attachments
      2. Attachment Offsets
      3. Extended Examples
      4. Common Problems
      5. Form Positions
      6. Other Form Resources
    5. The RowColumn Widget
      1. Making Rows and Columns
      2. Homogeneous RowColumn Children
      3. RowColumns Callbacks
    6. The Frame Widget
    7. The PanedWindow Widget
      1. PanedWindows' Sashes
    8. Tab Groups
      1. Tab Group Modifications
      2. Navigation Types
      3. Event Translations
      4. Processing Traversal Manually
    9. Summary
  9. Scrolled Windows and Scrollbars
    1. ScrolledWindow Design Model
      1. Automatic ScrolledWindows Model
      2. Application-defined ScrolledWindow Model
    2. Simple ScrolledWindows
      1. Automatic Scrolling
      2. Application-defined Scrolling
      3. Other ScrolledWindow Resources
      4. Automatic ScrolledWindow Example
    3. Working Directly with Scrollbars
      1. Scrollbar Orientation
      2. Scrollbar Callback Routines
    4. True Application-defined ScrolledWindows
      1. Scrooling Text and List Widgets
    5. Summary
    6. Exercises
  10. The DrawingArea Widget
    1. Creating a DrawingArea Widget
      1. Choices in DrawingArea Event Handling
      2. DrawingArea Callback Functions
      3. Redrawing a DrawingArea
      4. DrawingArea Children
    2. Using Translations on the DrawingArea
    3. Using Colors
    4. Summary
    5. Exercises
  11. Labels and Buttons
    1. Labels
      1. Creating Labels
      2. Text Labels
      3. Images as Labels
      4. Label Alignment
      5. Multilined and Multifont Labels
      6. Other Resources
    2. PushButtons
      1. PushButton Callbacks
      2. Multiple Button Clicks
    3. ArrowButtons
    4. DrawnButtons
    5. Signal Handling
      1. Xt Timers
    6. Pixmaps and Color Issues
      1. Installing Your Own Images
      2. Color
    7. Summary
    8. Exercises
  12. Toggle Widgets
    1. Creating ToggleButtons
    2. ToggleButton Pixmaps
    3. ToggleButton Callbacks
    4. Groups of ToggleButtons
      1. RadioBoxes
      2. CheckBoxes
    5. Summary
  13. List Widgets
    1. Creating List Widgets
    2. Scrolling Lists
      1. Use of Color
      2. Input Focus
    3. Adding Items
    4. Finding Items
    5. Replacing Items
    6. Deleting Items
    7. Selecting Items
    8. Collective Example
    9. Positioning the List
    10. List Widget Callback Routines
      1. The Default Action
      2. Browse and Single Selection Callbacks
      3. Multiple Selection Callback
      4. Extended Selection Callback
    11. Summary
    12. Exercises
  14. Scales
    1. Creating Scale Widgets
    2. Scale values
    3. The Scale's Label
    4. Scale Orientation and Movement
    5. Scale Callbacks
    6. Tick Marks
    7. Summary
  15. Text Widgets
    1. The Text Interface Model
      1. Selecting Text
    2. The Basics of Text Widgets
      1. The Text Widget's Text
      2. Editing Modes
      3. Scrollable Text
    3. Rudimentary Examples
      1. A File Browser
      2. Line Wrapping and Scrollbar Placements
      3. Output-only Text Areas
    4. Text Positions
      1. Artificial Text Scrolling
      2. Text Replacement
    5. Text Clipboard Functions
      1. Text Selection Details
      2. Modifying the Selection Mechanism
    6. A Complete Editor
    7. Single-line Text Widget Callbacks
      1. Activation Callbacks in Dialogs
    8. Text Modification Callbacks
      1. The ModifyVerify Callbacks
      2. Vetoing a Text Modification
      3. Handling Text Deletion
      4. Extending Modification and the XmNvalueChangedCallback
    9. Cursor Movement Callback
    10. Focus Callbacks
    11. Summary
    12. Exercises
  16. Menus
    1. Simple Menu Creation
      1. Simple Popup Menus
      2. Simple Cascading Menus
      3. Simple Option Menus
      4. Summary of Simple Menu Routines
    2. Advanced Menu Methods
      1. Menu Titles
      2. Menu Items
      3. Mnemonics
      4. Accelerators
      5. Help Titles
    3. General Menu Techniques
      1. Building Pullright Menus
      2. Building Popup Menus
      3. Using Popup Menus
      4. Building Option Menus
    4. Menu and Menu Item Sensitivity
    5. Summary
    6. Exercises
  17. Interacting with the Window Manager
    1. Review of Concepts
    2. Common Shell Resources
      1. Shell Positions
      2. Shell Sizes
      3. The Shell's Icon
    3. VendorShell Resources
      1. Window Manager Decorations
      2. Window Manager Menu Functions
    4. Handling Window Manager Messages
      1. Adding New protocols
      2. Saving Application State
    5. Customized Protocols
      1. Now What?
      2. Whatever You Like
    6. Summary
    7. Exercises
  18. The Clipboard
    1. Simple Clipboard Copy and Retrieval
      1. Undoing Copies
      2. Incremental Retrieves
      3. Querying the Clipboard for Data Size
    2. Copy by Name
      1. Copying Incrementally
    3. Clipboard Data Formats
      1. Inquiring About Formats
    4. The Primary Selection and the Clipboard
      1. Clipboard Functions with Text Widgets
      2. Who Has the Selection?
    5. How It Works
    6. Summary
  19. Compound Strings
    1. Simple Compound Strings
    2. Character Sets and Font Lists
      1. The Default Character Set
    3. Creating Compound Strings
      1. Compound String Segments
    4. Strings with Multiple Fonts
      1. Creating Font Lists
    5. Manipulating Compound Strings
      1. Motif String Functions
      2. Converting Compound Strings to Text
    6. Advanced Material
      1. Querying Font Lists
      2. Rendering Compound Strings
      3. Compound String Dimensions
    7. Summary
  20. Advanced Dialog Programming
    1. Help Dialogs
      1. Point-and-click Help
    2. WorkingDialogs
      1. Using Work Procedures
      2. Using Timers
      3. Processing Events Yourself
      4. Caveats with XmUpdateDisplay()
      5. Avoid Using Forks
    3. Dynamic MessageDialog Symbols
    4. Summary
  1. Motif Functions and Macros
  2. Xt and Motif Widget Classes
    • ApplicationShell
    • ArrowButton
    • ArrowButtonGadget
    • BulletinBoard
    • BulletinBoardDialog
    • CascadeButton
    • CascadeButtonGadget
    • CheckBox
    • Command
    • Composite
    • Constraint
    • Core
    • DialogShell
    • DrawingArea
    • DrawnButton
    • ErrorDialog
    • FileSelectionBox
    • FileSelectionDialog
    • Form
    • FormDialog
    • Frame
    • Gadget
    • InformationDialog
    • Label
    • LabelGadget
    • List
    • MainWindow
    • Manager
    • MenuBar
    • MenuShell
    • MessageBox
    • MessageDialog
    • Object
    • OptionMenu
    • OverrideShell
    • PanedWindow
    • PopupWindow
    • Primitive
    • PromptDialog
    • PulldownDialog
    • PushButton
    • PushButtonGadget
    • QuestionDialog
    • RadioBox
    • RectObj
    • RowColumn
    • Scale
    • ScrollBar
    • ScrolledList
    • ScrolledText
    • ScrolledWindow
    • SelectionBox
    • SelectionDialog
    • Separator
    • SeparatorGadget
    • Shell
    • Text
    • TextField
    • ToggleButton
    • ToggleButtonGadget
    • TopLevelShell
    • TransientShell
    • VendorShell
    • WarningDialog
    • WMShell
    • WorkingDialog
  3. Data Types
  4. Additional Example Programs
    1. A Postcard Interface for Mail
    2. Displaying a List of Bitmaps
    3. A Memo Calendar
    4. Setting Criteria for a List

Reviews

Motif Programming Manual

Reviewed by Roland Buresund

OK ***** (5 out of 10)

Last modified: May 21, 2007, 3:16 a.m.

If you know X11, Xt, C, UNIX and are a reasonable experienced programmer, then you could buy this book. Otherwise, it's only for initiated.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required