# $XConsortium: Text2.scr /main/6 1995/07/17 20:41:44 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 # # #) This text widget has defined a number of different translations, which are # listed below. Try each translation and verify that the correct action is # performed. The fontList for this text widget is variable. If you # need to add more text to the example, do so. LocatePointer Text1 RTextChar 20 ClickMB Btn1 # !) # Ctrlg beep ClickKey Kg # Ctrli insert string "newstring" ClickKey Ki CompareVisual Text1 # Ctrlright bracket forward a paragraph ClickKey KBracketRight CompareVisual Text1 # Ctrlleft bracket back a paragraph ClickKey KBracketLeft CompareVisual Text1 # Metau scroll one line up ClickKey Ku CompareVisual Text1 # Metad scroll down one line ClickKey Kd CompareVisual Text1 # Ctrlf next page ClickKey Kf CompareVisual Text1 # Ctrlb previous page ClickKey Kb CompareVisual Text1 # BackSpace kill previous character LocatePointer Text1 RTextChar 20 ClickMB Btn1 ClickKey KBackSpace CompareVisual Text1 # Ctrls kill selection LocatePointer Text1 RTextChar 20 ClickMB Btn1 DragComponent Text1 RTextChar 35 ClickKey Ks CompareVisual Text1 # Ctrlk kill next word ClickKey Kk CompareVisual Text1 # Metak kill previous word ClickKey Kk CompareVisual Text1 # Ctrlu unkill ClickKey Ku CompareVisual Text1 # Ctrlr delete previous word ClickKey Kr CompareVisual Text1 # Metar delete next word. ClickKey Kr CompareVisual Text1 # Ctrlc cut primary selection LocatePointer Text1 RTextChar 5 ClickMB Btn1 DragComponent Text1 RTextChar 10 ClickKey Kc CompareVisual Text1 # C) Continue # /* test case for PIR 3520 */ # This PIR was closed, test is no longer valid. # # #) Select any word in the text by double clicking MB1 on it. # LocatePointer Text1 RTextChar 25 # ClickMB Btn1 2 # # # #) Press the Backspace key to kill the selection. # ClickKey KBackSpace # CompareVisual Text1 # # # #) Click MB1 somewhere else in the text. # LocatePointer Text1 RTextChar 40 # # # #) Press Ctrlu to unkill the selection and paste it at the # # insertion cursor position. # ClickKey Ku # CompareVisual Text1 # # # #) Perform the same sequence of select word, kill and unkill using # # the kill-next-word ( Ctrlk ) action. # LocatePointer Text1 RTextChar 15 # ClickMB Btn1 2 # ClickKey Kk # LocatePointer Text1 RTextChar 30 # ClickKey Ku # CompareVisual Text1 # # # #) Once again, perform the sequence using the kill-previous-word # # ( Metak ) action. # LocatePointer Text1 RTextChar 20 # ClickMB Btn1 2 # ClickKey Kk # LocatePointer Text1 RTextChar 45 # ClickKey Ku # CompareVisual Text1 # # # C) # Continue # # /* end of test case for PIR 3520 */ # Test case for CR 8029 - should not get an infinite loop LocatePointer Text1 ClickMB Btn1 ClickKey KBeginData InputString " A paragraph that starts\nwith whitespace\n\n" ClickKey KBeginData # Ctrlright bracket forward a paragraph ClickKey KBracketRight # C) Continue # E) Exit