8VLQJ8,0;ZLWK&'(
Using UIM/X with CDE - Integrated Computer Solutions
Using UIM/X with CDE - Integrated Computer Solutions
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>8VLQJ8</strong>,0;ZLWK&'(
Copyright © 2005 Integrated Computer Solutions, Inc.<br />
The Using UIM/X with CDE manual is copyrighted by Integrated Computer Solutions, Inc., with all rights<br />
reserved. No part of this book may be reproduced, transcribed, stored in a retrieval system, or transmitted<br />
in any form or by any means electronic, mechanical, photocopying, recording, or otherwise, without the<br />
prior written consent of Integrated Computer Solutions, Inc.<br />
Integrated Computer Solutions, Inc.<br />
54 Middlesex Turnpike, Bedford, MA 01730<br />
Tel: 617.621.0060<br />
Fax: 617.621.9555<br />
E-mail: info@ics.com<br />
WWW: http://www.ics.com<br />
UIM/X Trademarks<br />
UIM/X, Builder Xcessory, BX, Builder Xcessory PRO, BX PRO, BX/Win Software Development Kit, BX/Win<br />
SDK, Database Xcessory, DX, DatabasePak, DBPak, EnhancementPak, EPak, ViewKit ObjectPak, VKit,<br />
and ICS Motif are trademarks of Integrated Computer Solutions, Inc.<br />
Motif is a trademark of Open Software Foundation, Inc.<br />
UNIX is a registered trademark in the United States and other countries, licensed exclusively through<br />
X/Open Company Limited.<br />
X/Open is a trademark of X/Open Company Limited in the UK and other countries.<br />
X Window System is a trademark of the Massachusetts Institute of Technology.<br />
All other trademarks are properties of their respective owners.<br />
ii Using UIM/X with CDE
Contents<br />
Preface ......................................................................................v<br />
Chapter 1—CDE Integration<br />
Running UIM/X Under the CDE .................................................................................. 2<br />
CDE Session Management ........................................................................................ 3<br />
Starting UIM/X in a Different Workspace .................................................................... 3<br />
Chapter 2—CDE Widgets<br />
The Default Palette ..................................................................................................... 6<br />
CDE Widgets .............................................................................................................. 7<br />
Swidget Methods ......................................................................................................... 9<br />
Index........................................................................................11<br />
Using UIM/X with CDE<br />
iii
iv Using UIM/X with CDE
Preface<br />
Overview<br />
This guide explains the special issues concerned with running UIM/X on your CDE<br />
desktop.<br />
Using UIM/X with CDE<br />
v
Who Should Use this Guide<br />
This manual assumes you are familiar with the basics of UIM/X. Before using this<br />
manual, review the UIM/X Beginner’s Guide and the UIM/X User’s Guide.<br />
This manual also assumes that you have some knowledge of programming, a<br />
general understanding of the X Window System, and familiarity with UIM/X and<br />
the CDE desktop. You should also know how to use common items such as menus,<br />
buttons, and scroll bars. If you are not familiar with these items, you may find it<br />
useful to review the OSF/Motif User’s Guide and the UIM/X Motif Developer’s<br />
Guide.<br />
Before you begin, check with your system administrator to ensure that the software<br />
has been installed as described in the UIM/X Installation Guide.<br />
Before You Read This Guide<br />
This guide makes the following assumptions:<br />
• You are familiar with the basic functions of selecting from menus and dialog<br />
boxes; opening, moving, resizing and closing windows, and clicking icons.<br />
• You understand the functions of the three mouse buttons, which this guide<br />
refers to as the Select button (left button), the Adjust button (middle), and the<br />
Menu button (right). See “Using the Mouse” on page ix for more information.<br />
The UIM/X Document Set and Related Books<br />
This section lists the UIM/X document set, and provides a suggested list for further<br />
reading.<br />
vi<br />
Using UIM/X with CDE
The following list is the complete UIM/X document set:<br />
• UIM/X Installation Guide. Explains how to install and run UIM/X. Includes<br />
information on the files provided with UIM/X, backwards compatibility issues,<br />
and compiler considerations.<br />
• UIM/X Beginner’s Guide. Introduces UIM/X by presenting Novice Mode, the<br />
simplified Palette that enables new users to be productive immediately.<br />
Includes information on a number of important features for creating, testing,<br />
and running applications.<br />
• UIM/X Tutorial Guide. A series of step-by-step tutorials, teaching tools and<br />
techniques that will greatly assist you in developing your own applications.<br />
Features tutorials in Novice Mode, Standard Mode, and on advanced topics.<br />
• UIM/X User’s Guide. Explores the UIM/X features common to both Motif and<br />
cross-platform development. Includes discussions of how to use UIM/ X’s<br />
editors to set properties, add behavior, etc.<br />
• UIM/X Motif Developer’s Guide. An in-depth guide to the widgets, features<br />
and capabilities of UIM/X as they relate specifically to Motif development.<br />
• UIM/X Advanced Topics. Describes how to customize UIM/X, including<br />
integrating new widget and component classes into the executable. Includes<br />
reference information of an advanced technical nature.<br />
• UIM/X Reference Manual. A comprehensive list of properties, methods, and<br />
events, plus more, for Motif development. Designed for the experienced<br />
developer.<br />
Suggested Reading<br />
For more information on designing GUIs, see any of the following books:<br />
• OSF/Motif Style Guide release 1.2 (Prentice Hall, 1993, ISBN 0-13-643123-2)<br />
• Visual Design with OSF/Motif (by Shiz Kobara, Addison-Wesley, 1991, ISBN<br />
0-201-56320-7)<br />
• New Windows Interface: An Application Guide (Microsoft Corporation, 1994,<br />
ISBN 1-55615-679-0)<br />
• Human Interface Guidelines: The Apple Desktop Interface (Addison-Wesley,<br />
1987, ISBN 0-201-17753-6)<br />
Using UIM/X with CDE<br />
vii
How this Guide Is Organized<br />
• Chapter 1, “CDE Integration,” covers the basic concepts of starting and<br />
running UIM/X on your CDE desktop.<br />
• Chapter 2, “CDE Widgets,” describes the SGI Widgets category of the<br />
Palette.<br />
Some Terms You Should Know<br />
Certain basic terms recur throughout this guide, and it helps to understand them<br />
from the outset.<br />
An object is a building block you can use to build an interface with UIM/X.<br />
A Motif widget is an object whose appearance and behavior precisely follows the<br />
OSF/Motif Style Guide. The novice mode of UIM/X supports a number of popular<br />
Motif widgets, including Push Button, Label, Text Field, and more.<br />
A compound object consists of several Motif widgets combined into one object for<br />
your convenience. The novice mode of UIM/X supports a number of compound<br />
objects, including Application Window and Group Box, that save you the time you<br />
might otherwise spend creating them.<br />
An interface is a window or dialog box that you build up from objects with UIM/X.<br />
The novice mode of UIM/X supports four different types of interfaces: Application<br />
Window, Secondary Window, Message dialog box, and File Selection dialog box.<br />
Certain menu options refer to an interface, such as Save Interface; these act only on<br />
your selected interface.<br />
A project contains all the interfaces (i.e., windows and dialog boxes) and their<br />
associated files for a certain GUI you are building with UIM/X. The program can<br />
automatically save and generate code for an entire project in one step. Certain menu<br />
options refer to a project, such as Save Project; these act on all the windows and<br />
dialog boxes in your project.<br />
viii<br />
Using UIM/X with CDE
Conventions Used in this Guide<br />
Typographic Conventions<br />
The following table describes the typographic conventions used in this guide.<br />
Typeface or<br />
Meaning<br />
Symbol<br />
AaBbCc12 The names of commands, files, and<br />
directories;<br />
or onscreen output;<br />
or user input.<br />
AaBbCc12 A placeholder you replace with your<br />
actual value;<br />
or words to be emphasized;<br />
or book titles.<br />
Installation Directories<br />
Example<br />
Edit your .login file.<br />
%You have mail. Use ls -a<br />
to list all the files.<br />
To delete a file, type rm filename.<br />
You must be root to do this. See<br />
Chapter 6 in the User’s Guide.<br />
File⇒Open The Open option in the File menu.<br />
Choose the File⇒Open<br />
command.<br />
Alt+F4 Press both Alt and F4 at once. Press Alt+F4 to exit.<br />
Return The key on your keyboard marked<br />
Enter, Return, or .<br />
Press Return.<br />
Product installation directories can depend on the platform or the user’s<br />
preferences. To keep things simple, this guide uses general names for product<br />
installation directories. The following table lists the name and the corresponding<br />
product installation directory:<br />
Name<br />
uimx_directory<br />
Description<br />
The UIM/X installation directory<br />
Using the Mouse<br />
Before starting the tutorial, take a moment to review the location and usage of your<br />
mouse buttons, as illustrated in the Figure P-1and the following table:<br />
Using UIM/X with CDE<br />
ix
1: Select 2: Adjust 3: Menu<br />
Button: Called: Is used for:<br />
1 Select Selecting objects, menus, toggles, and options.<br />
2 Adjust Resizing and moving objects.<br />
3 Menu Displaying popup menus.<br />
Throughout this book, you will use the mouse buttons along with the<br />
mouse pointer to make selections, move the input pointer, or position the<br />
text insertion point. You can perform any of the following mouse<br />
operations.<br />
Operation<br />
Point to<br />
Press<br />
Release<br />
Click<br />
Drag<br />
Double-click<br />
Triple-click<br />
Description<br />
Move the mouse to make the pointer go as directed.<br />
Hold down a mouse button.<br />
Release a mouse button after pressing it.<br />
Quickly press and release a mouse button without moving the<br />
mouse.<br />
Move the mouse while pressing a mouse button.<br />
Click a mouse button twice in rapid succession without moving the<br />
mouse pointer.<br />
Click a mouse button three times in rapid succession without moving<br />
the mouse pointer<br />
x<br />
Using UIM/X with CDE
In general, instructions for mouse operations include the name of the mouse button.<br />
The exceptions are Click, Double-click, and Drag. These common operations may<br />
be described without specifying a mouse button. For example:<br />
• Click on the applWindow1 icon in the Interfaces Area of the Project<br />
Window.<br />
• Drag the Push Button icon from the Palette.<br />
In these cases, use the Select button to click and double-click, and the Adjust button<br />
to drag.<br />
Setting Application Defaults<br />
Application Defaults configure the way UIM/X looks and set the default<br />
preferences for many of its operations. You can set the Application Defaults for all<br />
UIM/X users or for a single user. For more details on setting your Application<br />
Defaults see the UIM/X User’s Guide.<br />
For optimum performance, set the following resources in your Application<br />
Defaults:<br />
Mwm*autoKeyFocus: falseMwm*clientAutoPlace:<br />
falseMwm*focusAutoRaise:<br />
falseMwm*focusFollowsPointer:<br />
trueMwm*keyboardFocusPolicy: pointer<br />
If you have a gray-scale monitor, you might try the following settings:<br />
Mwm*activeBackground: #666666<br />
(gray40)Mwm*activeForeground: #e5e5e5<br />
(gray90)Mwm*background: #666666<br />
(gray40)Mwm*foreground: #e5e5e5<br />
(gray90)Uimx3_0*calculatedColors:<br />
falseUimx3_0*background: #ededed<br />
(gray93)Uimx3_0*BottomShadowColor: #000000<br />
(black)Uimx3_0*foreground: #000000<br />
(black)Uimx3_0*TopShadowColor: #ffffff<br />
(white)Uimx3_0*XmText.background: #b3b3b3<br />
(gray70)Uimx3_0*XmTextField.background: #b3b3b3<br />
(gray70)<br />
Note: The resources above prefixed with Mwm are specific to the Motif Window<br />
Manager. If you are using a different window manager, consult your Systems<br />
Administrator for the equivalent settings.<br />
Using UIM/X with CDE<br />
xi
xii<br />
Using UIM/X with CDE
CDE Integration 1<br />
Overview<br />
This chapter discusses how to run and manage UIM/X under the CDE.<br />
Using UIM/X with CDE 1
1<br />
CDE INTEGRATION<br />
Running UIM/X Under the CDE<br />
Running UIM/X Under the CDE<br />
UIM/X is fully integrated with the Common Desktop Environment (CDE).<br />
You can start UIM/X and load files by working with desktop icons. The<br />
following table describes the different UIM/X icons.<br />
Desktop Icon<br />
Description<br />
UIM/X icon. To start UIM/X, double-click on this icon.<br />
You can also start UIM/X and load a file by dropping the<br />
file icon on this icon. After you start UIM/X, you can load<br />
files by dropping their icons on either the Interfaces Area<br />
or the Palettes Area of the Project Window.<br />
UIM/X interface file (.i). To start UIM/X and load the<br />
interface, double-click on this icon. You can also drop it on<br />
the UIM/X icon to start UIM/X and load the interface. To<br />
load the interface into UIM/X, drop the icon in the<br />
Interfaces Area or Palettes Area of the Project Window.<br />
UIM/X project file (.prj). To start UIM/X and load the<br />
project, double-click on the icon. You can also drop it on<br />
the UIM/X icon to start UIM/X and load the project. To<br />
load the project into UIM/X, drop the icon in the Interfaces<br />
Area or Palettes Area of the Project Window.<br />
UIM/X palette file (.pal). To start UIM/X and load the<br />
palette, double-click on the icon. You can also drop it on<br />
the UIM/X icon to start UIM/X and load the palette. To<br />
load the palette into UIM/X, drop the icon in the Palettes<br />
Area or the Interfaces Area of the Project Window.<br />
Dt Script interface file (.i). Dt Script is a simple dialog<br />
builder that generates dtksh code. It saves interfaces using<br />
the same interface file format as UIM/X. You can load Dt<br />
Script interface files the same way you load UIM/X<br />
interface files. When you load a Dt Script interface file,<br />
UIM/X discards any dtksh code contained in the file.<br />
2 Using UIM/X with CDE
CDE INTEGRATION<br />
1<br />
CDE Session Management<br />
When you log onto your system, the CDE Session Manager reloads the UIM/X<br />
session you were running when you logged off, and reloads your project as it<br />
was, including unapplied changes.<br />
The Session Manager allows you to choose between a current session, as<br />
described above, and a home session, which allows you to return to the same<br />
UIM/X session every time you log in. To choose the home session, click on<br />
the Return to Home Session toggle button in the Startup dialog of the CDE<br />
Style Manager.<br />
You can also use the CDE Style Manager to manage your UIM/X sessions and<br />
change the colors and fonts used by UIM/X.<br />
Starting UIM/X in a Different Workspace<br />
You can start UIM/X in a workspace other than the one you are currently<br />
using. To do this, use the -workspace argument when you start UIM/X on<br />
the command line:<br />
uimx_directory/bin/uimx -workspace workspace_name<br />
Using UIM/X with CDE 3
1<br />
CDE INTEGRATION<br />
Starting UIM/X in a Different Workspace<br />
4 Using UIM/X with CDE
CDE Widgets 2<br />
Overview<br />
This chapter describes the default UIM/X palette, as well as the widgets<br />
associated with CDE.<br />
Using UIM/X with CDE 5
2<br />
CDE WIDGETS<br />
The Default Palette<br />
The Default Palette<br />
The Ux Palette, shown in the figure below, is the default palette displayed<br />
when you start UIM/X. Its filename is Uxcde.pal and it is found in<br />
uimx_directory/palettes. This palette contains a new category called CDE<br />
Widgets, which are described in detail later in this chapter.<br />
You can change the default palette that UIM/X displays on start-up by using<br />
resources. The UIM/X resource file contains the following resource<br />
specification:<br />
Uimx3_0*UxStartingPalettes.value: Uxcde.pal<br />
The UxStartingPalettes resource specifies the palette files loaded at<br />
start-up. These palette files are loaded before any files specified on the UIM/X<br />
command line. These palettes are not saved with projects saved by the user.<br />
If you wish to have UIM/X start with the Ux Palette, but with no CDE Widgets<br />
category, change the UxStartingPalettes resource to look as follows:<br />
Uimx3_0*UxStartingPalettes.value: Ux.pal<br />
Note: You can load more than one palette file at once. To load more than one<br />
palette, you must insert \n between palette file names. For more information<br />
about working with palettes, see the UIM/X User’s Guide.<br />
The Ux Palette is shown below. Some categories have been collapsed for<br />
display purposes:<br />
6 Using UIM/X with CDE
CDE WIDGETS<br />
2<br />
Figure 2-1 The Ux Palette<br />
CDE Widgets<br />
The CDE Widgets provided by the Ux Palette are shown in the following table,<br />
along with their names, suggested uses, and how the end user activates them in<br />
your interface. While these CDE Widgets are not official Motif widgets, they<br />
still follow the OSF/Motif Style Guide. For more information about the<br />
Using UIM/X with CDE 7
2<br />
CDE WIDGETS<br />
CDE Widgets<br />
ComboBox and the Spin Box, see the CDE Programmer’s Guide. For more<br />
information about the Help Dialog and the Help Quick Dialog, see the<br />
CDEHelp System Author’s and Programmer’s Guide.<br />
Name Icon Suggested Uses<br />
Combo Box<br />
Purpose: To provide a choice from among two<br />
or more possibilities.<br />
Use a ComboBox to enable the end user to<br />
choose from a given list of possibilities.<br />
To activate a ComboBox, press and hold down<br />
its dropdown button, then select your choice<br />
from the list.<br />
Help Dialog<br />
Purpose: To allow the user to browse through a<br />
help volume.<br />
Use a Help Dialog to display online help. CDE<br />
Help features like Backtrack and Index are<br />
supported.<br />
Activate a Help Dialog by clicking on topics.<br />
Use the menu bar and push buttons to find the<br />
topics you want to consult.<br />
Help Quick<br />
Dialog<br />
Purpose: To allow rapid access to a help Dialog<br />
volume.<br />
Use a Help Quick Dialog to display online help.<br />
Activate a Help Quick Dialog by clicking its<br />
pushbuttons.<br />
Spin Box<br />
Purpose: Enables the user to cycle through the<br />
values presented in its text field.<br />
Use a Spin Box to allow the user to choose from<br />
and edit a list of values.<br />
Activate a Spin Box by clicking its arrow<br />
buttons and typing into its text field.<br />
Note: You can integrate a DtTerm CDE widget by using the files in<br />
uimx_directory/contrib/Terminal.<br />
8 Using UIM/X with CDE
CDE WIDGETS<br />
2<br />
Swidget Methods<br />
The CDE Widgets each have a set of swidget methods. These swidget methods<br />
allow the developer to use connections to specify behavior for the CDE<br />
Widgets. The swidget methods for each method are listed in the following<br />
table:<br />
CDE Widget<br />
Help Dialog<br />
Help Quick dialog<br />
Spin Box<br />
Combo Box<br />
Swidget Methods<br />
SetDynamicHelpString<br />
SetHelpFile<br />
SetHelpString<br />
SetHelpTopic<br />
SetManPage<br />
SetDynamicHelpString<br />
SetHelpFile<br />
SetHelpString<br />
SetHelpTopic<br />
SetManPage<br />
GetValues SetValues<br />
GetPosition<br />
SetPosition<br />
GetItems<br />
SetItems<br />
GetSelectedItem<br />
SelectItem<br />
Using UIM/X with CDE 9
2<br />
CDE WIDGETS<br />
Swidget Methods<br />
10 Using UIM/X with CDE
Index<br />
Index<br />
A<br />
Adjust mouse button x<br />
Alt key ix<br />
Application Defaults xi<br />
C<br />
CDE Integration 1<br />
CDE Widgets 5<br />
Combo Box 8<br />
compound objects<br />
definition viii<br />
D<br />
definition<br />
compound object viii<br />
interface viii<br />
Motif widget viii<br />
object viii<br />
project viii<br />
Dt Script file<br />
loading 2<br />
Dt Script interface file icon 2<br />
E<br />
Enter key ix<br />
H<br />
Help Dialog 8<br />
Help Quick Dialog 8<br />
I<br />
icon<br />
Combo Box 8<br />
Dt Script interface file 2<br />
Help Dialog 8<br />
Help Quick Dialog 8<br />
Spin Box 8<br />
UIM/X 2<br />
UIM/X interface file 2<br />
UIM/X palette file 2<br />
UIM/X project file 2<br />
Installation Directories ix<br />
interface<br />
definition viii<br />
M<br />
Menu mouse button x<br />
Motif widget<br />
definition viii<br />
mouse<br />
usage ix<br />
mouse button<br />
adjust x<br />
menu x<br />
naming conventions for ix<br />
select x<br />
N<br />
naming conventions<br />
menu options viii<br />
mouse buttons vi<br />
Return key ix<br />
shell prompts ix<br />
O<br />
object<br />
Combo Box 8<br />
definition viii<br />
Help Dialog 8<br />
Help Quick Dialog 8<br />
11
Index<br />
Spin Box 8<br />
OSF/Motif Style Guide vii, 7<br />
P<br />
project<br />
definition viii<br />
R<br />
resources<br />
setting xi<br />
S<br />
Select mouse button x<br />
setting<br />
application defaults xi<br />
Spin Box 8<br />
T<br />
Typographic Conventions ix<br />
U<br />
UIM/X icon 2<br />
UIM/X interface file icon 2<br />
UIM/X palette file icon 2<br />
UIM/X project file icon 2<br />
UxStartingPalettes 6<br />
12 Using UIM/X with CDE