The X Window System Libraries(*)
Total Page:16
File Type:pdf, Size:1020Kb
The Mjølner System X Window System Libraries Reference Manual Mjølner Informatics Report MIA 91-16(1.3) October 1997 Copyright © 1991-97 Mjølner Informatics ApS. All rights reserved. No part of this document may be copied or distributed without the prior written permission of Mjølner Informatics The X Window System is a trademark of X Consortium, Inc. UNIX is a trademark of X/Open Company, Ltd. OPEN LOOK is a trademark of Novell, Inc. OSF/Motif is a trademark of Open Software Foundation, Inc. Parts of this report are based on X Toolkit Intrinsic-C language Interface, by Joel McCormack, Paul Asente, and Ralph Swich, and X Toolkit Athene Widgets-C Language Interface, by Ralph Swich and Terry Weissman, both of which are copyrighted © 1985 - 1989 the Massachusetts Institute of Technology, Cambridge, Massachusetts, and Digital Equipment Corporation, Maynard, Massachusetts. We have used this material under the terms of its copyright, which grants free use, subject to the following condi- tions: Permission to use, copy, modify and distribute this documentation (i.e. the original MIT and DEC material) for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. or Digital not be used in in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T and Digital makes no representations about the suitability of the software described herein for any purpose. It is provided ``as is'' without express or implied warranty. Table of Contents 1. INTRODUCTION...........................................................................1 1.1 What is Xt?.................................................................................. 1 1.2 The BETA interface to Xt et. al. ............................................................ 2 1.3 Demo programs ............................................................................. 2 1.4 Environment Variables ..................................................................... 3 1.4 .............................................................................................. 3 2. XTENV........................................................................................4 2. ..................................................................................................4 2.1 Using the XtEnv fragment .................................................................. 4 2.2 Basic XtEnv widget patterns................................................................ 5 2.2.1 Core ................................................................................................................. 5 2.2.2 Composite ......................................................................................................... 9 2.2.3 Constraint.......................................................................................................... 9 2.2.4 Shell................................................................................................................10 2.2.5 WMShell..........................................................................................................10 2.2.6 ToplevelShell ....................................................................................................10 2.2.7 TransientShell ...................................................................................................10 2.2.8 OverrideShell ....................................................................................................10 2.2.9 VendorShell......................................................................................................10 2.3 Other XtEnv Objects and Patterns ........................................................ 11 2.3.1 Toplevel...........................................................................................................11 2.3.2 Display ............................................................................................................11 2.3.2 .......................................................................................................................11 2.3.3 Timer...............................................................................................................11 2.3.3 .......................................................................................................................11 2.3.4 WorkProc .........................................................................................................11 2.3.4 .......................................................................................................................11 2.3.5 TranslationTable................................................................................................11 2.3.5 .......................................................................................................................11 2.3.6 AcceleratorTable................................................................................................11 2.3.6 .......................................................................................................................11 2.3.7 RegisteredAction................................................................................................11 2.3.7 .......................................................................................................................11 2.3.8 StringArray.......................................................................................................11 2.3.8 .......................................................................................................................11 2.3.9 FallbackResources..............................................................................................11 2.3.9 .......................................................................................................................11 2.3.10 Options...........................................................................................................12 2.3.11 ErrorHandler ...................................................................................................12 2.3.11 .....................................................................................................................12 2.3.12 WarningHandler...............................................................................................12 iii iv X Window System Libraries 2.3.12 .....................................................................................................................12 2.4 Examples using Xt widgets ................................................................ 12 2.5 XtEnv Interface Description............................................................... 15 2.5.1 xtenv ...............................................................................................................15 2.5.2 events ..............................................................................................................36 2.5.3 xsystemenv.......................................................................................................48 2.5.4 editres..............................................................................................................49 2.5.5 xterm...............................................................................................................50 3. AWENV .....................................................................................15 3.1 What is the Athena Widget set? ........................................................... 51 3.2 Using the AwEnv fragment ................................................................ 51 3.3 Overview of AwEnv Patterns .............................................................. 52 3.4 Simple Athena Patterns.................................................................... 53 3.4.1 Simple .............................................................................................................53 3.4.2 Label ...............................................................................................................53 3.4.3 Command.........................................................................................................53 3.4.4 ListWidget........................................................................................................54 3.4.5 StripChart.........................................................................................................54 3.4.6 Toggle .............................................................................................................54 3.4.7 Grip.................................................................................................................54 3.4.8 Scrollbar...........................................................................................................54 3.5 Examples using simple Athena Widgets ................................................... 55 3.5.1 Using Label ......................................................................................................55 3.5.2 Using ListWidget...............................................................................................55 3.5.3 Using Command ................................................................................................57 3.5.4 Using StripChart ................................................................................................57 3.5.5 Using Toggle.....................................................................................................58