Blob Blame History Raw
/* $XConsortium: StringRend.dat /main/4 1995/07/17 10:25:25 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) 

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

#)  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)

#)  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)

#)  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)

#)  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)

@)  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.    

#)  Select \"NO_LINE" from the \"UnderlineType\" option menu.
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. 

#) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.

C)

#)  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. 

#) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.

C)

#) 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. 

#) Select the \"Quit\" pushbutton to popdown the \"Merge Panel\" window.

C)

#) 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. 

C)

#) 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.

C)

#) 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.
 
C)
E)