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