# $XConsortium: Scrollbar12.scr /main/4 1995/07/17 20:37:05 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 following panels test the snapback scrolling feature. # A vertical scrollbar should be displayed. The XmNsnapBackMultiple resource # is set to its default value, which means the scrollbar slider should # move as long as pointer is within the bounds of a reasonable screen size. # Press MB1 on the scrollbar slider. While continuing to hold down MB1, # move the pointer horizontally outside the bounds of the scrollbar. Continue # to press MB1 while moving the slider in the vertical direction. # The scrollbar slider should continue to move. LocatePointer Scrollbar1 RSlider DragXYRelative Any 100 50 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -100 -50 CompareVisual Scrollbar1 # C) Continue # XmNsnapBackMultiple has been set to zero. The scrollbar slider should # snap back to its original position once the pointer is moved outside # the bounds of the scrollbar. Press MB1 on the scrollbar slider. # Drag the pointer vertically while continuing the hold down MB1 and # then drag the pointer horizontally outside the bounds of the scrollbar. # Verify that the scrollbar slider returns to its original position. LocatePointer Scrollbar1 RSlider DragXYRelative Any 20 100 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -20 -50 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any 30 50 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -30 50 CompareVisual Scrollbar1 # C) Continue # XmNsnapBackMultiple has been set to one. # Vertical separators should appear at the distance of one scrollbar # to both the left and the right of the scrollbar. # The scrollbar slider should snap back to its original position # once the pointer is moved beyond the region enclosed by the vertical # separators. Press MB1 on the scrollbar slider. # Drag the pointer vertically while continuing the hold down MB1 and # then drag the pointer horizontally outside the width of the scrollbar # but still within the region bracketed by the vertical separators. # Move the pointer vertically, the scrollbar slider should move up and # down. Continuing to press MB1, move the pointer outside the region # bracketed by the separators. Verify that the scrollbar slider # returns to its original position once the pointer crosses the # bounds of one of the separators. LocatePointer Scrollbar1 RSlider DragXYRelative Any 50 100 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any 85 50 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -50 -100 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -85 -50 CompareVisual Scrollbar1 # C) Continue # XmNsnapBackMultiple has been set to two. # Vertical separators should appear at the distance of two scrollbars # to both the left and the right of the scrollbar. # The scrollbar slider should snap back to its original position # once the pointer is moved beyond the region enclosed by the vertical # separators. Press MB1 on the scrollbar slider. # Drag the pointer vertically while continuing the hold down MB1 and # then drag the pointer horizontally outside the region bracketed by # the vertical separators. # Verify that the scrollbar slider returns to its original position # once the pointer crosses the bounds of one of the separators. LocatePointer Scrollbar1 RSlider DragXYRelative Any 75 100 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any 135 50 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -75 -100 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -135 -50 CompareVisual Scrollbar1 # C) Continue # The scrollbar should now be displayed horizontally. # The XmNsnapBackMultiple resource is set to 1000 which should be # equivalent to the default value, meaning the scrollbar slider should # move as long as pointer is within the bounds of a reasonable screen size. # Press MB1 on the scrollbar slider. While continuing to hold down MB1, # move the pointer horizontally outside the bounds of the scrollbar. Continue # to press MB1 while moving the slider in the vertical direction. # The scrollbar slider should continue to move. LocatePointer Scrollbar1 RSlider DragXYRelative Any 50 100 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -50 -100 CompareVisual Scrollbar1 # C) Continue # XmNsnapBackMultiple has been set to zero. The scrollbar slider should # snap back to its original position once the pointer is moved outside # the bounds of the scrollbar. Press MB1 on the scrollbar slider. # Drag the pointer horizontally while continuing the hold down MB1 and # then drag the pointer vertically outside the bounds of the scrollbar. # Verify that the scrollbar slider returns to its original position. LocatePointer Scrollbar1 RSlider DragXYRelative Any 100 -20 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -50 20 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any 50 -50 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -50 50 CompareVisual Scrollbar1 # C) Continue # XmNsnapBackMultiple has been set to one. # Horizontal separators should appear at the distance of one scrollbar # to above and below the scrollbar widget. # The scrollbar slider should snap back to its original position # once the pointer is moved beyond the region enclosed by the horizontal # separators. Press MB1 on the scrollbar slider. # Drag the pointer horizontally while continuing the hold down MB1 and # then drag the pointer vertically outside the width of the scrollbar # but still within the region bracketed by the horizontal separators. # Move the pointer horizontally, the scrollbar slider should move back and # forth. Continuing to press MB1, move the pointer outside the region # bracketed by the separators. Verify that the scrollbar slider # returns to its original position once the pointer crosses the # bounds of one of the separators. LocatePointer Scrollbar1 RSlider DragXYRelative Any -50 -50 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any 50 50 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -25 -85 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any 25 85 CompareVisual Scrollbar1 # C) Continue # XmNsnapBackMultiple has been set to two. # Horizontal separators should appear at the distance of two scrollbars # to both the left and the right of the scrollbar. # The scrollbar slider should snap back to its original position # once the pointer is moved beyond the region enclosed by the horizontal # separators. Press MB1 on the scrollbar slider. # Drag the pointer horizontally while continuing the hold down MB1 and # then drag the pointer vertically outside the region bracketed by # the vertical separators. # Verify that the scrollbar slider returns to its original position # once the pointer crosses the bounds of one of the separators. LocatePointer Scrollbar1 RSlider DragXYRelative Any -100 -75 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any 100 75 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any -100 -130 CompareVisual Scrollbar1 LocatePointer Scrollbar1 RSlider DragXYRelative Any 100 130 CompareVisual Scrollbar1 # C) Continue # E) Exit