/* * @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: DNDDrop1.dat /main/6 1995/07/14 11:52:10 drk $" */ #) This is the DNDDrop1 test. #) If you want to test CR4924 about unitType and dragUnder highlighting, rerun the test with "DNDDrop1 -u showunitbug". C) #) There should be a topLevel window with title \"topLevel0\" containing six PushButtons arranged in two rows, and a Text widget, within a BulletinBoard. If you are running the test with "-u showunitbug", the Text widget is created with a unitType of 100TH_MILLIMETERS and highlightThickness of 400, and resides within a Frame. #) PushBtn0, PushBtn2, and PushBtn4 have been registered as dropSites. #) Move \"topLevel0\" so that the control panel is fully visible. #) There should be a control panel containing four optionMenus for modifying animationStyle, dropActivity, dropSiteOperations, and dragOperations. The control panel should also show an \"Apply To\", for applying the changes in animationStyle, dropActivity, and dropSiteOperations, to one or more of the registered dropsites. #) The \"Animation Style\" optionMenu should show the options, \"HighLight\", \"ShadowOut\", \"ShadowIn\", \"None\", and \"Pixmap\". \"Pixmap\" is insensitive. \"Highlight\" is the selected item at startup. #) The \"Drop Activity\" optionMenu should show the options, \"Active\" and \"Inactive\". \"Active\" is the selected item at startup. #) The \"Drop Operations\" optionMenu should show the options, \"Move_n_Copy\", \"MoveOnly\", \"CopyOnly\", \"LinkOnly\", \"Move_n_Link\", \"Copy_n_Link\", \"All\" and \"None\". \"Move_n_Copy\" is the selected item at startup. #) The \"Drag Operations\" optionMenu should show the options, \"Move_n_Copy\", \"MoveOnly\", \"CopyOnly\", \"LinkOnly\", \"Move_n_Link\", \"Copy_n_Link\", and \"All\" and \"None\". \"Move_n_Copy\" is the selected item at startup. #) The \"Apply To\" optionMenu should show the options, \"PushBtn0\", \"PushBtn1\", \"PushBtn4\", and \"All\". \"All\" is the selected item at startup. #) If you want to run another DND test simultaneously and do not care about the instructions of that test, run that test with the option -u "-noinstruct". Otherwise, before proceeding further you will have to reposition the control panels, the topLevel windows, and the instruction panels of both the tests so that they are all completely visible. C) #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns. A dragIcon should appear consisting of a runner, an open folder, and an arrowhead. #) With BTransfer pressed, drag the pointer over different PushBtns and over the Text widget. #) When the pointer is moving within PuishBtn1, PushBtn3, or PushBtn5, you should not see any visual change. #) When the pointer is moving within PushBtn0, PushBtn2, or PushBtn4, the borders of those PushBtns should get highlighted. #) When the pointer is moving within the Text widget, the borders of the Text widget should get highlighted. If you are running the test with "-u showunitbug", you should see a highlightThickness of about 4 millmeters. If instead, you see that almost the whole Text widget gets filled with the highlight color, then CR4924 (about DND code not using unitType other than PIXELS) has not been fixed. #) When the pointer is moving within the BulletinBoard but outside of all the PushBtns and the Text widget, there should be no visual change. #) Move the pointer over to rootWindow and release BTransfer. The dragIcon shoudl snap back to from where the drag was initiated and disappear. C) #) Select \"ShadowIn\" from the \"Animation Style\" menu and select \"All\" from the \"Apply To\" menu to apply this new animationStyle to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns and start dragging. #) Now, when the pointer is being dragged over PushBtn0, PushBtn2, and PushBtn4, the dragUnder effect should be displayed by an inset shadow. #) When the pointer is being dragged over other PushBtns or the BulletinBoard outside of all the PushBtns and Text widget, there should be no visual change. #) When the pointer is moving within the Text widget, the borders of the Text widget should get highlighted. #) Move the pointer over to rootWindow and release BTransfer. The dragIcon shoudl snap back to from where the drag was initiated and disappear. C) #) Select \"ShadowOut\" from the \"Animation Style\" menu and select \"All\" from the \"Apply To\" menu to apply this new animationStyle to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns and start dragging. #) Now, when the pointer is being dragged over PushBtn0, PushBtn2, and PushBtn4, the dragUnder effect should be displayed by an outset shadow. #) When the pointer is being dragged over other PushBtns or the BulletinBoard outside of all the PushBtns and Text widget, there should be no visual change. Since the button shadows are already shadow out, there should be no visual difference from when the pointer was being moved over the registered dropSites (PushBtn0, PushBtn2, PushBtn4). #) When the pointer is moving within the Text widget, the borders of the Text widget should get highlighted. #) Move the pointer over to rootWindow and release BTransfer. The dragIcon should snap back to from where the drag was initiated and disappear. C) #) Select \"None\" from the \"Animation Style\" menu and select \"All\" from the \"Apply To\" menu to apply this new animationStyle to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns and start dragging. #) Now, when the pointer is being dragged over any of the PushBtns (including PushBtn0, PushBtn2, and PushBtn4), or the BulletinBoard outside of all the PushBtns and Text widget, there should be no visual change. #) When the pointer is moving within the Text widget, the borders of the Text widget should get highlighted. #) Move the pointer over to rootWindow and release BTransfer. The dragIcon shoudl snap back to from where the drag was initiated and disappear. #) Select \"HighLight\" from the \"Animation Style\" menu and select \"All\" from the \"Apply To\" menu to apply this new animationStyle to registered PushBtn dropSites. C) #) Select \"Inactive\" from the \"Drop Activity\" menu and select \"All\" from the \"Apply To\" menu to apply this new animationStyle to registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns and start dragging. #) Now, even when the pointer is being dragged over PushBtn0, PushBtn2, or PushBtn4, there should be no visual change. And also, if you attempt drop on any of these three registered dropSites by releasing BTransfer with the pointer over any one of them, the dragIcon should zap back to the place of drag initiation and disappear. #) Select \"Active\" from the \"Drop Activity\" menu and select \"All\" from the \"Apply To\" menu to apply this new animationStyle to registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns and start dragging. #) Now, the visual changes should be back while dragging over PushBtn0, PushBtn2, and PushBtn4. And also, if you attempt drop over any one of these dropSites, the dragIcon should melt into the background and disappear. #) Select \"Ignore\" from the \"Drop Activity\" menu and select \"PushBtn0\" from the \"Apply To\" menu to apply this new animationStyle to PushBtn0. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns and start dragging. #) Drag over PushBtn2. While dragging, the drag under visuals for PushBtn2 should not be clipped by PushBnt0, i.e, the highlight for the entire PushButton should be visible. Attempt a drop over PushBtn0. The dragIcon should snap back to the place of drag initiation and disappear. C) #) Now, let us try different combinations of \"Drop Operations\" and \"Drag Operations\". We will be testing here the resultant operation due to different combinations of dragOperations and dropSiteOperations. #) Select \"Move_n_Copy\" from the \"Drag Operations\" menu to set the dragOperations to Move and Copy. #) Select \"Move_n_Copy\" from the \"Drop Operations\" menu to set the dropSiteOperations to Move and Copy. Select \"All\" from the \"Apply To\" menu to to apply this new dropSiteOperations to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns and start dragging. The operationIcon part of the dragIcon should indicate Move operation (single folder is the default). #) With BTransfer pressed, drag over to PushBtn0. The borders of PushBtn0 should get highlighted. #) With the dragIcon over PushBtn0, release BTransfer to attempt a drop. The dragIcon should melt into the background of PushBtn0, indicating the drop was successful. #) Repeat steps 4 through 6 only replacing PushBtn0 by PushBtn2 and PushBtn4. In both the cases, you should see an indication of a successful drop. #) Initiate Drag with the pointer positioned on any of the PushBtns and drag over to the Text widget. Attempt a drop onto the Text widget by releasing BTransfer with the dragIcon over the Text widget. The dragIcon should melt into the background of the Text widget indicating a successful drop. Also, you should see the text "return value" inserted into the Text widget. C) #) Select \"MoveOnly\" from the \"Drag Operations\" menu to set the dragOperations to only Move. #) Select \"CopyOnly\" from the \"Drop Operations\" menu to set the dropSiteOperations to only Copy. Select \"All\" from the \"Apply To\" menu to apply this new dropSiteOperations to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on PushBtns1, PushBtn3, or PushBtn5, and start dragging. The operationIcon part of the dragIcon should indicate Move operation (single folder is the default). #) With BTransfer pressed, drag over to PushBtn0. The operation icon should disappear, indicating there is no common operation possible between the dragSource and the dropSite. #) With the dragIcon on PushBtn0, attempt a drop by releasing BTransfer. The dragIcon should snap back to the PushBtn from where the drag was initiated, indicating the drop was a failure. #) Select \"CopyOnly\" from the \"Drag Operations\" menu to set the dragOperations to only Copy. #) Select \"MoveOnly\" from the \"Drop Operations\" menu to set the dropSiteOperations to only Move. Select \"All\" from the \"Apply To\" menu to apply this new dropSiteOperations to all the registered PushBtn dropSites. #) Repeat steps 3 through 5. The operationIcon part of the dragIcon should indicate Copy operation (double folder is the default). #) With both the combinations of dropOperations and dragOperations described above, initiate drag from one of the PushBtns, and attempt a drop on the Text widget. In both the cases, the drop on the Text widget should succeed, i.e., the dragIcon should melt into the background of the Text widget, and you should see the text "return value" inserted into the Text widget. C) #) Select \"None\" from the \"Drag Operations\" menu to set the dragOperations None. #) Select \"Move_n_Copy\" from the \"Drop Operations\" menu to set the dropSiteOperations to Move and Copy. Select \"All\" from the \"Apply To\" menu to apply this new dropSiteOperations to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer with the pointer on PushBtn1 and dragging. You should see a dragIcon with no operation icon. #) With BTransfer pressed, drag over to PushBtn0, PushBtn2, or PushBtn4. You should not see any dragUnder effect. Drag it the Text widget. You should not see any dragUnder effect. #) With dragIcon on PushBt0, attempt a drop by releasing BTransfer. The dragIcon should snap back to PushBtn1, indicating a drop failure. #) Initiate Drag from PushBtn1 and drag over to the Text widget. The text widget should not get highlighted. Attempt a drop onto the Text widget by releasing BTransfer. The dragIcon should snap back to PushBtn1 indicating a drop failure. C) #) Select \"Move_n_Copy\" from the \"Drag Operations\" menu to set the dragOperations to Move and Copy. #) Select \"None\" from the \"Drop Operations\" menu to set the dropSiteOperations to None. Select \"All\" from the \"Apply To\" menu to apply this new dropSiteOperations to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on PushBtns1, PushBtn3, or PushBtn5, and start dragging. The operationIcon part of the dragIcon should indicate Move operation (single folder is the default). #) With BTransfer pressed, drag over to PushBtn0. The operation icon should disappear, indicating there is no common operation possible between the dragSource and the dropSite. #) With the dragIcon on PushBtn0, attempt a drop by releasing BTransfer. The dragIcon should snap back to the PushBtn from where the drag was initiated, indicating the drop was a failure. #) Initiate Drag from PushBtn1 and drag over to the Text widget. The text widget should get highlighted. Attempt a drop onto the Text widget by releasing BTransfer. The drop on the Text widget should succeed, i.e., the dragIcon should melt into the background of the Text widget, and you should see the text "return value" inserted into the Text widget. C) #) Select \"Move_n_Link\" from the \"Drag Operations\" menu to set the dragOperations to Move and Link. #) Select \"LinkOnly\" from the \"Drop Operations\" menu to set the dropSiteOperations to LinkOnly. Click on \"ApplyChanges\" to apply this new dropSiteOperations to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on PushBtn1, PushBtn3, or PushBtn5, and start dragging. The operationIcon part of the dragIcon should indicate Move operation (single folder is the default). #) With the drag in progress, press and hold down AND keys. The operationIcon part of the dragIcon should change to indicate Link operation. #) Release AND keys. The operationIcon part of the dragIcon should revert back to indicating Move operation. #) With BTransfer pressed, drag over to PushBtn0. The operation icon should change to show Link, indicating Link is the possible operation between the dragSource and the dropSite. #) With the dragIcon on PushBtn0, attempt a drop by releasing BTransfer. The dragIcon should snap back to the PushBtn from where the drag was initiated, indicating the drop was a failure. Also, you should see a message in the term window saying "Link Operation currently not supported". C) #) The Text widget and PushBtn0 have been unmanaged. This is to test CR5215. #) Select \"Move_n_Copy\" from the \"Drag Operations\" menu to set the dragOperations to Move and Copy. #) Select \"Move_n_Copy\" from the \"Drop Operations\" menu to set the dropSiteOperations to Move and Copy. Click on \"ApplyChanges\" to apply this new dropSiteOperations to all the registered PushBtn dropSites. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the visible PushBtns and start dragging. #) With BTransfer pressed, drag the pointer over to the area where PushBtn0 was. You shuld not see the highlighted border of PushBtn0. If you do, the bug has not been fixed. #) With BTransfer pressed, drag the pointer over to the area where Text widget was. You shuld not see the highlighted border of Text widget. If you do, the bug has not been fixed. #) With the dragIcon over the area where PushBtn0 was, attempt drop by releasing BTransfer. The dragIcon should zap back to the point of origin of drag and disappear. If, on the otherhand, the dragIcon melts over the region previously occupied by PushBtn0, the bug has not been fixed. #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the visible PushBtns and start dragging. #) With the dragIcon over the area where Text widget was, attempt drop by releasing BTransfer. The dragIcon should zap back to the point of origin of drag and disappear. If, on the otherhand, the dragIcon melts over the region previously occupied by Text widget, the bug has not been fixed. C) E)