# $XConsortium: Text1.scr /main/6 1995/07/17 20:41:14 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 text widget's contents read "Some Text." If Adobe fonts are # installed on your system, then the text widget # will use the Adobe courier 14 font. # Otherwise the default font will be used. # #) Select a few letters in the middle of the text by dragging # MB1. Now, cut the selection using by pressing the osfCut key. # The remaining text should be free of any garbage pixels in # the area where the selection was. LocatePointer Text1 RTextChar 1 DragComponent Text1 RTextChar 5 Btn1 ClickKey KCut CompareVisual Text1 # C) Continue # #) Move the pointer into the client window after the text already # present and click MB1. Next, type Return and the following: # !) # Humpty Dumpty sat on a wall. # Humpty Dumpty had a great fall. LocatePointer Text1 RTextChar Max ClickMB Btn1 ClickKey KReturn InputString "Humpty Dumpty sat on a wall.\nHumpty Dumpty had a great fall.\n" # #) Type the next line, and note that after the horizontal scrollbar # slider reaches the right side of its trough, it becomes smaller # with each additional keystroke: # !) # All the king's horses and all the king's men. InputString "All the king's horses and all the king's men." CompareVisual Text1 # #) Again, move the pointer into the client window after the last # sentence you just typed and type Return. Note that the vertical # scrollbar slider gets smaller. LocatePointer Text1 RTextChar Max ClickMB Btn1 ClickKey KReturn CompareVisual Text1 # C) Continue # #) Move the vertical scrollbar's slider all the way up to the top. LocatePointer Text1 RVertScrollBarSlider DragSliderValue Up Min # #) Resize the window much larger. The scrollbar sliders should fill # the troughs again. WindowResize Shell1 SouthEast 450 150 CompareVisual Text1 # #) Move the cursor into the client window and verify that the I-beam is # visible in the newly exposed text areas. LocatePointer Text1 RTextChar Max CompareVisual Text1 # C) Continue # #) Try the following MB1 multiple-click tests, # and verify the selections: # !) # Single click -- places insertion cursor. WindowRaise Shell1 LocatePointer Text1 RTextChar 50 ClickMB Btn1 CompareVisual Text1 Wait 1 # Double click -- selects word. ClickMB Btn1 2 CompareVisual Text1 Wait 1 # Triple click -- selects line. ClickMB Btn1 3 CompareVisual Text1 Wait 1 # Quadruple click -- selects all the text. ClickMB Btn1 4 CompareVisual Text1 # C) Continue # # @) The following test is concerned about using MCtrlKUp and MCtrlKDown # to move the cursor back and forth between paragraphs, which was # reported as a bug (# 3145). # !) # #) Move the cursor to the end of the line. Enlarge the window in order # to see ten or more lines. Type the following lines, typing a space # where the instructions indicate \"_\". LocatePointer Text1 RTextChar Max ClickMB Btn1 InputString "\n\na\n\n x \nb" # #) With the cursor located after the letter \"b\", press KUp. # The cursor should move to the position before the letter \"x\". ClickKey KUp CompareVisual Text1 # Press KUp again. The cursor should now be located # before the letter \"a\". ClickKey KUp CompareVisual Text1 # Pressing KDown should move the cursor back in front of # the letter \"x\". ClickKey KDown CompareVisual Text1 # Pressing KDown again should move the cursor after the # letter \"b\". ClickKey KDown CompareVisual Text1 # C) Continue # @) The following two panels are a test case for CR 5166. # #) The text widget should now have two lines of text displayed. # Move the vertical scrollbar down to the bottom of the trough. LocatePointer Text1 RVertScrollBarSlider DragSliderValue Down Max # C) Continue #) The text \"Spider Lives!" should now be displayed. CompareVisual Text1 # C) Continue # E) Exit