# $XConsortium: StringRend.scr /main/4 1995/07/17 20:47:22 drk $ # @OPENGROUP_COPYRIGHT@ # COPYRIGHT NOTICE # Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc. # Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group # ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for # the full copyright text. # # This software is subject to an open license. It may only be # used on, with or for operating systems which are themselves open # source systems. You must contact The Open Group for a license # allowing distribution and sublicensing of this software on, with, # or for operating systems which are not Open Source programs. # # See http://www.opengroup.org/openmotif/license for full # details of the license agreement. Any use, reproduction, or # distribution of the program constitutes recipient's acceptance of # this agreement. # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS # PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY # WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY # OR FITNESS FOR A PARTICULAR PURPOSE # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT # NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE # EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGES. # # # 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