Blame tests/UTM/UTMtransfer.dat

Packit b099d7
/* $TOG: UTMtransfer.dat /main/5 1999/11/18 16:45:12 jff $ */
Packit b099d7
/*
Packit b099d7
 * Motif
Packit b099d7
 *
Packit b099d7
 * Copyright (c) 1987-2012, The Open Group. All rights reserved.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are free software; you can
Packit b099d7
 * redistribute them and/or modify them under the terms of the GNU
Packit b099d7
 * Lesser General Public License as published by the Free Software
Packit b099d7
 * Foundation; either version 2 of the License, or (at your option)
Packit b099d7
 * any later version.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are distributed in the hope that
Packit b099d7
 * they will be useful, but WITHOUT ANY WARRANTY; without even the
Packit b099d7
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit b099d7
 * PURPOSE. See the GNU Lesser General Public License for more
Packit b099d7
 * details.
Packit b099d7
 *
Packit b099d7
 * You should have received a copy of the GNU Lesser General Public
Packit b099d7
 * License along with these librararies and programs; if not, write
Packit b099d7
 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Packit b099d7
 * Floor, Boston, MA 02110-1301 USA
Packit b099d7
 * 
Packit b099d7
 */
Packit b099d7
/*
Packit b099d7
 * HISTORY
Packit b099d7
 */
Packit b099d7
Packit b099d7
#) This is the UTMtransfer test.
Packit b099d7
#) You must see a UTMtransfer window on your screen and a UTMPrim1 window.
Packit b099d7
#) If you don't see an UTMPrim1 window, please run:
Packit b099d7
!)
Packit b099d7
              "UTMPrim1 -u -n&"
Packit b099d7
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) The following panels test the transfer of the primary selection.
Packit b099d7
#) When you select an object with a primary selection, and then transfer it 
Packit b099d7
   (copying it) in an other widget, the following actions should occur:
Packit b099d7
!)
Packit b099d7
          1. The convertCallback of the widget owning the primary 
Packit b099d7
             selection is called multiple times with the selection 
Packit b099d7
             field set to PRIMARY and different conversion target 
Packit b099d7
             that this widget supports as a source of data.
Packit b099d7
Packit b099d7
          2. The destinationCallback of the widget receiving 
Packit b099d7
             the transfer is called with the selection field 
Packit b099d7
             set to PRIMARY and the operation field set to XmCOPY.
Packit b099d7
Packit b099d7
#) In our test, the destination widget is the drawing area (red square) in the 
Packit b099d7
   UTMtransfer window.
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Select the "Amazing" word in the TextField widget of the UTMPrim1 window.
Packit b099d7
#) Pulldown the "Edit" menu of the UTMtransfer window and select 
Packit b099d7
   "Paste (copy)".
Packit b099d7
#) The list of targets supported by the TextField widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
!)
Packit b099d7
          TIMESTAMP
Packit b099d7
          FOREGROUND
Packit b099d7
          BACKGROUND
Packit b099d7
          COLORMAP
Packit b099d7
          CLASS
Packit b099d7
          NAME
Packit b099d7
          CLIENT_WINDOW
Packit b099d7
          _MOTIF_RENDER_TABLE
Packit b099d7
          _MOTIF_ENCODING_REGISTRY
Packit b099d7
          COMPOUND_TEXT
Packit b099d7
          TEXT
Packit b099d7
          STRING
Packit b099d7
Packit b099d7
#) You should see in your term window the calls to the TextField 
Packit b099d7
   convertCallback, and the call to the drawing area destinationCallback.
Packit b099d7
#) You can play in the UTMtransfer window, by selecting a target type in the 
Packit b099d7
   list. When selected, the "Target" name, "Target Value" and target "Type" 
Packit b099d7
   are updated in the "Target Values" panel.
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Select the "scream" word in the Text widget of the UTMPrim1 window.
Packit b099d7
#) As the primary selection change, you will notice in your term window, 
Packit b099d7
   2 TextField widget convertCallback calls, because this widget just lost
Packit b099d7
   the focus and the primary selection:
Packit b099d7
!)
Packit b099d7
          XmNconvertCallback called for TextField widget.
Packit b099d7
                  selection         = _MOTIF_DESTINATION
Packit b099d7
                  conversion target = _MOTIF_LOSE_SELECTION
Packit b099d7
Packit b099d7
          XmNconvertCallback called for TextField widget.
Packit b099d7
                  selection         = PRIMARY
Packit b099d7
                  conversion target = _MOTIF_LOSE_SELECTION
Packit b099d7
Packit b099d7
#) Pulldown the "Edit" menu of the UTMtransfer window and select 
Packit b099d7
   "Paste (copy)".
Packit b099d7
#) The list of targets supported by the Text widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
!)
Packit b099d7
          TIMESTAMP
Packit b099d7
          FOREGROUND
Packit b099d7
          BACKGROUND
Packit b099d7
          COLORMAP
Packit b099d7
          CLASS
Packit b099d7
          NAME
Packit b099d7
          CLIENT_WINDOW
Packit b099d7
          _MOTIF_RENDER_TABLE
Packit b099d7
          _MOTIF_ENCODING_REGISTRY
Packit b099d7
          COMPOUND_TEXT
Packit b099d7
          TEXT
Packit b099d7
          STRING
Packit b099d7
Packit b099d7
#) You should see in your term window the calls to the Text
Packit b099d7
   convertCallback, and the call to the drawing area destinationCallback.
Packit b099d7
#) You can play in the UTMtransfer window, by selecting a target type in the 
Packit b099d7
   list. When selected, the "Target" name, "Target Value" and target "Type" 
Packit b099d7
   are updated in the "Target Values" panel.
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) The following panels test the transfer (move) of the primary selection.
Packit b099d7
#) When you select an object with a primary selection, and then transfer it 
Packit b099d7
   (moving it) to an other widget, the following actions should occur:
Packit b099d7
!)
Packit b099d7
          1. The convertCallback of the widget owning the primary 
Packit b099d7
             selection is called multiple times with the 
Packit b099d7
             selection field set to PRIMARY and different 
Packit b099d7
             conversion target that this widget supports as 
Packit b099d7
             a source of data.
Packit b099d7
Packit b099d7
          2. The destinationCallback of the widget receiving 
Packit b099d7
             the transfer is called with the selection field 
Packit b099d7
             set to PRIMARY and the operation field set to XmMOVE.
Packit b099d7
Packit b099d7
          3. When the transfer is completed, a delete request 
Packit b099d7
             is sent to the owner of the primary selection. 
Packit b099d7
             That is the convertCallback is called with the 
Packit b099d7
             selection field set to PRIMARY and the conversion 
Packit b099d7
             target set to DELETE.
Packit b099d7
Packit b099d7
#) In our test, the destination widget is the drawing area (red square) in the 
Packit b099d7
   UTMtransfer window.
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Select the "Amazing" word in the TextField widget of the UTMPrim1 window.
Packit b099d7
#) Pulldown the "Edit" menu of the UTMtransfer window and select 
Packit b099d7
   "Paste (move)".
Packit b099d7
#) The list of targets supported by the TextField widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
#) You should see in your term window the calls to the TextField 
Packit b099d7
   convertCallback, the call to the drawing area destinationCallback, and 
Packit b099d7
   the call to the TextField convertCallback with the DELETE conversion
Packit b099d7
   target.
Packit b099d7
#) Notice that the "Amazing" word has been cut from the TextField widget.
Packit b099d7
#) You can play in the UTMtransfer window, by selecting a target type in the 
Packit b099d7
   list. When selected, the "Target" name, "Target Value" and target "Type" 
Packit b099d7
   are updated in the "Target Values" panel.
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Select the "scream" word in the Text widget of the UTMPrim1 window.
Packit b099d7
#) Pulldown the "Edit" menu of the UTMtransfer window and select 
Packit b099d7
   "Paste (move)".
Packit b099d7
#) The list of targets supported by the Text widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
#) You should see in your term window the calls to the Text
Packit b099d7
   convertCallback, the call to the drawing area destinationCallback, and 
Packit b099d7
   the call to the Text convertCallback with the DELETE conversion
Packit b099d7
   target.
Packit b099d7
#) Notice that the "scream" word has been cut from the TextField widget.
Packit b099d7
#) You can play in the UTMtransfer window, by selecting a target type in the 
Packit b099d7
   list. When selected, the "Target" name, "Target Value" and target "Type" 
Packit b099d7
   are updated in the "Target Values" panel.
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Select the "Flavors" word in the TextField widget of the UTMPrim1 window.
Packit b099d7
#) Press Btn2 and start dragging. Drop it in the drawing area of the
Packit b099d7
   UTMtransfer window.
Packit b099d7
#) The list of targets supported by the TextField widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
#) You should see in your term window the calls to the TextField 
Packit b099d7
   convertCallback with _MOTIF_EXPORT_TARGETS, then the individual conversion
Packit b099d7
   target calls, and the drawing area destinationCallback, with the
Packit b099d7
   following parameters:
Packit b099d7
!)
Packit b099d7
          selection = _MOTIF_DROP
Packit b099d7
          operation = XmMOVE
Packit b099d7
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Select the "ice" word in the Text widget of the UTMPrim1 window.
Packit b099d7
#) Press Btn2 and start dragging. Drop it in the drawing area of the
Packit b099d7
   UTMtransfer window.
Packit b099d7
#) The list of targets supported by the Text widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
#) You should see in your term window the calls to the Text
Packit b099d7
   convertCallback with _MOTIF_EXPORT_TARGETS, then the individual conversion
Packit b099d7
   target calls, and the drawing area destinationCallback, with the
Packit b099d7
   following parameters:
Packit b099d7
!)
Packit b099d7
          selection = _MOTIF_DROP
Packit b099d7
          operation = XmMOVE
Packit b099d7
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Select the "Maple Walnut" item in the List widget of the UTMPrim1 window.
Packit b099d7
#) Press Btn2 and start dragging. Drop it in the drawing area of the
Packit b099d7
   UTMtransfer window.
Packit b099d7
#) The list of targets supported by the List widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
!)
Packit b099d7
          TIMESTAMP
Packit b099d7
          FOREGROUND
Packit b099d7
          BACKGROUND
Packit b099d7
          COLORMAP
Packit b099d7
          CLASS
Packit b099d7
          NAME
Packit b099d7
          CLIENT_WINDOW
Packit b099d7
          _MOTIF_RENDER_TABLE
Packit b099d7
          _MOTIF_ENCODING_REGISTRY
Packit b099d7
          _MOTIF_COMPOUND_STRING
Packit b099d7
          COMPOUND_TEXT
Packit b099d7
          TEXT
Packit b099d7
          STRING
Packit b099d7
Packit b099d7
#) You should see in your term window the calls to the List
Packit b099d7
   convertCallback with _MOTIF_EXPORT_TARGETS, then the individual conversion
Packit b099d7
   target calls, and the drawing area destinationCallback, with the
Packit b099d7
   following parameters:
Packit b099d7
!)
Packit b099d7
          selection = _MOTIF_DROP
Packit b099d7
          operation = XmCOPY
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Press Btn2 on the PushButton widget and start dragging. 
Packit b099d7
   Drop it in the drawing area of the UTMtransfer window.
Packit b099d7
#) The list of targets supported by the PushButton widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
!)
Packit b099d7
          TIMESTAMP
Packit b099d7
          FOREGROUND
Packit b099d7
          BACKGROUND
Packit b099d7
          COLORMAP
Packit b099d7
          CLASS
Packit b099d7
          NAME
Packit b099d7
          CLIENT_WINDOW
Packit b099d7
          _MOTIF_RENDER_TABLE
Packit b099d7
          _MOTIF_ENCODING_REGISTRY
Packit b099d7
          _MOTIF_COMPOUND_STRING
Packit b099d7
          COMPOUND_TEXT
Packit b099d7
          TEXT
Packit b099d7
          STRING
Packit b099d7
Packit b099d7
#) You should see in your term window the calls to the PushButton
Packit b099d7
   convertCallback with _MOTIF_EXPORT_TARGETS, then the individual conversion
Packit b099d7
   target calls, and the drawing area destinationCallback, with the
Packit b099d7
   following parameters:
Packit b099d7
!)
Packit b099d7
          selection = _MOTIF_DROP
Packit b099d7
          operation = XmCOPY
Packit b099d7
Packit b099d7
#) You should obtain the same result with the ToggleButton and the Label.
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Press Btn2 on the label value of the Scale widget and start dragging. 
Packit b099d7
   Drop it in the drawing area of the UTMtransfer window.
Packit b099d7
#) The list of targets supported by the Scale widget appears in the list
Packit b099d7
   of the UTMtransfer window.
Packit b099d7
!)
Packit b099d7
          TIMESTAMP
Packit b099d7
          FOREGROUND
Packit b099d7
          BACKGROUND
Packit b099d7
          COLORMAP
Packit b099d7
          CLASS
Packit b099d7
          NAME
Packit b099d7
          CLIENT_WINDOW
Packit b099d7
          _MOTIF_RENDER_TABLE
Packit b099d7
          _MOTIF_ENCODING_REGISTRY
Packit b099d7
          COMPOUND_TEXT
Packit b099d7
          STRING
Packit b099d7
Packit b099d7
#) You should see in your term window the calls to the Scale
Packit b099d7
   convertCallback with _MOTIF_EXPORT_TARGETS, then the individual conversion
Packit b099d7
   target calls, and the drawing area destinationCallback, with the
Packit b099d7
   following parameters:
Packit b099d7
!)
Packit b099d7
          selection = _MOTIF_DROP
Packit b099d7
          operation = XmCOPY
Packit b099d7
C)
Packit b099d7
Packit b099d7
#) Before exiting press the QuitButton in UTMPrim1.
Packit b099d7
E)
Packit b099d7