/*
* 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[] = "$XConsortium: DNDIcon2.dat /main/6 1995/07/14 11:53:28 drk $"
*/
#) This is the DNDIcon2 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 twelve optionMenus
for modifying respectively, animationStyle, dropActivity,
dropSiteOperations, dragOperations, blendModel,
opIcon attachment, stateIcon attachment, cursorForeground,
cursorBackground, operationCursorIcon, stateCursorIcon,
and sourceCursorIcon. 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 \"OpIcon Attchment\" and the \"StateIcon Attachment\" optionMenus
should show the options, \"NorthWest\", \"North\", \"NorthEast\",
\"East\", \"SouthEast\", \"South\", \"SouthWest\", \"West\" and
\"Center\". \"SouthEast\" is the selected item at startup for the
menu \"OpIcon Attchment\", and \"NorthEast\" is the selected item at
startup for the menu \"StateIcon Attachment\".
#) The \"Cursor Foreground\", \"Cursor Background\", optionMenus
should show the options, \"Red\", \"Black\", \"Yellow\", \"Green\",
and \"White\". \"Cursor Background\" has \"White\" as the
selected item at startup and \"Cursor Foreground\" has \"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 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 change. 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 pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) 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 tet widget, you
should see that the borders of these widgets get highlighted.
#) Release BTransfer with pointer over PushBtn3.
#) Select \"All\" from the \"Blend Model\" menu.
C)
#) 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.
#) Repeat step 1 with different color selections.
#) Select "Red" from the \"Cursor ForeGround\" menu and "White"
from the \"Cursor Background\" menu.
C)
#) Select \"SouthEast\" from the \"OpIcon Attchment\" menu and
\"NorthEast\" from the \"StateIcon Attachment\" menu.
#) 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 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 bottom right square is the operationCursorIcon and top right
square is the stateCursorIcon. The top left square is the
sourceCursorIcon.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"NorthWest\" from the \"OpIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) A dragIcon should appear consisting of two squares. The topleft
square should show \"COPY ICON\" and the top right square
should show \"NONE ICON\". \"SRC ICON\" should not be visible
since \"COPY ICON\" completely covers it.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) Select \"North\" from the \"OpIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) Now the dragIcon should consist of a rectangle showing part of
\"SRC ICON\" on the left, complete \"COPY ICON\" in the
middle, and part of \"NONE ICON\" on the right.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"East\" from the \"OpIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) Now the dragIcon should consist of a top left square showing
\"SRC ICON\", a bottom right square showing \"COPY ICON\" and
with its top left corner attached to the right mid-point of
the \"SRC ICON\" square, and a partially visible top right
square showing just \"NONE\" part of the \"NONE ICON\".
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) Select \"NorthEast\" from the \"OpIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) A dragIcon should appear consisting of two squares. The topleft
square should show \"SRC ICON\" and the top right square
should show \"COPY ICON\". \"NONE ICON\" should not be visible
since \"COPY ICON\" completely covers it.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"South\" from the \"OpIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) A dragIcon should appear consisting of three squares. The topleft
square should show \"SRC ICON\" and the top right square
should show \"NONE ICON\". There should be a bottom square
showing \"COPY ICON\" with its topleft corner attached to the
bottom mid-point of the \"SRC ICON\" square and its topright
corner attached to the \"NONE ICON\" square.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) Select \"SouthWest\" from the \"OpIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) A dragIcon should appear consisting of three squares. The topleft
square should show \"SRC ICON\". The top right square should
show \"NONE ICON\". And the bottom left square ahould show
\"COPY ICON\". All three should be completely visible.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"West\" from the \"OpIcon Attchment\" menu.
#) Now the dragIcon should consist of a partially visible top left
square showing just the \"SRC\" part of the \"SRC ICON\", a
bottom left square showing \"COPY ICON\" and with its top left
corner attached to the left mid-point of the \"SRC ICON\"
square, and a top right square showing \"NONE ICON\".
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) Select \"Center\" from the \"OpIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) Now the dragIcon should consist of a partially visible top left
square showing part of the \"SRC ICON\", a partially visible
top right square showing part of the \"NONE ICON\", and a
commpletely visible center square showing \"COPY ICON\" with
its topleft corner attached to the center of the \"SRC ICON\"
square.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"SouthEast\" from the \"OpIcon Attchment\" menu.
C)
#) Select \"SouthEast\" from the \"StateIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) A dragIcon should appear consisting of two squares. The topleft
square should show \"SRC ICON\". The bottom right square
should show \"COPY ICON\". The \"NONE ICON\" should not be
visible since it is completely covered by the \"COPY ICON\".
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"NorthWest\" from the \"StateIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) A dragIcon should appear consisting of two squares. The topleft
square should show \"NONE ICON\" and the bottom right square
should show \"COPY ICON\". \"SRC ICON\" should not be visible
since \"NONE ICON\" completely covers it.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) Select \"North\" from the \"StateIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) Now the dragIcon should consist of a rectangle showing part of
\"SRC ICON\" on the left and a complete square showing \"NONE ICON\"
with its topleft corner attached to the top mid-point of the
\"SRC ICON\" square, and a bottom right square showing \"COPY ICON\".
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"East\" from the \"StateIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) Now the dragIcon should consist of a top left square showing
\"SRC ICON\", a bottom right square showing \"COPY ICON\"
and a partially visible right square showing just \"NONE\" part
of the \"NONE ICON\", with its topleft corner attached to the
right mid-point of the \"SRC ICON\" square.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) Select \"NorthEast\" from the \"StateIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) A dragIcon should appear consisting of three squares. The topleft
square should show \"SRC ICON\". The top right square should show
\"NONE ICON\". And the bottom right square ahould show
\"COPY ICON\". All three should be completely visible.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"South\" from the \"StateIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) Now, the dragIcon should consist of a top left square ahowing
\"SRC ICON\", a bottom rectangle showing part of the
\"NONE ICON\" with its topleft corner attached to the bottom
mid-point of the \"SRC ICON\" square, and a bottom right square
showing \"COPY ICON\".
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) Select \"SouthWest\" from the \"StateIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) A dragIcon should appear consisting of three squares. The topleft
square should show \"SRC ICON\". The bottom left square should
show \"NONE ICON\". And the bottom right square ahould show
\"COPY ICON\". All three should be completely visible.
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"West\" from the \"StateIcon Attchment\" menu.
#) Now the dragIcon should consist of a partially visible top left
square showing just the \"SRC\" part of the \"SRC ICON\", a
bottom left square showing \"NONE ICON\" with its top left
corner attached to the left mid-point of the \"SRC ICON\"
square, and a bottom right square showing \"COPY ICON\".
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
C)
#) Select \"Center\" from the \"StateIcon Attchment\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) Now the dragIcon should consist of a partially visible top left
square showing part of the \"SRC ICON\", a partially visible
center square showing part of the \"NONE ICON\" with its topleft
corner attached to the center of the \"SRC ICON\" square, and a
commpletely visible bottom right square showing \"COPY ICON\".
#) Release BTransfer with pointer over PushBtn3. The dragIcon should
zap back to PushBtn1 and disappear.
#) Select \"NorthEast\" from the \"StateIcon Attchment\" menu.
C)
#) Now, let us try to replace default icons with custom icons.
#) Select \"OpIcon1\" from the \"Op Icon\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) You should see that the bottom right square now shows \"OPICON1\"
instead of \"COPY ICON\".
#) Repeat steps 2 and 3 replacing \"OpIcon1\" with \"OpIcon2\".
#) You should see that the bottom right square now shows \"OPICON2\".
#) Repeat steps 2 and 3 replacing \"OpIcon2\" with \"OpIcon3\".
#) You should see that the bottom right square now shows \"OPICON3\".
C)
#) Select \"StateIcon1\" from the \"State Icon\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) You should see that the top right square now shows \"STICON1\"
instead of \"NONE ICON\".
#) Repeat steps 2 and 3 replacing \"StateIcon1\" with \"StateIcon2\".
#) You should see that the top right square now shows \"STICON2\".
#) Repeat steps 2 and 3 replacing \"StateIcon2\" with \"StateIcon3\".
#) You should see that the top right square now shows \"STICON3\".
C)
#) Select \"SrcIcon1\" from the \"Src Icon\" menu.
#) Initiate Drag by pressing BTransfer (MB2 by default) with the
pointer positioned on PushBtn1.
#) You should see that the top left square now shows \"SRICON1\"
instead of \"SRC ICON\".
#) Repeat steps 2 and 3 replacing \"SrcIcon1\" with \"SrcIcon2\".
#) You should see that the top left square now shows \"SRICON2\".
#) Repeat steps 2 and 3 replacing \"SrcIcon2\" with \"SrcIcon3\".
#) You should see that the top left square now shows \"SRICON3\".
C)
E)