/* * @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: DNDProt1.dat /main/6 1995/07/14 11:54:50 drk $" */ #) This is the DNDProt1 test. C) #) There should be a topLevel window with title \"topLevel0\" containing six PushButtons arranged in two rows, and a Text widget, within a BulletinBoard. #) 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 a PushButton \"ApplyChanges\" for applying the changes in animationStyle, dropActivity, and dropSiteOperations, to 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\", and \"All\". \"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\". \"Move_n_Copy\" is the selected item at startup. #) Run the test "DNDDrop1 -u -noinstruct". Move \"topLevel0\" and the control panel of "DNDDrop1" so that the topLevel windows and the control panels of both the tests are completely visible. C) #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\" of "DNDProt1". 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 in the \"topLevel0\" of "DNDDrop1". #) When the pointer is moving within PuishBtn1, PushBtn3, or PushBtn5, of \"topLevel0\", "DNDDrop1", you should not see any visual change. #) When the pointer is moving within PushBtn0, PushBtn2, or PushBtn4, of \"topLevel0\", "DNDDrop1", the borders of those PushBtns should get highlighted. #) When the pointer is moving within the Text widget of \"topLevel0\", "DNDDrop1", the borders of the Text widget should get highlighted. #) When the pointer is moving within the BulletinBoard of \"topLevel0\", "DNDDrop1", 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 in "DNDDrop1" and click on \"All\" to apply this new animationStyle to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\", "DNDProt1", and start dragging. #) Now, when the pointer is being dragged over PushBtn0, PushBtn2, and PushBtn4, of \"topLevel0\", "DNDDrop1", 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, of \"topLevel0\", "DNDDrop1", there should be no visual change. #) When the pointer is moving within the Text widget, of \"topLevel0\", "DNDDrop1", 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 \"ShadowOut\" from the \"Animation Style\" menu in "DNDDrop1" and click on \"All\" to apply this new animationStyle to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\", "DNDProt1", and start dragging. #) Now, when the pointer is being dragged over PushBtn0, PushBtn2, and PushBtn4, of \"topLevel0\", "DNDDrop1", 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, of \"topLevel0\", "DNDDrop1", there should be no visual change. #) When the pointer is moving within the Text widget, of \"topLevel0\", "DNDDrop1", 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 \"None\" from the \"Animation Style\" menu in "DNDDrop1" and click on \"All\" to apply this new animationStyle to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\", "DNDProt1", 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, of \"topLevel0\", "DNDDrop1", there should be no visual change. #) When the pointer is moving within the Text widget, \"topLevel0\", "DNDDrop1",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 in "DNDDrop1" and click on \"All\" to apply this new animationStyle to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". C) #) Select \"Inactive\" from the \"Drop Activity\" menu in "DNDDrop1" and click on \"All\" to apply this new dropActivity to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\", "DNDProt1", and start dragging. #) Now, even when the pointer is being dragged over PushBtn0, PushBtn2, or PushBtn4, of \"topLevel0\", "DNDDrop1", 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 in "DNDDrop1" and click on \"ApplyChanges\" to apply this new dropActivity to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\", "DNDProt1", and start dragging. #) Now, the visual changes should be back while dragging over PushBtn0, PushBtn2, and PushBtn4, of \"topLevel0\", "DNDDrop1". And also, if you attempt drop over any one of these dropSites, the dragIcon should melt into the background 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 of "DNDProt1" to set the dragOperations to Move and Copy. #) Select \"Move_n_Copy\" from the \"Drop Operations\" menu of "DNDDrop1" to set the dropSiteOperations to Move and Copy. Click on \"All\" of "DNDDrop1" to apply this new dropSiteOperations to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\", "DNDProt1", 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 of \"topLevel0\", "DNDDrop1". The borders of that PushBtn0 should get highlighted. #) With the dragIcon over PushBtn0 of \"topLevel0\", "DNDDrop1", 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 of \"topLevel0\", "DNDProt1", and drag over to the Text widget of \"topLevel0\", "DNDDrop1". Attempt a drop onto that Text widget by releasing BTransfer with the dragIcon over that Text widget. The dragIcon should melt into the background of that Text widget indicating a successful drop. Also, you should see the text "return value" inserted into that Text widget. C) #) Select \"MoveOnly\" from the \"Drag Operations\" menu of "DNDProt1" to set the dragOperations to only Move. #) Select \"CopyOnly\" from the \"Drop Operations\" menu of "DNDDrop1" to set the dropSiteOperations to only Copy. Click on \"All\" of "DNDDrop1" to apply this new dropSiteOperations to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\", "DNDProt1", 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 of \"topLevel0\", "DNDDrop1". The operation icon should disappear, indicating there is no common operation possible between the dragSource and the dropSite. #) With the dragIcon on PushBtn0 of \"topLevel0\", "DNDDrop1", 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 of "DNDProt1" to set the dragOperations to only Copy. #) Select \"MoveOnly\" from the \"Drop Operations\" menu of "DNDDrop1" to set the dropSiteOperations to only Move. Click on \"ApplyChanges\" of "DNDDrop1" to apply this new dropSiteOperations to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) 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 of \"topLevel0\", "DNDProt1", and attempt a drop on the Text widget of \"topLevel0\", "DNDDrop1". 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 that Text widget. C) #) Select \"None\" from the \"Drag Operations\" menu of "DNDProt1" to set the dragOperations to None. #) Select \"Move_n_Copy\" from the \"Drop Operations\" menu of "DNDDrop1" to set the dropSiteOperations to Move and Copy. Click on \"ApplyChanges\" of "DNDDrop1" to apply this new dropSiteOperations to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on any of the PushBtns in the \"topLevel0\", "DNDProt1", and start dragging. You should see a dragIcon with no operation icon. #) With BTransfer pressed, drag over to PushBtn0, PushBtn2, or PushBtn4 of \"topLevel0\", "DNDDrop1". You should not see any dragUnder effect. Drag it the Text widget of \"topLevel0\", "DNDDrop1". You should not see any dragUnder effect. #) With dragIcon on PushBt0 of \"topLevel0\", "DNDDrop1", attempt a drop by releasing BTransfer. The dragIcon should snap back to the PushBtn from where the drag was initiated, indicating a drop failure. #) Initiate Drag from any PushBtn of \"topLevel0\", "DNDProt1" and drag over to the Text widget of \"topLevel0\", "DNDDrop1". The text widget should not get highlighted. Attempt a drop onto that Text widget by releasing BTransfer. The dragIcon should snap back to the PushBtn from where the drag was initiated, indicating a drop failure. C) #) Select \"Move_n_Copy\" from the \"Drag Operations\" menu of "DNDProt1" to set the dragOperations to Move and Copy. #) Select \"None\" from the \"Drop Operations\" menu of "DNDDrop1" to set the dropSiteOperations to None. Click on \"ApplyChanges\" of "DNDDrop1" to apply this new dropSiteOperations to all the registered PushBtn dropSites of \"topLevel0\", "DNDDrop1". #) Initiate Drag by pressing BTransfer (MB2 by default) with the pointer positioned on PushBtn1, PushBtn3, or PushBtn5 in the \"topLevel0\", "DNDProt1", and start dragging. The operationIcon part of the dragIcon should indicate Move operation (single folder is the default). #) With BTransfer pressed, drag over to PushBtn0of \"topLevel0\", "DNDDrop1". The operation icon should disappear, indicating there is no common operation possible between the dragSource and the dropSite. #) With the dragIcon on PushBtn0 \"topLevel0\", "DNDDrop1", 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 of \"topLevel0\", "DNDProt1", and drag over to the Text widget of \"topLevel0\", "DNDDrop1". The text widget should not get highlighted. Attempt a drop onto that Text widget by releasing BTransfer. The drop on that Text widget should succeed, i.e., the dragIcon should melt into the background of that Text widget, and you should see the text "return value" inserted into that Text widget. C) #) Position the pointer over \"topLevel0\", "DNDDrop1", and hit "q". This will terminate the program "DNDDrop1". E)