/* TEACH GO_POINT                                Ben Rabau, 27th Aug 1993

This file is incomplete, at present you will have to experiment with the
GO environment to see what is available by Direct Manipulation (DM). For
more detailed information see

HELP * GO
REF * GO


New aditions of basic objects for go include:
    - points    explained in TEACH * GO_POINT (this file)
    - lines     explained in TEACH * GO_POLYLINES
    - polygons  explained in TEACH * GO_MAKE_EDITABLE

 */

;;; Requires the following files to be loaded:
uses go;
uses go_point;

;;; It also requires the GO window to be active:
go_init_rc();

/*
-- CLASS POINT: -------------------------------------------------------
 */
;;; A go_point is a location on the screen represented as a dot.
;;; The go_point objects can be moved over the screen in go_edit_mode.

vars pnt;

newgo_point() -> pnt;
go_add_to( pnt , go_default_pane );

;;; in go_edit_mode you can move this dot; in live_mode you cannot move it.
;;; Edit/Live mode is a feature of the pane in which the object is shown
;;; (see TEACH * GO_PANE). Edit mode is entered with:
true -> go_edit_mode( go_default_pane );

;;; Live mode is entered with:
true -> go_live_mode( go_default_pane );

/*
-- APPEARANCE ---------------------------------------------------------
 */
;;; To make it more visible you can change the go_linewidth with which the
;;; dot is visualised:
6 -> go_linewidth( pnt );

;;; Or you can change the go_linewidth of the whole pane:
false -> go_linewidth( pnt );       ;;; Use the default line width
from the pane.
4 -> go_linewidth( go_default_pane );

;;; The latter is undone by setting the go_linewidth to the default value: 1
1 -> go_linewidth( go_default_pane );

;;; The go_point also has other appearance features like go_fgcolour:
5 -> go_linewidth( pnt );
'red' -> go_fgcolour( pnt );

/*
-- FUNCTION GRAPH -----------------------------------------------------
 */
;;; The following creates a lot of points each of which could potentially
;;; allow interaction by Direct Manipulation.
2 -> go_linewidth( go_default_pane );
go_empty_pane( go_default_pane );

vars i;
for i from 0 by 4 to 200 do
    instance go_point; go_xcentre = i; go_ycentre = i*cos(i); endinstance;
    go_add_to( go_default_pane );
endfor;

;;; For efficiency these points should be stored in a vector and only
;;; their positions should be changed...

;;; See TEACH GO for more information.

--- C.all/lib/proto/go/teach/go_point
--- Copyright University of Sussex 1993. All rights reserved.
