Sun Logo


X-Designer User's Guide

Sun Studio 11

819-3700-10



Contents

1. Overview

Introduction to X-Designer

Operating Environment

Requirements for Compiling Generated Code

Basic Concepts and Terms

Protection From Invalid Actions

On-Line Help

Accessibility

The X-Designer Development Cycle

How This Manual Is Organized

2. Building the Widget Hierarchy

Introduction to the Tutorial

The Design Hierarchy

Starting and Stopping

Navigating in the Menus

Toolbar

Tooltip Help

Status Line

Starting the Design

Widget Names

Naming Widgets

Adding Children to the Hierarchy

Dynamic Display of Layout

Currently Selected Widget

Multiple Selection

No Selected Widget

Adding the Buttons

Building the Menu Bar

Adding the Work Area

Building the Radio Box

Building the Row Column Array

Adding the Toggle Buttons

Adding a Window to Your Application

Creating a Second Window

Editing the Hierarchy

Search

Fast Find

Display Options

Transform Widgets

Printing Your Hierarchy

Using the File Browser

3. Resources

Introduction

The Label Resource Panel

Multiple Selection and Resources

Resource Panels in Microsoft Windows Mode

Button Widget Resources

Shared Resource Panels

Resources for Menu Items

The Keyboard Page

Designated Help Widget

RowColumn Resources

Shell Resources

Navigating in the Resource Panels

Core Resource Panel

Constraints Panel

Default Resource Settings

The Reset Command

Rejected Resource Settings

Custom Attributes

Resource Restrictions

Resource Bindings

Loose Bindings

Tight Bindings

Comparison of Resource Generation

Where to Look for More Information on Resources

4. The Layout Editor

Introduction

Concepts

Displaying the Layout Editor

Editing Area

Editing Modes

Selection: Single, Primary and Secondary

Layout Editor Toolbar

Layout Editor File Menu

Layout Editor Edit Menu

Layout Editor View Menu

Layout Editor Layout Menu

Grid

Resize Policy

Understanding the Default Layout

Rough Layout: the Move Mode

Offsets

Attachments to the Form

Attachments Between Widgets

Aligning Widgets: the Align Mode

Aligning Widgets: Group Alignment

Distribute

Proportional Spacing: the Position Mode

Self Mode

Resize Mode

Using the Constraints Panel

Other Layout Widgets

Layout Editor Restrictions

5. Other Editors

Introduction

Setting Colors

Setting Fonts

Selecting Pixmaps

Editing Pixmaps

Editing the Color Palette

Using the Pixmap Editor

Compound Strings

Callback and Prelude Editing

6. Activating the Interface: Adding Your Own Code

Introduction

Callbacks

Designating a Callback

Callback Functions

Accessing Widgets in Callbacks

Manipulating Widgets

Links

Drag and Drop

Translations and Actions

Xt Procedures

7. Generating Code

Introduction

The Generate Menu

Generate Dialog

Adding Callback Functionality

Analysis of the Primary Module

Resource File Syntax

Arranging Your Files

Customizing the Generated Files: Preludes

Module Preludes

Code Preludes

Using the Edit Mechanism

8. Structured Code Generation and Reusable Definitions

Introduction

Structured Code Generation

Function Structures

Data Structures

C++ Classes

Method Declarations

Method Preludes

Creating a Derived Class

Modifying the Base Classes

Children Only Place Holders

Structured Code Generation and UIL

Changing Declaration Scope

Definitions

The Definitions File

Modifying a Definition

Instances

Definitions and Resource Files

Online Help for Definitions

9. C++ Code Tutorial

Introduction

Creating a C++ Class

Callback Methods

Adding Class Members

Creating a Derived Class

Creating a Definition

Adding a Definition to the Palette

Generating Code for a Definition

Creating an Instance

Modifying and Extending an Instance

Creating a Derived Class

Overriding a Callback Method

Definitions and Resource Files

10. Designing for Java

Introduction

What Is Java?

The Generated Java Code

Requirements

Using X-Designer For Java

Java Version

Widgets

New Widgets for Java Classes

Event Model

Generate Dialog

Generated Code

Moving X-Designer Designs to Visaj

Motif Widgets to Java Classes--the MWT Library

Mapping Motif Widgets to Swing Components

11. Designing for Microsoft Windows

Introduction

Prerequisites

Generating the Application

Starting in Microsoft Windows Mode

The X-Designer Window

Microsoft Windows Compliance

Compliance Failure

Using Links

Manager Widgets and Layout

Fonts

Pixmaps, Bitmaps and Icons

Colors

Using Third Party Widgets

Method Declarations

DrawingAreas

Application Class

Event Handlers

File Names

Code Generation

Configuring X-Designer

12. Creating a Microsoft Windows and Motif Application

Introduction

Starting Your Design

Popup Menu

Setting Resources

Building the Application

Filling in the Stubs

Compiling the Application

Single Sourcing

13. Design Tools

Introduction

AppGuru

XD/Capture

Capture Dialog

Using XD/Capture From the Command Line

14. XD/Replay

Introduction

How to Invoke an Application With XD/Replay

Recording and Replaying From the Command Line

Getting the Most From XD/Replay

Preparing Rolling Demonstrations

Taking Screen Dumps

Testing

Extending the XD/Replay Widget Set

Adding Your Own XD/Replay Commands

Allowing Your Applications to Be Recorded and Replayed

15. Groups

Introduction

Creating a Group

Groups as Shortcuts

Groups for Smart Code

16. Get/Set Smart Code

Introduction

How the Smart Code Information Is Organized

Using Smart Code

Get/Set Smart Code

Get/Set Tutorial

17. Thin Client Smart Code

Introduction

Using Thin Client Smart Code

Requirements

Thin Client Smart Code Tutorial

Thin Client Server Callbacks

Server Application

Customizing the Server Connection

Going Live

Generated Code

18. Internet Smart Code

Introduction

Internet and Thin Client

Receiving Data

Communication Protocol

Simple Internet Smart Code Tutorial

Extracting Information From HTML Data

19. Makefile Generation

Introduction

Makefile Generation Options

Creating the Initial Makefile

Updating the Initial Makefile

Editing the Generated Makefile

Using Your Own Makefiles

20. Advanced Layout

Introduction

Column Layout Using the RowColumn

Column Layout Using the Form

Edge Problems

Form Resizing

21. Hypertext Help

Introduction

The Help Model

Help Viewers

Setting up Help in X-Designer

Module Defaults

Finding Help Documents and Markers

Linking Help Into Your Application

Help Implementation

22. Internationalization

Introduction

What Is the Problem?

Locale

Font Sets

Creating International Text

Localized Input in Your Application

Setting the Application Font Resource

Using Eight-Bit Characters in Shell Titles

Unsupported Locales

23. User-Defined Widgets

Introduction

Using Pre-Configured Integration Kits

Requirements

Generating UIL

Generating Java Code

Generating MFC Code

Caveats

Prerequisites

How X-Designer Works

Getting Widget Information

xdconfig--the Main Dialog

Widget Classes

Widget Attributes

Resources

Aliases

Enumerations

Converters

Popups

Resource Memory Management

XmStringTable Resources

Headers

Motif Widgets Stop List

Generating and Compiling Code

Testing the Configuration

Configuration Functions

Generating UIL

24. Command Line Operations

Introduction

Command Line Switches for Interactive Use

Generating Code From the Command Line

XD/Replay

XD/Capture

Converting UIL Source to X-Designer Save Files

Converting GIL Source to X-Designer Save Files

25. Configuration

Introduction

Setting up Callback and Prelude Editing

Palette Icons

Palette Contents

Palette Layout

Toolbar

Makefile Features

Dynamic Display Window

26. Command Summary

Introduction

Widget Name and Variable Name

The File Menu

The Edit Menu

The View Menu

The Palette Menu

The Widget Menu

The Module Menu

The Generate Menu

Tear-Off Menus

The Tools Menu

The Help Menu

Keyboard Shortcuts

27. Widget Reference

Introduction

ArrowButton

BulletinBoard

CascadeButton

ComboBox

Command

Container

DialogTemplate

DrawingArea

DrawnButton

FileSelectionBox

Form

Frame

GrabShell

IconGadget

Label

List

MainWindow

Menu

MenuBar

MessageBox

Notebook

OptionMenu

PanedWindow

PushButton

RadioBox

RowColumn

Scale

ScrollBar

ScrolledList

ScrolledText

ScrolledWindow

SelectionBox

SelectionPrompt

Separator

Shells- Dialog, Top Level, Application and Session

SimpleSpinBox

SpinBox

TabManager

Text

TextField

ToggleButton

Mapping Motif Widgets to Microsoft Windows

Mapping Motif Resources to Microsoft Windows

Window Styles

28. Troubleshooting in X-Designer

Introduction

X-Designer Interface

Definitions and Instances

Unsupported Locale

Resource Panels

Layout Editor

Links

Code Generation

XD/Replay and XD/Capture

A. XD/Replay Command Syntax

Introduction

Specifying the Context of Actions

Button Actions (Simple Controls)

Menu Operations

Option Menu Operations

Keyboard Operations

Text Entry

Button Actions (Position Dependent Controls)

Resource Evaluation

Widget Hierarchy Analysis

Non-application Operations

Condition Clauses

Display Expressions

Widget State Expressions

Importing User-Defined Commands

XD/Replay Widget Naming Conventions

B. Motif XP Reference

Introduction

Motif XP Library

Linking Error With Some Compilers

C. Getters and Setters

Introduction

How to Use This Information

More Information

Label, Button and IconGadget

Toggle

Text Field, Text and Scrolled Text

Scale

List, Scrolled List and SimpleSpinBox

Option Menu and ComboBox

Radio Box

D. The XML Export File

Introduction

Using the Exported XML File

E. Application Defaults

Introduction

General

Callback and Prelude Editing

Microsoft Windows

Filters

Generate Dialog

Generation

Comments in Generated Code

Help

Auto Save

Layout Editor

Hierarchy Colors

Work-arounds

FrameMaker

Configuration

F. Further Reading

Introduction

Books Mentioned in This Manual

Books on X and Motif

Books on C++ and Object Oriented Programming

Books on Java

Books on Networking and World Wide Web

Books on Internationalization

Books on CDE

Books on HTML

Glossary

Index