1 XCOMM! CDE_INSTALLATION_TOP/bin/dtksh
2 XCOMM $XConsortium: SelBoxResTest.src /main/3 1996/04/23 20:18:42 drk $
4 XCOMM #########################################################################
5 XCOMM (c) Copyright 1993, 1994 Hewlett-Packard Company
6 XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
7 XCOMM (c) Copyright 1993, 1994 Sun Microsystems, Inc.
8 XCOMM (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
10 XCOMM #########################################################################
14 XCOMM This sample shell script verifies that the selection box properly
15 XCOMM interprets the 'childPlacement' resource. Using a timer, it will
16 XCOMM set the resource to a particular value, verify it is correct, and
17 XCOMM then repeat for the next setting.
22 XtGetValues $SB childPlacement:CP
24 echo " Expected = PLACE_TOP"
30 XtGetValues $SB childPlacement:CP
32 echo " Expected = PLACE_BELOW_SELECTION"
34 XtSetValues $SB childPlacement:PLACE_TOP
35 XtAddTimeOut ID 5000 "Timeout3"
40 XtGetValues $SB childPlacement:CP
42 echo " Expected = PLACE_ABOVE_SELECTION"
44 XtSetValues $SB childPlacement:PLACE_BELOW_SELECTION
45 XtAddTimeOut ID 5000 "Timeout2"
49 XCOMM ###################### Create the Main UI ###############################
51 XtInitialize TOPLEVEL selectionBoxTest SelectionBoxTest "$0" "$@"
53 XtCreateManagedWidget SB sb XmSelectionBox $TOPLEVEL \
54 childPlacement:PLACE_ABOVE_SELECTION
56 XtCreateManagedWidget SCALE scale XmScale $SB \
57 orientation:HORIZONTAL
59 XtRealizeWidget $TOPLEVEL
61 XtAddTimeOut ID 5000 "Timeout1"