|
|
IRIX 6.5 » Books » Developer »
IRIX Interactive Desktop Integration Guide
(document number: 007-2006-130 / published: 2001-11-07)
table of contents | additional info | download find in page
Chapter 10. Handling Users' System Preferences
This chapter describes how your application can recognize and use various system preferences that users can set through Desktop control panels. Whenever possible, your application should follow these preferences to provide a consistent interface for your users. In particular, this chapter contains:
Handling the Mouse Double-Click Speed Setting
The Mouse Settings control panel (available from the “Customize” submenu of the Desktop toolchest) allows users to set various parameters that affect the operation of the mouse.
The setting of importance to applications is “Click Speed,” which determines the maximum interval between double-clicks. “Click Speed” sets the *multiClickTime X resource.
In most cases, you don't need to do anything to handle this setting. IRIS IM widgets automatically use the multiClickTime value as appropriate. Only if your application needs to handle double-clicks explicitly (for example, to select a word in a word processing application) does it need to call XtGetMultiClickTime() to determine the double-click time. See the XtGetMultiClickTime(3Xt) reference page for more information on XtGetMultiClickTime().
 | Note: Don't call XtSetMultiClickTime(), which sets the double-click time for the entire display.
|
Using the Default Viewer and Editor Utilities Panel
Users who select Toolchest->Customize->Utilities invoke /usr/sbin/dtUtilities. This application displays the “Default Viewer and Editor Utilities” panel (shown in Figure 10-1).
Using the dtUtilities panel,
users can select installed utilities, including the following:
Text Editor (for example, xwsh, Jot, or Vi)
Web Browser (for example, Netscape)
Image Viewer (for example, Imgview)
Mailer (for example, MediaMail or Netscape)
Book Viewer (for example, Insight)
PostScript Viewer (for example, ShowPS)
Selecting Utilities and Their Values
The dtUtilities variables and their values are listed in Table 10-1. An example of providing programmatic access to one of these utilities is in “Setting the Preferred Text Editor”, which is below the table.
Table 10-1. dtUtilities and Their Values
dtUtility Variable
| Value
|
|---|
WINEDITOR
| Path to a window editor (for example, /usr/sbin/jot).
|
WEBBROWSER
| Path to an X Window System application that is a World Wide
Web visual browser (for example, /usr/bin/X11/netscape).
|
IMGVIEWER
| Path to an application that displays image files (for example,
/usr/bin/X11/imgview).
|
MAILBOXPROG
| Path to a mail reader application (for example,
/usr/bin/X11/MediaMail -gui).
|
BOOKVIEWER
| Path to an application for displaying InSight books (for
example, /usr/sbin/insight).
|
PSVIEWER
| Path to an application for viewing PostScript files (for
example, /usr/bin/X11/showps).
|
Setting the Preferred Text Editor
The “Text Editor” setting on the dtUtilities control panel allows users to select a preferred visual editor for editing ASCII text. This setting sets the value of the WINEDITOR environment variable.
The following instructions explain how to set the value of WINEDITOR. You can use the same instructions for the other utilities on the control panel. Just refer to Table 10-1 for the utility and value you wish to set.
Whenever your application needs to let users edit text, you should:
Call getenv() to check whether the WINEDITOR environment variable is set. See the getenv(3c) reference page for more information on getenv().
If WINEDITOR is set, save the text to edit in a temporary file. Typically, you should check the value of the environment variable TMPDIR and, if it is set, put the temporary file in that directory.
Execute the editor, providing it the name of the temporary file as an argument.
When the user quits the editor, read the temporary file and delete it.
IRIX Interactive Desktop Integration Guide
(document number: 007-2006-130 / published: 2001-11-07)
table of contents | additional info | download
Front Matter
New Features in This Guide
About This Guide
Integrating an Application Into the IRIX Interactive Desktop Environment: An Introduction
Part I. Getting the Right Look and Feel
Part II. Creating Desktop Icons
Appendix A. Example Programs for SGI Enhanced Widgets
Appendix B. Desktop Variables
Appendix C. Online Help Examples
Appendix D. The Icon Description Language
Appendix E. Predefined File Types
Appendix F. FTR File Directories
Appendix G. Using GoldenGate Data Conversion Services
Appendix H. Standard Menu Resources
Index
home/search |
what's new |
help
|
|
|