english
version "1.0"
identify "wxyz"

# Copyright (c) 1998, 1999 by Wayne C. Gramlich.
# All rights reserved.
#
# Permission to use, copy, modify, distribute, and sell this software
# for any purpose is hereby granted without fee provided that the above
# copyright notice and this permission are retained.  The author makes
# no representations about the suitability of this software for any purpose.
# It is provided "as is" without express or implied warranty.

module swit_text

#: This module supports text strings in a SWIT canvas.


#: {item_text} procedures:

procedure clone@item_text
    takes
	master_text item_text
	clone_parent item_group
	uid unsigned
    returns item_text

    #: This procedure will create and return a clone of {master_text}
    #, as a parent of {clone_parent} and with a unique identifier of {uid}.


procedure create@item_text
    takes
	parent item_group
	uid unsigned
	x integer
	y integer
	value string
    returns item_text

    #: This procedure will create and return a {clone_text} object
    #, in {parent} with a position of ({x}, {y}) and a string value
    #, of {value} a unique identifier of {uid}.  This procedure is for
    #, internal use only.  Use {text_create}@{item_group} to create a
    #, text item.


procedure delete@item_text
    takes
	text item_text
    returns_nothing

    #: This procedure will delete {text}.


procedure fill_color_get@item_text
    takes
	text item_text
    returns color

    #: This procedure will return the fill color for {text}.


procedure fill_color_set@item_text
    takes
	text item_text
	fill_color color
    returns_nothing

    #: This procedure will set the fill color for {text} to {fill_color}.


procedure increment@item_text
    takes
	text item_text
    returns_nothing

    #: Increment the modification count for {text}.


procedure level_get@item_text
    takes
	text item_text
    returns unsigned

    #: Returns the relative level of {text} in its {item_group}.


procedure level_set@item_text
    takes
	text item_text
	new_level unsigned
    returns_nothing

    #: This procedure will set the level of {text} to {new_level}.


procedure tag_append@item_text
    takes
	text item_text
	tag string
    returns_nothing

    #: This procedure will append {tag} to the tag list in {text}.


procedure tags_get@item_text
    takes
	text item_text
    returns vector[string]

    #: This procedure will return the tags for {text}.


procedure update@item_text
    takes
	master_text item_text
	clone_text item_text
    returns_nothing


procedure value_get@item_text
    takes
	text item_text
    returns string

    #: This procedure will return the text value for {text}.


procedure value_set@item_text
    takes
	text item_text
	value string
    returns_nothing

    #: This procedure will set the text value for {text} to {value}.


procedure x_get@item_text
    takes
	text item_text
    returns integer

    #: This procedure will return the x coordinate of {text}
    #, to the group origin.


procedure x_set@item_text
    takes
	text item_text
	x integer
    returns_nothing

    #: This procedure will set the x coordinate of {text} (relative
    #, to the group origin) to {x}.


procedure y_get@item_text
    takes
	text item_text
    returns integer

    #: This procedure will return the y coordinate of {text} relative
    #, to the group origin.


procedure y_set@item_text
    takes
	text item_text
	y integer
    returns_nothing

    #: This procedure will set the y coordinate of {text} (relative
    #, to the group origin) to {y}.