english
version "1.0"
identify "xyz"

# Copyright (c) 1998 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_test

#: This module does some testing of the SWIT client library.

define global				#: Global application data
    record
	main_top_level frame		#: Top-level frame
	entry entry			#: Entry to work with
	application application		#: Shared application
	initialized logical		#: {true}=>initialized
	group1 item_group		#: First group
	group1rect item_rectangle	#: First group rectangle
	group1line item_line		#: First group line
	group1text item_text		#: First group text
	group2 item_group		#: Second group
	group2rect item_rectangle	#: Second group rectangle
	group2line item_line		#: Second group line
    generate address_get, allocate, erase, identical, print



procedure main
    takes
	system system
    returns unsigned

    #: This procedure does some testing of the SWIT client library.


procedure test_initialize
    takes
	application application
    returns_nothing

    #: This procedure will initialize the test application.


procedure op1_call_back
    takes
	button button
    returns_nothing

    #: This procedure is called when the Op1 button is clicked.


procedure op2_call_back
    takes
	button button
    returns_nothing

    #: This procedure is called when the Op2 button is clicked.


procedure clone_call_back
    takes
	button button
    returns_nothing

    #: This procedure is called when the goodbye button is clicked.

    #put@("clone_call_back: returning\n\", debug_stream)



procedure new_call_back
    takes
	button button
    returns_nothing

    #: This procedure is called when the goodbye button is clicked.


procedure show_call_back
    takes
	button button
    returns_nothing

    #: This procedure is called when the goodbye button is clicked.


procedure another_call_back
    takes
	button button
    returns_nothing

    #: This procedure is called when the goodbye button is clicked.


procedure get@global
    takes_nothing
    returns global

    #: This procedure returns the global object.


procedure rectangle_button1_motion_call_back
    takes
	item item
	tag string
	x integer
	y integer
    returns_nothing

    #: This procedure will be call whenever a rectangle is entered.


procedure rectangle_button1_release_call_back
    takes
	item item
	tag string
	x integer
	y integer
    returns_nothing

    #: This procedure will be call whenever a rectangle is entered.