Blob Blame History Raw
# $XConsortium: StringRend.scr /main/4 1995/07/17 20:47:22 drk $
# 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

# @)  This is the StringRend test used to test the display of
# rendition components when drawing with XmString functions. 
# Currently a blank drawing area widget should be displayed.

# C) 
Continue

# @) Eight strings should be displayed.  
# The contents of the strings help to indicate which rendition 
# components are currently active. 
CompareVisual DrawArea

# #)  The first string which reads \"Begin - Rendition 1\" should
# be displayed with the following attributes:
# @)  Background:  black
# @)  Foreground:  white
# @)  Font:        8x13
# @)  Tabs:        None
# @)  Underline:   No
# @)  Strikethru:  No

# #)  The second string, \"Begin - Rendition 2\", should be displayed
# with the attributes:
# @)  Background:  blue
# @)  Foreground:  white
# @)  Font:        8x13
# @)  Tabs:        None
# @)  Underline:   Yes ( Single Line )
# @)  Strikethru:  No

# C)
Continue

# #)  The third string, \"Begin - Rendition 3\", should be displayed 
# with the attributes:
# @)  Background:  blue
# @)  Foreground:  white
# @)  Font:        8x13bold
# @)  Tabs:        1 cm 
# @)  Underline:   No
# @)  Strikethru:  No


# #)  The fourth string, \"Begin - Rendition 4 - End\", should be displayed
# with the attributes:
# @)  Background:  blue
# @)  Foreground:  yellow
# @)  Font:        9x15
# @)  Tabs:        2 cm 
# @)  Underline:   No
# @)  Strikethru:  Yes ( Single Dashed Line )

# C)
Continue

# #)  The fifth string, \"Begin - Rendition 5 - End\", has all its resources
# set to XmAS_IS. Its rendition resources should default to the resource
# values of a previously active rendition which is Rendition 3. This string
# should have the same display attributes as the third string.
# with the attributes: 
# @)  Background:  blue
# @)  Foreground:  white
# @)  Font:        8x13bold
# @)  Tabs:        1 cm 
# @)  Underline:   No
# @)  Strikethru:  No

# #)  The sixth string, \"End - Rendition 2\", should be displayed with 
# the following attributes: 
# @)  Background:  black
# @)  Foreground:  white
# @)  Font:        8x13bold
# @)  Tabs:        1 cm 
# @)  Underline:   No
# @)  Strikethru:  No

# C)
Continue

# #)  The seventh string, \"Rendition 3 - End\", should have the same
# display attributes as the previous string.
# @)  Background:  black
# @)  Foreground:  white
# @)  Font:        8x13bold
# @)  Tabs:        1 cm 
# @)  Underline:   No
# @)  Strikethru:  No

# #)  The eighth string, \"End - Rendition 1\", should be displayed with
# the following attributes: 
# @)  Background:  black
# @)  Foreground:  white
# @)  Font:        8x13
# @)  Tabs:        None
# @)  Underline:   No
# @)  Strikethru:  No

# C)
Continue

# @)  A popup window titled \"Renditions\" should be displayed.
# It contains a list of the current render tags within the render table
# and three pushbuttons labelled \"Merge\", \"Modify\" and \"Remove\".

# #)  Select \"render2\" from the list in the \"Renditions\" window.
# Select the \"Merge\" pushbutton. A popup window labelled \"Merge Panel\"
# will be displayed.  The \"Merge Panel\" will list the current resource
# values corresponding to the rendition selected.    
LocatePointer RendList RListItem 1
ClickMB Btn1
LocatePointer MergePB
ClickMB Btn1

# #)  Select \"NO_LINE\" from the \"UnderlineType\" option menu.
LocatePointer UnderlineOptions ROptionButton
PressMB Btn1
LocatePointer UnderlinePB1
ReleaseMB Btn1

# Set the \"Merge Mode\" to \"Replace\". Select the \"Apply\" pushbutton. 
# When \"Apply\" is selected, a new rendition is created using the same
# render tag as the render tag selected in the \"Renditions\" window.
# The new rendition is then added to the current render table with
# the merge mode as XmREPLACE. Verify that there is no longer an underline
# drawn beneath the second string in the \"Display Strings\" window. 
#LocatePointer MergeOptions ROptionButton
#PressMB Btn1
#LocatePointer ReplacePB
#ReleaseMB Btn1

LocatePointer ApplyPB
ClickMB Btn1

CompareVisual DrawArea

# #) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.
LocatePointer QuitPB
ClickMB Btn1

# C)
Continue

# #)  Select \"render4\" from the \"Renditions\" window and then 
# select the \"Merge\" pushbutton. The \"Merge Panel\" will be displayed
# listing the current rendition resource values for the render tag selected. 
# Select \"AS_IS\" from the \"StrikethruType\" option menu.
# Select \"Merge New\" from the \"Merge Mode\" option menu.
# Select the \"Apply\" pushbutton. Any unspecified resource values in the 
# new rendition will be replaced with the values specified in the old
# rendition. Verify that a single dashed line is still displayed through
# the fourth string in the \"Display Strings\" window. 
LocatePointer RendList RListItem 3
ClickMB Btn1
LocatePointer MergePB
ClickMB Btn1

LocatePointer StrikethruOptions ROptionButton
PressMB Btn1
LocatePointer StrikethruPB0
ReleaseMB Btn1

LocatePointer MergeOptions ROptionButton
PressMB Btn1
LocatePointer MergeNewPB
ReleaseMB Btn1

LocatePointer ApplyPB
ClickMB Btn1

CompareVisual DrawArea

# #) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.
LocatePointer QuitPB
ClickMB Btn1

# C)
Continue

# #) Select \"render5\" from the \"Renditions\" window and then select
# the \"Merge\" pushbutton.  The \"Merge Panel\" should be displayed.
# Type \"fixed\" into the \"FontName\" field and select \"FONT_IS_FONT\"
# from the \"FontType\" option menu.  Select \"Merge Old\" from the \"Merge
# Mode\" option menu and click the \"Apply\" pushbutton.
# Since the merge mode is XmMERGE_OLD, any unspecified resource values from the
# old rendition will be overwritten with a specified resource in the new
# rendition.  Verify that the font is changed from 8x13bold to fixed in
# the fifth string displayed in the \"Display Strings\" window. 
LocatePointer RendList RListItem 4
ClickMB Btn1
LocatePointer MergePB
ClickMB Btn1

LocatePointer FontNameTF RTextChar Max 
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
InputString "fixed"

LocatePointer FontTypeOptions ROptionButton
PressMB Btn1
LocatePointer FontTypePB1
ReleaseMB Btn1

LocatePointer MergeOptions ROptionButton
PressMB Btn1
LocatePointer MergeOldPB
ReleaseMB Btn1

LocatePointer ApplyPB
ClickMB Btn1

CompareVisual DrawArea

# #) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.
LocatePointer QuitPB
ClickMB Btn1

# C)
Continue

# #) Select \"render4\" from the \"Renditions\" window and then select
# the \"Merge\" pushbutton.  The \"Merge Panel\" should be displayed.
# Type \"0\" into the \"Foreground\" field and select \"NO_LINE\"
# from the \"StrikethruType\" option menu.  Select \"Skip\" from the \"Merge
# Mode\" option menu and click the \"Apply\" pushbutton.
# Since the merge mode is XmSKIP, the new rendition resource values should
# be ignored.  Verify that the foreground color remains yellow and the
# strikethru line is still a single dashed line in the fourth string
# displayed in the \"Display Strings\" window. 
LocatePointer RendList RListItem 3
ClickMB Btn1
LocatePointer MergePB
ClickMB Btn1

LocatePointer ForegroundTF RTextChar Max
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
InputString "0"

LocatePointer StrikethruOptions ROptionButton
PressMB Btn1
LocatePointer StrikethruPB1
ReleaseMB Btn1

LocatePointer MergeOptions ROptionButton
PressMB Btn1
LocatePointer SkipPB
ReleaseMB Btn1

LocatePointer ApplyPB
ClickMB Btn1

CompareVisual DrawArea

LocatePointer QuitPB
ClickMB Btn1

# C)
Continue

# #) Select \"render1\" from the \"Renditions\" window and select the
# \"Modify\" pushbutton. Change the value of the \"fontName\" field
# to \"9x15\".  Change the value of the \"font\" field to \"Null\".
# Click the \"Apply\" pushbutton.  The new fontName and font resource
# values will be set and the function XmRenditionUpdate() will be called
# to update the selected rendition.  Verify that the font for the first
# second and eighth strings are changed to 9x15.
LocatePointer RendList RListItem 0
ClickMB Btn1
LocatePointer ModifyPB
ClickMB Btn1

LocatePointer FontNameTF RTextChar Max
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
InputString "9x15"

LocatePointer FontTF RTextChar Max
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
InputString "Null"

LocatePointer ApplyPB
ClickMB Btn1

CompareVisual DrawArea

LocatePointer QuitPB
ClickMB Btn1

# C)
Continue

# #) Select \"render3\" from the \"Renditions\" window and select the
# \"Remove\" pushbutton. The rendition, \"render3\", will be removed
# from the render table and references to rendition components named
# \"render3\" in the XmString should be ignored.
# Verify that the third, fifth, sixth and seventh strings are no longer
# tabbed and the font for the third, sixth and seventh strings
# is the same as the font displayed in the first string.
LocatePointer RendList RListItem 2
ClickMB Btn1
LocatePointer RemovePB
ClickMB Btn1

CompareVisual DrawArea
 
# C)
Continue

# E)
Exit