123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- XCOMM! CDE_INSTALLATION_TOP/bin/dtksh
- XCOMM $XConsortium: SelBoxResTest.src /main/3 1996/04/23 20:18:42 drk $
- XCOMM #########################################################################
- XCOMM (c) Copyright 1993, 1994 Hewlett-Packard Company
- XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
- XCOMM (c) Copyright 1993, 1994 Sun Microsystems, Inc.
- XCOMM (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
- XCOMM Novell, Inc.
- XCOMM #########################################################################
- XCOMM
- XCOMM This sample shell script verifies that the selection box properly
- XCOMM interprets the 'childPlacement' resource. Using a timer, it will
- XCOMM set the resource to a particular value, verify it is correct, and
- XCOMM then repeat for the next setting.
- XCOMM
- Timeout3()
- {
- XtGetValues $SB childPlacement:CP
- echo ChildPlacement
- echo " Expected = PLACE_TOP"
- echo " Actual = " $CP
- }
- Timeout2()
- {
- XtGetValues $SB childPlacement:CP
- echo ChildPlacement
- echo " Expected = PLACE_BELOW_SELECTION"
- echo " Actual = " $CP
- XtSetValues $SB childPlacement:PLACE_TOP
- XtAddTimeOut ID 5000 "Timeout3"
- }
- Timeout1()
- {
- XtGetValues $SB childPlacement:CP
- echo ChildPlacement
- echo " Expected = PLACE_ABOVE_SELECTION"
- echo " Actual = " $CP
- XtSetValues $SB childPlacement:PLACE_BELOW_SELECTION
- XtAddTimeOut ID 5000 "Timeout2"
- }
- XCOMM ###################### Create the Main UI ###############################
- XtInitialize TOPLEVEL selectionBoxTest SelectionBoxTest "$0" "$@"
- XtCreateManagedWidget SB sb XmSelectionBox $TOPLEVEL \
- childPlacement:PLACE_ABOVE_SELECTION
- XtCreateManagedWidget SCALE scale XmScale $SB \
- orientation:HORIZONTAL
- XtRealizeWidget $TOPLEVEL
- XtAddTimeOut ID 5000 "Timeout1"
- XtMainLoop
|