Blame tests/Toolkit/Text/TextWcs1.dat

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
 * HISTORY
Packit b099d7
*/ 
Packit b099d7
/*
Packit b099d7
static char rcsid[] = "$XConsortium: TextWcs1.dat /main/6 1995/07/13 19:37:43 drk $"
Packit b099d7
*/
Packit b099d7
@) A client with a list of functions, a control panel and a Text widget to 
Packit b099d7
be acted upon should appear.
Packit b099d7
@) The Action Text widget should initially contain the string 
Packit b099d7
"This is the starting string".
Packit b099d7
#) Drag MB1 in the Action Text widget to make a small selection.
Packit b099d7
#) Select the XmTextGetSelectionWcs() function, and click Call Function.
Packit b099d7
The selected string from Action Text should appear
Packit b099d7
in the status widget.
Packit b099d7
C)
Packit b099d7
#) Click the Clear Args PushButton to reset the control panel.
Packit b099d7
#) Select the XmTextInsertWcs() function.  Set the Num Arg 1 Scale to 3.
Packit b099d7
#) Click in the Status/Input widget and type in a new string like "NEW".
Packit b099d7
#) Click the Call Function PushButton.  The string in the Status/Input
Packit b099d7
widget should get inserted after the third character in the Action Text 
Packit b099d7
widget.
Packit b099d7
C)
Packit b099d7
#) Select and call the XmTextGetStringWcs() function.  The entire string from
Packit b099d7
the Action Text widget should appear in the Status/Input widget.  Note that
Packit b099d7
the string may be wider than the Status widget width.  Use the arrow
Packit b099d7
keys to move to the hidden text.
Packit b099d7
#) Click the Clear Args PushButton to reset the control panel.
Packit b099d7
#) Select the XmTextSetStringWcs() function.  
Packit b099d7
#) Click in the Status/Input widget and type "Here is a new string". 
Packit b099d7
#) Click the Call Function PushButton.  The new text from the Status
Packit b099d7
widget should replace all the text that was previously in the Action
Packit b099d7
Text widget.
Packit b099d7
#) Click the Clear Args PushButton.
Packit b099d7
#) Select the XmTextReplaceWcs() function.  Set the Num Arg 1 Scale to 2
Packit b099d7
and the Num Arg 2 Scale to 7.
Packit b099d7
#) Click in the Status/Input widget and type "y wheres".
Packit b099d7
#) Click the Call Function PushButton.  The Action Text widget should
Packit b099d7
now read "Hey wheres a new string".
Packit b099d7
C)
Packit b099d7
#) Click the Clear Args PushButton.
Packit b099d7
#) Select the XmTextFindStringWcs() function.
Packit b099d7
#) Click in the Status/Input widget and type "new".
Packit b099d7
#) Click the Call Function PushButton.  The Status/Input widget should
Packit b099d7
indicate the string was found.  The Action Text widget should have the
Packit b099d7
search string selected.
Packit b099d7
#) Click the Clear Args PushButton.
Packit b099d7
#) Select the XmTextFindStringWcs() function.
Packit b099d7
#) Click in the Status/Input widget and type "old", and click Call Function.
Packit b099d7
#) The Status/Input widget should indicate that the string was not found.
Packit b099d7
#) Click the Clear Args PushButton.
Packit b099d7
#) Select the XmTextFindStringWcs() function.
Packit b099d7
#) Set Num Arg 1 to 28.  Toggle the Forward/Backward Arg to Backward.
Packit b099d7
#) Click in the Status widget and type "ey", and click Call Function.
Packit b099d7
#) The Status widget should indicate the string was found and the Action
Packit b099d7
Text should have the search string selected.
Packit b099d7
C)
Packit b099d7
#) Click the Clear Args PushButton.
Packit b099d7
#) Select the XmTextGetSubstringWcs() function.
Packit b099d7
#) Set the Num Arg 1 Scale to 5, the Num Arg 2 Scale to 4, and
Packit b099d7
the Num Arg 3 Scale to 5.
Packit b099d7
#) Click the Call Function PushButton.  The Status/Input widget should
Packit b099d7
contain the substring "here".
Packit b099d7
#) Set the Num Arg 1 Scale to 20, the Num Arg 2 Scale to 4, and
Packit b099d7
the Num Arg 3 Scale to 5.
Packit b099d7
#) Click the Call Function PushButton.  The Status/Input widget should
Packit b099d7
contain the substring "(XmCOPY_TRUNCATED) ing".
Packit b099d7
#) Set the Num Arg 1 Scale to 5, the Num Arg 2 Scale to 4, and
Packit b099d7
the Num Arg 3 Scale to 3.
Packit b099d7
#) Click the Call Function PushButton.  The Status/Input widget should
Packit b099d7
contain the substring "Return: XmCOPY_FAILED".
Packit b099d7
E)