/*
* Motif
*
* Copyright (c) 1987-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these librararies and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* HISTORY
*/
/*
static char rcsid[] = "$TOG: DNDIcon1.dat /main/7 1999/11/10 16:57:21 jff $"
*/
#) This is the DNDIcon1 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 ten optionMenus
for modifying respectively, animationStyle, dropActivity,
dropSiteOperations, dragOperations, blendModel,
cursorForeground, cursorBackground, validCursorForeground,
invalidCursorForeground, and noneCursorForeground. 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\", \"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\", \"All\", and \"None\".
\"CopyOnly\" is the selected item at startup.
C)
#) The \"Blend Model\" optionMenu should show the options,
\"All\", \"State_n_Source\", \"JustSource\", and \"None\".
#) The \"Cursor Foreground\", \"Cursor Background\",
\"Valid Cursor Foreground\", \"Invalid Cursor Foreground\",
and the \"None Cursor Foreground\" optionMenus all should
show the options, \"Red\", \"Black\", \"Yellow\", \"Green\",
and \"White\". \"Cursor Background\" has \"White\" as the
selected item at startup; all others have \"Red\" as 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 PushBtn1.
#) A dragIcon should appear consisting of three squares with white
background and red text in the foreground. The topleft square
should have \"SRC ICON\" in the middle, with \"SRC\" on
one line and \"ICON\" on another line. The top right square
should have \"NONE ICON\" in the middle, with \"NONE\" on one
line and \"ICON\" on another line. And the bottom right
square ahould have \"COPY ICON\" in the middle with \"COPY\"
on one line and \"ICON\" on another line. All three should be
completely visible.
#) The attachment for the operationCursorIcon (bottom right
square) is SouthEast and for the stateCursorIcon (top right
square) is NorthEast. The top left square is the
sourceCursorIcon.
#) Note that the hotspot for the dragIcon comes from the state
Icon, which is the topleft corner of the square when the
state is None (meaning when you are dragging over widgets
which are not registered as dropSites).
#) With BTransfer pressed, drag the pointer over different PushBtns
and over the Text widget.
#) When the pointer is moving within PuishBtn1, PushBtn3, or PushBtn5,
or within the Bulletinboard but outside of all the PushBtns and
the text widget, you should not see any visual feedback. The
dragIcon should be the same as when you initiated the drag with
pointer on PushBtn1, meaning, it should show that you are dragging
over widgets that are not registered dropSites.
#) When the pointer is moving over PushBtn2, you should not see any
visual dragUnder effect. But the stateIcon (top right square)
part of the dragIcon should show \"INVALID ICON\", instead of
\"NONE ICON\".The reason for this is that, even though PushBtn2
is registered as a dropSite, it is not registered to accept any
drops (importTargets is NULL and numImportTargets is 0).
#) When the pointer is moving within PushBtn0 or PushBtn4, or the
Text widget, the borders of those PushBtns or the Text widget
should get highlighted. Also, the stateIcon (the top right square)
should change to \"VALID ICON\", and the hotspot should shift to
the left midpoint of that square.
#) Release BTransfer with the dragIcon on the BulletinBoard. The
dragIcon should zap back to PushBtn1 and disappear.
C)
#) Select \"Inactive\" from the \"Drop Activity\" menu and click
on \"ApplyChanges\" to apply this new dropActivity to all the
registered PushBtn dropSites.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1 and start dragging.
#) Now, except the Text widget, wherever you drag inside the
BulletinBoard, the stateIcon should show \"NONE ICON\",
meaning, even the registered dropSites are treated as
non-dropSites when dropActivity is \"Inactive\".
#) Release BTransfer with the dragIcon on the BulletinBoard. The
dragIcon should zap back to PushBtn1 and disappear.
#) Select \"Active\" from the \"Drop Activity\" menu and click
on \"ApplyChanges\" to apply this new dropActivity to all the
registered PushBtn dropSites.
#) Now, initiate drag from PushBtn1, and drag over all the PushBtns.
The stateIcon should show that the behavior is back to when
we started, meaning, PushBtn0, PushBtn4, and the Text widget are
Valid dropSites, PushBtn2 is an Invalid dropSite, and all other
PushBtns and the BulletinBoard are non-dropSites.
#) Release BTransfer with the dragIcon on the BulletinBoard. The
dragIcon should zap back to PushBtn1 and disappear.
C)
#) Select \"State_n_Source\" from the \"Blend Model\" menu.
#) Initiate drag from PushBtn1. The dragIcon should now consist of
only two squares, the one on the left (sourceCursorIcon) showing
\"SRC ICON\", and the one on the right (stateCursorIcon) showing
\"NONE ICON\".
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"JustSource\" from the \"Blend Model\" menu.
#) Initiate drag from PushBtn1. The dragIcon should now consist of
only one square (sourceCursorIcon) showing \"SRC ICON\".
#) Start dragging with BTransfer pressed, on different PushBtns. Note
the hotspot has now shifted to the topleft corner of the dragIcon.
Release BTransfer with the dragIcon on the BulletinBoard. The
dragIcon should zap back to PushBtn1 and disappear.
#) Select \"None\" from the \"Blend Model\" menu.
#) Initiate drag from PushBtn1. There should be no dragIcon visible
now. But as you drag the pointer with BTransfer pressed, the
state should be visible through dragUnder effect, i.e., while you
are dragging over PushBtn0, PushBtn4, or the text widget, you
should see that the borders of these widgets get highlighted.
#) Release BTransfer with the dragIcon on the BulletinBoard.
C)
#) Select \"All\" from the \"Blend Model\" menu.
#) Select "Red" from the \"Cursor ForeGround\" menu and
"Yellow" from the \"Cursor Background\" menu and initiate drag.
You should see that all parts of the dragIcon have red foreground
and yellow background. Release BTransfer with the dragIcon on
the BulletinBoard. The dragIcon should zap back to PushBtn1 and
disappear.
#) Select "Black" from the \"Valid Cursor Foreground\" menu,
"Green" from the \"Invalid Cursor Foreground\" menu, and "Green"
from the \"None Cursor Foreground\" menu. You will see that these
will affect foreground of all parts of the dragIcon depending on
where you are dragging.
#) Initiate Drag by pressing BTransfer with the pointer over any of
the PushBtns. With BTransfer pressed, drag over various PushBtns
and the Text widget.
#) When you are dragging over PushBtn0 and PushBtn4 or the Text widget,
you will notice that the state icon shows \"VALID ICON\" with black
foreground and yellow background.
#) When you are dragging over PushBtn2 , you will notice that the state
icon shows \"INVALID ICON\" with green foreground and yellow
background.
#) When you are dragging over any other PushBtn or over BulletinBoard
outside of all the PushBtns and the Text widget, you will notice
that the state icon shows \"NONE ICON\" with green foreground and
yellow background.
#) Release BTransfer with the dragIcon on the BulletinBoard. The
dragIcon should zap back to PushBtn1 and disappear.
#) Repeat steps 3 through 8 for different color selections.
C)
!) This tests for CR 5937. PushBtn0-PushBtn3 have increased
in size to ensure that they are contiguous (i.e. no
BulletinBoard space exists between them).
#) Select \"JustSource\" from the \"Blend Model\" menu.
#) Select \"Black\" from the \"Cursor Background\" menu,
\"Red\" from the \"Valid Cursor Foreground\" menu,
\"Green\" from the \"Invalid Cursor Foreground\" menu, and
\"Yellow\" from the \"None Cursor Foreground\" menu.
#) Initiate Drag by pressing BTransfer with the pointer over PushBtn1.
With BTransfer pressed, drag over PushBtn0. The cursor foreground
should change to red.
#) Keeping BTransfer pressed, drag over PushBtn2. The cursor foreground
should change to green.
#) Keeping BTransfer pressed, drag back over PushBtn0. If the cursor does
not change back to red, CR 5937 has not been fixed.
C)
E)