# $XConsortium: TextField4.scr /main/5 1995/07/17 20:43:03 drk $ # # @OPENGROUP_COPYRIGHT@ # COPYRIGHT NOTICE # Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc. # Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group # ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for # the full copyright text. # # This software is subject to an open license. It may only be # used on, with or for operating systems which are themselves open # source systems. You must contact The Open Group for a license # allowing distribution and sublicensing of this software on, with, # or for operating systems which are not Open Source programs. # # See http://www.opengroup.org/openmotif/license for full # details of the license agreement. Any use, reproduction, or # distribution of the program constitutes recipient's acceptance of # this agreement. # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS # PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY # WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY # OR FITNESS FOR A PARTICULAR PURPOSE # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT # NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE # EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGES. # # # HISTORY # # @) The client window should have two TextField widgets and # one Text widget. # The first TextField has XmNresizeWidth set to False. The second has # it set to True. The Text widget also has it set to True. # /* test case for PIR 2914 */ # #) Type "all the king's horses and all the king's men" into the first # TextField widget. For each character typed that exceeds the width # of the TextField, the text should shift to the left one character # to keep the newly typed character in view. LocatePointer TextF1 ClickMB Btn1 InputString "all the king's horses and all the king's men" CompareVisual TextF1 # #) Type the same string into the second TextField widget. The behavior should # be identical. In particular, the text should not jump more than one # character at a time to the left as the new text in entered on the right. LocatePointer TextF2 ClickMB Btn1 InputString "all the king's horses and all the king's men" CompareVisual TextF2 # #) Type the same string again into the third Text widget. The behavior should # also be identical. # /* end of test case for PIR 2914 */ LocatePointer Text1 ClickMB Btn1 InputString "all the king's horses and all the king's men" CompareVisual Text1 # C) Continue # #) Resize the shell window to the right by about an inch to give # the two text fields space # to grow. WindowResize Shell1 East 320 # #) Click MB1 after the last character in the first TextField widget. LocatePointer TextF1 ClickMB Btn1 ClickKey KEndData # #) Type "couldn't put humpty". The widget should not change size, and # the text should scroll as it did before. InputString "couldn't put humpty" CompareVisual TextF1 # #) Click MB1 at the end of the second TextField widget and type the same # string there. LocatePointer TextF2 ClickMB Btn1 ClickKey KEndData InputString "couldn't put humpty" # @) This widget should grow to accomodate the new characters until its # size reaches the new size of the shell window. At that point, the text # should scroll as more new characters are entered. CompareVisual TextF2 # #) Click MB1 at the end of the third Text widget. Confirm that is # behaves the same as the second TextField widget did. LocatePointer Text1 ClickMB Btn1 ClickKey KEndData InputString "couldn't put humpty" CompareVisual Text1 # C) Continue # /* test case for PIR 2898 */ # #) Click MB1 at the end of the string in the second TextField widget. LocatePointer TextF2 ClickMB Btn1 ClickKey KEndData # #) Type osfBackspaces until the string is slightly shorter than the # width of the first TextField widget. # Confirm that one character at a time is # deleted and the window shrinks by one character each time. ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace CompareVisual TextF2 # #) Click MB1 at the end of the string in the Text widget and type # the same number of osfBackspaces. LocatePointer Text1 ClickMB Btn1 ClickKey KEndData ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace ClickKey KBackSpace # #) Confirm that this widget behaves the same as the TextField widget did. # /* end of test case for PIR 2898 */ CompareVisual Text1 # E) Exit