|
Packit |
b099d7 |
# $XConsortium: StringRend.scr /main/4 1995/07/17 20:47:22 drk $
|
|
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 |
# @) This is the StringRend test used to test the display of
|
|
Packit |
b099d7 |
# rendition components when drawing with XmString functions.
|
|
Packit |
b099d7 |
# Currently a blank drawing area widget should be displayed.
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# @) Eight strings should be displayed.
|
|
Packit |
b099d7 |
# The contents of the strings help to indicate which rendition
|
|
Packit |
b099d7 |
# components are currently active.
|
|
Packit |
b099d7 |
CompareVisual DrawArea
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) The first string which reads \"Begin - Rendition 1\" should
|
|
Packit |
b099d7 |
# be displayed with the following attributes:
|
|
Packit |
b099d7 |
# @) Background: black
|
|
Packit |
b099d7 |
# @) Foreground: white
|
|
Packit |
b099d7 |
# @) Font: 8x13
|
|
Packit |
b099d7 |
# @) Tabs: None
|
|
Packit |
b099d7 |
# @) Underline: No
|
|
Packit |
b099d7 |
# @) Strikethru: No
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) The second string, \"Begin - Rendition 2\", should be displayed
|
|
Packit |
b099d7 |
# with the attributes:
|
|
Packit |
b099d7 |
# @) Background: blue
|
|
Packit |
b099d7 |
# @) Foreground: white
|
|
Packit |
b099d7 |
# @) Font: 8x13
|
|
Packit |
b099d7 |
# @) Tabs: None
|
|
Packit |
b099d7 |
# @) Underline: Yes ( Single Line )
|
|
Packit |
b099d7 |
# @) Strikethru: No
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) The third string, \"Begin - Rendition 3\", should be displayed
|
|
Packit |
b099d7 |
# with the attributes:
|
|
Packit |
b099d7 |
# @) Background: blue
|
|
Packit |
b099d7 |
# @) Foreground: white
|
|
Packit |
b099d7 |
# @) Font: 8x13bold
|
|
Packit |
b099d7 |
# @) Tabs: 1 cm
|
|
Packit |
b099d7 |
# @) Underline: No
|
|
Packit |
b099d7 |
# @) Strikethru: No
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) The fourth string, \"Begin - Rendition 4 - End\", should be displayed
|
|
Packit |
b099d7 |
# with the attributes:
|
|
Packit |
b099d7 |
# @) Background: blue
|
|
Packit |
b099d7 |
# @) Foreground: yellow
|
|
Packit |
b099d7 |
# @) Font: 9x15
|
|
Packit |
b099d7 |
# @) Tabs: 2 cm
|
|
Packit |
b099d7 |
# @) Underline: No
|
|
Packit |
b099d7 |
# @) Strikethru: Yes ( Single Dashed Line )
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) The fifth string, \"Begin - Rendition 5 - End\", has all its resources
|
|
Packit |
b099d7 |
# set to XmAS_IS. Its rendition resources should default to the resource
|
|
Packit |
b099d7 |
# values of a previously active rendition which is Rendition 3. This string
|
|
Packit |
b099d7 |
# should have the same display attributes as the third string.
|
|
Packit |
b099d7 |
# with the attributes:
|
|
Packit |
b099d7 |
# @) Background: blue
|
|
Packit |
b099d7 |
# @) Foreground: white
|
|
Packit |
b099d7 |
# @) Font: 8x13bold
|
|
Packit |
b099d7 |
# @) Tabs: 1 cm
|
|
Packit |
b099d7 |
# @) Underline: No
|
|
Packit |
b099d7 |
# @) Strikethru: No
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) The sixth string, \"End - Rendition 2\", should be displayed with
|
|
Packit |
b099d7 |
# the following attributes:
|
|
Packit |
b099d7 |
# @) Background: black
|
|
Packit |
b099d7 |
# @) Foreground: white
|
|
Packit |
b099d7 |
# @) Font: 8x13bold
|
|
Packit |
b099d7 |
# @) Tabs: 1 cm
|
|
Packit |
b099d7 |
# @) Underline: No
|
|
Packit |
b099d7 |
# @) Strikethru: No
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) The seventh string, \"Rendition 3 - End\", should have the same
|
|
Packit |
b099d7 |
# display attributes as the previous string.
|
|
Packit |
b099d7 |
# @) Background: black
|
|
Packit |
b099d7 |
# @) Foreground: white
|
|
Packit |
b099d7 |
# @) Font: 8x13bold
|
|
Packit |
b099d7 |
# @) Tabs: 1 cm
|
|
Packit |
b099d7 |
# @) Underline: No
|
|
Packit |
b099d7 |
# @) Strikethru: No
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) The eighth string, \"End - Rendition 1\", should be displayed with
|
|
Packit |
b099d7 |
# the following attributes:
|
|
Packit |
b099d7 |
# @) Background: black
|
|
Packit |
b099d7 |
# @) Foreground: white
|
|
Packit |
b099d7 |
# @) Font: 8x13
|
|
Packit |
b099d7 |
# @) Tabs: None
|
|
Packit |
b099d7 |
# @) Underline: No
|
|
Packit |
b099d7 |
# @) Strikethru: No
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# @) A popup window titled \"Renditions\" should be displayed.
|
|
Packit |
b099d7 |
# It contains a list of the current render tags within the render table
|
|
Packit |
b099d7 |
# and three pushbuttons labelled \"Merge\", \"Modify\" and \"Remove\".
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select \"render2\" from the list in the \"Renditions\" window.
|
|
Packit |
b099d7 |
# Select the \"Merge\" pushbutton. A popup window labelled \"Merge Panel\"
|
|
Packit |
b099d7 |
# will be displayed. The \"Merge Panel\" will list the current resource
|
|
Packit |
b099d7 |
# values corresponding to the rendition selected.
|
|
Packit |
b099d7 |
LocatePointer RendList RListItem 1
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
LocatePointer MergePB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select \"NO_LINE\" from the \"UnderlineType\" option menu.
|
|
Packit |
b099d7 |
LocatePointer UnderlineOptions ROptionButton
|
|
Packit |
b099d7 |
PressMB Btn1
|
|
Packit |
b099d7 |
LocatePointer UnderlinePB1
|
|
Packit |
b099d7 |
ReleaseMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# Set the \"Merge Mode\" to \"Replace\". Select the \"Apply\" pushbutton.
|
|
Packit |
b099d7 |
# When \"Apply\" is selected, a new rendition is created using the same
|
|
Packit |
b099d7 |
# render tag as the render tag selected in the \"Renditions\" window.
|
|
Packit |
b099d7 |
# The new rendition is then added to the current render table with
|
|
Packit |
b099d7 |
# the merge mode as XmREPLACE. Verify that there is no longer an underline
|
|
Packit |
b099d7 |
# drawn beneath the second string in the \"Display Strings\" window.
|
|
Packit |
b099d7 |
#LocatePointer MergeOptions ROptionButton
|
|
Packit |
b099d7 |
#PressMB Btn1
|
|
Packit |
b099d7 |
#LocatePointer ReplacePB
|
|
Packit |
b099d7 |
#ReleaseMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer ApplyPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
CompareVisual DrawArea
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.
|
|
Packit |
b099d7 |
LocatePointer QuitPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select \"render4\" from the \"Renditions\" window and then
|
|
Packit |
b099d7 |
# select the \"Merge\" pushbutton. The \"Merge Panel\" will be displayed
|
|
Packit |
b099d7 |
# listing the current rendition resource values for the render tag selected.
|
|
Packit |
b099d7 |
# Select \"AS_IS\" from the \"StrikethruType\" option menu.
|
|
Packit |
b099d7 |
# Select \"Merge New\" from the \"Merge Mode\" option menu.
|
|
Packit |
b099d7 |
# Select the \"Apply\" pushbutton. Any unspecified resource values in the
|
|
Packit |
b099d7 |
# new rendition will be replaced with the values specified in the old
|
|
Packit |
b099d7 |
# rendition. Verify that a single dashed line is still displayed through
|
|
Packit |
b099d7 |
# the fourth string in the \"Display Strings\" window.
|
|
Packit |
b099d7 |
LocatePointer RendList RListItem 3
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
LocatePointer MergePB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer StrikethruOptions ROptionButton
|
|
Packit |
b099d7 |
PressMB Btn1
|
|
Packit |
b099d7 |
LocatePointer StrikethruPB0
|
|
Packit |
b099d7 |
ReleaseMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer MergeOptions ROptionButton
|
|
Packit |
b099d7 |
PressMB Btn1
|
|
Packit |
b099d7 |
LocatePointer MergeNewPB
|
|
Packit |
b099d7 |
ReleaseMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer ApplyPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
CompareVisual DrawArea
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.
|
|
Packit |
b099d7 |
LocatePointer QuitPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select \"render5\" from the \"Renditions\" window and then select
|
|
Packit |
b099d7 |
# the \"Merge\" pushbutton. The \"Merge Panel\" should be displayed.
|
|
Packit |
b099d7 |
# Type \"fixed\" into the \"FontName\" field and select \"FONT_IS_FONT\"
|
|
Packit |
b099d7 |
# from the \"FontType\" option menu. Select \"Merge Old\" from the \"Merge
|
|
Packit |
b099d7 |
# Mode\" option menu and click the \"Apply\" pushbutton.
|
|
Packit |
b099d7 |
# Since the merge mode is XmMERGE_OLD, any unspecified resource values from the
|
|
Packit |
b099d7 |
# old rendition will be overwritten with a specified resource in the new
|
|
Packit |
b099d7 |
# rendition. Verify that the font is changed from 8x13bold to fixed in
|
|
Packit |
b099d7 |
# the fifth string displayed in the \"Display Strings\" window.
|
|
Packit |
b099d7 |
LocatePointer RendList RListItem 4
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
LocatePointer MergePB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer FontNameTF RTextChar Max
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
InputString "fixed"
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer FontTypeOptions ROptionButton
|
|
Packit |
b099d7 |
PressMB Btn1
|
|
Packit |
b099d7 |
LocatePointer FontTypePB1
|
|
Packit |
b099d7 |
ReleaseMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer MergeOptions ROptionButton
|
|
Packit |
b099d7 |
PressMB Btn1
|
|
Packit |
b099d7 |
LocatePointer MergeOldPB
|
|
Packit |
b099d7 |
ReleaseMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer ApplyPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
CompareVisual DrawArea
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.
|
|
Packit |
b099d7 |
LocatePointer QuitPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select \"render4\" from the \"Renditions\" window and then select
|
|
Packit |
b099d7 |
# the \"Merge\" pushbutton. The \"Merge Panel\" should be displayed.
|
|
Packit |
b099d7 |
# Type \"0\" into the \"Foreground\" field and select \"NO_LINE\"
|
|
Packit |
b099d7 |
# from the \"StrikethruType\" option menu. Select \"Skip\" from the \"Merge
|
|
Packit |
b099d7 |
# Mode\" option menu and click the \"Apply\" pushbutton.
|
|
Packit |
b099d7 |
# Since the merge mode is XmSKIP, the new rendition resource values should
|
|
Packit |
b099d7 |
# be ignored. Verify that the foreground color remains yellow and the
|
|
Packit |
b099d7 |
# strikethru line is still a single dashed line in the fourth string
|
|
Packit |
b099d7 |
# displayed in the \"Display Strings\" window.
|
|
Packit |
b099d7 |
LocatePointer RendList RListItem 3
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
LocatePointer MergePB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer ForegroundTF RTextChar Max
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
InputString "0"
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer StrikethruOptions ROptionButton
|
|
Packit |
b099d7 |
PressMB Btn1
|
|
Packit |
b099d7 |
LocatePointer StrikethruPB1
|
|
Packit |
b099d7 |
ReleaseMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer MergeOptions ROptionButton
|
|
Packit |
b099d7 |
PressMB Btn1
|
|
Packit |
b099d7 |
LocatePointer SkipPB
|
|
Packit |
b099d7 |
ReleaseMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer ApplyPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
CompareVisual DrawArea
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer QuitPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select \"render1\" from the \"Renditions\" window and select the
|
|
Packit |
b099d7 |
# \"Modify\" pushbutton. Change the value of the \"fontName\" field
|
|
Packit |
b099d7 |
# to \"9x15\". Change the value of the \"font\" field to \"Null\".
|
|
Packit |
b099d7 |
# Click the \"Apply\" pushbutton. The new fontName and font resource
|
|
Packit |
b099d7 |
# values will be set and the function XmRenditionUpdate() will be called
|
|
Packit |
b099d7 |
# to update the selected rendition. Verify that the font for the first
|
|
Packit |
b099d7 |
# second and eighth strings are changed to 9x15.
|
|
Packit |
b099d7 |
LocatePointer RendList RListItem 0
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
LocatePointer ModifyPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer FontNameTF RTextChar Max
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
InputString "9x15"
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer FontTF RTextChar Max
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
ClickKey KBackSpace
|
|
Packit |
b099d7 |
InputString "Null"
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer ApplyPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
CompareVisual DrawArea
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
LocatePointer QuitPB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# #) Select \"render3\" from the \"Renditions\" window and select the
|
|
Packit |
b099d7 |
# \"Remove\" pushbutton. The rendition, \"render3\", will be removed
|
|
Packit |
b099d7 |
# from the render table and references to rendition components named
|
|
Packit |
b099d7 |
# \"render3\" in the XmString should be ignored.
|
|
Packit |
b099d7 |
# Verify that the third, fifth, sixth and seventh strings are no longer
|
|
Packit |
b099d7 |
# tabbed and the font for the third, sixth and seventh strings
|
|
Packit |
b099d7 |
# is the same as the font displayed in the first string.
|
|
Packit |
b099d7 |
LocatePointer RendList RListItem 2
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
LocatePointer RemovePB
|
|
Packit |
b099d7 |
ClickMB Btn1
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
CompareVisual DrawArea
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# C)
|
|
Packit |
b099d7 |
Continue
|
|
Packit |
b099d7 |
|
|
Packit |
b099d7 |
# E)
|
|
Packit |
b099d7 |
Exit
|