/* * @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: List2.dat /main/5 1995/07/13 18:16:53 drk $" */ #) This test will contain a form with three children, a Scrolled List, a RowColumn with settable resources, and another RowColumn with Callback Information. #) The Scrolled List will contain 28 items, 18 which are initially visible. It will have a background color of wheat. #) The middle panel will contain scales, Option Menus, a Toggle Button, and a PushButton. These widgets will control resources for the Scrolled List. For instance to change the visibleItemCount of the List you should move the scale to the value you wish and a SetValues() will be performed on that resource. #) The last PushButton in the middle panel (orchid background color) will destroy and re-create the Scrolled List with the resource values currently shown in the resource area. #) The right side RowColumn contains callback information for the Scrolled List. The Panel's background color will be cyan. The Panel will be updated any time a callback has been called in the List. The panel will fill in callback information conditionally on what the selection Policy is. Fields that are not available for a certain selection Policy will be marked as N/A. #) Output to STDOUT will contain a DUMP of the entire heirarchy in this test. C) #) Move the Top Item Position Scale to 28. The Scrolled List should have one Item Visible ( (28) PanedWindow ). #) Now, change the Font via the Option Menu Available Fonts to variable. The Scrolled List should change fonts to variable. #) Only one Item ( (28) PanedWindow ) should be visible. C) #) Press the Destroy and Recreate PushButton 3 times. The interface should not change, and all attachments to the form should stay intact. C) /* Screen 4 */ #) Move the Visible Item Count scale till it reads 10. The list should now contain 10 items. #) Scroll the List to the top. #) Select Item4 (4) PushButton). #) Press KPageDown. The highlight should be on Item14 (14) Scale). #) Press KPageDown. The highlight should be on Item24 (24 ToggleButtonGadget). #) Press KPageUp. The highlight should be on Item14 (14) Scale). #) Press KPageUp. The highlight should be on Item4 (4) PushButton). C) /* Screen 5 */ #) Scroll the List so that "1) DrawnButton" (item1) is the first item in the list. #) Select "1) DrawnButton" from the list. #) Press KCopy. This should copy DrawnButton to the clipboard. #) Move to the Text widget (goldenrod in color) and press MB1. #) Press KPaste. The string "1) DrawnButton" should be pasted into the Text widget. C) /* Screen 6 */ #) From the Selection Policy Option Menu select XmEXTENDED_SELECT, the list should now be Extended mode. #) Select "1) DrawnButton", "2) Label", and "3) List" from the list. #) Press KCopy. All strings should be copied to the clipboard (separated by newlines). #) Move to the Text widget (goldenrod in color) and press MB1. #) Press KPaste. All strings should be copied to the Text widget (again separated by newlines.) #) Now select "6) ArrowButton", "7) ScrollBar", and "8) Text" using BToggle (Btn1). These three items should be selected in addition to the first three. #) Now select "11) DrawnButton", "12) DrawingArea", and "13) ScrolledWindow" using BToggle (Btn1). These three items should be selected in addition to the six previously selected. #) Now press BSelect on "15) Command" but don't release it. This item should be selected and the others deselected. #) Now press KCancel while still holding down BSelect. "15) Command" should be deselected and the nine previously selected items should all be reselected. C) @) Testing CR 6117 #) Scroll the List to the top. #) Toggle the List Sensitive toggle button. The List should become insensitive but the ScrollBar should still be sensitive to input. #) Toggle the List Sensitive toggle button. Both the List and the ScrollBar should be sensitive. @) Done testing CR 6117 C) @) Testing CR 5740 #) Move the Top Item Position Scale to 6. #) Move the Top Item Position Scale to 0. The Scrolled List should have one Item Visible ( (28) PanedWindow ). There should be no warning message printed. @) Done testing CR 5740 C) @) Testing CR 5678 #) Move the Top Item Position Scale to 12. #) Now press and release BSelect on "15) Command" to select it. #) Click KAddMode to toggle into add mode. Verify that no callback information is printed to the terminal window with the reason XmCR_EXTENDED_SELECT. @) Done testing CR 5678 C) #) From the String Direction Option Menu select "Right to Left". #) The List widget should immediately update to show the strings drawn #) from the right. #) Now select "Left to Right." The List should immediately switch back to showing the strings drawn from the left. E)