/* * @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 */ /* static char rcsid[] = "$XConsortium: List9.dat /main/6 1995/07/13 18:22:11 drk $" */ #) Testing XmList functions XmListGetKbdItemPos(), XmListSetKbdItemPos(), XmListPosSelected() and XmListPosToBounds(). #) Move the position scale so that it reads 0. #) Select XmListPosSelected() from the Functions List. #) Press the Call Function PushButton. The Label beneath the Functions list should state that Position 0 is not selected. #) Select Item10 from the Action List. #) Move the position scale so that it reads 10 #) Press the Call Function PushButton. The Label beneath the Functions list should state that Position 10 is selected. #) Move the position scale so that it reads 16. #) Press the Call Function PushButton. The Label beneath the Functions list should state that Position 16 is not selected. C) #) Select XmListPosToBounds() from the Functions List. #) Move the position scale so that it reads 0. #) Press the Call Function PushButton. The Label beneath the Functions list should state that Position 0 is not visible. #) Move the position scale so that it reads 5 #) Press the Call Function PushButton. The Label beneath the Functions list should list the bounding box for Position 5. #) Move the position scale so that it reads 0. #) Scroll the Action List so that Item15 is visible. #) Press the Call Function PushButton. The Label beneath the Functions list should list the bounding box for Position 0 (Item15). C) #) Select XmListSetKbdItemPos() from the Functions List. #) Move the position scale so that it reads 8. #) Press the Call Function PushButton. Item8 should be seleted and if you tab to the List, Item8 will have the highlight. #) Select XmListGetKbdItemPos() from the Functions List. #) Press the Call Function PushButton. The Label beneath the Functions list should state that Keyboard Position is 8. #) Try setting the keyboard position via XmListSetKbdItemPos() and retreiving the value of the selected position via XmListGetKbdItemPos() with other positions. #) Try setting the keyboard position via XmListSetKbdItemPos() to 0 and making sure that the last item in the list is highlighted. #) Try changing the Selection Policy (via the RadioBox) and testing interactions in different modes. #) Move in Extended Selection mode, and try interactions in and out of Add Mode (can Toggle with List AddMode toggle button or Shift F8 in the Action List) C) @) This is the test for OSF CR 5676 #) Stay in Extended Selection mode. #) Select items 4 through 8 by clicking on item 4 and dragging to item 8 #) Then toggle select by pressing Ctrl-Btn1 on item 3 and dragging to item 10, but don't release the mouse button yet. Items 3, 9 and 10 have now been toggled to on. #) Without releasing the mouse on item 10, drag back to item 3 and then release. Items 9 and 10 should have correctly been reverted back to an unselected state. But items 4 through 8 should remain selected. If not, the test for OSF CR 5676 fails. @) End of the test for OSF CR 5676 C) @) This is the test for OSF CR 5676 #) Stay in Extended Selection mode. #) Select items 4 through 8 by clicking on item 4 and dragging to item 8 #) Then toggle select by pressing Ctrl-Btn1 on item 3 and dragging to item 10, but don't release the mouse button yet. Items 3, 9 and 10 have now been toggled to on. #) Without releasing the mouse on item 10, drag back to item 3 and then release. Items 9 and 10 should have correctly been reverted back to an unselected state. But items 4 through 8 should remain selected. If not, the test for OSF CR 5676 fails. @) End of the test for OSF CR 5676 C) #) All items should be deleted. @) Test case for OSF CR 5886 #) Toggle the List AddMode toggle button so that it is off. #) If the test is still running, CR 5886 is fixed. @) End of test for OSF CR 5886 #) Select XmListGetKbdItemPos() from the Functions List. #) Press the Call Function PushButton. The Label beneath the Functions list should state that Keyboard Position is 0. E) #) This is a 1.2 test only. Please exit. E)