DECwindows Motif Guide to Application Programming

*HyperReader

CONTENTS

  Title Page

  Copyright Page

  Preface

  1      Introduction
    1.1 Overview of DECwindows Motif Toolkit
      1.1.1      Toolkit Building Blocks:  Widgets and Gadgets
      1.1.2      Widget Types
      1.1.3      Widgets in the OSF/Motif Toolkit
      1.1.4      Widgets Provided by Digital
      1.1.5      Toolkit Widget and Gadget Routines
      1.1.6      Application Development Tools
      1.1.7      Internationalization Using UIL and MRM
      1.1.8      Toolkit Intrinsic Routines
    1.2 Toolkit Routines Contrasted with UIL
    1.3 Toolkit Routines Contrasted with Xlib Routines
    1.4 Toolkit Programming Considerations
      1.4.1      Application Widget Hierarchy
      1.4.2      OpenVMS DECburger Application Hierarchy
      1.4.3      Form Versus Function
      1.4.4      Associating Functions with Callbacks
      1.4.5      Using Widget Attributes in Applications
        1.4.5.1      Size and Position Attributes
        1.4.5.2      Appearance Attributes
        1.4.5.3      Callback Attributes
        1.4.5.4      Assigning Values to Widget Attributes
    1.5 Using the OpenVMS DECburger Demo Application
    1.6 Non-C Language Examples for OpenVMS

  2      DECwindows Application Interface Design
    2.1 Designing a DECwindows Application-Where to Begin
      2.1.1      Application Design Topics
      2.1.2      Use of Callbacks
      2.1.3      Making Assumptions About Resources
      2.1.4      Selecting Appropriate Widgets
      2.1.5      Widgets in the OpenVMS DECburger Application
      2.1.6      Toolkit Intrinsic Routines Used in OpenVMS DECburger

  3      Helpful Hints for Creating a DECwindows Application
    3.1 Using Widgets Supplied by Digital from UIL
    3.2 XmForm Widget Hints
      3.2.1      Creating a Form Dialog Box with Children
      3.2.2      Aligning Children of Different Sizes
      3.2.3      Centering Widgets at Positions Within an XmForm Widget
      3.2.4      Spacing XmPushButtons in XmForm Widgets
    3.3 Using Default Files
    3.4 Using Default Files to Save Customized Settings
    3.5 Using Multiple Displays
      3.5.1      Using Multiple Independent Displays
      3.5.2      Using Multiple Interconnected Displays
    3.6 Creating a Cursor
    3.7 Using the XtAppAddInput Routine
    3.8 Freeing Resources Allocated Through UIL

  4      Using the Help Widget
    4.1 Overview of the Help Widget
      4.1.1      Invoking the Help Widget
      4.1.2      Help Widget Terminology
    4.2 OpenVMS Help Library Information
      4.2.1      OpenVMS Help Library Modules
        4.2.1.1      Accessing OpenVMS Help Library Modules
        4.2.1.2      Specifying OpenVMS Help Library Key Names
      4.2.2      OpenVMS Help Library Enhancements
    4.3 Help Widget Components
    4.4 Modifying Help Widget Appearance
      4.4.1      Modifying Help Widget Labels and Mnemonics
      4.4.2      Help Widget Messages
    4.5 Help Widget Callbacks
    4.6 Specifying Help Widget Topics
    4.7 Using the Help Widget
      4.7.1      Context-Sensitive Help
        4.7.1.1      Creating the On Context Push Button in UIL
        4.7.1.2      Entering Context-Sensitive Help Mode
      4.7.2      Specifying a Help Callback
    4.8 Creating the Help Widget with UIL
    4.9 Help Widget Implementation-C Language Module
    4.10 Using the Toolkit Help Widget Creation Routine

  5      Using the DECwindows Motif Help System
    5.1 Overview of the Help System
    5.2 Invoking the Help System
    5.3 Help File Information
    5.4 Help File Information-VAX DOCUMENT Example
    5.5 Context-Sensitive Help Callbacks
      5.5.1      Creating the On Context Push Button in UIL
      5.5.2      Entering Context-Sensitive Help Mode
      5.5.3      Specifying a Help Callback
    5.6 Implementing the Help System
    5.7 Help System Implementation-C Language Module

  6      Using the Color Mixing Widget
    6.1 Overview of the Color Mixing Widget
    6.2 Color Mixing Widget Resources
    6.3 Color Models
      6.3.1      Color Picker Model
        6.3.1.1      Color Picker Model Spectrum
        6.3.1.2      Selecting a Color Using the Color Picker Model
        6.3.1.3      Using the Interpolator
      6.3.2      HLS Color Model
      6.3.3      RGB Color Model
      6.3.4      Browser Color Model
      6.3.5      Greyscale Mixer
    6.4 Color Mixing Widget Components
      6.4.1      Scratch Pad
      6.4.2      Color Display Subwidget
      6.4.3      Color Model Option Menu Subwidget
      6.4.4      Color Mixer Subwidget
      6.4.5      Push-Button Subwidgets
      6.4.6      Label Subwidgets
      6.4.7      Work Area Subwidget
      6.4.8      Setting and Retrieving New Color Values
      6.4.9      Customizing the Color Mixing Widget
        6.4.9.1      Specifying Size
        6.4.9.2      Specifying Margins
        6.4.9.3      Labeling the Color Mixing Widget
        6.4.9.4      Defining the Background Color of the Color Display Subwidget
        6.4.9.5      Adding a Work Area to the Color Mixing Widget
        6.4.9.6      Customizing the Color Picker Color Model
    6.5 Supporting Other Color Models
      6.5.1      Replacing the Color Display Subwidget
      6.5.2      Replacing the Color Mixer Subwidget
    6.6 Associating Callbacks with a Color Mixing Widget
    6.7 Creating a Color Mixing Widget
      6.7.1      Creating a Color Mixing Widget-UIL Example
      6.7.2      Color Mixing Widget-OK Callback
      6.7.3      Color Mixing Widget-Apply Callback
      6.7.4      Color Mixing Widget-Cancel Callback
      6.7.5      Creating a Color Mixing Widget-Toolkit Example

  7      Using the Print Widget
    7.1 Overview of the Print Widget
    7.2 Print Widget Walk-Through
    7.3 Print Widget Components
    7.4 Print Widget Callbacks
    7.5 Print Widget File-Type Guesser
    7.6 Print Widget Resources
      7.6.1      Suppressing Print Widget Features
      7.6.2      Adding Print Widget Functions
        7.6.2.1      Adding Print Formats
        7.6.2.2      Adding to Option Menus
    7.7 Creating the Print Widget with UIL
    7.8 Creating the Print Widget with a Toolkit Routine
    7.9 Submitting Print Jobs

  8      Using the Compound String Text Widget
    8.1 Overview of the CSText Widget
    8.2 Modifying CSText Widget Resources
      8.2.1      Manipulating the Text Contents of the CSText Widget
        8.2.1.1      Placing a Compound String in a CSText Widget
        8.2.1.2      Retrieving Compound Strings from a CSText Widget
        8.2.1.3      Disabling Text Editing
        8.2.1.4      Limiting the Length of the Text
      8.2.2      Customizing the Appearance of the CSText Widget
        8.2.2.1      Specifying Size
        8.2.2.2      Specifying Margins
        8.2.2.3      Controlling Resizing Behavior
        8.2.2.4      Scroll Bar Positioning
        8.2.2.5      Controlling Text Cursor Appearance
        8.2.2.6      Positioning the Insertion Point
        8.2.2.7      Identifying the Current Writing and Editing Directions
      8.2.3      Multiline Editing in a CSText Widget
      8.2.4      Handling Text Selections
        8.2.4.1      Selecting Text
        8.2.4.2      Retrieving Selected Text
        8.2.4.3      Copy Selected Text to the Clipboard
        8.2.4.4      Pasting Selected Text from the Clipboard
        8.2.4.5      Deleting Selected Text from the Clipboard
        8.2.4.6      Getting Position Information About the Selection
        8.2.4.7      Determining Primary Selection Ownership
        8.2.4.8      Canceling the Selection of Text
      8.2.5      Associating Callbacks with CSText Widgets
    8.3 Conversion Routines
    8.4 Creating CSText Widgets
      8.4.1      Using UIL to Create a CSText Widget
      8.4.2      Using the Toolkit CSText Widget Creation Routine

  9      Using the SVN Widget
    9.1 Overview of the SVN Widget
      9.1.1      Components of an Entry
      9.1.2      Selection Mode
      9.1.3      Tree-Mode Navigation Window
      9.1.4      Location Cursor
      9.1.5      Highlighting Entries
      9.1.6      Editable Text
      9.1.7      Sensitive Entries
      9.1.8      Disabling/Enabling the SVN Widget
      9.1.9      Invalidating the SVN widget
      9.1.10     Outer Scroll Bar Arrows
      9.1.11     Scroll Bar Index Window
    9.2 SVN Widget Programming Considerations
      9.2.1      Creating the Data Hierarchy
        9.2.1.1      Attaching to Data-The DXmSvnNattachToSourceCallback Callback
        9.2.1.2      Understanding the entry_number Field
        9.2.1.3      Getting Information About an Entry
        9.2.1.4      Associating Hierarchy Data with SVN
      9.2.2      Disabling/Enabling the SVN Widget
      9.2.3      Setting the Location Cursor
      9.2.4      Invalidating an Entry
      9.2.5      Setting a Tree Style
      9.2.6      Setting the Display Mode
      9.2.7      Setting an Entry Coordinate Position
      9.2.8      Setting an Entry Position
      9.2.9      Selecting Entries
      9.2.10     Manipulating Entries
      9.2.11     Manipulating Column Mode Entries
      9.2.12     Flushing an Entry
      9.2.13     Manipulating Components
      9.2.14     Highlighting an Entry
      9.2.15     Getting the Displayed Entries
      9.2.16     Dragging an Entry
      9.2.17     Ghosting
      9.2.18     Setting Entry Font Lists
    9.3 Setting Tree-Mode Attributes
      9.3.1      Manipulating Tree Position
      9.3.2      Setting the Tree-Mode Arc Width
      9.3.3      Centering Tree-Mode Components
      9.3.4      Tree-Mode Outlines
      9.3.5      Tree-Mode Entry Shadows
      9.3.6      Tree-Mode Perpendicular Lines
    9.4 Associating Callbacks with an SVN Widget
    9.5 SVN Help Callback
      9.5.1      User-Generated Callbacks
    9.6 Creating an SVN Widget
    9.7 SVN Demo Application

  10     Interoperability Coding Recommendations
    10.1 Why Interoperability Is Important
    10.2 Font Fallback
      10.2.1     Font Naming Convention
      10.2.2     Font Fallback Implementation
      10.2.3     Using Common Fonts
      10.2.4     Implementing Font Fallback Through UIL
      10.2.5     Implementing Font Fallback Through Toolkit Routines
    10.3 Screen Independence
      10.3.1     Screen DPI Assumptions
      10.3.2     MultiHead Server Support
        10.3.2.1     Using XtAppInitialize to Specify a Screen
        10.3.2.2     Using XtOpenDisplay to Specify a Screen
      10.3.3     Window Size for Small Screens
      10.3.4     Using Scrolled Windows for Small Screens
      10.3.5     Using the DXmNfitToScreenPolicy Resource
      10.3.6     Window Placement for Small Screens
    10.4 Color Support
      10.4.1     Matching Color Requirements to Display Types
        10.4.1.1     Writable Color Cells
        10.4.1.2     Display Depth
        10.4.1.3     Handling Insufficient Color Resources
    10.5 Image Format
      10.5.1     Image Format Implementation
      10.5.2     Determining Image Format

  A Using the OpenVMS DECwTermPort Routine