COMMENT @----------------------------------------------------------------------
 
	Copyright (c) GeoWorks 1988 -- All Rights Reserved

PROJECT:	PC GEOS
FILE:		grobj.def

AUTHOR:		Steve Scholl

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	Steve	11/89		Initial version

DESCRIPTION:
	This file contains the definitions for the library.  It is included
both by the library and by users of the library.  When included by the library,
the symbol "_DECLARER_" must be true.

	$Id: grobj.def,v 1.2 98/04/24 00:37:28 gene Exp $

------------------------------------------------------------------------------@
SetDef __GROBJ

StartLibrary	grobj

;
; Necessary include files
;
UseLib	Objects/spline.def
UseLib	Objects/colorC.def
UseLib	Objects/vTextC.def
UseLib	Objects/styles.def
UseLib	bitmap.def




;------------------------------------------------------------------------------
;	Graphic Library Structures and Constants
;------------------------------------------------------------------------------

GrObjBlockHandleElement	struct
	GOBHE_blockHandle	hptr
	GOBHE_potentialSize	word
GrObjBlockHandleElement	ends

	
;
;		Structures related to Cut/Copy/Paste
;

GrObjTransferBlockHeader struct
    GOTBH_meta		VMChainTree
    GOTBH_size		PointDWord	;width and height of cut

GOTBH_firstLMem	label	word
    GOTBH_areaAttrArray	dword		;need help from Tony here...
    GOTBH_lineAttrArray	dword		;need help from Tony here...
    GOTBH_styleArray	dword		;need help from Tony here...
    GOTBH_charAttrRuns	dword		;need help from Tony here...
    GOTBH_paraAttrRuns	dword		;need help from Tony here...
    GOTBH_textStyleArray dword		;need help from Tony here...
    GOTBH_textGraphicElements dword	;need help from Tony here...
GOTBH_lastLMem	label	word
    GOTBH_textGraphicsTree dword	;need help from Tony here...
GrObjTransferBlockHeader ends	

;
;	The following record indicates which of a number of possible
;	data describing a grobj is included in a vmblock
;

GrObjTiledDataFlags record
	:7
	GOTDF_VAR_DATA		: 1
GrObjTiledDataFlags end

GrObjTransferDataDirectory struct
	GOTDD_tiledDataFlags	GrObjTiledDataFlags
	GOTDD_protocol		byte
GrObjTransferDataDirectory ends

;LinkAndClass struct
;	LAC_link	VMChainLink
;	LAC_class	fptr.ClassStruct
;LinkAndClass ends

GrObjEntryPointRelocation struct
	GOEPR_fullRelocation	EntryPointRelocation
	GOEPR_grObjEntryPoint	word
GrObjEntryPointRelocation ends

VMLinkAndGrObjRelocation struct
	VMLAGOR_link		VMChainLink
	VMLAGOR_relocation	GrObjEntryPointRelocation
VMLinkAndGrObjRelocation ends

;   These Action Notification structures and enums are used by the object
;   to notify one other object that an action has been performed on it.
;   For example, in charting, if the user changes the size of a chart,
;   the chart library is notified of this action so it can rebuild the
;   chart at the new size. The Action Notification should not be confused
;   with the Notification information which is used for updating the
;   UI controllers.


GrObjActionNotificationType	etype	word
	GOANT_NULL		enum	GrObjActionNotificationType
		; Reserve zero as a special value
	GOANT_SELECTED		enum	GrObjActionNotificationType
	GOANT_UNSELECTED	enum	GrObjActionNotificationType
	GOANT_CREATED		enum	GrObjActionNotificationType

	GOANT_MOVED		enum 	GrObjActionNotificationType
	GOANT_RESIZED		enum	GrObjActionNotificationType
	GOANT_ROTATED		enum	GrObjActionNotificationType
	GOANT_SKEWED		enum	GrObjActionNotificationType
	GOANT_TRANSFORMED	enum	GrObjActionNotificationType
	GOANT_ATTRED		enum	GrObjActionNotificationType
	GOANT_SPEC_MODIFIED	enum	GrObjActionNotificationType
	GOANT_PASTED		enum	GrObjActionNotificationType
	GOANT_DELETED		enum	GrObjActionNotificationType
	GOANT_WRAP_CHANGED	enum	GrObjActionNotificationType

	GOANT_UNDO_GEOMETRY	enum	GrObjActionNotificationType
	GOANT_UNDO_DELETE	enum	GrObjActionNotificationType
	GOANT_REDO_DELETE	enum	GrObjActionNotificationType

	GOANT_PRE_MOVE		enum 	GrObjActionNotificationType
	GOANT_PRE_RESIZE	enum	GrObjActionNotificationType
	GOANT_PRE_ROTATE	enum	GrObjActionNotificationType
	GOANT_PRE_SKEW		enum	GrObjActionNotificationType
	GOANT_PRE_TRANSFORM	enum	GrObjActionNotificationType
	GOANT_PRE_SPEC_MODIFY	enum	GrObjActionNotificationType
	GOANT_QUERY_DELETE	enum	GrObjActionNotificationType
	GOANT_PRE_WRAP_CHANGE	enum	GrObjActionNotificationType

GrObjActionNotificationStruct	struct
	GOANS_suspendCount	word	;If non-zero then don't send
					;out action notification
	GOANS_optr		optr	;OD to send message to
GrObjActionNotificationStruct	ends

VisWardToolActiveStatus	etype	byte, 0
VWTAS_ACTIVE	enum VisWardToolActiveStatus
VWTAS_INACTIVE	enum VisWardToolActiveStatus

BitmapGuardianSpecificInitializationData	struct
	BGSID_toolClass		fptr.ClassStruct
	BGSID_activeStatus	VisWardToolActiveStatus
BitmapGuardianSpecificInitializationData	ends

;    This is the header for the sortable OD array
;

SortableArrayHeader	struct
	SAH_CAH			ChunkArrayHeader
	SAH_originalArray	optr
SortableArrayHeader	ends

;    Each element of a sortable array contains an OD and a DWFixed key
;

SortableArrayElement	struct
	SAE_OD		optr
	SAE_key		DWFixed
SortableArrayElement	ends

;    Information on how the area attributes should be used to draw the object
;

GrObjAreaAttrInfoRecord	record
	GOAAIR_TRANSPARENT:1		;If, true then don't draw
					;background behind object
GrObjAreaAttrInfoRecord	end


;    Code in GrObjApplyGrObjAreaToken depends on the order of fields
;    in GrObjBaseAreaAttrElement. Look before you change.
;

AREA_ATTR_COLOR_SIZE = 3
AREA_ATTR_MASK_SIZE = 1
AREA_ATTR_DRAW_MODE_SIZE = 1
AREA_ATTR_MIX_MODE_SIZE = 1
AREA_ATTR_TYPE_SIZE = 1
AREA_ATTR_PATTERN_SIZE = 2


;    Determine which structure is in the element
;

GrObjAreaAttrElementType	etype	byte
	;GrObjBaseAreaAttrElement
	GOAAET_BASE	enum GrObjAreaAttrElementType 
	;GrObjGradientAreaAttrElement
	GOAAET_GRADIENT	enum GrObjAreaAttrElementType 

GrObjBaseAreaAttrElement	struct
    GOBAAE_styleElement	StyleSheetElementHeader
    GOBAAE_r		byte		
    GOBAAE_g		byte		
    GOBAAE_b		byte
    GOBAAE_mask		SystemDrawMask
    GOBAAE_drawMode	MixMode
    GOBAAE_pattern	GraphicPattern
    GOBAAE_backR	byte
    GOBAAE_backG	byte
    GOBAAE_backB	byte
    GOBAAE_aaeType	GrObjAreaAttrElementType
    GOBAAE_areaInfo	GrObjAreaAttrInfoRecord
    GOBAAE_reservedByte	byte			;Currently unused. Must be
						;initialized to 0. Maybe
						;nuked to word align struct
    GOBAAE_reserved	word			;Currently unused. Must be
						;initialized to zero.
GrObjBaseAreaAttrElement	ends	


;	Structure to be used by get attribute routines to allow for 
;   	larger GrObjBaseAreaAttrElement structures in future versions of grobj
;

FUTURE_AREA_ATTR_ELEMENT_DATA_SIZE = 50
GrObjFullAreaAttrElement	struct
	GOFAAE_base	GrObjBaseAreaAttrElement
	GOFAAE_future	byte	FUTURE_AREA_ATTR_ELEMENT_DATA_SIZE dup (?)
GrObjFullAreaAttrElement	ends



;    Information in each element of the line attribute element array
;

;    Code in GrObjApplyGrObjLineToken depends on the order of fields
;    in GrObjBaseLineAttrElement. Look before you changed.

LINE_ATTR_COLOR_SIZE = 3
LINE_ATTR_END_SIZE  = 1
LINE_ATTR_JOIN_SIZE  = 1
LINE_ATTR_MASK_SIZE = 1
LINE_ATTR_DRAW_MODE_SIZE = 1
LINE_ATTR_WIDTH_SIZE = 4
LINE_ATTR_STYLE_SIZE  = 1
LINE_ATTR_MITER_LIMIT_SIZE  = 4
LINE_ATTR_TYPE_SIZE = 1

;    Information on how the line attributes should be used to draw the object
;

GrObjLineAttrInfoRecord	record
	GOLAIR_ARROWHEAD_ON_START:1
	GOLAIR_ARROWHEAD_ON_END:1
	GOLAIR_ARROWHEAD_FILLED:1
	GOLAIR_ARROWHEAD_FILL_WITH_AREA_ATTRIBUTES:1
	:4
GrObjLineAttrInfoRecord	end

;    Determine which structure is in the element
;

GrObjLineAttrElementType	etype	byte
	GOLAET_BASE	enum GrObjLineAttrElementType ;GrObjBaseLineAttrElement

GrObjBaseLineAttrElement	struct
    GOBLAE_styleElement	StyleSheetElementHeader
    GOBLAE_r		byte		
    GOBLAE_g		byte		
    GOBLAE_b		byte
    GOBLAE_end		LineEnd
    GOBLAE_join		LineJoin
    GOBLAE_width	WWFixed
    GOBLAE_mask		SystemDrawMask
    GOBLAE_style	LineStyle
    GOBLAE_miterLimit	WWFixed
    GOBLAE_laeType	GrObjLineAttrElementType
    GOBLAE_lineInfo	GrObjLineAttrInfoRecord
    GOBLAE_arrowheadAngle	byte
    GOBLAE_arrowheadLength	byte
    GOBLAE_reserved	word			;Currently unused. Must be
						;initialized to 0
GrObjBaseLineAttrElement	ends	

;	Structure to be used by get attribute routines to allow for 
;   	larger GrObjBaseLineAttrElement structures in future versions of grobj
;
FUTURE_LINE_ATTR_ELEMENT_DATA_SIZE equ 50
GrObjFullLineAttrElement	struct
	GOFLAE_base	GrObjBaseLineAttrElement
	GOFLAE_future	byte	FUTURE_LINE_ATTR_ELEMENT_DATA_SIZE dup (?)
GrObjFullLineAttrElement	ends





GrObjGradientType	etype	byte
	GOGT_NONE		enum GrObjGradientType
	GOGT_LEFT_TO_RIGHT	enum GrObjGradientType
	GOGT_TOP_TO_BOTTOM	enum GrObjGradientType
	GOGT_RADIAL_RECT	enum GrObjGradientType
	GOGT_RADIAL_ELLIPSE	enum GrObjGradientType

GrObjGradientAreaAttrElement	struct
	GOGAAE_base		GrObjBaseAreaAttrElement
	GOGAAE_type		GrObjGradientType
	GOGAAE_endR		byte		;ending color red byte
	GOGAAE_endG		byte		;ending color green byte
	GOGAAE_endB		byte		;ending color blue byte
	GOGAAE_numIntervals	word
	GOGAAE_reserved	word
GrObjGradientAreaAttrElement	ends


GrObjStyleFlags	record
    GSF_AREA_COLOR_RELATIVE:1
    GSF_AREA_MASK_RELATIVE:1
    GSF_LINE_COLOR_RELATIVE:1
    GSF_LINE_MASK_RELATIVE:1
    GSF_LINE_WIDTH_RELATIVE:1
    :11
GrObjStyleFlags	end

GrObjStylePrivateData	struct
    GSPD_flags		GrObjStyleFlags
    GSPD_unused		byte 2 dup (0)
GrObjStylePrivateData	ends

GrObjStyleElement	struct
    GSE_meta		NameArrayElement
    GSE_baseStyle	word
    GSE_flags		StyleElementFlags
    GSE_reserved	byte 6 dup (?)
    GSE_privateData	GrObjStylePrivateData
    GSE_areaAttrToken	word
    GSE_lineAttrToken	word
    GSE_name		label	char
GrObjStyleElement	ends

	CheckHack <(offset GSE_areaAttrToken) eq (size StyleElementHeader)>

DONT_SAVE_TRANSFER_ARRAYS	equ	0
SAVE_TRANSFER_ARRAYS		equ	0xffff

GrObjTransferParams struct
    GTP_ssp			StyleSheetParams
    GTP_textSSP			VisTextSaveStyleSheetParams
    GTP_selectionCenterDOCUMENT	PointDWFixed
    GTP_optBlock		hptr
    GTP_vmFile			hptr
    GTP_curSlot			word
    GTP_id			dword
    GTP_curSize			word
    GTP_curPos			word
GrObjTransferParams ends

	CheckHack <(offset GSE_areaAttrToken) eq (size StyleElementHeader)>

;    Structures for updating UI controllers
;

GrObjDrawFlags	record
	:7
	GODF_DRAW_QUICK_VIEW:1		;Have objects draw themselves
					;with MSG_GO_DRAW_QUICK_VIEW which
					;is much faster but not WYSIWYG

	GODF_DRAW_CLIP_ONLY:1		;Draw the clip area only 
					;of the object

	GODF_DRAW_WRAP_TEXT_INSIDE_ONLY:1
					;if true, then only draw objects
					;with GOAF_WRAP set to 
					;GOWTT_WRAP_INSIDE

	GODF_DRAW_WRAP_TEXT_AROUND_ONLY:1
					;if true, then only draw objects
					;with GOAF_WRAP set to 
					;GOWTT_WRAP_AROUND_RECT or 
					;GOWTT_WRAP_AROUND_TIGHTLY

	GODF_DRAW_WITH_INCREASED_RESOLUTION:1
					;If the object is capable it
					;should draw with more resolution.
					;Used for printing and when view
					;is scaled. 

	GODF_DRAW_INSTRUCTIONS:1	;if true, then draw objects
					;with GOAF_INSTRUCTION bit set

	GODF_DRAW_SELECTED_OBJECTS_ONLY:1
					;if true, then only draw selected
					;objects.

	GODF_DRAW_OBJECTS_ONLY:1	;if true, then don't draw grid lines
					;sprites, handles, etc.

	GODF_PRINT_INSTRUCTIONS:1	;if true then print instructions



GrObjDrawFlags	end



GrObjBodyNotifyInstructionFlags	struct
	GBNIF_flags		GrObjDrawFlags
	GBNIF_handleSize	byte	;this field added post-Zoomer
	align word
GrObjBodyNotifyInstructionFlags	ends

GrObjNotifyCurrentTool	struct
	GONCT_toolClass		fptr.ClassStruct
	GONCT_specInitData	word	;MSG_GO_SPECIFIC_INITIALIZE data
GrObjNotifyCurrentTool	ends

GrObjUINotificationTypes	record
	GOUINT_STYLE:1		;True if style notification needs to be sent
	GOUINT_AREA:1		;True if area notification needs to be sent
	GOUINT_LINE:1		;True if line notification needs to be sent
	GOUINT_GROBJ_SELECT:1	;True if grobj specific selection state
				;notification needs to be sent
	GOUINT_STYLE_SHEET:1	;True if style notification needs to be sent
	GOUINT_SELECT:1		;True if edit menu notification need be sent
	:10			;unused
GrObjUINotifcationTypes	end

GrObjSelectionStateFlags	record
	GSSF_EDITING:1		;True if an object is being edited.
	GSSF_UNGROUPABLE:1	;True if at least one of the objects
				;selected can be ungrouped.
	GSSF_TEXT_SELECTED:1	;True if at least one of the objects
				;selected is some sort of text object
	GSSF_BITMAP_SELECTED:1	;True if at least one of the objects
				;selected is some sort of bitmap object
	GSSF_SPLINE_SELECTED:1	;True if at least one of the objects
				;selected is some sort of spline object
	GSSF_ARC_SELECTED:1	;True if at least one of the objects
				;selected is some sort of arc object
GrObjSelectionStateFlags	end

GrObjLocks	record
	GOL_COPY:1		;True if object may not be clipboarded
	GOL_LOCK:1		;True if object cannot have its locks changed
	GOL_SHOW:1		;True if object can't be drawn/selected/edited
				;Used with MSG_GB_HIDE_UNSELECTED_OBJECTS
				;and MSG_GB_SHOW_ALL_OBJECTS
	GOL_WRAP:1		;True if can't change wrap type
	GOL_MOVE:1		;True if object cannot be moved
	GOL_RESIZE:1		;True if object cannot be resized
	GOL_ROTATE:1		;True if object cannot be rotated
	GOL_SKEW:1		;True if object cannot be skewed
	GOL_EDIT:1		;True if object cannot be edit
	GOL_DELETE:1		;True if object cannot be deleted. Will
				;not prevent object's in groups from
				;being deleted.
	GOL_SELECT:1		;True if object cannot be selected
	GOL_ATTRIBUTE:1		;True if object cannot change attibutes
	GOL_GROUP:1		;True if object cannot be grouped
	GOL_UNGROUP:1		;True if group cannot be ungrouped
	GOL_DRAW:1		;True if object cannot be drawn
	GOL_PRINT:1		;True if object cannot be printed
GrObjLocks	end

GrObjWrapTextType	etype byte, 0
CheckHack	< (GOWTT_DONT_WRAP eq 0) >
	GOWTT_DONT_WRAP			enum GrObjWrapTextType
	GOWTT_WRAP_AROUND_RECT		enum GrObjWrapTextType
	GOWTT_WRAP_AROUND_TIGHTLY 	enum GrObjWrapTextType
	GOWTT_WRAP_INSIDE		enum GrObjWrapTextType

GROBJ_DEFAULT_WRAP_TYPE = GOWTT_DONT_WRAP

GrObjAttrFlags	record
	:6
	GOAF_DONT_COPY_LOCKS:1	; When this object is written out to
				; the transfer format, locks won't be
				; copied. 

	GOAF_HAS_PASTE_INSIDE_CHILDREN:1	;True if object contains paste
						;inside children. Currently
						;only relevant for groups

	GOAF_PASTE_INSIDE:1		;Meaningless unless object is in
					;a group. If true then object
					;was pasted inside group and will
					;be drawn clipped to group's
					;normal children.

	GOAF_INSERT_DELETE_MOVE_ALLOWED:1
					;If true grobject can be 
					;moved as a result of a
					;MSG_GO_INSERT_OR_DELETE_SPACE
	GOAF_INSERT_DELETE_RESIZE_ALLOWED:1
					;If true grobject can be 
					;resized as a result of a
					;MSG_GO_INSERT_OR_DELETE_SPACE
	GOAF_INSERT_DELETE_DELETE_ALLOWED:1
					;If true grobject can be 
					;deleted as a result of a
					;MSG_GO_INSERT_OR_DELETE_SPACE
		
	GOAF_INSTRUCTION:1		;if true then this object is used
					;for instructions in a template.

	GOAF_MULTIPLICATIVE_RESIZE:1	;if false, the resize deltas are
					;added to objects coordinates. if
					;true, a scale factor is calculated
					;and applied to objects transform

	GOAF_WRAP GrObjWrapTextType:2	;enum describing how to wrap text
					;with respect to object

GrObjAttrFlags	end

;These flags cannot be set as default attributes in the GrObjAttributeManager
;and they will not be changed in the object when handling 
;MSG_GO_INIT_TO_DEFAULT_ATTRS

NO_DEFAULT_GROBJ_ATTR_FLAGS equ mask GOAF_MULTIPLICATIVE_RESIZE or mask GOAF_PASTE_INSIDE 


CheckHack	< (offset GOAF_WRAP eq 0) >



GrObjSelectionState	struct
	GSS_numSelected		word
	GSS_classSelected	fptr.ClassStruct
	GSS_flags		GrObjSelectionStateFlags
	GSS_grObjFlags		GrObjAttrFlags
	GSS_locks		GrObjLocks
	align			word
GrObjSelectionState	ends

GrObjSelectionStateDiffs	record
	GSSD_MULTIPLE_CLASSES:1
	GSSD_MULTIPLE_ARC_CLOSE_TYPES:1
	GSSD_MULTIPLE_ARC_START_ANGLES:1
	GSSD_MULTIPLE_ARC_END_ANGLES:1
	:4
GrObjSelectionStateDiffs	end

GrObjNotifySelectionStateChange	struct
	GONSSC_selectionState		GrObjSelectionState
	GONSSC_selectionStateDiffs	GrObjSelectionStateDiffs
	GONSSC_grObjFlagsDiffs		GrObjAttrFlags
	GONSSC_locksDiffs		GrObjLocks
	GONSSC_arcCloseType		ArcCloseType
	GONSSC_arcStartAngle		WWFixed
	GONSSC_arcEndAngle		WWFixed	
GrObjNotifySelectionStateChange	ends

GrObjBaseAreaAttrDiffs	record
	GOBAAD_MULTIPLE_ELEMENT_TYPES:1
	GOBAAD_MULTIPLE_STYLE_ELEMENTS:1
	GOBAAD_MULTIPLE_COLORS:1
	GOBAAD_MULTIPLE_BACKGROUND_COLORS:1
	GOBAAD_MULTIPLE_MASKS:1
	GOBAAD_MULTIPLE_PATTERNS:1
	GOBAAD_MULTIPLE_DRAW_MODES:1
	GOBAAD_MULTIPLE_INFOS:1

	GOBAAD_MULTIPLE_GRADIENT_END_COLORS:1
	GOBAAD_MULTIPLE_GRADIENT_TYPES:1
	GOBAAD_MULTIPLE_GRADIENT_INTERVALS:1

	:4
	GOBAAD_FIRST_RECIPIENT:1	;A grobj knows that it's the first
					;one to receive this data buffer if
					;this flag is set (and should clear it)
GrObjAreaAttrDiffs	end

GrObjGradientAttrDiffs	record
	GGAD_MULTIPLE_END_COLORS:1
	GGAD_MULTIPLE_TYPES:1
	GGAD_MULTIPLE_INTERVALS:1
	:4
	GGAD_FIRST_RECIPIENT:1		;A grobj knows that it's the first
					;one to receive this data buffer if
					;this flag is set (and should clear it)
GrObjGradientAttrDiffs	end

GrObjNotifyGradientAttrChange	struct
	GONGAC_type		GrObjGradientType
	GONGAC_endR		byte		;ending color red byte
	GONGAC_endG		byte		;ending color green byte
	GONGAC_endB		byte		;ending color blue byte
	GONGAC_numIntervals	word
	GONGAC_diffs		GrObjGradientAttrDiffs
	align	word
GrObjNotifyGradientAttrChange	ends

GrObjNotifyAreaAttrChange	struct
	GNAAC_areaAttr		GrObjBaseAreaAttrElement
	GNAAC_areaAttrDiffs	GrObjBaseAreaAttrDiffs
GrObjNotifyAreaAttrChange	ends

GrObjBaseLineAttrDiffs	record
	GOBLAD_MULTIPLE_STYLE_ELEMENTS:1
	GOBLAD_MULTIPLE_ELEMENT_TYPES:1
	GOBLAD_MULTIPLE_COLORS:1
	GOBLAD_MULTIPLE_ENDS:1
	GOBLAD_MULTIPLE_JOINS:1
	GOBLAD_MULTIPLE_WIDTHS:1
	GOBLAD_MULTIPLE_MASKS:1
	GOBLAD_MULTIPLE_STYLES:1
	GOBLAD_ARROWHEAD_ON_START:1
	GOBLAD_ARROWHEAD_ON_END:1
	GOBLAD_ARROWHEAD_FILLED:1
	GOBLAD_ARROWHEAD_FILL_WITH_AREA_ATTRIBUTES:1
	GOBLAD_MULTIPLE_MITER_LIMITS:1
	GOBLAD_MULTIPLE_ARROWHEAD_ANGLES:1
	GOBLAD_MULTIPLE_ARROWHEAD_LENGTHS:1
	GOBLAD_FIRST_RECIPIENT:1
GrObjBaseLineAttrDfs	end

GrObjNotifyLineAttrChange	struct
	GNLAC_lineAttr		GrObjBaseLineAttrElement
	GNLAC_lineAttrDiffs	GrObjBaseLineAttrDiffs
GrObjNotifyLineAttrChange	ends

;
;	Controllers
;

;------------------------------------------------------------------------
;		GrObjStyleSheetControlClass
;------------------------------------------------------------------------
GrObjStyleSheetControlClass	class	StyleSheetControlClass
GrObjStyleSheetControlClass	endc

;------------------------------------------------------------------------
;		GrObjAreaColorSelectorClass
;------------------------------------------------------------------------
GrObjAreaColorSelectorClass	class	ColorSelectorClass
GrObjAreaColorSelectorClass	endc

;------------------------------------------------------------------------
;		GrObjBothColorSelectorClass
;------------------------------------------------------------------------
GrObjBothColorSelectorClass	class	ColorSelectorClass


				; or mask CSF_PATTERN

GOBCS_DEFAULT_FEATURES	 		equ mask CSF_INDEX
GOBCS_DEFAULT_TOOLBOX_FEATURES 		equ mask CSTF_INDEX

GrObjBothColorSelectorClass	endc

;------------------------------------------------------------------------
;		GrObjBackgroundColorSelectorClass
;------------------------------------------------------------------------
GrObjBackgroundColorSelectorClass	class	ColorSelectorClass

GOBGCS_DEFAULT_FEATURES equ mask CSF_INDEX or mask CSF_RGB or mask CSF_OTHER

GrObjBackgroundColorSelectorClass	endc

;------------------------------------------------------------------------
;		GrObjStartingGradientColorSelectorClass
;------------------------------------------------------------------------
GrObjStartingGradientColorSelectorClass	class	ColorSelectorClass

GOSGCS_DEFAULT_FEATURES equ mask CSF_INDEX or mask CSF_RGB or mask CSF_OTHER

GrObjStartingGradientColorSelectorClass	endc

;------------------------------------------------------------------------
;		GrObjEndingGradientColorSelectorClass
;------------------------------------------------------------------------
GrObjEndingGradientColorSelectorClass	class	ColorSelectorClass

GOEGCS_DEFAULT_FEATURES equ mask CSF_INDEX or mask CSF_RGB or mask CSF_OTHER

GrObjEndingGradientColorSelectorClass	endc



;------------------------------------------------------------------------
;		GrObjObscureAttrControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjObscureAttrControlClass	class	GenControlClass

MSG_GOOAC_SET_WRAP_TEXT_TYPE					message
MSG_GOOAC_CHANGE_OBSCURE_ATTRS					message

GrObjObscureAttrControlFeatures	record
	GOOACF_INSTRUCTIONS : 1
	GOOACF_INSERT_OR_DELETE_MOVE : 1
	GOOACF_INSERT_OR_DELETE_RESIZE : 1
	GOOACF_INSERT_OR_DELETE_DELETE : 1
	GOOACF_DONT_WRAP : 1
	GOOACF_WRAP_INSIDE : 1
	GOOACF_WRAP_AROUND_RECT : 1
	GOOACF_WRAP_TIGHTLY : 1
GrObjObscureAttrControlFeatures	end

GOOAC_INSERT_OR_DELETE_FEATURES equ	mask GOOACF_INSERT_OR_DELETE_MOVE or \
					mask GOOACF_INSERT_OR_DELETE_RESIZE \
					or mask GOOACF_INSERT_OR_DELETE_DELETE

GOOAC_WRAP_FEATURES		equ	mask GOOACF_DONT_WRAP or \
					mask GOOACF_WRAP_INSIDE or \
					mask GOOACF_WRAP_AROUND_RECT or \
					mask GOOACF_WRAP_TIGHTLY

GOOAC_DEFAULT_FEATURES		equ	mask GrObjObscureAttrControlFeatures

GrObjObscureAttrControlClass	endc

;------------------------------------------------------------------------
;		GrObjInstructionControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjInstructionControlClass	class	GenControlClass

MSG_GOIC_MAKE_INSTRUCTIONS_EDITABLE			message
MSG_GOIC_MAKE_INSTRUCTIONS_UNEDITABLE			message
MSG_GOIC_DELETE_INSTRUCTIONS				message
MSG_GOIC_SET_INSTRUCTION_ATTRS				message

GrObjInstructionControlFeatures	record
	GOICF_DRAW : 1
	GOICF_PRINT : 1
	GOICF_MAKE_EDITABLE : 1
	GOICF_MAKE_UNEDITABLE : 1
	GOICF_DELETE : 1
GrObjInstructionControlFeatures	end

GOIC_DEFAULT_FEATURES		equ	mask GrObjInstructionControlFeatures

GrObjInstructionControlClass	endc

;------------------------------------------------------------------------
;		GrObjAreaAttrControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjAreaAttrControlClass	class	GenControlClass

MSG_GOAAC_SET_MIX_MODE					message
MSG_GOAAC_SET_AREA_TRANSPARENCY				message

GOAACFeatures	record
	GOAACF_MM_CLEAR : 1
	GOAACF_MM_COPY : 1
	GOAACF_MM_NOP : 1
	GOAACF_MM_AND : 1
	GOAACF_MM_INVERT : 1
	GOAACF_MM_XOR : 1
	GOAACF_MM_SET : 1
	GOAACF_MM_OR : 1
	GOAACF_TRANSPARENCY : 1
GOAACFeatures	end

;
;  SET, COPY, and NOP are confusing, so they're not defaults
;
if 1		;bug in UI causes death
GOAAC_DEFAULT_FEATURES		equ	mask GOAACF_TRANSPARENCY or \
					mask GOAACF_MM_COPY or \
					mask GOAACF_MM_INVERT or \
					mask GOAACF_MM_XOR or \
					mask GOAACF_MM_AND or \
					mask GOAACF_MM_OR
else
GOAAC_DEFAULT_FEATURES		equ	mask GOAACFeatures
endif

GOAAC_DEFAULT_TOOLBOX_FEATURES	equ	0

GrObjAreaAttrControlClass	endc

;------------------------------------------------------------------------
;		GrObjLineColorSelectorClass
;------------------------------------------------------------------------
GrObjLineColorSelectorClass	class	ColorSelectorClass
GrObjLineColorSelectorClass	endc

GOLCC_DEFAULT_FEATURES equ mask CSF_FILLED_LIST or mask CSF_INDEX or \
			   mask CSF_RGB or mask CSF_DRAW_MASK or mask CSF_OTHER

GOLCC_DEFAULT_TOOLBOX_FEATURES equ mask CSTF_INDEX or mask CSTF_DRAW_MASK

;------------------------------------------------------------------------
;		GrObjLineAttrControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjLineAttrControlClass	class	GenControlClass

StandardArrowheadType	record
	SAT_LENGTH : 6
	SAT_FILLED : 1
	SAT_FILL_WITH_AREA_ATTRIBUTES:1
	SAT_ANGLE  : 8
StandardArrowheadType	end

MSG_GOLAC_SET_LINE_VALUE_FROM_INDEX		message
MSG_GOLAC_SET_LINE_INDEX_FROM_VALUE		message

MSG_GOLAC_SET_INTEGER_LINE_WIDTH		message
MSG_GOLAC_SET_LINE_WIDTH			message
MSG_GOLAC_SET_LINE_STYLE			message
MSG_GOLAC_SET_ARROWHEAD_TYPE			message
MSG_GOLAC_SET_ARROWHEAD_WHICH_END		message

GOLACFeatures	record
	GOLACF_WIDTH_INDEX : 1
	GOLACF_WIDTH_VALUE : 1
	GOLACF_STYLE : 1

	GOLACF_ARROWHEAD_TYPE : 1
	GOLACF_ARROWHEAD_WHICH_END : 1
GOLACFeatures	end

GOLACToolboxFeatures	record
	GOLACTF_WIDTH_INDEX : 1
	GOLACTF_STYLE : 1
GOLACToolboxFeatures	end

GOLAC_DEFAULT_FEATURES		equ	mask GOLACFeatures
GOLAC_DEFAULT_TOOLBOX_FEATURES	equ	mask CSTF_INDEX or mask CSTF_DRAW_MASK


GrObjLineAttrControlClass	endc


;------------------------------------------------------------------------
;		GrObjNudgeControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjNudgeControlClass	class	GenControlClass

MSG_GONC_NUDGE				message
MSG_GONC_CUSTOM_MOVE			message
MSG_GONC_SET_DISPLAY_FORMAT		message

GrObjNudgeControlFeatures	record
	GONCF_NUDGE_LEFT : 1
	GONCF_NUDGE_RIGHT : 1
	GONCF_NUDGE_UP : 1
	GONCF_NUDGE_DOWN : 1
	GONCF_CUSTOM_MOVE : 1
GrObjNudgeControlFeatures	end

GROBJ_NUDGE_CONTROL_DEFAULT_FEATURES	equ	mask GrObjNudgeControlFeatures

GrObjNudgeControlClass	endc


;------------------------------------------------------------------------
;		GrObjMoveInsideControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjMoveInsideControlClass	class	GrObjNudgeControlClass
GrObjMoveInsideControlClass	endc


;------------------------------------------------------------------------
;		GrObjGroupControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjGroupControlClass	class	GenControlClass

MSG_GOGC_GROUP					message
MSG_GOGC_UNGROUP				message

GOGCFeatures	record
	GOGCF_GROUP : 1
	GOGCF_UNGROUP : 1
GOGCFeatures	end

GOGC_DEFAULT_FEATURES		equ	mask GOGCFeatures
GOGC_DEFAULT_TOOLBOX_FEATURES	equ	mask GOGCFeatures

GrObjGroupControlClass	endc


;------------------------------------------------------------------------
;		GrObjDefaultAttributesControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjDefaultAttributesControlClass	class	GenControlClass

MSG_GODAC_SET_DEFAULT_ATTRIBUTES				message

GODACFeatures	record
	GODACF_SET_DEFAULT_ATTRIBUTES : 1
GODACFeatures	end

GODAC_DEFAULT_FEATURES		equ	mask GODACFeatures
GODAC_DEFAULT_TOOLBOX_FEATURES	equ	mask GODACFeatures

GrObjDefaultAttributesControlClass	endc


;------------------------------------------------------------------------
;		GrObjPasteInsideControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjPasteInsideControlClass	class	GenControlClass

MSG_GOPIC_PASTE_INSIDE				message
MSG_GOPIC_BREAKOUT_PASTE_INSIDE			message

GOPICFeatures	record
	GOPICF_PASTE_INSIDE : 1
	GOPICF_BREAKOUT_PASTE_INSIDE : 1
GOPICFeatures	end

GOPICToolboxFeatures	record
	GOPICTF_PASTE_INSIDE : 1
	GOPICTF_BREAKOUT_PASTE_INSIDE : 1
GOPICToolboxFeatures	end

GOPIC_DEFAULT_FEATURES		equ	mask GOPICFeatures
GOPIC_DEFAULT_TOOLBOX_FEATURES	equ	mask GOPICToolboxFeatures

	GPICI_lastNumSelected		word	;Since the Paste Inside
						;control needs to update using
						;info from two separate notif.
						;types, we store the relevant
						;data of one here

GrObjPasteInsideControlClass	endc


;------------------------------------------------------------------------
;		GrObjDuplicateControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjDuplicateControlClass	class	GenControlClass

MSG_GROBJ_DUPLICATE_CONTROL_DUPLICATE			message
MSG_GROBJ_DUPLICATE_CONTROL_DUPLICATE_IN_PLACE		message

GrObjDuplicateControlFeatures	record
	GODCF_DUPLICATE : 1
	GODCF_DUPLICATE_IN_PLACE : 1
GrObjDuplicateControlFeatures	end

GrObjDuplicateControlToolboxFeatures	record
	GODCTF_DUPLICATE : 1
	GODCTF_DUPLICATE_IN_PLACE : 1
GrObjDuplicateControlToolboxFeatures	end

GROBJ_DUPLICATE_CONTROL_DEFAULT_FEATURES equ mask GrObjDuplicateControlFeatures

GROBJ_DUPLICATE_CONTROL_DEFAULT_TOOLBOX_FEATURES	equ mask GrObjDuplicateControlToolboxFeatures

GrObjDuplicateControlClass	endc


;------------------------------------------------------------------------
;		GrObjConvertControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjConvertControlClass	class	GenControlClass

MSG_GOCC_CONVERT_TO_BITMAP					message
MSG_GOCC_CONVERT_TO_GRAPHIC					message
MSG_GOCC_CONVERT_FROM_GRAPHIC					message

GOCCFeatures	record
	GOCCF_CONVERT_TO_BITMAP : 1
	GOCCF_CONVERT_TO_GRAPHIC : 1
	GOCCF_CONVERT_FROM_GRAPHIC : 1
GOCCFeatures	end

GOCC_DEFAULT_FEATURES		equ	mask GOCCFeatures
GOCC_DEFAULT_TOOLBOX_FEATURES	equ	mask GOCCFeatures

GrObjConvertControlClass	endc

;------------------------------------------------------------------------
;		GrObjCreateControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjCreateControlClass	class	GenControlClass

MSG_GOCC_CREATE_GROBJ			message
MSG_GOCC_CREATE_POLYGON			message
MSG_GOCC_CREATE_STAR			message

GrObjCreateControlFeatures	record
	GOCCF_RECTANGLE : 1
	GOCCF_ELLIPSE : 1
	GOCCF_LINE : 1
	GOCCF_ROUNDED_RECTANGLE : 1
	GOCCF_ARC : 1
	GOCCF_TRIANGLE : 1
	GOCCF_HEXAGON : 1
	GOCCF_OCTOGON : 1
	GOCCF_FIVE_POINTED_STAR : 1
	GOCCF_EIGHT_POINTED_STAR : 1
GrObjCreateControlFeatures	end
	
GROBJ_CREATE_CONTROL_DEFAULT_FEATURES	equ	mask GrObjCreateControlFeatures and not mask GOCCF_HEXAGON
GROBJ_CREATE_CONTROL_DEFAULT_TOOLBOX_FEATURES	equ	mask GrObjCreateControlFeatures and not mask GOCCF_HEXAGON

GrObjCreateControlClass	endc

;------------------------------------------------------------------------
;		GrObjLocksControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjLocksControlClass	class	GenControlClass

MSG_GOLC_CHANGE_LOCKS				message

;
;	The GrObjLocks record serves as the "features" record for this
;	controller
;

GOLC_DEFAULT_FEATURES		equ	mask GOL_MOVE or mask GOL_RESIZE or \
					mask GOL_ROTATE or mask GOL_SKEW or \
					mask GOL_EDIT or mask GOL_DELETE or \
					mask GOL_ATTRIBUTE or \
					mask GOL_GROUP or mask GOL_UNGROUP or \
					mask GOL_DRAW or mask GOL_PRINT

GrObjLocksControlClass	endc


;------------------------------------------------------------------------
;		GrObjDepthControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjDepthControlClass	class	GenControlClass

MSG_GODC_BRING_TO_FRONT					message
MSG_GODC_SEND_TO_BACK					message
MSG_GODC_SHUFFLE_UP					message
MSG_GODC_SHUFFLE_DOWN					message

GODepthCFeatures	record
	GODepthCF_BRING_TO_FRONT : 1
	GODepthCF_SEND_TO_BACK : 1
	GODepthCF_SHUFFLE_UP : 1
	GODepthCF_SHUFFLE_DOWN : 1
GODepthCFeatures	end

GODepthC_DEFAULT_FEATURES	equ	mask GODepthCFeatures
GODepthC_DEFAULT_TOOLBOX_FEATURES  equ	mask GODepthCFeatures

GrObjDepthControlClass	endc



;------------------------------------------------------------------------
;		GrObjFlipControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjFlipControlClass	class	GenControlClass

MSG_GOFC_FLIP_HORIZONTALLY				message
MSG_GOFC_FLIP_VERTICALLY				message

GOFCFeatures	record
	GOFCF_FLIP_HORIZONTALLY	: 1
	GOFCF_FLIP_VERTICALLY	: 1
GOFCFeatures	end

GOFC_DEFAULT_FEATURES		equ	mask GOFCFeatures
GOFC_DEFAULT_TOOLBOX_FEATURES  equ	mask GOFCFeatures

GrObjFlipControlClass	endc



;------------------------------------------------------------------------
;		GrObjHandleControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjHandleControlClass	class	GenControlClass

MSG_GOHC_SET_HANDLES		message

GOHCFeatures	record
	GOHCF_SMALL_HANDLES	: 1
	GOHCF_MEDIUM_HANDLES	: 1
	GOHCF_LARGE_HANDLES	: 1
	GOHCF_INVISIBLE_HANDLES : 1
GOHCFeatures	end

GOHC_DEFAULT_FEATURES		equ	mask GOHCFeatures
GOHC_DEFAULT_TOOLBOX_FEATURES	equ	0

GrObjHandleControlClass	endc


;------------------------------------------------------------------------
;		GrObjRotateControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjRotateControlClass	class	GenControlClass

MSG_GORC_ROTATE				message
;
;	Outputs a MSG_GO_ROTATE to the target grobjs
;
;	PASS:		dx:cx - WWFixed rotation
;
;	RETURN:		nothing
;

MSG_GORC_CUSTOM_ROTATE				message

GrObjRotateControlFeatures	record
	GORCF_45_DEGREES_CW : 1
	GORCF_90_DEGREES_CW : 1
	GORCF_135_DEGREES_CW : 1
	GORCF_180_DEGREES : 1
	GORCF_135_DEGREES_CCW : 1
	GORCF_90_DEGREES_CCW : 1
	GORCF_45_DEGREES_CCW : 1
	GORCF_CUSTOM_ROTATION : 1
GrObjRotateControlFeatures	end

GROBJ_ROTATE_CONTROL_DEFAULT_FEATURES	equ	mask GrObjRotateControlFeatures

GrObjRotateControlClass	endc

;------------------------------------------------------------------------
;		GrObjScaleControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjScaleControlClass	class	GenControlClass

MSG_GOSC_SCALE_HORIZONTALLY		message
MSG_GOSC_SCALE_VERTICALLY		message
MSG_GOSC_CUSTOM_SCALE			message

GrObjScaleControlFeatures	record
	GOSCF_HALF_WIDTH : 1
	GOSCF_HALF_HEIGHT : 1
	GOSCF_DOUBLE_WIDTH : 1
	GOSCF_DOUBLE_HEIGHT : 1
	GOSCF_CUSTOM_SCALE : 1
GrObjScaleControlFeatures	end

GROBJ_SCALE_CONTROL_DEFAULT_FEATURES	equ	mask GrObjScaleControlFeatures

GrObjScaleControlClass	endc


;------------------------------------------------------------------------
;		GrObjSkewControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjSkewControlClass	class	GenControlClass

MSG_GOSC_SKEW_HORIZONTALLY		message
MSG_GOSC_SKEW_VERTICALLY		message
MSG_GOSC_CUSTOM_SKEW			message

GrObjSkewControlFeatures	record
	GOSCF_LEFT : 1
	GOSCF_RIGHT : 1
	GOSCF_UP : 1
	GOSCF_DOWN : 1
	GOSCF_CUSTOM_SKEW : 1
GrObjSkewControlFeatures	end

GROBJ_SKEW_CONTROL_DEFAULT_FEATURES	equ	mask GrObjSkewControlFeatures

GrObjSkewControlClass	endc


;------------------------------------------------------------------------
;		GrObjTransformControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjTransformControlClass	class	GenControlClass

MSG_GOTC_UNTRANSFORM				message

GOTransformCFeatures	record
	GOTCF_UNTRANSFORM : 1
GOTransformCFeatures	end

GOTransformC_DEFAULT_FEATURES		equ	mask GOTransformCFeatures
GOTransformC_DEFAULT_TOOLBOX_FEATURES	equ	0

GrObjTransformControlClass	endc


;------------------------------------------------------------------------
;		GrObjHideShowControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjHideShowControlClass	class	GenControlClass

MSG_GOHSC_HIDE				message
MSG_GOHSC_SHOW				message

GOHSCFeatures	record
	GOHSCF_HIDE : 1
	GOHSCF_SHOW : 1
GOHSCFeatures	end

GOHSC_DEFAULT_FEATURES		equ	mask GOHSCFeatures

GrObjHideShowControlClass	endc

;------------------------------------------------------------------------
;		GrObjDraftModeControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjDraftModeControlClass	class	GenControlClass

MSG_GODMC_SET_DRAFT_MODE_STATUS		message

GODMCFeatures	record
	GODMCF_DRAFT_MODE : 1
GODMCFeatures	end

GODMC_DEFAULT_FEATURES		equ	mask GODMCFeatures

GrObjDraftModeControlClass	endc


;------------------------------------------------------------------------
;		GrObjCustomShapeControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjCustomShapeControlClass	class	GenControlClass

MSG_GOCSC_CREATE_POLYGON				message
MSG_GOCSC_CREATE_STAR					message

GOCSCFeatures	record
	GOCSCF_NUM_POLYGON_SIDES : 1
	GOCSCF_POLYGON_RADIUS : 1
	GOCSCF_NUM_STAR_POINTS : 1
	GOCSCF_STAR_RADII : 1
GOCSCFeatures	end

GOCSC_DEFAULT_FEATURES		equ	mask GOCSCFeatures

GrObjCustomShapeControlClass	endc


;------------------------------------------------------------------------
;		GrObjCustomDuplicateControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjCustomDuplicateControlClass	class	GenControlClass

MSG_GOCDC_CUSTOM_DUPLICATE				message

GOCDCFeatures	record
	GOCDCF_REPETITIONS : 1
	GOCDCF_MOVE : 1
	GOCDCF_SCALE : 1
	GOCDCF_ROTATE : 1
	GOCDCF_SKEW : 1
GOCDCFeatures	end

GOCDC_DEFAULT_FEATURES		equ	mask GOCDCFeatures

GrObjCustomDuplicateControlClass	endc

;------------------------------------------------------------------------
;		GrObjGradientFillControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjGradientFillControlClass	class	GenControlClass

MSG_GOGFC_SET_GRADIENT_TYPE				message
MSG_GOGFC_SET_NUMBER_OF_GRADIENT_INTERVALS		message

GrObjGradientFillControlFeatures	record
	GOGFCF_HORIZONTAL_GRADIENT : 1
	GOGFCF_VERTICAL_GRADIENT : 1
	GOGFCF_RADIAL_RECT_GRADIENT : 1
	GOGFCF_RADIAL_ELLIPSE_GRADIENT : 1
	GOGFCF_NUM_INTERVALS : 1
GrObjGradientFillControlFeatures	end

GOGFC_DEFAULT_FEATURES		equ	mask GrObjGradientFillControlFeatures

GrObjGradientFillControlClass	endc


;------------------------------------------------------------------------
;		GrObjAlignToGridControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjAlignToGridControlClass	class	GenControlClass

MSG_GOATGC_ALIGN_TO_GRID				message

GOATGCFeatures	record
	GOATGCF_ALIGN_TO_GRID : 1
GOATGCFeatures	end

GOATGC_DEFAULT_FEATURES		equ	mask GOATGCF_ALIGN_TO_GRID
GOATGC_DEFAULT_TOOLBOX_FEATURES	equ	0

GrObjAlignToGridControlClass	endc


;------------------------------------------------------------------------
;		GrObjAlignDistributeControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjAlignDistributeControlClass	class	GenControlClass

MSG_GOADC_ALIGN_APPLY					message
MSG_GOADC_DISTRIBUTE_APPLY				message

GrObjAlignDistributeControlFeatures	record
	GOADCF_ALIGN_LEFT : 1
	GOADCF_ALIGN_CENTER_HORIZONTALLY : 1
	GOADCF_ALIGN_RIGHT : 1
	GOADCF_ALIGN_WIDTH : 1

	GOADCF_ALIGN_TOP : 1
	GOADCF_ALIGN_CENTER_VERTICALLY : 1
	GOADCF_ALIGN_BOTTOM : 1
	GOADCF_ALIGN_HEIGHT : 1

	GOADCF_DISTRIBUTE_LEFT : 1
	GOADCF_DISTRIBUTE_CENTER_HORIZONTALLY : 1
	GOADCF_DISTRIBUTE_RIGHT : 1
	GOADCF_DISTRIBUTE_WIDTH : 1

	GOADCF_DISTRIBUTE_TOP : 1
	GOADCF_DISTRIBUTE_CENTER_VERTICALLY : 1
	GOADCF_DISTRIBUTE_BOTTOM : 1
	GOADCF_DISTRIBUTE_HEIGHT : 1
GrObjAlignDistributeControlFeatures	end

GOADC_DEFAULT_FEATURES	equ	mask GrObjAlignDistributeControlFeatures

GrObjAlignDistributeControlClass	endc


;------------------------------------------------------------------------
;		GrObjArcControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjArcControlClass	class	GenControlClass

MSG_GOAC_SET_START_ANGLE		message
MSG_GOAC_SET_END_ANGLE			message
MSG_GOAC_SET_ARC_CLOSE_TYPE		message

GOArcCFeatures	record
	GOACF_START_ANGLE	: 1
	GOACF_END_ANGLE		: 1
	GOACF_PIE_TYPE		: 1
	GOACF_CHORD_TYPE	: 1
GOArcCFeatures	end

GOArcC_DEFAULT_FEATURES		equ	mask GOArcCFeatures
GOArcC_DEFAULT_TOOLBOX_FEATURES	equ	0

GrObjArcControlClass	endc

;------------------------------------------------------------------------
;		GrObjToolControlClass
;------------------------------------------------------------------------
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

GrObjToolControlClass	class	GenControlClass
MSG_GOTC_SET_TOOL					message

ATTR_GROBJ_TOOL_CONTROL_POSITION_FOR_ADDED_TOOLS	vardata	word

GOTCFeatures	record
	GOTCF_PTR		: 1
	GOTCF_ROTATE_PTR	: 1
	GOTCF_ZOOM		: 1
	GOTCF_TEXT		: 1
	GOTCF_LINE		: 1
	GOTCF_RECT		: 1
	GOTCF_ROUNDED_RECT	: 1
	GOTCF_ELLIPSE		: 1
	GOTCF_ARC		: 1
	GOTCF_POLYLINE		: 1
	GOTCF_POLYCURVE		: 1
	GOTCF_SPLINE		: 1
GOTCFeatures	end
GOTC_DEFAULT_FEATURES		equ	mask GOTCFeatures
GOTC_DEFAULT_TOOLBOX_FEATURES	equ	mask GOTCFeatures
GrObjToolControlClass	endc

;------------------------------------------------------------------------
;		GrObjBitmapToolControlClass
;------------------------------------------------------------------------
GrObjBitmapToolControlClass	class	VisBitmapToolControlClass
GrObjBitmapToolControlClass	endc

;------------------------------------------------------------------------
;		GrObjToolItemClass
;------------------------------------------------------------------------
GrObjToolItemClass		class	GenItemClass

MSG_GOTI_GET_TOOL_CLASS		message
;
;	Returns the class of the tool this list entry represents
;
;	PASS:		nothing
;
;	RETURN:		cx:dx = class of tool
;			bp = MSG_GO_SPECIFIC_INITIALIZE data
;

MSG_GOTI_SELECT_SELF_IF_MATCH		message
;
;	Object selects itself as the exclusive if the passed data match
;	the entry's instance data.
;
;	PASS:		cx:dx = class of tool
;			bp = MSG_GO_SPECIFIC_INITIALIZE data
;
;	RETURN:		nothing
;

	GOTII_toolClass	fptr.ClassStruct
	GOTII_specInitData	word

GrObjToolItemClass		endc


SMALL_DESIRED_HANDLE_SIZE	=	5
MEDIUM_DESIRED_HANDLE_SIZE	=	8
LARGE_DESIRED_HANDLE_SIZE	=	12

DEFAULT_DESIRED_HANDLE_SIZE	=	MEDIUM_DESIRED_HANDLE_SIZE


;	Bits that will be lost if the object is discarded
;	Must be protected by incing in use count

GrObjTempModes	record
	GOTM_SELECTED:1			;GrObj is in the selectionList

	GOTM_EDITED:1			;GrObj is currently being edited
					;equivalent to having app target.

	GOTM_EDIT_INDICATOR_DRAWN:1	;If true the object has drawn
					;some indicator to show the
					;user that it is being edit

	GOTM_HANDLES_DRAWN:1		;GrObjs selection handles have been
					;drawn 

	GOTM_TEMP_HANDLES:1		;GrObjs handles are drawn in a
					;temporary state. Set by
					;DRAW_HANDLES_FORCE, 
					;DRAW_HANDLES_OPPOSITE and cleared by
					;DRAW_HANDLES_MATCH and DRAW_HANDLES
					;and UNDRAW_HANDLES. Mainly used
					;when drag selecting with pointer
					;to cut down the number of objects
					;that methods must be sent to.

	GOTM_SPRITE_DRAWN:1		;True if the objects sprite has
					;been drawn	

	GOTM_SPRITE_DRAWN_HI_RES:1	;True if when the objects sprite
					;was drawn it was drawn at a
					;higher resolution. This bit
					;is meaningless if GOTM_SPRITE_DRAWN
					;is not set

	GOTM_SYS_TARGET:1		;True if body has the system target
					;Bit is meaningless unless 
					;GOTM_SELECTED or GOTM_EDITED is
					;set. (body only updates objects
					;in selection list and with
					;app target.


GrObjTempModes	end

;	These bits are changed when the object is being modified
;	and so the object should be dirtied when they are changed
;

GrObjActionModes	record
	GOAM_RESIZE:1
	GOAM_MOVE:1
	GOAM_ROTATE:1
	GOAM_CHOOSE:1
	GOAM_ACTION_ACTIVATED:1
	GOAM_ACTION_PENDING:1
	GOAM_ACTION_HAPPENING:1
	GOAM_CREATE:1
GrObjActionModes	end


;	Multi-purpose record for storing default preferences, 
;	keyboard modifiers and to be passed with mouse events
;
;	Should be word sized.
;

GrObjFunctionsActive	record
	GOFA_RULER_HAS_SEEN_EVENT : 1	;This is true if the mouse event has
					;been sent to the ruler already. This
					;is used for cases like moving
					;multiple grobjs, where you only want
					;to snap the mouse once, and not a
					;kajillion times for each grobj
	GOFA_VIEW_ZOOMED:1	;If true do all drawing operations in
				;high resolution mode
	GOFA_SNAP_TO:1		;If true, snap operation to grid
	GOFA_FROM_CENTER:1	;If true then do resize/create 
				;from center 
	GOFA_ABOUT_OPPOSITE:1	;If true, rotate about opposite corner
	GOFA_CONSTRAIN:1	;If true constrain resize,rotate,etc
	GOFA_ADJUST:1		;Same as UIFA_ADJUST
	GOFA_EXTEND:1		;Same as UIFA_EXTEND
	:2			;needed for check hacks
GrObjFunctionsActive	end

;    When combining GBI_defaultOptions and GBI_currentModifiers to 
;    create the GBI_currentOptions these bits are xored. So the one
;    bits in the currentModifiers toggle the defualt settings.
;

GOFA_TOGGLE_BITS	equ 	mask GOFA_SNAP_TO or \
				mask GOFA_FROM_CENTER or \
				mask GOFA_ABOUT_OPPOSITE or \
				mask GOFA_CONSTRAIN or \
				mask GOFA_ADJUST or \
				mask GOFA_EXTEND

;    When combining GBI_defaultOptions and GBI_currentModifiers to 
;    create the GBI_currentOptions these bits are ored. So a one in
;    either the defaults or modifiers will result in a one in the 
;    currentOptions
;

GOFA_OR_BITS		equ	 mask GOFA_VIEW_ZOOMED



GOFA_KEYBOARD_SPECIFIC equ mask GOFA_SNAP_TO or \
			mask GOFA_FROM_CENTER or \
			mask GOFA_ABOUT_OPPOSITE or \
			mask GOFA_CONSTRAIN


;    Only these bits may be set in the GBI_defaultOptions field
;

GOFA_ALLOW_DEFAULT_SETTING equ 	GOFA_TOGGLE_BITS or GOFA_OR_BITS



CheckHack	< (offset GOFA_CONSTRAIN eq offset UIFA_CONSTRAIN) >
CheckHack	< (offset GOFA_ADJUST eq offset UIFA_ADJUST) >
CheckHack	< (offset GOFA_EXTEND eq offset UIFA_EXTEND) >
GOFA_MOVE	equ <GOFA_ADJUST>
GOFA_COPY	equ <GOFA_EXTEND>

GrObjOptimizationFlags	record
	GOOF_ADDED_TO_BODY:1		;Grobject has been added to body,
					;or the group it is in has been
					;added to the body

	GOOF_IN_GROUP:1			;If true, objects is in a group

	GOOF_GROBJ_INVALID:1		;If true, object is incomplete
					;and cannot be drawn, or invalidated
					;It may be missing
					;its normal transform or have
					;no attributes, etc.

	GOOF_ATTRIBUTE_MANAGER:1	;True if object is an attribute manager

	GOOF_FLOATER:1			;GrObj is floater. Don't need to
					;dirty the object when this
					;bit is set
					;because floater objects
					;are not actually in the document

	GOOF_HAS_ACTION_NOTIFICATION:1	;True if object has an action
					;notification od in it's var
					;data.

	GOOF_HAS_UNBALANCED_PARENT_DIMENSIONS:1
					;If TRUE, object has vardata
					;ATTR_GO_PARENT_DIMENSIONS_OFFSET, which
					;holds offset from objects center to
					;center of parent dimensions

	:1				;need this to line up bits
					;with uic definition
GrObjOptimizationFlags	end
	



GrObjMessageOptimizationFlags	record
	;Each below bit corresponds to an often used, but seldom subclassed
	;message. Instead of sending the message to itself, objects
	;will call a utility routine (such as GrObjOptInvalidate),
	;the routine will check the objects GOMOF flags and if the
	;corresponding bit is set it will send the message to 
	;itself. Otherwise the routine will perform the default
	;functionality.
	;This bits should only be set in a MSG_META_INITIALIZE handler
	;as they are class not object specific bits. They are not
	;copied to clipboard.

	GOMOF_GET_DWF_SELECTION_HANDLE_BOUNDS_FOR_TRIVIAL_REJECT:1
		;MSG_GO_GET_DWF_SELECTION_HANDLE_BOUNDS_FOR_TRIVIAL_REJECT
	GOMOF_SPECIAL_RESIZE_CONSTRAIN:1
					;MSG_GO_SPECIAL_RESIZE_CONSTRAIN 
	GOMOF_INVALIDATE_LINE:1		;MSG_GO_INVALIDATE_LINE
	GOMOF_INVALIDATE_AREA:1		;MSG_GO_INVALIDATE_AREA
	GOMOF_INVALIDATE:1		;MSG_GO_INVALIDATE
	GOMOF_NOTIFY_ACTION:1		;MSG_GO_NOTIFY_ACTION
	GOMOF_SEND_UI_NOTIFICATION:1	;MSG_GO_SEND_UI_NOTIFICATION

	;The following bits corresponding to several drawing messages
	;that are almost always sent during the handling of MSG_GO_DRAW.
	;Under certain conditions these message are not sent. 
	;If the line or area mask is 0 then the line or area drawing 
	;messages are not sent. If the area mask is solid then the
	;background message is not sent. If you wish to force one of these
	;messages to be sent anyway then set corresponding the bit.
	;For example the text object sets the DRAW_BG bit because the 
	;foreground is text which doesn't completely cover the background
	;rect, so the background should always be drawn. NOTE: if the
	;background is transparent then the background message will not
	;be sent period.
	;


	GOMOF_DRAW_FG_AREA:1		;MSG_GO_DRAW_FG_AREA(_HI_RES)
	GOMOF_DRAW_FG_LINE:1		;MSG_GO_DRAW_FG_LINE(_HI_RES)
	GOMOF_DRAW_BG:1			;MSG_GO_DRAW_BG

GrObjMessageOptimizationFlags	end

	;    Code that uses GrObjMouseData and similar structures 
	;    depends LMD_location being the first field
	;    in the LargeMouseData structure

	CheckHack	< (offset LMD_location eq 0) >

if 1
GrObjMouseData	struct

	;    Code depends on GOMD_point being the 
	;    first field in GrObjMouseData

	GOMD_point	PointDWFixed
	CheckHack	< (offset GOMD_point eq offset LMD_location) >

	GOMD_buttonInfo	ButtonInfo		;Copy of ButtonInfo
	CheckHack	< (offset GOMD_buttonInfo eq offset LMD_buttonInfo) >

	GOMD_uiFA	UIFunctionsActive	;Copy of UIFunctionsActive
	CheckHack	< (offset GOMD_uiFA eq offset LMD_uiFunctionsActive) >

	GOMD_goFA	GrObjFunctionsActive

	GOMD_gstate	hptr.GState
GrObjMouseData	ends
else
GrObjMouseData	struct

	;    Code depends on GOMD_point being the 
	;    first field in GrObjMouseData

	GOMD_point	PointDWFixed
	CheckHack	< (offset GOMD_point eq 0) >


	GOMD_goFA	GrObjFunctionsActive	

	GOMD_gstate	hptr.GState

	GOMD_buttonInfo	ButtonInfo		;Copy of ButtonInfo

	GOMD_uiFA	UIFunctionsActive	;Copy of UIFunctionsActive

GrObjMouseData	ends
endif




;------------------------------------------------------------------------------
;	GrObjHead Class Definition
;------------------------------------------------------------------------------


GrObjHeadClass	class  MetaClass



;------------------------------------------------------------------------------
;	GrObjHead Class Methods and Structures
;------------------------------------------------------------------------------


;*************************************************
MSG_GH_SET_CURRENT_TOOL		message
;
;	Sets the current tool class and instantiates a tool of this
;	class for the floater object and sends the new object
;	MSG_GO_OBJECT_SPECIFIC_INIITIALIZE with the data passed in bp
;
; Context:	Sent to head when user clicks on a tool in the tool
;		palette, or when app decides change the current tool
; Source:	Unrestricted. Generally application.
; Destination:	GrObjHead.
; Interception:	Unlikely
;		
;
;PASS
;	cx:dx - fptr to Class of tool
;	bp - MSG_GO_GROBJ_SPECIFIC_INITIALIZE data
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GH_SET_CURRENT_TOOL_WITH_DATA_BLOCK		message
;
;	Sets the current tool class and instantiates a tool of this
;	class for the floater object and sends the new object
;	MSG_GO_OBJECT_SPECIFIC_INIITIALIZE with the data passed in bp
;
;	* READ ME *
;	Sending this message will not update the UI to reflect the
;	current tool, so the specific guardian should be sure that
;	the UI is going to be updated otherwise.
;
; Context:	Sent to head when user clicks on a tool in the tool
;		palette, or when app decides change the current tool
; Source:	Unrestricted. Generally application.
; Destination:	GrObjHead.
; Interception:	Unlikely
;		
;
;PASS
;	cx:dx - fptr to Class of tool
;	^hbp - MSG_GO_GROBJ_SPECIFIC_INITIALIZE_WITH_DATA_BLOCK data
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GH_SET_CURRENT_BODY	message
;
; 	Set body to be current body under head.  This body will
;	remain the current on until another body sets itself as
;	the current or this body clears itself.
;
; Context:	Sent to GrObjHead by a GrObjBody when that
;		body gains the target.
; Source:	GrObjBody.
; Destination:	GrObjHead.
; Interception:	Unlikely
;		
;PASS
;	cx:dx - OD of body
;
;RETURN
;	nothing
;	
;DESTROYED:
;	ax
;

;*************************************************
MSG_GH_CLEAR_CURRENT_BODY	message
;
; 	Clear the current body if it is the passed body od.
;
; Context:	Sent to GrObjHead by a GrObjBody when the body
;		loses the target
; Source:	GrObjBody.
; Destination:	GrObjHead.
; Interception:	Unlikely
;
;PASS
;	cx:dx - OD of body
;
;RETURN
;	nothing
;	
;DESTROYED:
;	ax
;

;*************************************************
MSG_GH_CLASSED_EVENT_TO_FLOATER	message
;
;	Send the encapuslated method to the floater object
;
;PASS
;	cx - recorded message handle
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GH_CLASSED_EVENT_TO_FLOATER_IF_CURRENT_BODY	message
;
;	Send the encapuslated method to the floater object if
;	if passed body is the current one.
;
;PASS
;	cx - recorded message handle
;	dx:bp - od of body
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;************************************************
MSG_GH_FLOATER_FINISHED_CREATE		message
;
;	Notify head that the current floater has just completed
;	creation of a new object
;
;PASS
;	nothing
;		
;RETURN
;	nothing	
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GH_GET_CURRENT_TOOL		message
;
;	Gets the current tool class.
;
; Source:	Unrestricted.
; Destination:	GrObjHead.
; Interception:	Unlikely
;		
;
;PASS
;	nothing
;
;RETURN
;	cx:dx - fptr to Class of tool
;	bp - MSG_GO_GROBJ_SPECIFIC_INITIALIZE data
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GH_SEND_NOTIFY_CURRENT_TOOL			message
;
;	Sends notification regarding the current tool
;
; Source:	Unrestricted.
; Destination:	GrObjHead.
; Interception:	Unlikely
;		
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GH_CALL_FLOATER	message
;
;	Dispatch encapsulated message to floater and return the floaters
;	return values to the caller
;
; Context:	Head Utility
; Source:	Unrestricted
; Destination:  GrObjHead
; Interception: Unlikely
;
;PASS:		
;		cx - encapsulated message
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GH_SET_TEXT_TOOL_FOR_SEARCH_SPELL	message
;
;	When the user initiates a search or a spell check we must switch
;	to the text tool so that they can edit any text objects that
;	gain the target via the search or spell
;
; Context:	On MSG_SEARCH and MSG_SPELL_CHECK
; Source:	GrObjBody
; Destination:  GrObjHead
; Interception: The default handler sets the tool to the MultTextGuardianClass.
;		If you wish differnent behaviour then subclass the message
;		and set a different tool class, but don't call the superclass.
;
;PASS:		
;	nothing	
;		
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;------------------------------------------------------------------------------
;	GrObjHeadClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

    GH_currentTool	fptr.ClassStruct		;Class of currently
						;instantiated tool

    GH_initializeFloaterData	word		;Word of data to be sent with
					;MSG_GO_OBJECT_SPECIFIC_INIITIALIZE to
					;the floater when it is instantiated


    GH_currentBody	optr			;OD of current body

    GH_floater		optr			;Tool that is floating 
						;above the body waiting to
						;be placed and sized or to
						;operate on the other objects


GrObjHeadClass	endc



;------------------------------------------------------------------------------
;	GrObj Class Definition
;------------------------------------------------------------------------------


GrObjClass	class  MetaClass, master



;------------------------------------------------------------------------------
;	MetaGrObjMessages
;------------------------------------------------------------------------------



;****************************************************************************
MSG_GROBJ_ACTION_NOTIFICATION	message MetaGrObjMessages
;
;	Send out by grobj for action notification
;
;PASS:		
;	cx:dx - od of grobject
;	bp - GrObjActionNotificationType
;			
;RETURN:	
;	bp - depends on GrObjActionNotificationType
;	GOANT_QUERY_DELETE -> zero to cancel delete.
;	NOTE: Objects in groups will always be deleted even if you
;	attempt to cancel it.
;
;DESTROYED:
;	ax,cx,dx
;


;------------------------------------------------------------------------------
;	GrObj Class Methods and Structures
;------------------------------------------------------------------------------


GrObjHandleSpecification	record
	GOHS_HANDLE_LEFT:1
	GOHS_HANDLE_TOP:1
	GOHS_HANDLE_RIGHT:1
	GOHS_HANDLE_BOTTOM:1
GrObjHandleSpecification	end

HANDLE_MOVE 		= 	00000000b
HANDLE_CENTER		=	HANDLE_MOVE
HANDLE_LEFT_TOP		=	mask GOHS_HANDLE_LEFT or mask GOHS_HANDLE_TOP
HANDLE_MIDDLE_TOP	=	mask GOHS_HANDLE_TOP
HANDLE_RIGHT_TOP	=	mask GOHS_HANDLE_RIGHT or mask GOHS_HANDLE_TOP
HANDLE_LEFT_MIDDLE	=	mask GOHS_HANDLE_LEFT
HANDLE_RIGHT_MIDDLE	=	mask GOHS_HANDLE_RIGHT
HANDLE_LEFT_BOTTOM	=	mask GOHS_HANDLE_LEFT or mask GOHS_HANDLE_BOTTOM
HANDLE_MIDDLE_BOTTOM	=	mask GOHS_HANDLE_BOTTOM
HANDLE_RIGHT_BOTTOM	=	mask GOHS_HANDLE_BOTTOM or mask GOHS_HANDLE_RIGHT



HandleUpdateMode	etype 	byte,	0
HUM_NOW		enum	HandleUpdateMode
HUM_MANUAL	enum	HandleUpdateMode


;*************************************************
MSG_GO_GAINED_SELECTION_LIST	message
;	sent to an object when it gains the selection grab
;PASS:
;	dl - HandleUpdateMode
;RETURNS:
;	nothing
;	
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_LOST_SELECTION_LIST	message
;	sent to an object when it loses the selection grab
;PASS:
;	nothing
;RETURNS:
;	nothing
;	
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_BECOME_SELECTED	message
;
;	Tell object to join the selection list, draw it's handle ...
;	and otherwise become selected
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: If you wish to place additional restrictions 
;		(beyond GrObjLocks) on when an object can be selected, then
;		subclass this message and only call your superclass if
;		you are allowing the object to be selected. Behaviour
;		that you wish to add when an object actually becomes selected
;		should be handle in a subclass of MSG_GO_GAINED_SELECTION_LIST.
;
;PASS:
;	dl - HandleUpdateMode
;
;RETURNS:
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************u
MSG_GO_TOGGLE_SELECTION	message
;
;	Have object switch it selection status
;	
;	
;PASS:
;	nothing
;
;RETURNS:
;	nothing
;
;DESTROYED:
;	ax
;



;*************************************************
MSG_GO_BECOME_UNSELECTED 	message
;	Notify object that it is no longer selection
;PASS:
;	nothing
;
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_UNDRAW_SPRITE		message
;static
;	If the object's sprite is currently drawn, then erase it
;	Will use either quick sprite or tools specific sprite routine
;
;PASS
;	dx - gstate or 0
;
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_DRAW_SPRITE	message
;
;	Draw the object's sprite unless the sprite is already drawn
;
; Context:	While handling mouse events in move,resize,rotate modes
; Source:	Object itself
; Destination:  Object itself
; Interception: Unlikely. To change the image of the sprite subclass
;		MSG_GO_DRAW_SPRITE_LINE
;
;PASS:		
;	dx - gstate or 0
;	bp - GrObjFunctionsActive (GOFA_VIEW_ZOOMED)
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_DRAW_SPRITE_RAW	message
;static	
;	Called to update sprite image during an expose event. Draws
;	the appropriate sprite if the spriteDrawn flag is set, otherwise
;	does nothing.
;
;PASS:
;	dx - gstate 
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_DRAW_HANDLES		message
;	Draws handles to indicate object is selected. Only draws
;	the handles if the handlesDrawn flag is NOT set.
;
;PASS:
;	dx - gstate or 0
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_UNDRAW_HANDLES	message
;	Erases the handles that indicate the object is selected.
;	Only erases the handles if the handlesDrawn flag IS set.
;
;PASS:
;	dx - gstate or 0
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_DRAW_HANDLES_RAW	message
;	Called to update the handles during an expose event. Draws
;	the handles if the handlesDraw flag is set, otherwise
;	does nothing
;
;PASS
;	dx - gstate
;
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_DRAW_HANDLES_FORCE		message
;	Draw handles of the object regardless of the state of the selected
;	bit. But don't draw them if the are already drawn
;	
;
;PASS:
;	dx - gstate or 0
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_DRAW_HANDLES_MATCH		message
;	Draws or undraws the handles of the object to reflect
;	the state of the selected bit
;	
;
;PASS:
;	dx - gstate or 0
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_DRAW_HANDLES_OPPOSITE		message
;	Draws or undraws the handles of the object to reflect
;	the opposite of the selected bit
;	
;
;PASS:
;	dx - gstate or 0
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_ACTIVATE_MOVE		message
;	Sets up object for move. Does not actually start move.
;	Need to send a MSG_GO_START_MOVE for that
;
;PASS
;	nothing
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;



;*************************************************
MSG_GO_ACTIVATE_RESIZE		message
;
;	Sets up object for resize. 
;
; Context:	Usually called when user clicks on resize handle
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. 
; Interception:	Unlikely
;
;PASS:
;	nothing
;		
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_ACTIVATE_ROTATE		message
;	Sets up object for rotate. Does not actually start rotate
;	Need to send a MSG_GO_START_ROTATE for that
;
;PASS:
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;



ActivateCreateFlags	record
	ACF_NOTIFY:1			;notify selected objects that
					;tool is activating
ActivateCreateFlags	end

;*************************************************
MSG_GO_ACTIVATE_CREATE		message
;
;	Have object activate interactive create mode for the current body.
;	Object needs to set its modes bits, grab the mouse, set
;	its pointer image and notify the
;	selected and editable grobjects that there is a new tool.
;
;	Create mode is the standard mode for the floater. A floater
;	in create mode is allowed to switch to edit mode whenever
;	it wants for editing objects in the document. Many
;	GrObjVisGuardians do this switch on MSG_GO_LARGE_START_SELECT.
;
;
; Context:	When a new floater is instantiated for a body or
;		when the floater already exists but a new body
;		becomes the current one.
; Source:	GrObjHead
; Destination:	Floater only
; Interception:	Likely. The default handler is intended for shapes.
;		Other grobjects such as guardians or pointers 
;		will need to subclass this message.
;
;
;PASS:
;	cl - ActivateCreateFlags
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_REACTIVATE_CREATE		message
; 
;	Prepare the floater for interactive create again. Similar
;	to MSG_GO_ACTIVATE_CREATE, but it doesn't need to notify
;	the selected and editable grobjects
;
;  Context:	Sent to the floater after it has already created
;		a grobject and needs to be ready to create
;		another one.
; Source:	GrObjHead
; Destination:	Floater only
; Interception:	Unlikely
;
;PASS:
;	nothing
;	
;RETURNS:
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_START_CHOOSE_ABS		message
;	Starts the object choosing (mainly for pointer objects)
;	Using absolute mouse coords
;
;PASS:
;	ss:bp - GrObjMouseData
; 	
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_START_MOVE_ABS		message
;	Starts the object moving (mainly for pointer objects)
;	Using absolute mouse coords
;
;
;PASS:
;	ss:bp - GrObjMouseData 
;	
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_JUMP_START_MOVE		message
;	Jump starts interactive move by doing an activate, start and drag stuff
;
; Context:	Quickly start an interactive move. Usually called
;		when user clicks on move handle
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. 
; Interception:	Unlikely
;
;PASS:
;	bp - GrObjFunctionsActive
;	dx - gstate or 0
;	
;RETURN:
;	ax - MouseReturnFlags
;	bp - same as passed, except GOFA_RULER_HAS_SEEN_EVENT set
;
;DESTROYED:
;	nothing
;

;*************************************************
MSG_GO_JUMP_START_RESIZE		message
;
;	Jump starts resize by doing an activate, start and drag stuff
;
; Context:	Quickly start an interactive resize. Usually called
;		when user clicks on resize handle
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. 
; Interception:	Unlikely
;
;
;PASS:
;	bp - GrObjFunctionsActive
;	dx - gstate or 0
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;

;*************************************************
MSG_GO_JUMP_START_ROTATE		message
;	Jump starts interactive rotate by doing an 
;	activate, start and drag stuff
;
; Context:	Quickly start an interactive rotate. Usually called
;		when user clicks on handle with rotate pointer
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. 
; Interception:	Unlikely
;
;PASS:
;	bp - GrObjFunctionsActive
;	dx - Gstate or 0
;	
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_PTR_CHOOSE_ABS		message
;	Called when a ptr event is received and the object is in choose mode
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_PTR_MOVE		message
;
;	Sent to update position of mouse during an interactive move
;	
;
; Context:	During an interactive resize. This message 
;		cooresponds to an MSG_META_PTR when the object is
;		in move mode
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. If the
;		object is not currently being moved interactively
;		the message will be ignored.
; Interception:	Unlikely
;
;PASS:
;	ss:bp = GrObjMouseData
;		GOMD_point - deltas to move
;		GOMD_gstate - gstate to draw with
;		GOMD_goFA - GrObjFunctionsActive
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


GrObjResizeMouseData	struct

	;    Code depends on GOMD_point being the 
	;    first field in GrObjMouseData

	GORSMD_point	PointDWFixed
	CheckHack	< (offset GORSMD_point eq 0) >

	GORSMD_anchor	GrObjHandleSpecification
	GORSMD_grabbed	GrObjHandleSpecification

	GORSMD_goFA	GrObjFunctionsActive	

	GORSMD_gstate	hptr.GState


	align		word

GrObjResizeMouseData	ends

;*************************************************
MSG_GO_PTR_RESIZE		message
;
;	Sent to update position of mouse during an interactive resize
;	
;
; Context:	During an interactive resize. This message 
;		cooresponds to an MSG_META_PTR when the object is
;		in resize mode
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. If the
;		object is not currently being resized interactively
;		the message will be ignored.
; Interception:	Unlikely
;		
;		
;
;PASS:
;	ss:bp = GrObjResizeMouseData
;		GORSMD_point - deltas to resize
;		GORSMD_gstate - gstate to draw with
;		GORSMD_goFA - GrObjFunctionsActive
;		GORSMD_anchor - anchored handle
;	
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;    Stack frame passed with rotate messages
;

GrObjRotateMouseData	struct

	GORMD_degrees	WWFixed

	GORMD_anchor	GrObjHandleSpecification

	GORMD_goFA	GrObjFunctionsActive

	GORMD_gstate	hptr.GState

	align		word

GrObjRotateMouseData	ends

;*************************************************
MSG_GO_PTR_ROTATE		message
;
;	Sent to update position of mouse during an interactive rotate
;	
;
; Context:	During an interactive rotate. This message 
;		cooresponds to an MSG_META_PTR when the object is
;		in rotate mode
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. If the
;		object is not currently being rotate interactively
;		the message will be ignored.
; Interception:	Unlikely
;		
;
;PASS:
;	ss:bp - GrObjRotateMouseData
;		GORMD_degrees	- amount to rotate
; 		GORMD_anchor	- handle to rotate about
; 		GORMD_goFA	- GrObjFunctionsActive
; 		GORMD_gstate	- gstate to draw sprite with..
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;



;*************************************************
MSG_GO_PTR_MOVE_ABS		message
;	Sent when a ptr event is received and the object is in move mode.
;	Uses absolute mouse position.
;
;PASS:
; 	ss:bp = GrObjMouseData
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;



;*************************************************
MSG_GO_END_CHOOSE_ABS		message
;	Sent when an end select event is received and the object is in 
;	choose mode. 
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;

;*************************************************
MSG_GO_END_MOVE_ABS		message
;	Sent when an end move copy event is received and the object is in 
;	move mode. 
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_END_MOVE		message
;
;	Sent to complete an interactive move of an object
;
;
; Context:	At the end of an interactive move. This message 
;		cooresponds to an MSG_META_END_SELECT when the object is
;		in move mode
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. If the
;		object is not currently being moved interactively
;		the message will be ignored.
; Interception:	Possible. Generally call superclass first then perform
;		additional action, such as vis guardians sending
;		a notify geometry valid to their vis wards.
;
;PASS:
;	ss:bp = GrObjMouseData
;		GOMD_point - deltas to move
;		GOMD_gstate - gstate to draw with
;		GOMD_goFA - GrObjFunctionsActive
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_END_RESIZE		message
;
;	Sent to complete an interactive resize on an object
;
;
; Context:	At the end of an interactive resize. This message 
;		cooresponds to an MSG_META_END_SELECT when the object is
;		in resize mode
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. If the
;		object is not currently being resized interactively
;		the message will be ignored.
; Interception:	Possible. Generally call superclass first then perform
;		additional action, such as vis guardians sending
;		a notify geometry valid to their vis wards.
;
;
;PASS:
;	ss:bp = GrObjResizeMouseData
;		GORSMD_point - deltas to resize
;		GORSMD_anchor - anchored handle
;		GORSMD_grabbed - grabbed handle
;		GORSMD_gstate - gstate to draw with
;		GORSMD_goFA - GrObjFunctionsActive
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_END_ROTATE		message
;
;	Sent to complete an interactive rotate of an object
;
;
; Context:	At the end of an interactive rotate. This message 
;		cooresponds to an MSG_META_END_SELECT when the object is
;		in rotate mode
; Source:	Unrestricted, generally pointer object
; Destination:	Any grobj object that is not within a group. If the
;		object is not currently being rotated interactively
;		the message will be ignored.
; Interception:	Possible. Generally call superclass first then perform
;		additional action, such as vis guardians sending
;		a notify geometry valid to their vis wards.
;
;PASS:
;	ss:bp - GrObjRotateMouseData
;
;RETURN:
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;



;****************************************************************************
MSG_GO_CLEAR	message
;
;	Tell grobject to destroy itself in an undoable fashion. 
;	It will remove itself from the body or group if necessary, 
;	release grabs, etc. The object itself will not actually be
;	destroyed until its undo action is freed.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely. If grobject has any extra data that must be
;		freed it should do so on MSG_META_FINAL_OBJ_FREE
;		
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_INVERT_HANDLES	message
;	Invert of handles of selected object
;
;PASS:	
;	dx - gstate
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


GrObjTransMatrix	struct
	GTM_e11		WWFixed
	GTM_e12		WWFixed
	GTM_e21		WWFixed
	GTM_e22		WWFixed
GrObjTransMatrix	ends

BasicInit	struct
	BI_center		PointDWFixed
	BI_width		WWFixed
	BI_height		WWFixed
	BI_transform		GrObjTransMatrix
	align			word
BasicInit	ends



;*************************************************
MSG_GO_INIT_BASIC_DATA	message
;	Have object fill out its basic instance data from the
;	passed structure and calculate the remaining data
;	from it.
; 
;PASS
;	ss:bp - BasicInit
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_FLIP_HORIZ	message
;
;	Flip object about its vertical axis
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_FLIP_VERT	message
;
;	Flip object about its horizontal axis
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GO_ROTATE		message
;
;	Rotate object x degrees. [current matrix][rotate]
;
; Context:	GrObj utility.
; Source:	Unrestricted, generally UI or object itself
; Destination:	Any grobj object
; Interception:	Unlikely
;
;PASS
;	cx:dx - WWFixed degrees to rotate
;	bp low - GrObjHandleSpecification to rotate about
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GO_UNTRANSFORM		message
;
;	Untransform the object by setting its current matrix = I.
;
; Context:	GrObj utility.
; Source:	Unrestricted, generally UI or object itself
; Destination:	Any grobj object
; Interception:	Unlikely
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GO_MOVE		message
;
;	Move an object relative by the passed distance
;
;
; Context:	GrObj Utiltity
; Source:	Unrestricted, generally UI or object itself
; Destination:	Any grobj object
; Interception:	Unlikely 
;
;PASS
;	ss:bp = PointDWFixed amount to move object in PARENT coords
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GO_MOVE_CENTER_ABS		message
;
;	Move object's center to the passed location
;
;PASS
;	ss:bp = PointDWFixed location to move object's center to in PARENT
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

CenterLeftRightWidth	etype	byte
	CLRW_CENTER	enum	CenterLeftRightWidth
	CLRW_LEFT	enum	CenterLeftRightWidth
	CLRW_RIGHT	enum	CenterLeftRightWidth
	CLRW_WIDTH	enum	CenterLeftRightWidth

CenterTopBottomHeight	etype	byte
	CTBH_CENTER	enum	CenterTopBottomHeight
	CTBH_TOP	enum	CenterTopBottomHeight
	CTBH_BOTTOM	enum	CenterTopBottomHeight
	CTBH_HEIGHT	enum	CenterTopBottomHeight

AlignType	record
	AT_ALIGN_X	: 1
	AT_DISTRIBUTE_X	: 1
	AT_CLRW	CenterLeftRightWidth: 2

	AT_ALIGN_Y	: 1
	AT_DISTRIBUTE_Y	: 1
	AT_CTBH CenterTopBottomHeight: 2
AlignType	end

AlignParams	struct
	AP_x		DWFixed			;AP_x and AP_y should be first
	AP_y		DWFixed
	AP_spacingX	DWFixed
	AP_spacingY	DWFixed
	AP_type		AlignType
AlignParams	ends

;**********************************************
MSG_GO_ALIGN				message
;
;	???
;
;PASS
;	ss:bp = AlignParams
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

AlignToGridType	record
	ATGT_LEFT : 1
	ATGT_H_CENTER : 1
	ATGT_RIGHT : 1
	ATGT_TOP : 1
	ATGT_V_CENTER : 1
	ATGT_BOTTOM : 1
AlignToGridType	end

;**********************************************
MSG_GO_ALIGN_TO_GRID			message
;
;	???
;
;PASS
;	cl = AlignToGridType
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_SEND_ANOTHER_TOOL_ACTIVATED	message
;
;	Sent to grobject to have it send MSG_GO_ANOTHER_TOOL_ACTIVATED
;	to selected grobjects and edit and mouse grab
;
; Context:	Object generally sends this message when
;		handling MSG_GO_ACTIVATE_CREATE
; Source:	Floater
; Destination:	Floater
; Interception:	The default handler assumes the grobject is a shapes
;		Objects, such as guardians, pointer, whatever, need
;		to subclass this message and do the correct notification.
;		In this case the superclass should not be called
;
;PASS:
;	nothing
;
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;

;Provides basic information about tool activating that most selected and
;edited grobjects will be able to use to determine whether to remain
;selected or edited.

AnotherToolActivatedFlags	record
	ATAF_STANDARD_POINTER:1		;A pointer tool intended to word
					;on the normal move and resize
					;handles of an object
	ATAF_SHAPE:1			;A shape drawing tool, rectangle
					;ellipse...		
	ATAF_GUARDIAN:1			;A vis guardian object
AnotherToolActivatedFlags	end

;*************************************************
MSG_GO_ANOTHER_TOOL_ACTIVATED	message
;
;	Sent to selected grobjects when another tool is activated.
;	Receiving object decides whether to drop selection or
;	show an edit indicator based on tool activating
;
; Context:	Object generally sends this message when
;		handling MSG_GO_ACTIVATE_CREATE
; Source:	Floater
; Destination:	Any grobj object
; Interception:	The default handler assumes the grobject is a shape
;		and drops the selection unless the activating
;		tool is a standardPointer. Objects that can be
;		edited, such as guardians, will want to subclass
;		this message. 
;
;PASS:
;	cx:dx - od of caller
;	bp - AnotherToolActivatedFlags
;
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_SPECIAL_RESIZE_CONSTRAIN	message
;
;	Examines the information in the sprite instance data
;	which represents what the object will look like next.
;	If the resulting size,shape etc is not what we want
;	this routine should modify the sprite data appropriately
;
;	NOTE: this message has an associated GrObjMessageOptimizationFlags
;	bit. If you wish to subclass this message, you will need to 
;	set this bit in your object, otherwise the default handler
;	will be called directly.
;
; Context:	Sent to object during handling of MSG_GO_PTR_RESIZE, just
;		before new sprite is to be drawn. Only sent if
;		GOAF_SPECIAL_RESIZE_CONSTRAIN bit is set.
; Source:	Object itself
; Destination:  Object itself
; Interception: There is no default handler
;
;PASS:		
;	cl - GrObjHandleSpecification of anchor		
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_DUPLICATE_FLOATER	message
;
; 	Duplicate the floater in a block that is returned from the
;	body via MSG_GB_GET_BLOCK_FOR_ONE_GROBJ. 
;
;
; Context:	When duplicate of floater is being added to the body.
; Source: 	Unrestricted, usually the body
; Destination:	The floater object
; Interception: If objects has instance data, chunks, other blocks that
;		need to be initialized or otherwise copied then
;		you must subclass this message and call your superclass
;		first. 
;
;PASS
;	cx:dx - OD of body
;
;RETURN
;	cx:dx - OD of new object
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_GRAB_MOUSE		message
;
;	Grab the mouse
;
;PASS
;	nothing
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_RELEASE_MOUSE		message
;
;	Release the mouse
;
;PASS
;	nothing
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_UNGROUPABLE	message
;
;      	Determine if object consists of collection of objects in a
;	group that can be broken up into the indivdual objects
;
;
;PASS
;	nothing
;
;RETURN
;	stc - ungroupable
;	clc - groupable
;
;DESTROYED:
;	ax
;

if	0		;Done in bitmap.def now, apparently 11/13/93 cbh
RectDWFixed	struct
	RDWF_left	DWFixed
	RDWF_top	DWFixed
	RDWF_right	DWFixed
	RDWF_bottom	DWFixed
RectDWFixed	ends
endif

BoundingRectData	struct
	BRD_rect		RectDWFixed
	CheckHack	< (offset BRD_rect eq 0) >
	BRD_destGState		hptr.GState
	BRD_parentGState	hptr.GState
	BRD_initialized		word		;if zero, the rectangle
						;has not been initialized
						;It is generally ignored
						;except by groups
							
BoundingRectData	ends

;*************************************************
MSG_GO_GET_BOUNDING_RECTDWFIXED		message
;
;      	Calculate and return the RectDWFixed that bounds the object
;	in the destination gstate coordinate system.
;
;PASS
;	ss:bp - BoundingRectData
;		BRD_destGState
;		BRD_parentGState
;
;RETURN
;	ss:bp - BoundingRectData
;		BRD_rect	
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_CALC_PARENT_DIMENSIONS		message
;
;      	Have object recalcutate it's document coord width and height
;	using normalTransform, line width and such
;
;PASS
;	nothing
;
;RETURN
;	document dimensions set
;	
;DESTROYED:
;	ax
;



;*************************************************
MSG_GO_INIT_CREATE		message
;
;  Have object initialize its instance data for interactive creation
;
; Context:	Sent by object to itself in response to a receiving
;		a MSG_META_START_SELECT when in create mode.
; Source:	Generally sent by object to itself 
; Destination:	Any grobj object that has yet to be created.
; Interception:	Unlikely. 
;
;PASS
;	ss:bp - PointDWFixed - location to start create from
;
;RETURN
;
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_NOTIFY_GROBJ_VALID		message
;
;  Notify object that it is ready for action. It's got a normalTransform
;  with valid position, size, etc, info and it has any attributes it 
;  needs.
;
; Context:	Sent to object at the end of an interactive create
;		or after it has been created statically.
; Source:	For interactive creates the object sends it to itself.
;		For static creation, whomever created the object
;		must send it
; Destination:	Any grobj object. If the grobj is not currently 
;		invalid it should ignore the message.
; Interception:	Possible. For example, Guardian objects need to 
;		set the geometry of their children upon receiving
;		this message.
;
;PASS
;	nothing
;
;RETURN
;
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_EVALUATE_PARENT_POINT_FOR_HANDLE		message
;
;	Determine if one of the handles of the object would be hit
;	by the passed point
;
; Context:	Usually called as direct action of user clicking with
;		the pointer tool. 
; Source:	Unrestricted, generally the floater
; Destination:	Any grobj object. The message will be ignored if the
;		object's GOTM_HANDLES_DRAWN flag is not set
; Interception:	Possible. If object doesn't have normal 9 handles, such
;		as a line with only 3, it should subclass this message
;		and not call its superclass
;
;PASS
;	ss:bp - PointDWFixed in PARENT
;
;RETURN
;	al - EVALUATE_NONE - handles not hit
;		ah - destroyed
;	al - EVALUATE_HIGH - handle hit
;		ah - GrObjHandleSpecification of hit handle
;
;	dx - 0 ( blank EvaluatePositionNotes)
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_INVERT_GROBJ_SPRITE	message
;
;	Invert objects sprite
;
;PASS
;	dx - gstate to draw or 0
;
;RETURN
;	nothing
;
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_INVERT_GROBJ_NORMAL_SPRITE	message
;
;	Invert normal image of object as if it were the sprite.
;	Used when interatively modifying groups
;
;PASS
;	dx - gstate or 0
;
;RETURN
;	nothing
;
;
;DESTROYED:
;	ax
;



;****************************************************************************
MSG_GO_INVALIDATE	message
;
;	Invalidate the bounding box of the object
;
;	NOTE: this message has an associated GrObjMessageOptimizationFlags
;	bit. If you wish to subclass this message, you will need to 
;	set this bit in your object, otherwise the default handler
;	will be called directly.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: If you subclass this message you must set
;		GOMOF_INVALIDATE in the GOI_msgOptFlags field in
;		the object's instance data
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_GET_DW_PARENT_BOUNDS	message
;
;	Get RectDWord bounds of object in PARENT coord system
;
;	NOTE: this message handler is not used internally so subclassing
;	it will do nothing. It is merely provided as an external interface
;
;PASS
;	ss:bp - RectDWord
;
;RETURN
;	ss:bp - RectDWord
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_GET_DWF_PARENT_BOUNDS	message
;
;	Get DWFixed bounds of object in PARENT coordinate system
;
;	NOTE: this message handler is not used internally so subclassing
;	it will do nothing. It is merely provided as an external interface
;
;PASS
;	ss:bp - RectDWFixed
;
;RETURN
;	ss:bp - RectDWFixed
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_GET_DWF_SELECTION_HANDLE_BOUNDS_FOR_TRIVIAL_REJECT	message
;
;	Get extended DWFixed objects bounds in document coordinates. 
;	The extension will cover things hanging off the object likes
;       its handles. It is intended for trivially rejecting pointer 
;	events and clicks over handles of selected objects
;
;	For some objects, like rotated ellipses this bounds calculation
;	is non trivial, so they will just return the entire graphics system
;	as the bounds.
;	
;	This message can only be sent to objects not in groups. GrObjs
;	inside groups can't be selected, so they don't have handles. Even
;	if they did, this routine is not prepared to map the handle size 
;	from DOCUMENT coords into PARENT coords.
;
;	NOTE: this message has an associated GrObjMessageOptimizationFlags
;	bit. If you wish to subclass this message, you will need to 
;	set this bit in your object.
;	
;PASS
;	ss:bp - RectDWFixed
;
;RETURN
;	ss:bp - RectDWFixed
;
;DESTROYED:
;	ax
;

RectWWFixed	struct
	RWWF_left	WWFixed
	RWWF_top	WWFixed
	RWWF_right	WWFixed
	RWWF_bottom	WWFixed
RectWWFixed	ends

;*************************************************
MSG_GO_GET_WWF_PARENT_BOUNDS	message
;
;	Returns the RectWWFixed that surrounds the children in
;	PARENT coordinate system.
;
;	Only children in groups are guaranteed to have 
;	bounds that can be expressed in WWFixed so this
;	message can only be sent to children in groups
;
;	NOTE: this message handler is not used internally so subclassing
;	it will do nothing. It is merely provided as an external interface
;
;PASS
;	ss:bp - RectWWFixed
;
;RETURN
;	ss:bp - RectWWFixed
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_GET_WWF_OBJECT_BOUNDS	message
;
;	Returns the RectWWFixed that surrounds the children in
;	OBJECT coordinate system
;
;	NOTE: this message handler is not used internally so subclassing
;	it will do nothing. It is merely provided as an external interface
;
;PASS
;	ss:bp - RectWWFixed
;
;RETURN
;	ss:bp - RectWWFixed
;
;DESTROYED:
;	ax
;



AfterEditAction	etype	byte,	0
DONT_SELECT_AFTER_EDIT	enum	AfterEditAction
SELECT_AFTER_EDIT	enum	AfterEditAction

;*************************************************
MSG_GO_BECOME_UNEDITABLE		message
;
;	Tell object to release edit grab
;
; Context:	Usually called as direct action of user. Either choosing
;		tool of another object, clicking on a different object to
;		edit.
; Source:	Unrestricted, often the floater or object being created
; Destination:	Any grobj object, in generally only GrObjVisGuardians 
;		can actually become editable.
; Interception:	Unlikely
;
;PASS
;	cl - AfterEditAction
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;    Code in the grobj depends on EVALUATE_NONE being zero
;

EvaluatePositionRating	etype	byte,	0
EVALUATE_NONE		enum EvaluatePositionRating	;Point is not 
							;interesting at all

EVALUATE_SUB_LOW	enum EvaluatePositionRating	;Not currently used

EVALUATE_LOW		enum EvaluatePositionRating	;Point is in rectangle
							;bounding an object.

EVALUATE_SUB_MEDIUM	enum EvaluatePositionRating	;Not currently used

EVALUATE_MEDIUM		enum EvaluatePositionRating	;Point is inside
							;enclosed but not
							;filled object.

EVALUATE_SUB_HIGH	enum EvaluatePositionRating	;Not currently used

EVALUATE_HIGH		enum EvaluatePositionRating 	;Point is on line
							;or filled or 
							;partially filled area

EvaluatePositionNotes	record	
	EPN_PADDING:14
	EPN_SELECTION_LOCK_SET:1	;Objects selection lock is set.
	EPN_BLOCKS_LOWER_OBJECTS:1	;GrObj blocks out, covers up or
					;otherwise completely obscures objects
					;underneath it at the position
EvaluatePositionNotes	end

;*************************************************
MSG_GO_EVALUATE_POSITION	message
;	Have object evaluate the passed mouse position in terms 
;	of selection
;	
;
;PASS
;	ss:bp - PointDWFixed
;
;RETURN
;	al - EvaluatePositionRating
;	dx - EvaluatePositionNotes
;
;DESTROYED:
;	ah
;

;*************************************************
MSG_GO_EVALUATE_PARENT_POINT_FOR_SELECTION	message
;
;	Have object evaluate the passed point in terms 
;	of selection. The point is in the PARENT's coordinate system
;
; Context:	Varied. Generally used when determine which object to
;		select from a mouse click
; Source:	Unrestricted
; Destination:	Any grobj object
; Interception:	Very likely. Most grobj object's are unique in their
;		rating of a point. It is unlikely that you will need
;		to call your superclass
;		
;		
;PASS
;	ss:bp - PointDWFixed in PARENT coordinate system
;
;RETURN
;	al - EvaluatePositionRating
;	dx - EvaluatePositionNotes
;
;
;DESTROYED:
;	ah
;

;*************************************************
MSG_GO_GET_CENTER		message
;
;	Return center of object
;
;PASS
;	ss:bp - PointDWFixed
;
;RETURN
;	ss:bp - PointDWFixed with center in it
;	
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_INIT_TO_DEFAULT_ATTRS	message
;
;	Have object initialize its attributes to the current defaults
;
;PASS
;	nothing
;
;RETURN
;	nothing
;	
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_DRAW	message
;
;	Draw the object. Does not include drawing of object handles,
;	sprites or edit marker.
;	
;
; Context:	Unrestricted
; Source:	Unrestricted
; Destination:  Any grobject.
; Interception: Unlikely. Consider subclassing MGS_GOA_DRAW_FG
;		and MSG_GO_DRAW_BG_AREA
;
;PASS:		
;	bp - gstate with PARENT transformation in it.
;	cl - DrawFlags
;	dx - GrObjDrawFlags
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;




;*************************************************
MSG_GO_LARGE_START_SELECT	message
;
;	Internal version of MSG_META_LARGE_START_SELECT
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_LARGE_START_MOVE_COPY	message
;
;	Internal version of MSG_META_LARGE_START_MOVE_COPY
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN
;	ax - MouseReturnFlag
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_LARGE_END_SELECT	message
;
;	Internal version of MSG_META_LARGE_END_SELECT
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;

;*************************************************
MSG_GO_LARGE_END_MOVE_COPY	message
;
;	Internal version of MSG_META_LARGE_END_MOVE_COPY
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;

;*************************************************
MSG_GO_LARGE_DRAG_SELECT	message
;
;	Internal version of MSG_META_LARGE_DRAG_SELECT
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;


;*************************************************
MSG_GO_LARGE_DRAG_MOVE_COPY	message
;
;	Internal version of MSG_META_LARGE_DRAG_MOVE_COPY
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;

;*************************************************
MSG_GO_LARGE_PTR			message
;
;	Internal version of MSG_META_LARGE_PTR
;
;PASS:
;	ss:bp - GrObjMouseData
;
;RETURN
;	ax - MouseReturnFlags
;
;DESTROYED:
;	nothing
;

AfterAddedToGroupData	struct
	AATGD_group		optr		;OD of group object

	AATGD_centerAdjust	PointDWFixed	;Value to subtract from
						;center of child to position
						;it correctly

AfterAddedToGroupData	ends

;*************************************************
MSG_GO_AFTER_ADDED_TO_GROUP	message
;
;	Sent to an object after it has been added to a group
;
;PASS:
;	ss:bp - AfterAddedToGroupData
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_BEFORE_REMOVED_FROM_GROUP	message
;
;	Sent to an object just before it is removed from a group
;
;PASS:
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_AFTER_ADDED_TO_BODY	message
;
;	Sent to an object after it has been added to the body
;
; Context:	Sent to object that has just been added to body.
; Source:	Body only
; Destination:	Any grobj object
; Interception:	Possible. Call super class before doing own processing.
;		Example, VisGuardian intercepts this message
;		to visually add its ward to the body
;
;PASS:
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_BEFORE_REMOVED_FROM_BODY	message
;
;	Sent to an object just before it is removed from the body
;
; Context:	Sent to object that just before it is removed from body
; Source:	Body only
; Destination:	Any grobj object that has been added to body
; Interception:	Possible. Call super class after doing own processing.
;		Example, VisGuardian intercepts this message
;		to visually remove its ward from the body

;PASS:
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_SET_AREA_ATTR		message
;
;	Set the area attributes of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	ss:bp - GrObjBaseAreaAttrElement
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_AREA_COLOR		message
;
;	Set the area color of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - r
;	ch - g
;	dl - b
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_AREA_MASK		message
;
;	Set the area mask of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - SystemDrawMask
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_AREA_DRAW_MODE		message
;
;	Set the draw mode of the object in the area structure. The
;	draw mode is actually used for both the line and area 
;	drawing.
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - MixMode
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_SET_TRANSPARENCY		message
;
;	Set the transparency of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - TRUE/FALSE
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_SET_LINE_ATTR		message
;
;	Set the line attributes of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	ss:bp - GrObjBaseLineAttrElement
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;



;*************************************************
MSG_GO_SET_LINE_COLOR		message
;
;	Set the line color of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no line
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - r
;	ch - g
;	dl - b
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_LINE_MASK		message
;
;	Set the line mask of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no line
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - SystemDrawMask
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_LINE_END		message
;
;	Set the line end of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no line
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - LineEnd
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_LINE_JOIN		message
;
;	Set the line join of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no line
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - LineJoin
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_LINE_STYLE		message
;
;	Set the line style of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no line
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - LineStyle
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_LINE_WIDTH		message
;
;	Set the line width of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no line
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	dx:cx - WWFixed line width
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_LINE_MITER_LIMIT		message
;
;	Set the line miter limit of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no line
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	dx:cx - WWFixed miter limit
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_GET_GROBJ_AREA_TOKEN		message
;
;	Return the index of the GrObjBaseAreaAttrElement for this object
;
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area attributes
;		it will not respond to the message.
; Interception:	Unlikely
;		
;
;PASS:
;	nothing
;
;RETURN
;	cx - token	
;	must always return carry set
;	
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_GET_GROBJ_LINE_TOKEN		message
;
;	Return the index of the GrObjBaseLineAttrElement for this object
;
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no line attributes
;		it will not respond to the message.
; Interception:	Unlikely
;		
;
;PASS:
;	nothing
;
;RETURN
;	cx - token	
;	must always return carry set
;	
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_SET_GROBJ_AREA_TOKEN		message
;
;	Set the area token for the object
;
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. 
; Interception:	Unlikely
;		
;
;PASS:
;	cx - token (CA_NULL_ELEMENT for return to base style)	
;
;RETURN
;	nothing
;	
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_SET_GROBJ_LINE_TOKEN		message
;
;	Set the line token for the object
;
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object.
; Interception:	Unlikely
;		
;
;PASS:
;	cx - token (CA_NULL_ELEMENT for return to base style)
;
;RETURN
;	nothing
;	
;DESTROYED:
;	ax
;

;**********************************************
MSG_GO_SUBST_AREA_TOKEN				message
;
;	If GrObj's area token matches the passed "old" token, replace it
;	with the new token, updating the reference counts if specified
;
; Context:	GrObj Utility		
; Source:	Most likely from the style substitution callack
; Destination:	GrObj
; Interception:	Unlikely
;
;PASS:		cx - old area token
;		dx - new area token
;		bp - nonzero if GrObjs should update reference counts
;			to both the old and new tokens
;
;RETURN:	nothing
;
;DESTROYED:	ax

 
;**********************************************
MSG_GO_SUBST_LINE_TOKEN				message
;
;	If GrObj's line token matches the passed "old" token, replace it
;	with the new token, updating the reference counts if specified
;
; Context:	GrObjBody Utility		
; Source:	Most likely from the style substitution callack
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS:		cx - old line token
;		dx - new line token
;		bp - nonzero if GrObjs should update reference counts
;			to both the old and new tokens
;
;RETURN:	nothing
;
;DESTROYED:	ax



GrObjHandleAnchorData	struct
	GOHAD_anchor	PointDWFixed
	CheckHack	< (offset GOHAD_anchor eq 0) >
	GOHAD_handle	GrObjHandleSpecification
	align		word
GrObjHandleAnchorData	ends



;*************************************************
MSG_GO_GET_ANCHOR_DOCUMENT		message
;
;:	Get coords of anchor point specified by 
;	GrObjHandleSpecification in DOCUMENT coords
;
;PASS:
;	ss:bp - GrObjHandleAnchorData
;		GOHAD_handle - GrObjHandleSpecification
;
;RETURN
;	ss:bp - GrObjHandleAnchorData
;		GOHAD_anchor
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_BECOME_EDITABLE		message
;
;	Tell object to grab the edit grab
;
; Context:	Usually called as direct action of user. Either clicking on
;		object with edit tool or hitting edit menu item when one
;		object is selected.
; Source:	Unrestricted, often the floater or the body.
; Destination:	Any grobj object, in generally only GrObjVisGuardians 
;		can actually become editable.
; Interception:	Unlikely
;
;PASS:
;	nothing
;
;RETURNS:
;	stc - became editable
;	clc - didn't become editable, most likely due to edit lock
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_DRAW_EDIT_INDICATOR		message
;
;	Draws something to indicate to the user that
;	this object is being edited
;
; Context:	When the objects is becoming editable
; Source:	Unrestricted, often the object itself on MSG_GO_BECOME_EDITABLE
; Destination:	Any grobj object that can be edited. If the object
;		is not currently being edited the message will be
;		ignored
; Interception:	Unlikely
;
;
;PASS:
;	dx - gstate
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_UNDRAW_EDIT_INDICATOR	message
;
;	Erase the something that indicates to the user that
;	this object is being edited
;
; Context:	When the objects is becoming uneditable
; Source:	Unrestricted, often the object itself on MSG_GO_BECOME_UNEDITABLE
; Destination:	Any grobj object that can be edited. If the object's
;		edit marker is not currently drawn the message will be
;		ignored.
; Interception:	Unlikely
;
;
;PASS:
;	dx - gstate
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_DRAW_EDIT_INDICATOR_RAW	message
;	Called to update the something that indicates to the
;	user that this object is being edited during an expose event. Draws
;	the something if the indicatorDrawn flag is set, otherwise
;	does nothing
;
; Context:	During an expose event
; Source:	Unrestricted, most often the graphic body
; Destination:	Any grobj object that is being edited. If the object
;		is not being edited the message is ignored
; Interception:	Unlikely.
;
;PASS
;	dx - gstate
;
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_INVERT_EDIT_INDICATOR	message
;
;	Invert the edit indicator
;
; Context:	When the edit indicator needs to be drawn/erased 
; Source:	Unrestricted, most often the object itself
; Destination:	Any grobj object that can be edited. 
; Interception:	Possible. If the object has its own special edit
;		indicator it should invert its indicator and not
;		call its superclass
;
;PASS:	
;	dx - gstate
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_GROBJ_SPECIFIC_INITIALIZE	message
;
;	Do any initialization that is necessary after the object
;	has been instantiated.
;
; Context:	Send to floater object immediately after it is 
;		instantiated. Must be sent to object before 
;		MSG_GO_ACTIVATE_CREATE
; Source:	GrObjHead
; Destination:	Only the floater
; Interception:	Likely. There is no default behaviour for this function.
;		Each object that expects special initialize data
;		must have a handler
;		
;PASS:	
;	bp - object specific initialization data
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_GROBJ_SPECIFIC_INITIALIZE_WITH_DATA_BLOCK	message
;
;	Do any initialization that is necessary after the object
;	has been instantiated.
;
; Context:	Send to floater object immediately after it is 
;		instantiated. Must be sent to object before 
;		MSG_GO_ACTIVATE_CREATE
; Source:	GrObjHead
; Destination:	Only the floater
; Interception:	Likely. There is no default behaviour for this function.
;		Each object that expects special initialize data
;		must have a handler
;		
;PASS:	
;	^hbp - object specific initialization data
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_APPLY_ATTRIBUTES_TO_GSTATE	message
;
;	Have object apply any attributes that is possess in its
;	instance data to the passed gstate
;	
; Context:	Unlimited
; Source:	Anything
; Destination:	Any grobj object
; Interception:	Likely. There is no default handler for this message. Any
;		object that adds new attributes to its instance dataa
;		should subclass this message
;		
;PASS:	
;	bp - gstate
;
;RETURN
;	bp - gstate with attributes applied
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_SET_ACTION_NOTIFICATION_OUTPUT	message
;
;	Specify the output descriptor for grobjects to 
;	send notification to when an action is performed on them.
;	Many uses of the grobj will have no notification. 
;	This is for special uses like the
;	chart library which needs to know when pieces of the chart
;	have become selected, been moved, etc.
;
;	When a grobject sends out a notification it will put
;	its OD in cx:dx and bp will contain GrObjActionNotificationType.
;
;	The object whose OD is passed with this message must either 
;	be in the same file or in a resource
;	because the grobj will attempt to relocate and unrelocate it.
;
;	Setting the output will remove any suspension of action 
;	notifications.
;
;	The message sent out is MSG_GROBJ_ACTION_NOTIFICATION
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
; PASS:		
;	cx:dx - optr of object to notify
;		passing cx=0 will clear the output
;			
; RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_NOTIFY_ACTION	message
;
;	Message that an object sends to itself to notify it that
;	an action has been performed. The default handler sends
;	the action notification output 
;	(see MSG_GO_SET_ACTION_NOTIFICATION_OUTPUT and 
;	MSG_GB_SET_ACTION_NOTIFICATION_OUTPUT)
;	If the grobject doesn't have an output of its own it 
;	will attempt to use the GrObjBody's action output.
;
;	If the object has a GrObjWrapTexType other than GOWTT_NONE
;	it will send out two notifications for several of the
;	GrObjActionNotificationTypes instead of one.
;
;	for GOANT_PRE_MOVE, GOANT_PRE_RESIZE, GOANT_PRE_ROTATE,
;	GOANT_PRE_TRANSFORM, GOANT_PRE_SPEC_MODIFY, GOANT_PRE_SKEW
;	it will also send out GOANT_PRE_WRAP_CHANGE
;
;	for GOANT_MOVED, GOANT_RESIZED, GOANT_ROTATED,
;	GOANT_TRANSFORMED, GOANT_SPEC_MODIFIED, GOANT_PRE_SKEWED,
;	GOANT_PASTED, GOANT_UNDO_GEOMETRY it will also send out 
;	GOANT_WRAP_CHANGED
;
;	NOTE: this message has an associated GrObjMessageOptimizationFlags
;	bit. If you wish to subclass this message, you will need to 
;	set this bit in your object, otherwise the default handler
;	will be called directly.
;
; Context:	GrObj Utility
; Source:	Generally the object itself
; Destination:  Any GrObject
; Interception: If you subclass this message you must set
;		GOMOF_NOTIFY_ACTION in the GOI_msgOptFlags field in
;		the object's instance data
;
;PASS:		
;	bp - GrObjActionNotificationType
;			
;RETURN:
;	bp - based on GrObjActionNotificationType
;	     GOANT_PRE_DELETE - zero to abort the deletion
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GO_NUDGE		message
;
;	Move an object a multiple of current DEVICE units. This is generally
;	used for moving an object on pixel on the screen regardless of
;	the scale factor in the view
;
;
; Context:	GrObj Utiltity
; Source:	Unrestricted, generally UI or object itself
; Destination:	Any grobj object
; Interception:	Unlikely
;
;PASS
;	cx - number of device units in x to move
;	dx - number of device units in y to move
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_SIZE	message
;
;	Set the width and height of the object in points. The dimensions
;	are calculated by mapping the objects corners into document 
;	coordinates and calculating the distances between them. The center of
;	of the selection handles of a rectangle represent the corners mapped
;	into document coordinates. The line thickness is not included in
;	this calculation.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any Grobject
; Interception:	Unlikely
;
;PASS:		
;	ss:bp - PointWWFixed
;		PF_x - desired width in points
;		PF_y - desired height in points
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_POSITION	message
;
;	Set the poistion of the upper left of a grobject. The position set
;	is in DOCUMENT coords unless the grobject is in a group. Then the
;	position is relative to the upper left of a group. If the grobject
;	has been rotated/skewed/tranformed this sets the location of the
;	selection handle that was initially at the upper left of the grobject.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any Grobject
; Interception:	Unlikely 
;
;PASS:		
;	ss:bp - PointDWFixed
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_CHANGE_LOCKS	message
;
;	Change the GrObjLocks for the object. The original lock values
;	are returned to faciliate temporary changes to the locks.
;	The bits in dx will be cleared before the bits in cx are set.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		
;	cx - GrObjLocks - bits to set
;	dx - GrObjLocks - bits to clear
;			
;RETURN:	
;	cx - GrObjLocks before change
;	dx - GrObjLocks after change
;
;DESTROYED:
;	ax
;

GrObjScaleData	struct
	GOSD_xScale	WWFixed
	GOSD_yScale	WWFixed
GrObjScaleData	ends

GrObjAnchoredScaleData	struct
	GOASD_scale		GrObjScaleData
	GOASD_scaleAnchor 	GrObjHandleSpecification
	align			word
GrObjAnchoredScaleData	ends

;****************************************************************************
MSG_GO_SCALE	message
;
;	Scale a grobject. [current matrix][scale]
;	Anchors center of object.
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		
;	ss:bp - GrObjScaleData
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_COMBINE_AREA_NOTIFICATION_DATA			message
;
;	Combine this grobj's attributes with the passed structure
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		^hcx = GrObjNotifyAreaAttrChange
;
;RETURN:	carry clear to continue processing
;			
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_COMBINE_GRADIENT_NOTIFICATION_DATA			message
;
;	Combine this grobj's attributes with the passed structure
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		^hcx = GrObjNotifyGradientAttrChange
;
;RETURN:	nothing
;			
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_COMBINE_LINE_NOTIFICATION_DATA			message
;
;	Combine this grobj's attributes with the passed structure
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		^hcx = GrObjNotifyLineAttrChange
;
;RETURN:	nothing
;			
;DESTROYED:
;	ax
;

MSG_GO_COMBINE_SELECT_STATE_NOTIFICATION_DATA	message ;unused. please nuke

;****************************************************************************
MSG_GO_COMBINE_SELECTION_STATE_NOTIFICATION_DATA	message
;
;	Combine this grobj's attributes with the passed structure
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		^hcx = GrObjNotifySelectionStateChange struct
;
;RETURN:	nothing
;			
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_COMBINE_STYLE_NOTIFICATION_DATA			message
;
;	Combine this grobj's attributes with the passed structure
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		^hcx - NotifyStyleChange struct
;
;RETURN:	nothing
;			
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_COMBINE_STYLE_SHEET_NOTIFICATION_DATA		message
;
;	Combine this grobj's attributes with the passed structure
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		^hcx = NotifyStyleSheetChange struct
;
;RETURN:	nothing
;			
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_SEND_UI_NOTIFICATION	message
;
;	Initiate sending a notification to update the ui controllers
;
;	NOTE: this message has an associated GrObjMessageOptimizationFlags
;	bit. If you wish to subclass this message, you will need to 
;	set this bit in your object, otherwise the default handler
;	will be called directly.
;
; Context:	GrObj Utility
; Source:	Generally the grobject itself
; Destination:  any grobject
; Interception: Unlikely
;
;PASS:		
;	cx - GrObjUINotificationTypes of notifications that need to
;	be performed.
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SUSPEND_ACTION_NOTIFICATION	message
;
;	Prevent grobject from sending out any action notifications.
;	If the grobject has no action notification od then the
;	suspension will be ignored.
;	Nested suspends and unsuspends are allowed.
;	If a file is closed it will always reopen unsuspended.
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_UNSUSPEND_ACTION_NOTIFICATION	message
;
;	Counterbalance a call to MSG_GO_SUSPEND_ACTION_NOTIFICATION.
;	If all suspends have been balanced the grobject will be
;	free to send out action notification. However, it will not
;	send action notifications that were aborted during the suspended
;	period. If the grobject is not suspend the message will be ignored.
;
; Context:	GrObj Utility
; Source:	Unrestricted.
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing		
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

GrObjSkewData	struct
	GOSD_xDegrees	WWFixed
	GOSD_yDegrees	WWFixed
GrObjSkewData	ends

GrObjAnchoredSkewData	struct
	GOASD_degrees		GrObjSkewData
	GOASD_skewAnchor	GrObjHandleSpecification
	align			word
GrObjAnchoredSkewData	ends


;****************************************************************************
MSG_GO_SKEW	message
;
;	Skew grobject. [current matrix][skew]
;
; Context:	GrObjUtility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	ss:bp - GrObjSkewData
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_TRANSFORM	message
;
;	Transform the object. [current matrix][transform]
;	This is generally used to apply a groups transformation to
;	all the children in the group. Unlike MSG_GO_SCALE,ROTATE,SKEW
;	a handle is not anchored for the transformation. Instead the
;	center of the object is also tranformed by the transformation.
;
; Context:	GrObjUtility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	ss:bp - TransMatrix
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_COMPLETE_CREATE	message
;
;	Complete interative create of an object. An object sends this
;	message to itself once it has set up its geometry and generally
;	cleaned up the state of its instance data. Upon handling this
;	message an object is expected to.
;	Send notify grobj valid to itself.
;	Calculate its parent dimensions.
;	Draw itself to the screen
;	Notify head of completed create
;	Send action notification
;	Become selected or editable
;
; Context:	Sent to object at completion of interactive create
; Source:	Unrestricted. Ususally sent by object to itself
; Destination:  Any grobject that has just finished being created.
; Interception: Highly likely. The default handler will not
;		cause the object to become selected or become editable.
;		Each object must subclass this message, call its super
;		and then make itself selected or edited. Guardians
;		may also wish to subclass this message so that
;		can reset their instance data to have the Identity matrix
;		in their OT_transform field		
;
;PASS:		
;	nothing
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_COMPLETE_TRANSFORM	message
;
;	Object sends this message to itself to complete
;	a resize, rotate, skew or other transformation.
;	Object needs to calculate its parent dimensions,
;	adjust its position to make sure it is on the document,
;	invalidate itself and redraw handles if necessary.
;	Then send out MSG_GO_NOTIFY_ACTION to themselves.
;
; Context:	Sent at end of interactive resize, rotate, skew or
;		end of a static transformation ( eg.MSG_GO_ROTATE)
; Source:	Generally object itself
; Destination:  GrObject
; Interception: Objects, such as the SplineGuardian, needs to transform 
;		their points when ever a tranformation is
;		performed. Upon subclassing these objects should perform
;		their special function and then call their superclass.
;
;PASS:		
;	bp - GrObjActionNotificationType (to be sent with MSG_GO_NOTIFY_ACTION)
;	
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_COMPLETE_TRANSLATE	message
;
;	Object sends this message to itself to complete
;	a move or other translation.
;	Object needs to adjust its position to make sure 
;	it is on the document, invalidate itself and redraw 
;	handles if necessary. Then send out MSG_GO_NOTIFY_ACTION 
;	to themselves.
;
; Context:	Sent at end of interactive move or at the
;		end of a static transformation ( eg.MSG_GO_MOVE)
; Source:	Generally object itself
; Destination:  GrObject
; Interception: Objects such as the GrObjVisGuardian needs to have
;		their vis ward destroy any cached gstates when the
;		object is translated. They should call their superclass
;.		and the destroy the gstate.
;
;PASS:		
;	bp - GrObjActionNotificationType (to be sent with MSG_GO_NOTIFY_ACTION)
;	
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GET_SIZE	message
;
;	Return the width and height of the object in points. The dimensions
;	are calculated by mapping the objects corners into document 
;	coordinates and calculating the distances between them. The center of
;	of the selection handles of a rectangle represent the corners mapped
;	into document coordinates. The line thickness is not included in
;	this calculation.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	dx:cx - WWFixed width in points
;	bp:ax - WWFixed height in points
;
;DESTROYED:
;	nothing
;

;****************************************************************************
MSG_GO_GET_POSITION	message
;
;	Get the position of the upper left of a grobject. The position 
;	is in DOCUMENT coords unless the grobject is in a group. Then the
;	position is relative to the upper left of a group. If the grobject
;	has been rotated/skewed/tranformed this gets the location of the
;	selection handle that was initially at the upper left of the grobject.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any Grobject
; Interception:	Unlikely 
;
;PASS:		
;	ss:bp - PointDWFixed - empty
;			
;RETURN:	
;	ss:bp - PointDWFixed - filled
;
;DESTROYED:
;	ax
;


GrObjInitializeData	struct
	GOID_position	PointDWFixed		;Position of upper left
						;corner of object in 
						;PARENT coords

	GOID_width	WWFixed			;Width of object in points

	GOID_height	WWFixed			;Height of object in points
GrObjInitializeData	ends

;****************************************************************************
MSG_GO_INITIALIZE	message
;
;	Initialize the position and size of the object. Additionally,
;	initialize to default attriubtes, and 
;	any other initialization that needs to be done so that
;	the object can be added to the body and drawn.
;
; Context:	Usually called after MSG_GB_INITIALIZE when an app
;		or library is creating objects for the user. Such as
;		the chart library creating pieces of the chart.
; Source:	Unrestricted
; Destination:  Brand new grobj
; Interception: Possible. Objects with additional instance data, such
;		as RoundedRects corner radius or Guardians which need
;		to create their wards should subclass this message.
;		The Guardians should create their ward before calling
;		their superclass so that the ward can be initialized
;		to the default attributes. The RoundedRect can call
;		its superclass before or after it initializes its
;		corner radius.
;
;PASS:		
;	ss:bp - GrObjInitializeData
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SCALE_ABOUT_PARENT_LEFT_TOP	message
;
;	Scales object [current matrix] [scale]. 
; 	Obscure message which applies the scale along the PARENT axes
;	and keeps the left top of the PARENT bounds in the same place.
;	This is used in the handling of MSG_GO_INSERT_OR_DELETE_SPACE.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	ss:bp - GrObjScaleData
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;************************************************
MSG_GO_INSERT_OR_DELETE_SPACE	message
;
;	Insert or delete space in/from the grobject
;	MSG_VIS_LAYER_INSERT_OR_DELETE_SPACE for description of
;	parameters.
;
; Context:	GrObj Utility. Generally called when the body
;		recieves MSG_VIS_LAYER_INSERT_OR_DELETE_SPACE
; Source:	Unrestricted
; Destination:	GrObj
; Interception:	Unlikely.
;
;PASS
;	ss:bp  - InsertDeleteSpaceParams
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_BEGIN_CREATE	message
;
;	Basically puts object in create mode. Sets position and other
;	geometry. Object is now ready to receive a start,ptr and end 
;	selects for use in creating itself. Undo will be turned off
;	until MSG_GO_END_CREATE is received. Undoing a create is
;	done by just deleting the object, so this prevent cluttering
;	up the undo chains with useless stuff
;		
; Context:	Sent to object after it has been duplicated from floater
; Source:	Floater
; Destination:  Duplicate of floater
; Interception: Possible. Call super class first
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


EndCreatePassFlags	record
	ECPF_ADJUSTED_CREATE:1		;the UIFA_ADJUST flag was set in
					;start select that began object
					;creation.
EndCreatePassFlags	end

EndCreateReturnFlags	record
	ECRF_NOT_CREATING:1		;object was not in create mode.
	ECRF_DESTROYED:1		;object was destroyed
EndCreateReturnFlags	end

;****************************************************************************
MSG_GO_END_CREATE	message
;
;	Bring creation to a screeching halt using whatever data
;	is currently stored in the object. Must turn undo back on,
;	it was ignored in MSG_GO_BEGIN_CREATE.
;
; Context:	Force basic drag create shapes this message is sent
;		upon receiving an END_SELECT while being created.
;		For more complex objects, such as spline, this message
;		is sent on double clicks and right mouse clicks.
; Source:	Unrestricted. Usually object itself. 
; Destination:  Grobject being created.
; Interception: Rects, ellipse,lines, etc can use the default handler, but
;		other objects will likely subclass this and not
;		call their superclass. Subclasses of this message
;		must send MSG_GO_SUSPEND_COMPLETE_CREATE to themselves unless
;		the object is destroyed.
;
;PASS:		
;	cx - EndCreatePassFlags
;			
;RETURN:	
;	dx - EndCreateReturnFlags
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_EVALUATE_PARENT_POINT_FOR_EDIT	message
;
;	Have object evaluate the passed point in terms 
;	of editing. (ie could the object edit it self
;	at this point)(eg for a bitmap, anywhere within
;	its bounds, for a spline, somewhere along the spline
;	or drawn control points).
;
; Context:	Varied. Generally used when determine which object to
;		select from a mouse click
; Source:	Unrestricted
; Destination:	Any grobj object
; Interception:	Very likely. Most grobj object's are unique in their
;		rating of a point. It is unlikely that you will need
;		to call your superclass
;		
;		
;PASS
;	ss:bp - PointDWFixed in PARENT coordinate system
;
;RETURN
;	al - EvaluatePositionRating
;	dx - EvaluatePositionNotes
;
;DESTROYED:
;	ah
;

;****************************************************************************
MSG_GO_CREATE_TRANSFER			message
;
;	This message causes the grobj to create space (either a VM block
;	or a DB item) in the VM override file, write any data needed to
;	recreate the grobj in, and store the 32 bit identifier in the
;	passed tree block.
;		
; Context:	Sent to object during Cut/Copy/Duplicate
; Source:	Unrestricted
; Destination:  Any grobj
; Interception: Any subclass that requires more than just instance data to
;		reconstruct itself will subclass thus message to construct
;		the VMChain necessary to do so (eg. guardians, groups, etc.)
;
;PASS:		
;	VM file override set
;	ss:[bp] - GrObjTransferParams
;			
;RETURN:	
;	ss:[bp].GTP_curSlot - updated to the next slot in the tree
;				specified by ss:[bp].GTP_treeBlock
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_REPLACE_WITH_TRANSFER		message
;
;	This message causes the grobj to read the passed transfer item
;	and "recreate" itself from that information.
;		
; Context:	Sent to object during paste-type operations
; Source:	Unrestricted
; Destination:  Any grobj
; Interception: Any subclass that requires more than just instance data to
;		reconstruct itself will subclass thus message to parse
;		the VMChain necessary to do so (eg. guardians, groups, etc.)
;
;PASS:		
;	VM file override set
;	ss:[bp] - GrObjTransferParams
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_WRITE_INSTANCE_TO_TRANSFER	message
;
;	This message causes the grobj to write any data needed to
;	recreate the grobj into a transfer item.
;		
; Context:	Sent to object during Cut/Copy/Duplicate
; Source:	Unrestricted
; Destination:  Any grobj
; Interception: Any subclass with data necessary to recreate the object
;		will subclass this message. The subclass will first call
;		its superclass, then write in its extra data.
;
;PASS:		
;	ss:[bp] - GrObjTransferParams
;			
;RETURN:	
;	ss:[bp].GTP_curPos - updated to just past the last written data
;				(so superclass can begin writing, etc.)
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_READ_INSTANCE_FROM_TRANSFER	message
;
;	This message causes the grobj to read any data needed to
;	recreate the grobj from a transfer item.
;		
; Context:	Sent to object during paste-type operations
; Source:	Unrestricted
; Destination:  Any grobj
; Interception: Any subclass with data necessary to recreate the object
;		will subclass this message. The subclass will first call
;		its superclass, then read in its extra data.
;
;PASS:		
;	ss:[bp] - GrObjTransferParams
;			
;RETURN:	
;	ss:[bp].GTP_curPos - updated to just past the last read data
;				(so superclass can begin reading, etc.)
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_GET_POINTER_IMAGE	message
;
;	Return the optr of the mouse image.
;	
; Context:	Sent to object at end of every mouse event.
; Source:	Usually object itself
; Destination:  Any grobject
; Interception: Likely. The default pointer image is a +, if you don't
;		like it,subclass this message and don't call your
;		super class
;
;PASS:		
;	ss:bp - PointDWFixed 
;
;RETURN:	
;	ax - mask MRF_SET_POINTER_IMAGE
;	cx:dx - optr of mouse image
;	or
;	ax - mask MRF_CLEAR_POINTER_IMAGE
;	cx:dx - destroyed
;
;DESTROYED:
;	see RETURN
;

;****************************************************************************
MSG_GO_GET_LOCKS	message
;
;	Retrieve the GrObjLocks for the object.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	ax - GrObjLocks
;
;DESTROYED:
;	nothing
;

;****************************************************************************
MSG_GO_DRAW_FG_AREA		message
;
;	Draw the foreground area components of an object.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: There is no default handler. Most likely every 
;		object will subclass this and not call their superclass.
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_DRAW_BG_AREA	message
;
;	Draw the background area component of an object.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: Default handler draws a background rectangle.Most objects
;		will subclass this and not call their superclass.
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_DRAW_SPRITE_LINE	message
;
;	Draw the sprite line image of an object using the 
;	spriteTransform.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW_SPRITE
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: Most likely every object will subclass this and not
;		call their superclass.
;
;PASS:		
;		dx - gstate
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_DRAW_NORMAL_SPRITE_LINE	message
;
;	Draw the sprite line image of an object using the 
;	normalTransform.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW_SPRITE on objects
;		in a group.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: Most likely every object will subclass this and not
;		call their superclass.
;
;PASS:		
;		dx - gstate
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;this is just a filler for now. replace with a real message.
MSG_GO_DO_NOTHING	message
 
;****************************************************************************
MSG_GO_ADD_POTENTIAL_SIZE_TO_BLOCK	message
;
;	Increments the potential size of this grobj's object block by
;	the amount of size the grobj could potentially expand to.
;
; Context:	Most likely the GrObj has just been instantiated
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely. You should subclass MSG_GO_GET_POTENTIAL_GROBJECT_SIZE
;		instead.
;		
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SUBTRACT_POTENTIAL_SIZE_FROM_BLOCK	message
;
;	Decrements the potential size of this grobj's object block by
;	the amount of size the grobj could potentially expand to.
;
; Context:	Most likely the GrObj is about to be destroyed
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely. You should subclass MSG_GO_GET_POTENTIAL_GROBJECT_SIZE
;		instead.
;		
;		
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GET_GROBJ_CLASS			message
;
;	Returns the class representing the object's "leaf" class
;	according to The GrObj.
;
;	For example, if the Chart library subclassed EllipseClass,
;	the class tree would look like Meta->GrObj->Rect->Ellipse->ChartEllipse
;	This method would return EllipseClass, since that's the last
;	one known to GrObj.
;
; Context:	Sent by the object to itself when writing to the transfer item
;		so that in case a subclassing library writes the transfer
;		item, then goes away, we still have some class we can paste.
; Source:	The object itself, probably in the MSG_GO_CREATE_TRANSFER
;		method.
; Destination:  Any clipboardable grobj.
;
; Interception: DO NOT INTERCEPT THIS MESSAGE. That's the whole point,
;		isn't it?
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx:dx - a class ptr recognized by GrObj
;
;DESTROYED:
;	ax
;

GrObjUndoAppType	struc
	GOUAT_freeMessage	word
	GOUAT_undoMessage	word
GrObjUndoAppType	ends

;****************************************************************************
MSG_GO_UNDO_REPLACE_GEOMETRY_INSTANCE_DATA	message
;
;	Replace the objects instance data with the passed BasicInit data
;	as part of an undo operation. A new undo chain is generated first
;	so that this operation will be undoable.
;
; Context:	Send by object to itself while handling MSG_META_UNDO
; Source:	Object itself
; Destination:  Object itself
; Interception: Unlikely
;
;PASS:		
;	dx - DB group
;	cx - DB item
;	bp - VM file handle
;
;	The referenced DBitem must contain a BasicInit structure
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_GENERATE_UNDO_REPLACE_GEOMETRY_INSTANCE_DATA_ACTION	message
;
;	Generate an undo action for the objects current geometry
;	instance data
;
; Context:	Prior to any action that is undoable and changes the
;		objects geometry (ie MSG_GO_MOVE). Usually the object
;		calls MSG_GO_GENERATE_UNDO_REPLACE_GEOMETRY_INSTANCE_DATA_CHAIN
;		which sends this message sandwiched by MSG_GO_START_UNDO_CHAIN
;		and MSG_GO_END_UNDO_CHAIN
;
; Source:	Generally object itself
; Destination:  Generally object itself
; Interception: Unlikely
;
;PASS:		
;	nothing
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GENERATE_UNDO_REPLACE_GEOMETRY_INSTANCE_DATA_CHAIN	message
;
;	Generate an undo chain for the objects current geometry
;	instance data.
;
; Context:	Prior to any action that is undoable and changes the
;		objects geometry (ie MSG_GO_MOVE)
; Source:	Generally object itself
; Destination:  Generally object itself
; Interception: Unlikely
;
;PASS:		
;		cx:dx - optr of undo text
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_CLEAR_SANS_UNDO	message
;
;	Tell grobject to destroy itself in an undoable fashion. 
;	It will remove itself from the body or group if necessary, 
;	release grabs, etc. Then the object will send MSG_META_OBJ_FREE
;	to complete its demise. This message will delete the object
;	even if it has the delete lock set.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely. If grobject has any extra data that must be
;		freed it should do so on MSG_META_FINAL_OBJ_FREE
;		
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;



;****************************************************************************
MSG_GO_REMOVE_FROM_BODY		message
;
;	Object will release any exclusives, drop selection, edit, 
;	remove itself from the body and generate an
;	undo chain to undo the removal.
;
; Context:	Generally used as part of MSG_GO_CLEAR and as
;		undo action for MSG_GB_ADD_GROBJ
; Source:	Generally object itself
; Destination:  Object itself
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_REMOVE_FROM_GROUP	message
;
;	Have object remove itself from the group and generate an
;	undo chain to undo the removal.
;
; Context:	Generally used as part of MSG_GO_CLEAR
; Source:	Generally object itself
; Destination:  Object itself
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_RELEASE_EXCLS	message
;
;	Release mouse grabs, target, focus, gadget, selection, edit, etc
;
; Context:	GrObj Utilitity. Normal used when object is being cleared
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_GENERATE_UNDO_CLEAR_CHAIN	message
;
;	Generate an undo chain for undoing a clear.
;
; Context:	Sent when handling MSG_GO_CLEAR and as a result
;		of undoing and undo of a delete
; Source:	Object itself
; Destination:  Object itself
; Interception: Don't. Trust me.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GENERATE_UNDO_UNDO_CLEAR_CHAIN	message
;
;	Generate an undo chain for undoing an undo of a clear.
;
; Context:	Sent as a result of undoing a delete
; Source:	Object itself
; Destination:  Object itself
; Interception: Don't. Trust me.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_DEREF_A_GROBJ_AREA_TOKEN	message
;
;	Decrement the reference count for the passed area token
;
; Context:	Generally used as freeing undo action message
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	cx - area token
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_DEREF_A_GROBJ_LINE_TOKEN	message
;
;	Decrement the reference count for the passed line token
;
; Context:	Generally used as freeing undo action message
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	cx - line token
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_INVALIDATE_AREA	message
;
;	Invalidate object because of area attribute change.
;
;	NOTE: this message has an associated GrObjMessageOptimizationFlags
;	bit. If you wish to subclass this message, you will need to 
;	set this bit in your object, otherwise the default handler
;	will be called directly.
;
; Context:	When objects area attributes change
; Source:	Object itself
; Destination:  Object itself
; Interception: Objects without area attributes, such as lines,
;		should subclass this message and eat it.
;
;PASS:		
;		nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_INVALIDATE_LINE	message
;
;	Invalidate object because of line attribute change.
;
;	NOTE: this message has an associated GrObjMessageOptimizationFlags
;	bit. If you wish to subclass this message, you will need to 
;	set this bit in your object, otherwise the default handler
;	will be called directly.
;
; Context:	When objects line attributes change
; Source:	Object itself
; Destination:  Object itself
; Interception: Objects without line attributes
;		should subclass this message and eat it.
;
;PASS:		
;		nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SUSPEND_COMPLETE_CREATE		message
;
;	Sends a MSG_META_SUSPEND/MSG_META_UNSUSPEND to the body around
;	sending MSG_GO_COMPLETE_CREATE to itself.
;
; Context:	Sent to object at completion of interactive create
; Source:	Unrestricted. Ususally sent by object to itself
; Destination:  Any grobject that has just finished being created.
;		i.e. After receiving MSG_GO_END_CREATE
; Interception: Don't. Please. Intercept MSG_GO_COMPLETE_CREATE if you
;		want to subclass something.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GET_TEMP_STATE_AND_OPT_FLAGS	message
;
;	Retrieve the GrObjTempModes for the object. Also returns
;	GrObjOptimizationFlags.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	al - GrObjTempModes
;	ah - GrObjOptimizationFlags
;
;DESTROYED:
;	nothing
;

;****************************************************************************
MSG_GO_MAKE_INSTRUCTION	message
;
;	Make the grobject an instruction grobject. Instruction objects
;	are used mainly in templates. By default they do not print
;	and they generally are not selectable or editable
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_MAKE_NOT_INSTRUCTION	message
;
;	Make the grobject not an instruction grobject. 
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_WRAP_TEXT_TYPE	message
;
;	The GrObjWrapTextType for an object. The GrObjWrapTextType is
;	used by other applications, such as GeoWrite for wrapping text
;	around or inside objects
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;			
;	cl - GrObjWrapTextType
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_SET_PASTE_INSIDE	message
;
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject.
; Interception: Unlikely
;
;PASS:		
;	cl - TRUE or FALSE
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_SET_INSERT_DELETE_MOVE_ALLOWED	message
;
;	If true then during a MSG_GO_INSERT_OR_DELETE space the object
;	can be moved.
; 
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	cl - TRUE/FALSE
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_INSERT_DELETE_RESIZE_ALLOWED	message
;
;	If true then during a MSG_GO_INSERT_OR_DELETE space the object
;	can be resized.
; 
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	cl - TRUE/FALSE
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_INSERT_DELETE_DELETE_ALLOWED	message
;
;	If true then during a MSG_GO_INSERT_OR_DELETE space the object
;	can be deleted.
; 
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	cl - TRUE/FALSE
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_DRAW_PARENT_RECT	message
;
;	Draw the rectangle that bounds the object in PARENT coords..
;
; Context:	Generally used for drawing rectangle for 
;		wrapping text around when GOWTT_WRAP_AROUND_RECT is
;		set in object and GODF_DRAW_WRAP_TEXT_AROUND_ONLY
;		is passed with MSG_GO_DRAW
; Source:	Generally object itself
; Destination:  Generally object itself
; Interception: Unlikely
;
;PASS:		
;	cx - non-zero the kick the rectangle out by an ammount appropriate
;	     for wrapping around
;	bp - gstate with PARENT transformation in it
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_NUKE_DATA_IN_OTHER_BLOCKS	message
;
;	Destroy any data the object stores in blocks other than its own.
;	Also object must decrement the interactible count to balance
;	all the incs is has done, otherwise the block it is in won't
;	get tossed.
;	Object MUST NOT send any message on the queue while
;	handling this.
;
; Context:	Generally sent as handlers for MSG_GO_CLEAR and 
;		MSG_GO_QUICK_TOTAL_BODY_CLEAR
; Source:	GrObject itself
; Destination:  Any grobject
; Interception: If object has data in other blocks or has mucked with
;		the interactible count is must subclass this message.
;		Do your own work first then call superclass.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;****************************************************************************
MSG_GO_DRAW_FG_AREA_HI_RES	message
;
;	Draw the foreground area component of an object at a higher
;	resolution than 72 dpi. 
;
;	Normally an grobject is drawn at 72 dpi because the
;	the graphics system is optimized for non scaled drawing and 
;	the user is not viewing the image at a resolution higher
;	than 72 dpi. However, when printing or when the view is 
;	zoomed in, we can display at a higher resolution. This
;	is often done by applying a 1/4 scale factor to the
;	gstate and multiplying the coordinates of the object
;	by 4, bring the resolution up to 288 dpi.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW during printing
;		or when the view is zoomed in.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: There is no default behaviour. Most likely every 
;		object will subclass this and not call their superclass.
;		Objects whose images are built out at the device level,
;		such as text and bitmaps, and objects where it is 
;		impractical to modify the coordinates, such a gstrings,
;		should bind this message to the handler for 
;		MSG_GO_DRAW_FG_AREA
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;


;****************************************************************************
MSG_GO_DRAW_FG_LINE	message
;
;
;	Draw the foreground line components of an object.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: There is no default handler. Most likely every 
;		object will subclass this and not call their superclass.
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_DRAW_FG_LINE_HI_RES	message
;
;	Draw the foreground line component of an object at a higher
;	resolution than 72 dpi. 
;
;	Normally an grobject is drawn at 72 dpi because the
;	the graphics system is optimized for non scaled drawing and 
;	the user is not viewing the image at a resolution higher
;	than 72 dpi. However, when printing or when the view is 
;	zoomed in, we can display at a higher resolution. This
;	is often done by applying a 1/4 scale factor to the
;	gstate and multiplying the coordinates of the object
;	by 4, bring the resolution up to 288 dpi.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW during printing
;		or when the view is zoomed in.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: There is no default behaviour. Most likely every 
;		object will subclass this and not call their superclass.
;		Objects whose images are built out at the device level,
;		such as text and bitmaps, and objects where it is 
;		impractical to modify the coordinates, such a gstrings,
;		should bind this message to the handler for 
;		MSG_GO_DRAW_FG_LINE
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;



;****************************************************************************
MSG_GO_DRAW_CLIP_AREA	message
;
;	Draw the shape that can be used for clipping text and
;	other images.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW for wrapping
;		text tightly around the object and for clipping
;		gradient fills to the object.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: There is no default handler. Most likely every 
;		object will subclass this and not call their superclass.
;		Most objects can just bind this message to the
;		handler for MSG_GO_DRAW_FG_AREA.
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;

;****************************************************************************
MSG_GO_DRAW_CLIP_AREA_HI_RES	message
;
;	Draw the shape that can be used for clipping text and
;	other images at a higher resolution and 72 dpi
;
;	Normally an grobject is drawn at 72 dpi because the
;	the graphics system is optimized for non scaled drawing and 
;	the user is not viewing the image at a resolution higher
;	than 72 dpi. However, when printing or when the view is 
;	zoomed in, we can display at a higher resolution. This
;	is often done by applying a 1/4 scale factor to the
;	gstate and multiplying the coordinates of the object
;	by 4, bring the resolution up to 288 dpi.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW for wrapping
;		text tightly around the object and for clipping
;		gradient fills to the object during printing
;		or when the view is zoomed in.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: There is no default behaviour. Most likely every 
;		object will subclass this and not call their superclass.
;		Objects whose images are built out at the device level,
;		such as text and bitmaps, and objects where it is 
;		impractical to modify the coordinates, such a gstrings,
;		should bind this message to the handler for 
;		MSG_GO_DRAW_CLIP_AREA
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;


;****************************************************************************
MSG_GO_DRAW_FG_GRADIENT_AREA	message
;
;	Draw a gradient fill for the foreground area components 
;	of an object.
;
;	NOTE: This handler does NOT need to apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: Unlikely. The default handler clips the gradient
;		fill to the shape drawn by MSG_GO_DRAW_CLIP_AREA
;		
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;

;****************************************************************************
MSG_GO_DRAW_FG_GRADIENT_AREA_HI_RES	message
;
;
;	Draw a gradient fill for the foreground area components 
;	of an object at a higher resolution than 72 dpi. 
;
;	Normally an grobject is drawn at 72 dpi because the
;	the graphics system is optimized for non scaled drawing and 
;	the user is not viewing the image at a resolution higher
;	than 72 dpi. However, when printing or when the view is 
;	zoomed in, we can display at a higher resolution. This
;	is often done by applying a 1/4 scale factor to the
;	gstate and multiplying the coordinates of the object
;	by 4, bring the resolution up to 288 dpi.
;
;	NOTE: This handler does NOT need to apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW during printing
;		or when the view is zoomed in.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: There is no default behaviour. Most likely every 
;		object will subclass this and not call their superclass.
;		Objects whose images are built out at the device level,
;		such as text and bitmaps, and objects where it is 
;		impractical to modify the coordinates, such a gstrings,
;		should bind this message to the handler for 
;		MSG_GO_DRAW_FG_GRADIENT_AREA
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;

;****************************************************************************
MSG_GO_DRAW_BG_AREA_HI_RES	message
;
;	Draw the background area and line components of an object at 
;	a higher resolution than 72 dpi. 
;
;	Normally an grobject is drawn at 72 dpi because the
;	the graphics system is optimized for non scaled drawing and 
;	the user is not viewing the image at a resolution higher
;	than 72 dpi. However, when printing or when the view is 
;	zoomed in, we can display at a higher resolution. This
;	is often done by applying a 1/4 scale factor to the
;	gstate and multiplying the coordinates of the object
;	by 4, bring the resolution up to 288 dpi.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW during printing
;		or when the view is zoomed in.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: There is no default behaviour. Most likely every 
;		object will subclass this and not call their superclass.
;		Objects whose images are built out at the device level,
;		such as text and bitmaps, and objects where it is 
;		impractical to modify the coordinates, such a gstrings,
;		should bind this message to the handler for 
;		MSG_GO_DRAW_BG_AREA
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;

;*************************************************
MSG_GO_SET_BG_COLOR		message
;
;	Set the bg area and line color of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cl - r
;	ch - g
;	dl - b
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_SET_AREA_PATTERN		message
;
;	Set the area pattern of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	Unlikely
;		
;
;PASS:
;	cx - GraphicPattern
;
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GO_SET_AREA_ATTR_ELEMENT_TYPE		message
;
;	Set the GrObjAreaAttrElementType of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	If the object doesn't support one or more of the
;		GrObjAreaAttrElementTypes then it should subclass
;		this message and not call it's super if one of
;		the offending types has been passed. For instance
;		the bitmap doesn't support GOAAET_GRADIENT.
;		
;
;PASS:
;	cl - GrObjAreaAttrElementType
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_SET_LINE_ATTR_ELEMENT_TYPE		message
;
;	Set the GrObjLineAttrElementType of the object
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:	Any grobj object. If the object has no area
;		attributes it will ignore the message
; Interception:	If the object doesn't support one or more of the
;		GrObjAreaAttrElementTypes then it should subclass
;		this message and not call it's super if one of
;		the offending types has been passed. 
;		
;PASS:
;	cl - GrObjLineAttrElementType
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_SET_STARTING_GRADIENT_COLOR	message 
;
;	Set the starting color for a gradient fill. If the object's
;	area attributes are not GOAAET_GRADIENT then the 
;	message will be ignored. See MSG_GO_AREA_ATTR_ELEMENT_TYPE
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	cl - r
;	ch - g
;	dl - b
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_ENDING_GRADIENT_COLOR	message 
;
;	Set the ending color for a gradient fill. If the object's
;	area attributes are not GOAAET_GRADIENT then the 
;	message will be ignored. See MSG_GO_AREA_ATTR_ELEMENT_TYPE
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	cl - r
;	ch - g
;	dl - b
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_SET_NUMBER_OF_GRADIENT_INTERVALS	message 
;
;	Set the number of gradient intervals for a gradient fill. 
;	If the object's area attributes are not GOAAET_GRADIENT then the 
;	message will be ignored. See MSG_GO_AREA_ATTR_ELEMENT_TYPE.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	cx - number of intervals
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_GRADIENT_TYPE	message 
;
;	Set the type of the gradient fill. 
;	If the object's area attributes are not GOAAET_GRADIENT then the 
;	message will be ignored. See MSG_GO_AREA_ATTR_ELEMENT_TYPE.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	cl - GrObjGradientType
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_ARROWHEAD_ON_START		message
;
;	If true then during object will draw an arrowhead at it's first
;	point. Not all objects support arrowheads.
; 
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	cl - TRUE/FALSE
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_ARROWHEAD_ON_END	message
;
;	If true then during object will draw an arrowhead at it's final
;	point. Not all objects support arrowheads.
; 
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	cl - TRUE/FALSE
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_ARROWHEAD_FILLED	message
;
;	If true then arrowheads will be filled. If false then
;	they will be drawn with lines.
;	Not all objects support arrowheads.; 
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	cl - TRUE/FALSE
;	ch - nonzero to fill with area attributes,
;	     zero to fill with line attributes
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_ARROWHEAD_ANGLE	message
;
;	Set angle between the line and the arrowheads lines.
; 	Not all objects support arrowheads.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	cl - angle (0-90)
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_ARROWHEAD_LENGTH	message
;
;	Set length of arrowhead line from line starting/ending point
;	Not all objects support arrowheads.
; 
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception: Unlikely
;
;PASS:		
;	cl - length in 72 dpi
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_NOTIFY_GROBJ_INVALID	message
;
; Notify the grobj that it is not valid.
;
; Context:	GrObj utility
; Source:	Unrestricted
; Destination:  any GrObject
; Interception: unlikely
;
; Pass:		nothing
;			
; Return:	nothing 
;
; Destroyed:	ax 

;****************************************************************************
MSG_GO_SET_GROBJ_ATTR_FLAGS	message
;
;	Set and reset bits in the GOI_attrFlags field.
;
; Context:	GrObj Utility. Generally used for undo.
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	cx - GrObjAttrFlags bit to set
;	dx - GrObjAttrFlags bit to clear
;
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SET_SYS_TARGET	message
;
;	Set/Clear bit in object that reflects  the body's system 
;	target excl status
;
; Context:	When object is added to selection list or when object
;		receives MSG_META_GAINED/LOST_SYS_TARGET_EXCL
; Source:	GrObjBody/Object itself
; Destination:  Selected grobjects
; Interception: Unlikley
;
;PASS:		
;	cl - TRUE/FALSE
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_SCALE_OBJECT	message
;
;	Scale a grobject in its own coordinate space. [current matrix][scale]
;	Anchors center of object.
;	
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
;PASS:		
;	ss:bp - GrObjScaleData
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GENERATE_UNDO_CLEAR_CHAIN_WITH_ACTION_NOTIFICATION	message
;
;	Generate an undo chain for undoing the redo of a clear and
;	send out a GOANT_REDO_DELETE action notification.
;
; Context:	Sent when handling MSG_GO_GENERATE_UNDO_UNDO_CLEAR_CHAIN
;		( undoing an undo of a delete )
; Source:	Object itself
; Destination:  Object itself
; Interception: Don't. Trust me.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_RECREATE_CACHED_GSTATES	message
;
;	Have objects destroy and recreate any cached gstates
;
; Context:	Sent by body to target when body handles 
;		MSG_VIS_RECREATE_CACHED_GSTATES
; Source:	Unrestricted. Generally GrObjBody
; Destination:  Any grobject. Generally target
; Interception: If object has any cached gstates it must subclass this
;		message and call superclass
;
;PASS:		
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_DRAW_QUICK_VIEW		message
;
;	Draw the basic shape of the objects as quickly as possible.
;	Most objects just draw their outline for this message
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW when GODF_DRAW_QUICK_VIEW 
;		is set.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: The default handler draws a rectangle. Many objects bind
;		the message to their MSG_GO_DRAW_FG_LINE handler
;
;PASS:		
;		cl - DrawFlags
;		bp - GrObjDrawFlags		
;		dx - gstate with the object's transform applied
;			line width = 0
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_DRAW_SPRITE_LINE_HI_RES	message
;
;	Draw the sprite line image of an object using the 
;	spriteTransform at a higher resolution than 72 dpi. 
;
;	Normally an grobject is drawn at 72 dpi because the
;	the graphics system is optimized for non scaled drawing and 
;	the user is not viewing the image at a resolution higher
;	than 72 dpi. However, when the view is 
;	zoomed in, we can display at a higher resolution. This
;	is often done by applying a 1/4 scale factor to the
;	gstate and multiplying the coordinates of the object
;	by 4, bring the resolution up to 288 dpi.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW_SPRITE
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: Most likely every object will subclass this and not
;		call their superclass.
;
;PASS:		
;		dx - gstate
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_DRAW_NORMAL_SPRITE_LINE_HI_RES	message
;
;	Draw the sprite line image of an object using the 
;	normalTransform at a higher resolution than 72 dpi. 
;
;	Normally an grobject is drawn at 72 dpi because the
;	the graphics system is optimized for non scaled drawing and 
;	the user is not viewing the image at a resolution higher
;	than 72 dpi. However, when the view is 
;	zoomed in, we can display at a higher resolution. This
;	is often done by applying a 1/4 scale factor to the
;	gstate and multiplying the coordinates of the object
;	by 4, bring the resolution up to 288 dpi.
;
;	NOTE: This handler does NOT set attributes or apply
;	the ObjectTransform. It is a mindless low level handler
;	that is concerned only with the shape to be drawn.
;
; Context:	GrObjClass Utility. Generally called 
;		during handling of MSG_GO_DRAW_SPRITE on objects
;		in a group.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any grobject. Generally the object itself.
; Interception: Most likely every object will subclass this and not
;		call their superclass.
;
;PASS:		
;		dx - gstate
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GET_GROBJ_ATTR_FLAGS	message
;
;	Retrieve bits in the GOI_attrFlags field.
;
; Context:	GrObj Utility. 
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx - GrObjAttrFlags
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_MAKE_ATTRS_DEFAULT	message
;
;	Set the attributes of this object as the default attributes
;	in the GrObjAttributeManager.
;	Area,Line and GrObjAttrs
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


GrObjPointerImageSituation	etype	byte
	GOPIS_NORMAL		enum GrObjPointerImageSituation
	GOPIS_EDIT		enum GrObjPointerImageSituation
	GOPIS_CREATE		enum GrObjPointerImageSituation
	GOPIS_MOVE		enum GrObjPointerImageSituation
	GOPIS_RESIZE_ROTATE	enum GrObjPointerImageSituation


;****************************************************************************
MSG_GO_GET_SITUATIONAL_POINTER_IMAGE	message
;
;	Get pointer image for object for specific situations
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Likely. Call superclass for situations which your
;		object doesn't provide its own pointer image.
;
;PASS:		
;		cl - GrObjPointerImageSituation
;			
;RETURN:	
;		ah - high byte of MouseReturnFlags
;			MRF_SET_POINTER_IMAGE or MRF_CLEAR_POINTER_IMAGE
;		if MRF_SET_POINTER_IMAGE
;		cx:dx - optr of mouse image
;DESTROYED:
;	al
;

CheckHack <offset MRF_SET_POINTER_IMAGE gt 7 >
CheckHack <offset MRF_CLEAR_POINTER_IMAGE gt 7 >

;****************************************************************************
MSG_GO_OBJ_FREE		message
;
;	Free an object *now*. Used instead of MSG_META_OBJ_FREE to avoid
;	overflowing the handle table. MSG_META_OBJ_FREE puts a 
;	MSG_META_FINAL_OBJ_FREE on the queue. With a large number of objects
;	all doing this at the same time the handle table can easily overflow. 
;	MSG_GO_OBJ_FREE attempts to destroy the object without using the
;	queue.
;
;
; Context:	Low level utility for deleting objects when undo 
;		actions are being ignored.
; Source:	Sent internally usually. You really shouldn't send 
;		this yourself.
; Destination:  Any grobject
; Interception: The default handler increments the in use count of the
;		object and then sends MSG_META_FINAL_OBJ_FREE directly
;		to itself. This assumes that there are no messages in
;		the queue for the object. If your object may have messages
;		on the queue, such as the cursor flash messages
;		for the VisText, you should subclass this message,
;		send MSG_META_OBJ_FREE to yourself and don't call your
;		superclass.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_ADJUST_CREATE	message
;
;	Bring creation to a screeching halt using whatever data
;	is currently stored in the object.
;
; Context:	Force basic drag create shapes this message is sent
;		upon receiving an END_SELECT while being created.
;		For more complex objects, such as spline, this message
;		is sent on double clicks and right mouse clicks.
; Source:	Unrestricted. Usually object itself. 
; Destination:  Grobject being created.
; Interception: Rects, ellipse,lines, etc can use the default handler, but
;		other objects will likely subclass this and not
;		call their superclass. Subclasses of this message
;		must send MSG_GO_SUSPEND_COMPLETE_CREATE to themselves unless
;		the object is destroyed.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GENERATE_UNDO_UNDO_CLEAR_CHAIN_WITH_ACTION_NOTIFICATION	message
;
;	Generate an undo chain for undoing an undo of a clear and
;	send out a GOANT_UNDO_DELETE action notification.
;
; Context:	Sent when handling MSG_GO_GENERATE_UNDO_CLEAR_CHAIN
;		( undoing an undo of a delete )
; Source:	Object itself
; Destination:  Object itself
; Interception: Don't. Trust me.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GO_NUDGE_INSIDE		message
;
;	Move the paste inside children of a group a multiple of current 
;       DEVICE units. As currently implemented this does not take
;       into account transformations in the group, so the amount 
;	moved may vary.
;
;
; Context:	GrObj Utiltity
; Source:	Unrestricted, generally UI or object itself
; Destination:	Any grobj object
; Interception:	Unlikely
;
;PASS
;	cx - number of device units in x to move
;	dx - number of device units in y to move
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GO_MOVE_INSIDE		message
;
;	Move only the paste inside children of a group relative 
;	by the passed distance.
;
;
; Context:	GrObj Utiltity
; Source:	Unrestricted, generally UI or object itself
; Destination:	Any grobj object
; Interception:	Unlikely 
;
;PASS
;	ss:bp = PointDWFixed amount to move object in PARENT coords
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;
;****************************************************************************
MSG_GO_REPLACE_GEOMETRY_INSTANCE_DATA	message
;
;	Replaces the objects geometry related instance data with the
;	passed data.
;
; Context:	During undo of most geometry operations
; Source:	Object itself
; Destination:  Object itself
; Interception: Unlikely
;
;PASS:		
;	ss:bp - BasicInit
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;add next message to replace MSG_GO_DO_NOTHING which is currently a place
;holder up above.

;****************************************************************************
MSG_GO_CHECK_ACTION_MODES	message
;
;	Retrieve the GOI_actionModes field.
;
; Context:	GrObj Utility. 
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx - GrObjActionModes
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GO_EVALUATE_PARENT_POINT_FOR_HANDLE_MOVE_RESIZE		message
;
;	Determine if one of the handles of the object would be hit
;	by the passed point. Will ignore move handles of objects with
;	GOL_MOVE lock set. Will ignore resize handles of objects with
;	GOL_RESIZE lock set.
;
; Context:	Usually called as direct action of user clicking with
;		the pointer tool. 
; Source:	Unrestricted, generally the floater
; Destination:	Any grobj object. The message will be ignored if the
;		object's GOTM_HANDLES_DRAWN flag is not set
; Interception:	Possible. If object doesn't have normal 9 handles, such
;		as a line with only 3, it should subclass this message
;		and not call its superclass
;
;PASS
;	ss:bp - PointDWFixed in PARENT
;
;RETURN
;	al - EVALUATE_NONE - handles not hit
;		ah - destroyed
;	al - EVALUATE_HIGH - handle hit
;		ah - GrObjHandleSpecification of hit handle
;
;	dx - 0 ( blank EvaluatePositionNotes)
;
;DESTROYED:
;	nothing
;

;*************************************************
MSG_GO_EVALUATE_PARENT_POINT_FOR_HANDLE_MOVE_ROTATE		message
;
;	Determine if one of the handles of the object would be hit
;	by the passed point. Will ignore move handles of objects with
;	GOL_MOVE lock set. Will ignore rotate handles of objects with
;	GOL_ROTATE lock set.
;
; Context:	Usually called as direct action of user clicking with
;		the pointer tool. 
; Source:	Unrestricted, generally the floater
; Destination:	Any grobj object. The message will be ignored if the
;		object's GOTM_HANDLES_DRAWN flag is not set
; Interception:	Possible. If object doesn't have normal 9 handles, such
;		as a line with only 3, it should subclass this message
;		and not call its superclass
;
;PASS
;	ss:bp - PointDWFixed in PARENT
;
;RETURN
;	al - EVALUATE_NONE - handles not hit
;		ah - destroyed
;	al - EVALUATE_HIGH - handle hit
;		ah - GrObjHandleSpecification of hit handle
;
;	dx - 0 ( blank EvaluatePositionNotes)
;
;DESTROYED:
;	nothing
;

;****************************************************************************
MSG_GO_COMBINE_LOCKS	message
;
;		This message or's the grobj's locks into the passed locks;
;		this is generally used in combination with other grobjs
;		(eg., all the selected grobjs) to find out what is
;		allowable and what is not for a set of grobjs
;		
;PASS:		
;	cx - locks set so far
;	dx - locks clear so far
;			
;RETURN:	
;	cx,dx - updated
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_DESELECT_IF_GROUP_LOCK_SET	message
;
;	If the object is selected and it has its group lock set it
;	will become unselected.
;
; Context:	Used before grouping and paste inside to avoid lots
;		of problems.
; Source:	GrObjBody
; Destination:  Selected GrObjs
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GET_POTENTIAL_GROBJECT_SIZE	message
;
;	Return the number of bytes that the grobject can use up in
; 	its block. This includess instance data, chunks and vardata, but
;	not data in other blocks created by this object.
;
; Context:	Used to keep track of which document blocks can
;		have more objects added to them. 
; Source:	Object itself.
; Destination:  Object itself
; Interception: The default handler will calculate the instance data size,
;		but if your object allocates chunks or vardata in its
;		block it must subclass this message. Call the superclass
;		first and then add in your extra bytes
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx - size in bytes
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_GROUP_GAINED_SELECTION_LIST	message
;
;	Notify grobjects in a group that the group has been selected
;
; Context:	Sent to grobjects in group when group receives 
;		MSG_GO_GAINED_SELECTION_LIST
; Source:	Group
; Destination:  GrObject in a group
; Interception: There is no default handler. Only under special circumstances
;		will you need to intercept this message. For instance, the 
;		text guardian intercepts this message and selects all text so
;		that text attribute changes can be applied correctly
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_GROUP_LOST_SELECTION_LIST	message
;
;	Notify grobjects in a group that the group is no longer selected
;
; Context:	Sent to grobjects in group when group receives 
;		MSG_GO_LOST__SELECTION_LIST
; Source:	Group
; Destination:  GrObject in a group
; Interception: There is no default handler. Only under special circumstances
;		will you need to intercept this message. For instance, the 
;		text guardian intercepts this message and deselects all text,
;		to counteract the selection of all the text in the handler
;		for MSG_GO_GROUP_GAINED_SELECTION_LIST.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;****************************************************************************
MSG_GO_INVALIDATE_WITH_UNDO	message
;
;	Do a normal invalidate but create an undo action that also does
;	an invalidate.
;
; Context:	Obscure. Used currently so that when undoing a paste inside
;		the objects redraw without their insides.
; Source:	Unrestricted
; Destination:  Any grobject
; Interception: Not
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_AFTER_QUICK_PASTE	message
;
;	Send to object after it has been created by a quick paste. (ie
;	from quick move or quick copy). Object should either become
;	selected or edited.
;
; Context:	Sent to object after it has been created via a quick paste
; Source:	GrObjBody
; Destination:  GrObject
; Interception: Default handler selects object. Some objects will subclass
;		this and make themselves editable instead. Don't call
;		superclass in this case.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_QUICK_TOTAL_BODY_CLEAR	message
;
;	The body is about to destroy all the blocks that its children are in.
;	The object must	destroy any data in blocks that the body doesn't
;	know about. 
;	Object MUST NOT send any message on the queue while
;	handling this.
;	Object can assume that there are no messages in the queue for it.
;
; Context:	Send by body when handling MSG_GO_CLEAR
; Source:	GrObjBody
; Destination:  Any grobject
; Interception: The default handler sends MSG_GO_NUKE_DATA_IN_OTHER_BLOCKS
;		to itself (in most cases you will be better off subclassing
;		that message). However, objects such as the guardians must 
;		cause there wards to nuke any extra data, so they subclass 
;		the message, send MSG_FINAL_OBJ_FREE to their wards and then
;		call their superclass.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_CLEAR_IF_NOT_WITHIN_BODY_BOUNDS			message
;
;	Causes the GrObj to delete itself if its bounds do not overlap the
;	body's bounds
;
;PASS:		
;	nothing
;			
;RETURN:	
;	carry set if object nukes itself
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GO_INC_CX_IF_COPYABLE				message
;
;	Take a wild guess
;
;PASS:		
;	cx - current count of copyable objects
;			
;RETURN:	
;	cx - incremented if copyable
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_DESELECT_IF_COPY_LOCK_SET	message
;
;	If the object is selected and it has its copy lock set it
;	will become unselected.
;
; Context:	Used before copying to avoid lots of problems.
; Source:	GrObjBody
; Destination:  Selected GrObjs
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GO_OBJ_FREE_GUARANTEED_NO_QUEUED_MESSAGES		message
;
;	Free an object *now*, with the full knowledge that no messages
;	are in the queue for this object, or its ward if it is a guardian.
;	This is a tough guarantee to make. You really don't want to be
;	sending this message unless you are very sure about what you are
;	doing. Currently this message is only used when freeing the undo
;	action that an object created when it received MSG_GO_CLEAR. On
;	MSG_GO_CLEAR the object releases all excls, is taken out of the
;	selection list, is removed from the body and creates an undo
;	action. By the time that undo action can be freed there will be
;	no messages in the queue for the object. If that undo action
;	is freed the object send this message to itself.
;
;	The object may not put any messages on any queues in the process
;	of handling this message.
;
; Context:	Low level utility for deleting objects. See above
; Source:	Sent internally usually. You really shouldn't send 
;		this yourself.
; Destination:  Any grobject
; Interception: Most objects use the same handler as MSG_GO_OBJ_FREE.
;		The guardian's subclass this message because they
;		normally free there wards with MSG_META_OBJ_FREE, which
;		results in a message on the queue. This is not allowed
;		when handling this message. So the guardians subclass
;		this message and destroy their wards by sending
;		MSG_META_FINAL_OBJ_FREE to the wards directly. The guardians
;		then call their superclass to destroy themselves.
;		
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

MSG_GO_QUICK_TRANSFER_TAKE_MOUSE_GRAB_IF_POSSIBLE	message
;	Checks to see if this object should take the mouse grab.  This 
;	should only be called while a quick transfer is taking place and
;	the body currently has the mouse grab.  It will take back the
;	mouse grab IF it is NOT the floater, if it is the owner of the
;	quick transfer object, and if the mouse event pointer position is
;	within its bounds.  This is a highly specialized message.
;
;	INTERNAL USE ONLY
;
; Context:	Highly specialized message.  See explanation.
; Source:	GrObjBodyLargePtr
; Destination:  Any GrObject
; Interception: The default handler in GrObjClass will do nothing and return
;		carry clear.  This is intended to be subclassed only by
;		GrObjVisGuardianClass.
;
; Pass:	(No MF_STACK)
;	ss:bp	= LargeMouseData
;	^lcx:dx	= optr to the owner of the Quick Transfer Object
;			
; Return:
;	carry:	SET	- Object was eligible and mouse was grabbed.
;		CLEAR	- Object was not eligible, mouse grab was not changed.
;
;	cx, dx, bp - unchanged
;	ax - destroyed
;
; WARNING:
;	Do NOT send this message with MF_STACK because dx is not set to the
;	size of the parameters on the stack.  As a result, this message must
;	be sent and received by the same thread.
;

;---

protominor	GrObjNewFor2_1

MSG_GO_IS_POINT_INSIDE_OBJECT_BOUNDS	message
;	Checks to see if the passed point is inside the object's bounds
;
; Context:	Mostly used to check mouse position.
; Source:	Anyone.
; Destination:  Any GrObject (the floater always returns false)
; Interception: The GrObjClass handler should work in all cases.
;
; Pass:
;	ss:bp	= PointDWFixed
;	dx	= size PointDWFixed
;			
; Return:
;	carry:	SET	- Point is inside bounds
;		CLEAR	- Point is NOT inside bounds
;
;	cx, dx, bp - unchanged
;	ax - destroyed
;

MSG_GO_FLIP	message
;
;	Same as MSG_GO_SCALE except the undo string is set correctly to
;	flipString.
;
;	Scale a grobject. [current matrix][scale]
;	Anchors center of object.
;
; Context:	GrObj Utility
; Source:	Unrestricted
; Destination:  Any GrObject
; Interception:	Unlikely
;
; Pass:
;	ss:bp - GrObjScaleData
;			
; Return:
;	nothing
;
;	cx, dx, bp - unchanged
;	ax - destroyed
;


protoreset

;------------------------------------------------------------------------------
;	GrObjClass Structures and Records for Instance Data
;------------------------------------------------------------------------------
ObjectTransform	struct

	OT_center		PointDWFixed	;Center of the object in
						;PARENT coords

	OT_width		WWFixed		;width of object in the
						;OBJECT coordinate system

	OT_height		WWFixed 	;height of object in OBJECT
						;coordinate system.

	OT_parentWidth		WWFixed		;width of object in PARENT
						;coord. includes line
						;width and such so can
						;be used for invalidation, etc

	OT_parentHeight		WWFixed		;height of object in PARENT
						;coord. includes line
						;width and such so can
						;be used for invalidation, etc

	OT_transform		GrObjTransMatrix

ObjectTransform	ends


;
;	This structure represents the subset of GrObj instance data
;	required to recover the object from a transfer item
;
GrObjDefiningData struct
	GODD_attrFlags		GrObjAttrFlags
	GODD_locks		GrObjLocks
	GODD_areaToken		word
	GODD_lineToken		word
	GODD_normalTransform	ObjectTransform
GrObjDefiningData ends

GrObjObjManipData	struct
	GOOMD_actionGrObj		optr
	GOOMD_origMousePt		PointDWFixed
	GOOMD_oppositeHandle		GrObjHandleSpecification
	GOOMD_grabbedHandle		GrObjHandleSpecification
	GOOMD_initialAngle		WWFixed
	GOOMD_oppositeAnchor		PointDWFixed
	GOOMD_oppositeInitialAngle	WWFixed
GrObjObjManipData	ends

ATTR_GO_OBJ_MANIP_DATA	vardata		GrObjObjManipData

ATTR_GO_ACTION_NOTIFICATION	vardata		GrObjActionNotificationStruct

ATTR_GO_PARENT_DIMENSIONS_OFFSET	vardata	PointWWFixed

;------------------------------------------------------------------------------
;	GrObjClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

    GOI_drawLink		LinkPart <>		;link to next object in
public GOI_drawLink				;draw list

    GOI_reverseLink	LinkPart <>		;link to previous object
public	GOI_reverseLink				;in draw list

    GOI_attrFlags	GrObjAttrFlags	;Individual bit attributes
						
    GOI_optFlags	GrObjOptimizationFlags	;what it says

    GOI_msgOptFlags	GrObjMessageOptimizationFlags 
						;Should only be set in
						;handlers for 
						;MSG_META_INITIALIZE

    GOI_locks		GrObjLocks		;Locks that prevent
						;certain actions being
						;performed on object

    GOI_actionModes	GrObjActionModes	;Which mode (CREATE,MOVE..)
						;and the state it is in
						;(ACTIVATED...)

    GOI_tempState	GrObjTempModes		;Temporary state that must
						;be protected by incing 
						;the in use count
public GOI_tempState


    GOI_normalTransform	lptr.ObjectTransform	;Chunk handle of data
						;describing object

	;Sprite information mirrors normal transformation fields in purpose
	;but are used during modification of object. Regular fields remain
	;unmodified and transformations are applied to them and stored in
	;the sprite info for determining new position,size and for drawing
	;the sprite.

    GOI_spriteTransform		lptr.ObjectTransform



    GOI_areaAttrToken	word		;Element number of area attributes

    GOI_lineAttrToken	word		;Element number of default line

GrObjClass	endc




;------------------------------------------------------------------------------
;	GrObjAttributeManagerClass
;------------------------------------------------------------------------------


GrObjAttributeManagerClass	class GrObjClass
;------------------------------------------------------------------------------
;	GrObjAttributeManagerClass Methods
;------------------------------------------------------------------------------


;************************************************
MSG_GOAM_CREATE_ALL_ARRAYS	message
;
;	Have the attribute mannager create all the arrays it needs to 
;	manage the attributes. See MSG_GOAM_ATTACH_AND_CREATE_ARRAYS for 
;	contrast.
;
; Context:	Sent shortly after the attribute manager has been
;		created and the user doesn't want to create and 
;		intialize any of the arrays him/herself.
; Source:	Generally GenDocument while handling 
;		MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


GrObjAttributeManagerArrayDesc	struct

	GOAMAD_areaAttrArrayHandle	word
					;VM block handle of element array
					;for area attributes. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, area array will be created.

	GOAMAD_areaDefaultElement	word
					;Element number of default attributes
					;in area array. Value ignored if
					;0 passed for areaAttrArrayHandle

	GOAMAD_lineAttrArrayHandle	word
					;VM block handle of element array
					;for line attributes. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, text array will be created.

	GOAMAD_lineDefaultElement	word
					;Element number of default attributes
					;in line array. Value ignored if
					;0 passed for lineAttrArrayHandle

	GOAMAD_grObjStyleArrayHandle	word
					;VM block handle of element array
					;for grobj styles. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, style array will be created.

	GOAMAD_charAttrArrayHandle	word
					;VM block handle of element array
					;for char attributes. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, char array will be created.

	GOAMAD_charDefaultElement	word
					;Element number of default attributes
					;in char array. Value ignored if
					;0 passed for charAttrArrayHandle

	GOAMAD_paraAttrArrayHandle	word
					;VM block handle of element array
					;for paragraph attributes. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, text array will be created.

	GOAMAD_paraDefaultElement	word
					;Element number of default attributes
					;in paragraph array. Value ignored if
					;0 passed for paraAttrArrayHandle

	GOAMAD_typeArrayHandle		word
					;VM block handle of element array
					;for types. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, text array will be created.

	GOAMAD_typeDefaultElement	word
					;Element number of default attributes
					;in type array. Value ignored if
					;0 passed for paraAttrArrayHandle

	GOAMAD_graphicArrayHandle	word
					;VM block handle of element array
					;for graphics. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, graphic array will be created.

	GOAMAD_nameArrayHandle		word
					;VM block handle of element array
					;for graphics. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, graphic array will be created.

	GOAMAD_textStyleArrayHandle	word
					;VM block handle of element array
					;for text styles. Chunk must
					;be at GROBJ_VM_ELEMENT_ARRAY_CHUNK
					;If 0, style array will be created.

GrObjAttributeManagerArrayDesc	ends


;************************************************
MSG_GOAM_ATTACH_AND_CREATE_ARRAYS	message
;
;	Have the attribute manager use the passed arrays and
;	create the ones not passed.
;	See MSG_GOAM_CREATE_ARRAYS for contrast.
;
; Context:	Sent shortly after the attribute manager has been
;		created and the user has created some or all of the
;		arrays need for attribute management
; Source:	Generally GenDocument while handling 
;		MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	ss:bp - GrObjAttributeManagerArrayDesc
;		For the three grobj arrays you must either pass all
;		three arrays or all three as 0
;		For the three text arrays you must either pass all
;		three arrays or all three as 0
;		
;
;RETURN
;	nothing
;
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GOAM_ADD_AREA_ATTR_ELEMENT		message
;	
;	Add an element (or a new reference to an existing element)
;	in the area attr element array
;
; Context:	GrObjAttributeManager Utility		
; Source:	Any grobject under a GrObjBody that is attached to
;		the GrObjAttributeManager
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	ss:bp - GrObjBaseAreaAttrElement
;
;RETURN
;	ax - area token
;	stc - if this element newly added
;
;DESTROYED:
;	nothing
;

;**********************************************
MSG_GOAM_ADD_LINE_ATTR_ELEMENT		message
;	
;	Add an element (or a new reference to an existing element)
;	in the line attr element array
;
; Context:	GrObjAttributeManager Utility		
; Source:	Any grobject under a GrObjBody that is attached to
;		the GrObjAttributeManager
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	ss:bp - GrObjBaseLineAttrElement
;
;RETURN
;	ax - line token
;	stc - if this element newly added
;
;DESTROYED:
;	nothing
;

;**********************************************
MSG_GOAM_DEREF_AREA_ATTR_ELEMENT_TOKEN	message
;	
;	Dereference element in area attr array (remove if
;	reference count geos to zero)
;
; Context:	GrObjAttributeManager Utility		
; Source:	Any grobject under a GrObjBody that is attached to
;		the GrObjAttributeManager
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	cx - area token
;
;RETURN
;	stc  - if element actually removed
;

;**********************************************
MSG_GOAM_DEREF_LINE_ATTR_ELEMENT_TOKEN		message
;	
;	Dereference element in line attr array (remove if
;	reference count geos to zero)
;
; Context:	GrObjAttributeManager Utility		
; Source:	Any grobject under a GrObjBody that is attached to
;		the GrObjAttributeManager
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	cx - line token
;
;RETURN
;	stc  - if element actually removed
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GOAM_ADD_REF_AREA_ATTR_ELEMENT_TOKEN		message
;	
;	Add reference to element in area attr array 
;
; Context:	GrObjAttributeManager Utility		
; Source:	Any grobject under a GrObjBody that is attached to
;		the GrObjAttributeManager
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	cx - area token
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;
;**********************************************
MSG_GOAM_ADD_REF_LINE_ATTR_ELEMENT_TOKEN		message
;	
;	Add reference to element in line attr array 
;
; Context:	GrObjAttributeManager Utility		
; Source:	Any grobject under a GrObjBody that is attached to
;		the GrObjAttributeManager
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	cx - line token
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GOAM_GET_FULL_AREA_ATTR_ELEMENT		message
;	
;	Get area attribute element from element array
;
; Context:	GrObjAttributeManager Utility		
; Source:	Unrestricted
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	cx - area token
;	ss:bp - GrObjFullAreaAttrElement - empty
;
;RETURN
;	carry set if passed token valid
;		ss:bp - GrObjFullAreaAttrElement - filled
;		ax - element size
;
;	carry clear if no information retured
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GOAM_GET_FULL_LINE_ATTR_ELEMENT		message
;	
;	Get line attribute element from element array
;
; Context:	GrObjAttributeManager Utility		
; Source:	Unrestricted
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	cx - line token
;	ss:bp - GrObjFullLineAttrElement - empty
;
;RETURN
;	carry set if passed token valid
;		ss:bp - GrObjFullLineAttrElement - filled
;		ax - element size
;
;	carry clear if no information retured
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GOAM_GET_STYLE_ARRAY			message
MSG_GOAM_GET_AREA_ATTR_ARRAY			message
MSG_GOAM_GET_LINE_ATTR_ARRAY			message
;	
;	Get the style array handle
;
; Context:	GrObjAttributeManager Utility		
; Source:	Unrestricted
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;	nothing
;
;RETURN
;	carry set if valid value
;		cx - array block handle
;
;	carry clear if no information retured
;
;DESTROYED:
;	nothing
;

;**********************************************
MSG_GOAM_GET_AREA_AND_LINE_TOKENS_FROM_STYLE	message
;	
;	Returns the area and line tokens stored in the style
;	represented by the passed style token
;
; Context:	GrObjAttributeManager Utility		
; Source:	Unrestricted
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS
;		cx - style token
;
;RETURN
;		carry set if style not found, else
;
;		carry clear
;		ax - area attr token
;		dx - line attr token
;
;DESTROYED:
;	nothing
;

;**********************************************
MSG_GOAM_ATTACH_BODY				message
;
;	add the passed GrObjBody OD to the GOAM's body list
;
; Context:	GrObjAttributeManager Utility		
; Source:	Most likely from MSG_GB_ATTACH_GOAM method
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS:		^lcx:dx = GrObjBody object
;
;RETURN:	nothing
;
;DESTROYED:
;		ax
;	

;**********************************************
MSG_GOAM_INVALIDATE_BODIES				message
;
;	send a MSG_GB_INVALIDATE to every GrObjBody in the GOAM's 
;	body list. eg., if a style changes and they all need to know
;	about it.
;
; Context:	GrObjAttributeManager Utility		
; Source:	Unlimited
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS:		nothing
;
;RETURN:	nothing


;**********************************************
MSG_GOAM_SUBST_AREA_TOKEN				message
;
;	Inform all the GrObjBodys in the GOAM's list that any GrObjs
;	with the passed "old" token should replace it with the new one,
;	updating the reference count if specified.
;
; Context:	GrObjAttributeManager Utility		
; Source:	Most likely from the style substitution callack
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS:		cx - old area token
;		dx - new area token
;		bp - nonzero if GrObjs should update reference counts
;			to both the old and new tokens
;
;RETURN:	nothing
;
;DESTROYED:	ax

;**********************************************
MSG_GOAM_SUBST_LINE_TOKEN				message
;
;	Inform all the GrObjBodys in the GOAM's list that any GrObjs
;	with the passed "old" token should replace it with the new one,
;	updating the reference count if specified.
;
; Context:	GrObjAttributeManager Utility		
; Source:	Most likely from the style substitution callack
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS:		cx - old line token
;		dx - new line token
;		bp - nonzero if GrObjs should update reference counts
;			to both the old and new tokens
;
;RETURN:	nothing
;
;DESTROYED:	ax
;

;****************************************************************************
MSG_GOAM_GET_TEXT_OD	message
;
;	Return the output descriptor of the text object that the
;	attribute manager uses to keep track of the default text
;	attributes.
;
; Context:	GrObjAttributeManager Utility
; Source:	Unrestricted
; Destination:  GrObjAttributeManager
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	^lcx:dx - text od
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOAM_GET_TEXT_ARRAYS	message
;
;	Return the vm block handles of the char, para and style arrays.
;
; Context:	GrObjAttributeManager Utility
; Source:	Unrestricted
; Destination:  GrObjAttributeManager
; Interception: Unlikey
;
;PASS:		
;	ss:bp - GrObjTextArrays
;
;RETURN:
;	ss:bp - structure filled
;
;DESTROYED:
;	ax
;

GrObjTextArrays	struct
    GOTA_charAttrArray		word
    GOTA_paraAttrArray		word
    GOTA_typeArray		word
    GOTA_graphicArray		word
    GOTA_nameArray		word
    GOTA_textStyleArray		word
GrObjTextArrays	ends

;****************************************************************************
MSG_GOAM_LOAD_STYLE_SHEET_PARAMS			message
;
;	Fills out a StyleSheetParams struct
;
; Context:	GrObjAttributeManager Utility
; Source:	Unrestricted
; Destination:  GrObjAttributeManager
; Interception: Unlikey
;
;PASS:		
;	ss:[bp] - empty StyleSheetParams
;	cx - nonzero to preserve xfer arrays
;
;RETURN:	
;	ss:[bp] - StyleSheetParams
;
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GOAM_DETACH_BODY				message
;
;	Remove the passed GrObjBody OD from the GOAM's body list
;
; Context:	GrObjAttributeManager Utility		
; Source:	Most likely from the body when it is handling MSG_GB_CLEAR
; Destination:	GrObjAttributeManager
; Interception:	Unlikely
;
;PASS:		^lcx:dx = GrObjBody object
;
;RETURN:	nothing
;
;DESTROYED:
;		ax
;	


;****************************************************************************
MSG_GOAM_SUBST_TEXT_ATTR_TOKEN		message
;
;	A text object has requested an attribute substitution, so we
;	need to relay the message to all text objects in all the bodies.
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - VisTextSubstAttrTokenParams
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOAM_RECALC_FOR_TEXT_ATTR_CHANGE		message
;
;	A text object has requested an attribute substitution, so we
;	need to relay the message to all text objects in all the bodies
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:
;	cx - nonzero if relayed to all text objects
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOAM_LOAD_STYLE_SHEET		message
;
;	Merge data from a given style sheet
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjAttribute manager
; Interception: Unlikely
;
;PASS:
;	ss:bp - StyleSheetParams
;RETURN:
;	nothing
;
;DESTROYED:
;	ax, cx, dx, bp
;

;****************************************************************************
MSG_GOAM_SET_GROBJ_DRAW_FLAGS	message
;
;	Sends a MSG_GB_SET_GROBJ_DRAW_FLAGS_NO_BROADCAST to all the GOAM's
;	bodies
;
; Context:	GOAM Utility
; Source:	Unrestricted
; Destination:  GOAM
; Interception: Unlikely
;
;PASS:		
;
;	cx - GrObjDrawFlags to set
;	dx - GrObjDrawFlags to reset
;
;RETURN:	
;	nothing
;
;DESTROYED:  
;	ax
;

;------------------------------------------------------------------------------
;	GrObjAttributeManagerClass Structures and Records for Instance Data
;------------------------------------------------------------------------------

GOAM_BODY_LIST_CHUNK_ARRAY_HEADER macro count
	ChunkArrayHeader <count, 4, 0, size ChunkArrayHeader>
endm

GROBJ_VM_ELEMENT_ARRAY_CHUNK	=	(size LMemBlockHeader)

;------------------------------------------------------------------------------
;	GrObjAttributeManagerClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------
    GOAMI_areaAttrArrayHandle	word	;VM handle of Element array of 
					;GrObjBaseAreaAttrElement

    GOAMI_lineAttrArrayHandle	word	;VM handle of Element array 
					;of GrObjBaseLineAttrElement

    GOAMI_grObjStyleArrayHandle	word	;VM handle of Element array
					;of GrObjStyleElement

    GOAMI_bodyList		lptr	;Chunk array of body optrs

    GOAMI_charAttrArrayHandle	word	;VM block handle of Element array

    GOAMI_paraAttrArrayHandle	word	;VM block handle of Element array

    GOAMI_typeArrayHandle	word	;VM block handle of Element array

    GOAMI_graphicArrayHandle	word	;VM block handle of Element array

    GOAMI_nameArrayHandle	word	;VM block handle of Element array

    GOAMI_textStyleArrayHandle	word	;VM block handle of style array

    GOAMI_text			optr	;Output descriptor of text object
					;that will maintain default
					;text attributes



GrObjAttributeManagerClass	endc




;------------------------------------------------------------------------------
;	GrObjBody Class
;------------------------------------------------------------------------------


GrObjBodyClass	class VisCompClass

;------------------------------------------------------------------------------
;	GrObjBody Class Methods
;------------------------------------------------------------------------------

 
;************************************************
MSG_GB_CREATE_GSTATE	message
;
;	For speed purposes the grobj keeps a cached gstate.
;	When something in the grobj requests a gstate we
;	create a gstate and copy the cached gstates transform
;	into the new one. This prevent us from having
;	to vup up the vis linking several more levels.
;	We don't use the cached gstate so that the caller can
;	function just as if it called GrCreateState and 
;	destroy the gstate when it is done.
;
;PASS
;	nothing
;
;RETURN
;	bp - gstate
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_INVALIDATE	message
;
;	Invalidate all the GrObjs under this body
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_GIVE_ME_MOUSE_EVENTS	message
;
;	Tell body to send mouse events to a child
;
;PASS
;	cx:dx - od of child
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_DONT_GIVE_ME_MOUSE_EVENTS	message
;
;	Tell body to stop sending mouse events to a child
;
;PASS
;	cx:dx - od of child
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_ATTACH_HEAD	message
;
;	Set Head OD in instance data
;
; Context:	GrObjBody Utility
; Source:	Unrestricted. Generally the GenDocument on 
;		MSG_GEN_DOCUMENT_ATTACH_UI
; Destination:	GrObjBody
; Interception:	Unlikely

;PASS
;	cx:dx - OD of GrObjHead
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_ATTACH_GOAM	message
;
;	Set GrObjAttributeManager OD in instance data and attach the
;	body to the GOAM's bodyList.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted. Generally the GenDocument on 
;		MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE
; Destination:	GrObjBody
; Interception:	Unlikely

;PASS
;	cx:dx - OD of GrObjAttributeManager
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;************************************************
MSG_GB_ATTACH_RULER	message
;
;	Set Ruler OD in instance data
;
; Context:	GrObjBody Utility
; Source:	Unrestricted. Generally the GenDocument on 
;		MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS
;	cx:dx - OD of VisRuler
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;



GrObjBodyAddGrObjFlags record
	GOBAGOF_DRAW_LIST_POSITION:1	;if 1, GOBAGOF_REFERENCE refers to
					;position in draw list, if 0 it
					;refers to position in reverse
					;draw list
	GOBAGOF_REFERENCE:15		;
GrObjBodyAddGrObjFlags	end

GOBAGOR_FIRST = CCO_FIRST
GOBAGOR_LAST = CCO_LAST


;************************************************
MSG_GB_ADD_GROBJ	message
;
;	Add a graphic object to the GrObjbody and generate an
;	undo chain to undo the add. The object will be
;	notified via MSG_GO_AFTER_ADDED_TO_BODY that it has been added
;	to the body. The object will not be drawn. If the caller
;	wishes to have the object drawn at this time, then use
;	MSG_GB_ADD_GROBJ_THEN_DRAW insteads
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS
;	cx:dx - optr of child to add
;	bp - GrObjBodyAddGrObjFlags
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_REMOVE_GROBJ	message
;
;	Remove a grobject from the graphic body and generate
;	undo chain to undo remove. Warning, this message
;	will not cause the child to release exclusives, drop selection,
;	drop edit and such. In general you should use 
;	MSG_GO_REMOVE_FROM_BODY which is sent to the child.
;	
;
; Context:	GrObj Body Utility	
; Source:	Unrestricted
; Destination:  Body
; Interception: Unlikely
;
;PASS:		
;	^lcx:dx - child
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;************************************************
MSG_GB_FIND_GROBJ	message
;
;	Find the position in the draw list and reverse list of child
;	of the body
;
;PASS
;	cx:dx - optr of child to find
;
;RETURN
;	stc - found
;		cx - position in draw list (0 = first child)
;		dx - position in reverse list (0 = first child)
;	clc - not found
;		cx,dx - destroyed
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_PULL_SELECTED_GROBJS_TO_FRONT	message
;
;	Bring the selected grobjs to the front of the document.
;	(i.e. move them to the end of the drawing list)
;
; Context:	GrObjBody Utility
; Source:	Unrestricuted
; Destination:  GrObj Body
; Interception: Unlikely
; Undo:		Generates an undo chain with text
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_PUSH_SELECTED_GROBJS_TO_BACK	message
;
;	Push the selected grobjs to the back of the document.
;	(i.e. move them to the begining of the drawing list)
;
; Context:	GrObjBody Utility
; Source:	Unrestricuted
; Destination:  GrObj Body
; Interception: Unlikely
; Undo:		Generates an undo chain with text
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_SHUFFLE_SELECTED_GROBJS_UP	message
;
;	Move selected grobjs one closer to end of the draw list
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObj Body
; Interception: Unlikely
; Undo:		Generates an undo chain with text
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_SHUFFLE_SELECTED_GROBJS_DOWN	message
;
;	Move selected grobjs one closer to begining of the draw list
;	
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObj Body
; Interception: Unlikely
; Undo:		Generates an undo chain with text
;
;
;PASS
;	nothing
;RETURN
;	even less
;DESTROYED:
;	ax
;


;************************************************
MSG_GB_SET_DESIRED_HANDLE_SIZE	message
;
;	set desired handle width for selected objects
;
;PASS
;	cl - desired handle size (in DEVICE coords)
;RETURN
;	nothing
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_GET_DESIRED_HANDLE_SIZE	message
;
;	set desired handle width for selected objects
;
;PASS
;	nothing
;RETURN
;	al - desired handle size (in DEVICE coords)
;DESTROYED:
;	nothing
;



;******************************************
MSG_GB_ATTACH_UI			message
;
;	Prepare GrObjBody for opening
;
; Context:	MUST be sent to body after it has been added to the
;		document, which should be done on		
;		MSG_GEN_DOCUMENT_ATTACH_UI
; Source:	Generally GenDocument object
; Destination:	GrObjBody
; Interception:	Unlikely.
;
;PASS
;	cx:dx - OD of GrObjHead
;	
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;******************************************
MSG_GB_DETACH_UI			message
;
;	Prepare GrObjBody for closing
;
; Context:	MUST be sent to body before it is removed from the
;		document, which should be done on		
;		MSG_GEN_DOCUMENT_DETACH_UI
; Source:	Generally GenDocument object
; Destination:	GrObjBody
; Interception:	Unlikely.
;
;PASS
;	nothing
;	
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;



;**********************************************
MSG_GB_ADD_GROBJ_TO_SELECTION_LIST	message
;	
;	Add passed child to selection list.
;
;	NOTE: If you want to add a child to the body, send the child
;	MSG_GO_BECOME_SELECTED. DO NOT send this message to the body
;	with the child's od. The child may have its selection lock set
;	or other instance data that should prevent it from being selected.
;
; Context:	When a grobject is handling MSG_GO_BECOME_SELECTED.
; Source:	GrObject
; Destination:	GrObjBody
; Interception:	Unlikely.
;
;PASS
;	cx:dx - OD of child
;	bp low - HandleUpdateMode
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GB_REMOVE_GROBJ_FROM_SELECTION_LIST	message
;	
;	Remove passed child from selection list
;
;PASS
;	cx:dx - OD of child
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GB_REMOVE_ALL_GROBJS_FROM_SELECTION_LIST	message
;	
;	Removes all children from selection list
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GB_SEND_CLASSED_EVENT_TO_SELECTED_GROBJS	message
;	
;	Sends encapsulated classed event to all 
;	grobjects on selection list
;
;PASS
;	cx - event handle
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GB_GET_NUM_SELECTED_GROBJS	message
;	
;	return number of children in selection list
;
;PASS
;	nothing
;
;RETURN
;	bp - number of children
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GB_GET_BOUNDS_OF_SELECTED_GROBJS	message
;	
;	Returns the bounds that encompass all the selected objects
;
;PASS
;	ss:bp - RectDWord
;
;RETURN
;	ss:bp - RectDWord
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GB_GET_DWF_BOUNDS_OF_SELECTED_GROBJS	message
;	
;	Returns the bounds that encompass all the selected objects
;
;PASS
;	ss:bp - RectDWFixed
;
;RETURN
;	ss:bp - RectDWFixed
;DESTROYED:
;	ax
;

;**********************************************
MSG_GB_GET_SUMMED_DWF_DIMENSIONS_OF_SELECTED_GROBJS	message
;	
;	Returns the summed heights/widths of all the selected objects
;
;PASS
;	ss:bp - RectDWFixed
;
;RETURN
;	ss:bp - RectDWFixed
;DESTROYED:
;	ax
;

GrObjsInRectSpecial	record
	GOIRS_IGNORE_TEMP:1			;don't send tempMessage to
						;objects with GOTM_TEMP_HANDLES
						;set

	GOIRS_IGNORE_RECT:1			;don't send inRectMessage to
						;objects in rect

	GOIRS_XOR_CHECK:1			;if both temp and inRect
						;conditions apply, send
						;neither. otherwise send
						;both. temp will always
						;be sent first.

GrObjsInRectSpecial	end


GrObjsInRectData	struct
	GOIRD_tempMessage	word		;Message to send to 
						;an object that has
						;GOTM_TEMP_HANDLES bit set

	GOIRD_tempMessageDX	word		;word of data that can
						;be passed with temp
						;message in dx

	GOIRD_inRectMessage	word		;Message to send to an
						;object that is inside
						;the GOIRD_rect

	GOIRD_inRectMessageDX	word		;word of data that can
						;be passed with inRect
						;message in dx

	GOIRD_rect		RectDWord		;Rectangle to see if
						;object is in

	GOIRD_special		GrObjsInRectSpecial
						;Special instructions for
						;processing children

	align 			word

GrObjsInRectData ends

;**********************************************
MSG_GB_DELETE_SELECTED_GROBJS	message
;
;	Delete all the children on the selected list
;
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;**********************************************
MSG_GB_PROCESS_ALL_GROBJS_IN_RECT	message
;
;		Compares the visBounds of each object with the rectangle
;		for some condition. If condition is met, send method
;		to object with stack frame. The rect and condition flags
;		are in the TestRectangleStruct
;		
;
;PASS
;	ss:bp - GrObjsInRectData
;	dx - size GrObjsInRectData
;
;RETURN
;	nothing
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_INCREASE_POTENTIAL_EXPANSION	message
;	Notify the tree that an object just instantiated could
;	expand to a maximum of the amount passed
;
;PASS
;	cx - #bytes object may expand - may no be more than MAX_OBJ_EXPANSION
;	dx - handle of block
;
;RETURN
;	nothing 
;DESTROYED:
;	ax
;


;*************************************************
MSG_GB_DECREASE_POTENTIAL_EXPANSION	message
;	Notify the tree that an object about to be destroyed previously
;	increased the increased potential
;
;PASS
;	cx - #bytes object may expand - may no be more than MAX_OBJ_EXPANSION
;	dx - handle of block
;RETURN
;	nothing 
;
;DESTROYED:
;	ax
;



PriorityListInstructions	record
	PLI_CHECK_SELECTION_HANDLE_BOUNDS:1;Do trivial reject check on bounds
					;of objects that include the selection
					;handles, instead of the normal
					;PARENT bounds which are only guaranteed
					;to surround the image
	PLI_ONLY_PROCESS_SELECTED:1	;Only send messages to objects
					;that are in selection list
	PLI_ONLY_PROCESS_CLASS:1	;Only send messages to objects
					;of class
	PLI_ONLY_INSERT_CLASS:1		;Only insert items of class into
					;priority list
	PLI_STOP_AT_FIRST_HIGH:1	;Stop processing children after
					;an object evaluates high
	PLI_ONLY_INSERT_HIGH:1		;Only insert objects that evaluate
					;high
	PLI_DONT_INSERT_OBJECTS_WITH_SELECTION_LOCK:1
					;Don't insert objects that
					;have their selection lock set.
					;These objects must return
					;EPN_SELECTION_LOCK_SET


PriorityListInstructions	end


PLInit	struct
	PLI_align	byte
	PLI_message	word
	PLI_point	PointDWFixed
	PLI_instructions PriorityListInstructions
	PLI_maxElements	word
	PLI_class	fptr.ClassStruct
PLInit	ends

CheckHack < offset PLI_class  eq (size PLInit-size PLI_class)>

PriorityListElement	struct
	PLE_od		optr
	PLE_priority	byte
	PLE_other	byte
PriorityListElement	ends


;If used as PriorityList message no message will actually be sent to object.
;The bounds check will be considered sufficient for a high evaluation. No
;other data or EvaluatePositionNotes will be set.

PRIORITY_LIST_EVALUATE_PARENT_POINT_FOR_BOUNDS	equ	0

PriorityList	struct
	PL_message	word			;Method to send to each
						;object

	PL_point	PointDWFixed		;Document coord to be
						;examined by object

	PL_instructions	PriorityListInstructions;Instructions for processing
						;of objects

	PL_class	fptr.ClassStruct		;Class of object to be used
						;based on 
						;PriorityListInstructions

	PL_numElements	word			;Number of elements currently
						;in the list

	PL_maxElements	word			;Maximum number of elements
						;allowed in list

	PL_list		lptr			;Chunk handle of list
						;chunk array.
PriorityList	ends	


;*************************************************
MSG_GB_FILL_PRIORITY_LIST	message
;	
;	Fill the GrObjBody's priority list
;
;PASS
;	nothing
;
;RETURN:
;	nothing
;	
;DESTROYED:
;	ax
;


;*************************************************
MSG_GB_MESSAGE_TO_FLOATER_IF_PARENT	message
;
;	Send method to floater if this body is its parent
;
;PASS:
;	cx - method to send
;	dx,bp - method data
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_UPDATE_UI_CONTROLLERS	method
;
;	Update the GrObj controllers
;
;PASS:
;	cx - GrObjUINotificationTypes
;RETURN:
;	nothing
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_UPDATE_EXTENDED_AREA_ATTR_CONTROLLERS	method
;
;	Update the GrObj dealing with area attributes not of
;	type GOAAET_BASE
;
;PASS:
;	nothing
;RETURN:
;	nothing
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_UPDATE_EXTENDED_AREA_ATTR_CONTROLLERS_WITH_DEFAULTS	method
;
;	Update the GrObj dealing with area attributes not of
;	type GOAAET_BASE
;
;PASS:
;	nothing
;RETURN:
;	nothing
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_UPDATE_EXTENDED_LINE_ATTR_CONTROLLERS	method
;
;	Update the GrObj dealing with line attributes not of
;	type GOLAET_BASE
;
;PASS:
;	nothing
;RETURN:
;	nothing
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_UPDATE_EXTENDED_LINE_ATTR_CONTROLLERS_WITH_DEFAULTS	method
;
;	Update the GrObj dealing with line attributes not of
;	type GOLAET_BASE
;
;PASS:
;	nothing
;RETURN:
;	nothing
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_UPDATE_INSTRUCTION_CONTROLLERS	method
;
;	Update the GWNT_GROBJ_BODY_INSTRUCTION_FLAGS_CHANGE controllers
;	based on the body's instance data
;
;PASS:
;	nothing
;RETURN:
;	nothing
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_ADD_DUPLICATE_FLOATER method
;
;	Add a duplicate of the passed object to the visual tree
;
;PASS
;	cx:dx - OD of object to duplicate and add
;
;RETURN
;	cx:dx - OD of new object
;DESTROYED:
;	ax
;


;************************************************
MSG_GB_PRIORITY_LIST_RESET		message
;
;	Set the priority list back to zero elements
;
;PASS
;	nothing	
;		
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_PRIORITY_LIST_GET_NUM_ELEMENTS		message
;
;	Return number of elements in list
;
;PASS
;	nothing	
;		
;RETURN
;	cx - number of elements
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_PRIORITY_LIST_GET_ELEMENT		message
;
;	Return info about an element in list
;
;PASS
;	cx - element # (0 is first element)
;		
;RETURN
;	stc - element doesn't exist
;	clc  - element exists
;		cx:dx - optr
;		al - priority
;		ah - other data
;	
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_PRIORITY_LIST_INIT		message
;
;	Initialize priority list data
;
;PASS
;	cx:dx - fptr to PLInit
;		
;RETURN
;	nothing	
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_GROUP_SELECTED_GROBJS	message
;
;	Form a group composed of the selected children
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_UNGROUP_SELECTED_GROUPS	message
;
;	Ungroup any selected children which are groups
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_TRANSFER_GROBJ_FROM_GROUP	message
;
;	Call back message for transfer children from group to
;	body during an ungroup	
;
;PASS
;	ss:bp - CallBackMessageData
;		
;RETURN
;	clc - keep processing children
;
;DESTROYED:
;	ax
;


MSG_GB_CLOSE_FINISH_UP	message


;****************************************************************************
MSG_GB_CLEAR	message
;
;	Destroy the body, all its children, frees the blocks the
;	children are in but NOT the block the body is in.
;	More specifically, it releases all exclusives held by body, 
;	disconnects if from the head and attribute manager and sends 
;	MSG_META_OBJ_FREE to itself. On MSG_FINAL_OBJ_FREE the body
;	will send MSG_GO_QUICK_TOTAL_BODY_CLEAR to all its
;	children and the free all the children's blocks. This is done
;	instead of sending MSG_META_OBJ_FREE to each child because
;	that would flood the system queues with an alarming number
;	of messages.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;



;*************************************************
MSG_GB_ALIGN_SELECTED_GROBJS		message
;
;	Aligns the selected objects according to the passed AlignType
;
;PASS
;	cl = AlignType
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_CREATE_SORTABLE_ARRAY		message
;
;	Allocates a block for a sortable selected array, and changes the
;	graphic body's instance data to point to it. The original array's
;	descriptor is stored in the new array's header.
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_DESTROY_SORTABLE_ARRAY		message
;
;	Frees the block previously allocated for a sortable selected array,
;	(in handler for MSG_GB_CREATE_SORTABLE_ARRAY) and changes the
;	graphic body's instance data to point back to the original array.
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_FILL_SORTABLE_ARRAY_USING_GO_DWF_BOUNDS		message
MSG_GB_FILL_SORTABLE_ARRAY_USING_GO_CENTERS		message
;
;	Fills the Sortable array from the original array contained in
;	its header. The sortable array element is the OD from the
;	original element, plus a DWFixed key from the object specified
;	by the OD. The caller passes an offset into RectDWFixed to
;	specify which parameter from the object's bounds is to be
;	the key.
;
;PASS
;	dx = offset into RectDWFixed of key
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_SORT_SORTABLE_ARRAY		message
;
;	Sort the sortable array based on each element's key.
;
;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_GET_CENTER_OF_SELECTED_GROBJS			message
;
;	Return the PointDWFixed center of the selected grobjs
;
;PASS:
;		ss:bp = PointDWFixed
;		dx >= size PointDWFixed
;
;RETURN:
;		ss:bp = PointDWFixed center
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_GET_CENTER_OF_FIRST_SELECTED_GROBJ		message
;
;	Return the PointDWFixed center of the first object in
;	the selection list
;
;PASS:
;		ss:bp = PointDWFixed
;		dx >= size PointDWFixed
;
;RETURN:
;		ss:bp = PointDWFixed center
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_GET_CENTER_OF_LAST_SELECTED_GROBJ		message
;
;	Return the PointDWFixed center of the last object in
;	the selection list
;
;PASS:
;		ss:bp = PointDWFixed
;		dx >= size PointDWFixed
;
;RETURN:
;		ss:bp = PointDWFixed center
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_GET_DWF_BOUNDS_OF_FIRST_SELECTED_GROBJ		message
;
;	Return the RectDWFixed bounds of the first object in
;	the selection list
;
;PASS:
;		ss:bp = RectDWFixed
;		dx >= size RectDWFixed
;
;RETURN:
;		ss:bp = RectDWFixed center
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_GB_GET_DWF_BOUNDS_OF_LAST_SELECTED_GROBJ		message
;
;	Return the RectDWFixed bounds of the last object in
;	the selection list
;
;PASS:
;		ss:bp = RectDWFixed
;		dx >= size RectDWFixed
;
;RETURN:
;		ss:bp = RectDWFixed center
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GB_GET_BLOCK_FOR_ONE_GROBJ			message
;
;	Return a block in the file that the caller may add one object to.
;
;PASS
;	nothing
;
;RETURN
;	cx
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GB_GET_WINDOW	message
;
;	Return window that document draws through
;	
; Context:	Unlimited
; Source:	Anything
; Destination:	GrObjBody
; Interception:	Unlikely.
;		
;PASS:	
;	nothing
;
;RETURN
;	cx - window
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_ADD_GROBJ_THEN_DRAW	message
;
;	Add a graphic object to the graphic body. The object will be
;	notified via MSG_GO_AFTER_ADDED_TO_BODY that it has been added
;	to the body. If the object was added at the top of the draw list
;	it will be sent a message draw, otherwise it will be invalidated.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS
;	cx:dx - OD of graphic object to add
;	bp - GrObjBodyAddGrObjFlags
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;************************************************
MSG_GB_SET_BOUNDS	message
;
;	Set the bounds of the graphic body
;	
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS
;	ss:bp  - RectDWord
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_GET_BOUNDS	message
;
;	Set the bounds of the graphic body
;	
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS
;	ss:bp - RectDWord to fill in
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_SET_ACTION_NOTIFICATION_OUTPUT	message
;
;	Specify output descriptor for grobjects to 
;	send notification to when an action is performed on them.
;	Grobjects will use this notification in the body if they
;	don't have one of their own. Many uses of the grobj will
;	have no notification. This is for special uses like the
;	chart library which needs to know when pieces of the chart
;	have become selected, been moved, etc.
;
;	When a grobject sends out a notification it will put
;	its OD in cx:dx and bp will contain GrObjActionNotificationType.
;
;	The message sent out is MSG_GROBJ_ACTION_NOTIFICATION
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
; PASS:		
;	cx:dx - optr of object to notify
;			
; RETURN:	
;	nothing 
;
;DESTROYED:
;	ax
;



;****************************************************************************
MSG_GB_SUSPEND_ACTION_NOTIFICATION	message
;
;	Prevent all grobjects from sending out any action notifications,
;	even if a given grobject has its own output OD and message.
;	If the body has no action notification od it will
;	ignore this message.
;	Nested suspends and unsuspends are allowed.
;	If a file is closed it will always reopen unsuspended.
;	
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  Any GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_UNSUSPEND_ACTION_NOTIFICATION	message
;
;	Counterbalance a call to MSG_GB_SUSPEND_ACTION_NOTIFICATION.
;	If all suspends have been balanced the grobject will be
;	free to send out action notification. However, it will not
;	send action notifications that were aborted during the suspended
;	period. If the body is not suspend the message will be ignored.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted.
; Destination:  Any GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing		
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_INSTANTIATE_GROBJ	message
;
;	Instantiate a grobject of the passed class in a block managed
;	by the body.
;
; Context:	For creating objects on the fly as opposed to the user
;		interactively creating the object.
; Source:	Unrestricted.
; Destination:  GrObjBody.
; Interception: Unlikely.
;
;PASS:		
;	cx:dx - fptr to class
;			
;RETURN:	
;	cx:dx - OD of new object
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GB_SUBST_AREA_TOKEN				message
;
;	Inform any GrObjs with the passed "old" token to replace it with
;	the new one, updating the reference count if specified.
;
; Context:	GrObjBody Utility		
; Source:	Most likely from the style substitution callack
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS:		cx - old area token
;		dx - new area token
;		bp - nonzero if GrObjs should update reference counts
;			to both the old and new tokens
;
;RETURN:	nothing
;
;DESTROYED:	ax


;**********************************************
MSG_GB_SUBST_LINE_TOKEN				message
;
;	Inform any GrObjs with the passed "old" token to replace it with
;	the new one, updating the reference count if specified.
;
; Context:	GrObjBody Utility		
; Source:	Most likely from the style substitution callack
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS:		cx - old line token
;		dx - new line token
;		bp - nonzero if GrObjs should update reference counts
;			to both the old and new tokens
;
;RETURN:	nothing
;
;DESTROYED:	ax

;**********************************************
MSG_GB_CREATE_GROBJ_TRANSFER_FORMAT			message
;
;	Creates a VMChain necessary to recontruct the current selection
;
; Context:	GrObjBody Utility		
; Source:	Most likely from a MSG_CLIPBOARD_[CUT|COPY]
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS:		ss:[bp] - PointDWFixed origin
;		cx - VM file
;
;RETURN:	ax - vm block handle of VMChainTree root
;
;DESTROYED:	nothing

;**********************************************
MSG_GB_CREATE_GSTRING_TRANSFER_FORMAT			message
;
;	Creates a gstring representing the current selection
;
; Context:	GrObjBody Utility		
; Source:	Most likely from a MSG_CLIPBOARD_[CUT|COPY]
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS:		ss:[bp] - PointDWFixed origin
;		cx - VM file
;
;RETURN:	ax - vm block handle of gstring
;		cx,dx - width/height of gstring
;
;DESTROYED:	nothing



;****************************************************************************
MSG_GB_SEND_CLASSED_EVENT_SET_DEFAULT_ATTRS	message
;
;	The body sends this message to itself when processing
;	MSG_META_SEND_CLASSED_EVENT so that it can use the
;	message for setting default attributes. This handler
;	must not damage the original message. If it decides
;	to use the message it must duplicated it
;
; Context:	See Above
; Source:	GrObjBody
; Destination:  GrObjBody
; Interception: Possible. If you have subclassed the body to change
;		the default attribute setting behaviour then
;		you should subclass this message and not call
;		your superclass
;
;PASS:		
;	cx - event handle
;	dx - TravelOption
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;****************************************************************************
MSG_GB_CHANGE_GROBJ_DEPTH	message
;
;	Change grobjs position in the draw and reverse lists.
;	Note you can knock the selection array out of
;	draw order when using this message. You may
;	want to use MSG_GB_REORDER_SELECTION_ARRAY both before
;	and afterwards so that undo and redo work correctly.
;	
;
; Context:	Unrestricted
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
; Undo:		Generates an undo chain with "Depth Change" text
;
;PASS:		
;	cx:dx - od of grobj to change depth of
;	bp - GrObjBodyAddGrObjFlags
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_DRAW	message
;
;	Draw the grobects, grids, etc.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted. Generally the GrObjBody itself.
;		You probably want to sending MSG_VIS_DRAW to the body, you
;		should use this message only if you know what you are doing.
; Destination:  GrObjBody
; Interception: Possbile, but unlikely
;
;PASS:		
;	bp - gstate
;	cl - DrawFlags
;	dx - GrObjDrawFlags
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_EXPORT	message
;
;	Create gstring in the vm file
;
; Context:	Sent to body by impex when user chooses export
; Source:	Impex
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - ImpexTranslationParams
;
;RETURN:	
;	ss:bp - ImpexTranslationParams
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_GRAB_TARGET_FOCUS	message
;
;	Have the body grab the target and the focus
;
; Context:	Unrestricted. Generally sent by floater to body on 
;		start selects.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_GENERATE_TEXT_NOTIFY		message
;
;	Combine attrs from the selected text objects and send out notification
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - VisTextGenerateNotifyParams
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_GENERATE_SPLINE_NOTIFY		message
;
;	Combine attrs from the selected splines and send out notification
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - SplineGenerateNotifyParams
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GB_DETACH_GOAM	message
;
;	Clear GrObjAttributeManager OD in instance data and detach the
;	body from the GOAM's bodyList.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted. 
; Destination:	GrObjBody
; Interception:	Unlikely

;PASS
;	nothing
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_IMPORT	message
;
;	Handle import via impex
;
; Context:	Import
; Source:	Import Controller
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp -  ImpexTranslatoinParams
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_CONVERT_SELECTED_GROBJS_TO_BITMAP	message
;
;	Replace any selected grobjs with an equivalent bitmap.
;
; Context:	GrObjBodyUtility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_CONVERT_SELECTED_GROBJS_TO_GRAPHIC	message
;
;	Replace any selected grobjs with an equivalent gstring object.
;
; Context:	GrObjBodyUtility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_IGNORE_UNDO_ACTIONS_AND_SUSPEND		message
;
;	An alternative to MSG_META_SUSPEND that will *not* generate
;	a new undo chain. This message is complemented by
;	MSG_GB_ACCEPT_UNDO_ACTIONS_AND_UNSUSPEND
;
; Context:	GrObjBodyUtility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_UNSUSPEND_AND_ACCEPT_UNDO_ACTIONS		message
;
;	An alternative to MSG_META_UNSUSPEND that will *not* generate
;	a new undo chain. This message is complemented by
;	MSG_GB_IGNORE_UNDO_ACTIONS_AND_SUSPEND
;
; Context:	GrObjBodyUtility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_MAKE_INSTRUCTIONS_SELECTABLE_AND_EDITABLE	message
;
;	Clear selection and edit locks on all instruction grobjects
;	currently in the document.
;
; Context:	GrObj Body Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_MAKE_INSTRUCTIONS_UNSELECTABLE_AND_UNEDITABLE	message
;
;	Set selection and edit locks on all instruction grobjects
;	currently in the document.
;
; Context:	GrObj Body Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_SET_GROBJ_DRAW_FLAGS	message
;
;	Set the GrObjDrawFlags that are used during the handling
;	of MSG_VIS_DRAW. This message will send a
;	MSG_GOAM_SET_GROBJ_DRAW_FLAGS to the attribute manager, which will
;	in turn send a MSG_GB_SET_GROBJ_DRAW_FLAGS_NO_BROADCAST to all
;	the relevant bodies
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;
;	cx - GrObjDrawFlags to set
;	dx - GrObjDrawFlags to reset
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_DELETE_INSTRUCTIONS	message
;
;	Delete all instruction objects in document
;	
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_PASTE_INSIDE	message
;
;	Paste the clipboard objects inside the currently selected objects
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_CLONE_SELECTED_GROBJS	message
;
;	Clone the selected grobjs (copy/paste in place)
;	
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		nothing
;			
;RETURN:	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_CREATE_POLYGON	message
;
;	Create a polygon with the passed number of points
;	
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		bp - number of points in the polygon
;		cx,dx - width, height of polygon
;			
;RETURN:	^lcx:dx - new polygon
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_CREATE_STAR	message
;
;	Create a star with the passed number of points
;	
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		ss:[bp] - SplineMakeStarParams
;			
;RETURN:	^lcx:dx - new star
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_SUBST_TEXT_ATTR_TOKEN		message
;
;	A text object has requested an attribute substitution, so we
;	need to relay the message to all text objects.
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - VisTextSubstAttrTokenParams
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_RECALC_FOR_TEXT_ATTR_CHANGE		message
;
;	A text object has requested an attribute substitution, so we
;	need to relay the message to all text objects.
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GB_GET_BOUNDS_OF_GROBJS	message
;	
;	Returns the bounds that encompass all the objects
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS
;	ss:bp - RectDWord
;
;RETURN
;	ss:bp - RectDWord
;
;DESTROYED:
;	ax
;

GrObjBodyCustomDuplicateParams	struct
	GBCDP_repetitions	word
	GBCDP_move		PointDWFixed
	GBCDP_rotation		WWFixed
	GBCDP_rotateAnchor	GrObjHandleSpecification
	GBCDP_skew		GrObjAnchoredSkewData
	GBCDP_scale		GrObjAnchoredScaleData
	align word
GrObjBodyCustomDuplicateParams	ends

;****************************************************************************
MSG_GB_CUSTOM_DUPLICATE_SELECTED_GROBJS		message
;
;	Custom duplicate the selected GrObjs.
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:[bp] - GrObjBodyCustomDuplicateParams
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_EXPORT_SELECTED_GROBJS	message
;
;	Create gstring in the vm file
;
; Context:	Sent to body by impex when user chooses export
; Source:	Impex
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - ImpexTranslationParams
;
;RETURN:	
;	ss:bp - ImpexTranslationParams
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_HIDE_UNSELECTED_GROBJS	message
;
;	Set the GOL_SHOW lock in all objects that are not in
;	the selection list.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_SHOW_ALL_GROBJS	message
;
;	Clear the GOL_SHOW lock in all objects
;
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

GrObjBodyCreateGrObjParams	struct
	GBCGP_class	fptr.ClassStruct
	padding1	word			;so width and height align
						;with GrObjInitializeData
	padding2	word
	padding3	word
	padding4	word
	GBCGP_width	WWFixed
	GBCGP_height	WWFixed
GrObjBodyCreateGrObjParams	ends

;****************************************************************************
MSG_GB_CREATE_GROBJ	message
;
;	Initializes a grobj, then adds it to the selection list.
;	
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		ss:[bp] - GrObjBodyCreateGrObjParams
;			
;RETURN:	^lcx:dx - new grobj
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_DUPLICATE_SELECTED_GROBJS	message
;
;	Duplicate the selected grobjs (copy/paste to center of window)
;	
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		nothing
;			
;RETURN:	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_FIND_NEXT_GROBJ_THAT_OVERLAPS	message
;
;	Get the od of the next object in the draw list that has parent
;	bounds that overlap the parent bounds of the passed object
;
; Context:	Used as part of Pull Up/Push Down functionality
; Source:	Unrestricted. Generally GrObjBody
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	^lcx:dx - od of child
;			
;RETURN:	
;	cx = 0 - no such object
;	or
;	^lcx:dx - object that overlaps
;
;DESTROYED:
;	ax
;



;****************************************************************************
MSG_GB_FIND_PREV_GROBJ_THAT_OVERLAPS	message
;
;	Get the od of the prev object in the draw list that has parent
;	bounds that overlap the parent bounds of the passed object
;
; Context:	Used as part of Pull Up/Push Down functionality
; Source:	Unrestricted. Generally GrObjBody
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	^lcx:dx - od of child
;			
;RETURN:	
;	cx = 0 - no such object
;	or
;	^lcx:dx - object that overlaps
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_ZOOM_IN_ABOUT_POINT	message
;
;	Have the body scroll the point to the center of the screen
;	and zoom in.
;	
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: If you wish different view zoom increments then 
;		subclass this message and don't call your superclass
;
;PASS:		
;	ss:bp - PointDWFixed
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_ZOOM_OUT_ABOUT_POINT	message
;
;	Have the body scroll the point to the center of the screen
;	and zoom out.
;	
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: If you wish different view zoom increments then 
;		subclass this message and don't call your superclass
;
;PASS:		
;	ss:bp - PointDWFixed
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


GrObjMouseReturnType	etype byte
	;    The GrObjMouseReturnTypes are in the order in which they
	;    will be checked. As soon as one of the conditions is met
	;    the message returns without checking the remaining types.
	;

	GOMRF_HANDLE	enum GrObjMouseReturnType	
						;Mouse position is over a
						;handle of a selected object.
	GOMRF_BOUNDS	enum GrObjMouseReturnType
						;Mouse position is over
						;the bounds of a grobject
	GOMRF_NOTHING	enum GrObjMouseReturnType
						;Mouse position isn't over
						;anything interesting.


;****************************************************************************
MSG_GB_EVALUATE_MOUSE_POSITION	message
;
;	Determine if the passed mouse position if over a 
;	handle or the bounds of any object and return
;	the mouse cursor image if so. The middle handle of
;	objects with GOL_MOVE set and the perimeter handles of
;	objects with GOL_RESIZE set will be ignored.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikley
;
;PASS:		
;	ss:bp - PointDWFixed in GrObjBody's coordinate system
;			
;RETURN:	
;	ah - MouseReturnFlags high byte
;	nothing or MRF_SET_POINTER_IMAGE or MRF_CLEAR_POINTER_IMAGE
;		al - GrObjMouseReturnType
;	cx:dx - optr of cursor image if MRF_SET_POINTER_IMAGE 
;		set in MouseReturnFlags
;
;DESTROYED:
;	nothing
;

;****************************************************************************
MSG_GB_EVALUATE_POINT_FOR_HANDLE	message
;
;	Determine if passed point is over a handle of a selected grobj
;
; Context:	Unrestricted. Generally called from 
;		MSG_GB_EVALUATE_MOUSE_POSITION handler
; Source:	Unrestricted. Generally GrObjBody
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - PointDWFixed
;			
;RETURN:	
;	stc - handle hit
;		al - GrObjHandleSpecification of hit handle
;
;	clc - no handle hit
;
;DESTROYED:
;	ah
;


;****************************************************************************
MSG_GB_EVALUATE_POINT_FOR_BOUNDS	message
;
;	Determine if passed point is over PARENT bounds of a grobj
;
; Context:	Unrestricted. Generally called from 
;		MSG_GB_EVALUATE_MOUSE_POSITION handler
; Source:	Unrestricted. Generally GrObjBody
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - PointDWFixed
;			
;RETURN:	
;	stc - handle hit
;
;	clc - no handle hit
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_SET_NORMAL_SIZE_ABOUT_POINT	message
;
;	Have the body scroll the point to the center of the screen
;	and set the view scale to 100%
;	
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: If you wish different view zoom increments then 
;		subclass this message and don't call your superclass
;
;PASS:		
;	ss:bp - PointDWFixed
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_DRAW_GROBJ	message
;
;	Draw the passed grobj.If the grobj is the highest child it will
;	just be drawn, otherwise it will be invalidated
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	cx:dx - optr of grobj		
;	
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;**********************************************
MSG_GB_SEND_TO_SELECTED_GROBJS_SHARE_DATA	message
;	
;	Sends encapsulated classed event to all 
;	grobjects on selection list
;
;PASS
;	cx - grobj message #
;	dx, bp - other data
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_STANDARD_PASTE_CALL_BACK	message
;
;	The default handler adds the grobject to the body, draws it
;	and then adds the grobject to the selection list without 
;	drawing the grobjects handles.
;
;	For each object that is pasted in, the body either sends this
;	message to itself, or, if the body has ATTR_GB_PASTE_CALL_BACK 
;	in its vardata, it sends the message stored in the vardata to the
;	object stored in the vardata.
;
;	Upon handling MSG_META_CLIPBOARD_PASTE the body clears the 
;	ATTR_GB_PASTE_CALL_BACK vardata.
;
; 	If wish to use your own ATTR_GB_PASTE_CALL_BACK back to perform
;	special paste functionality (like paste inside), then send
;	MSG_GB_PASTE which uses any existing vardata.
;
; Context:	Sent once for each object being pasted if the body doesn't
;		have a ATTR_GB_PASTE_CALL_BACK vardata.
; Source:	GrObjBody
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	^lcx:dx - grobject not a child of anything
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GB_PASTE	message
;
;	Entry point to paste code that uses existing ATTR_GB_PASTE_CALL_BACK
;	vardata. As opposed to MSG_META_CLIPBOARD_PASTE which clears
;	the vardata. See MSG_GB_STANDARD_PASTE_CALL_BACK for more info
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing			
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_REORDER_SELECTION_ARRAY	message
;
;	Nuke and rebuild the selection array so that it is in draw order.
;	The array is rebuilt from objects that have their GOTM_SELECTED
;	bit set.
;
;	NOTE: for undo and redo to work correctly you will need to 
;	use this message both before and after you muck with the
;	selection array.
;
; Context:	GrObjBody Utility. Certain body functions such as
;		MSG_GB_SHUFFLE_SELECTED_GROBJS_DOWN and UP may 
;		knock the selection array out of draw order, so the
;		body sends this message to itself. Also, 
;		MSG_GB_CHANGE_GROBJ_DEPTH can muck the selection array
;		depending on how it is used. So be careful
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
; Undo:		Generates an undo chain with no text
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_ABORT_SEARCH_SPELL_MESSAGE	message
;
;	Abort a search/spell message (because no text objects exist)
;
; Context:	Sent by the GrObjBody to itsself when receiving a search/spell
;		message and no text objects exist
; Source:	GrObjBody
; Destination:  GrObjBody
; Interception: Possible
; Undo:		-
;
;PASS:		
;	cx - message to abort
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_QUICK_PASTE	message
;
;	Does a paste, drawing from the quick part of the clipboard
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	nothing
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_GET_GROBJ_DRAW_FLAGS	message
;
;	Get the GrObjDrawFlags that are used during the handling
;	of MSG_VIS_DRAW. This is mainly used by a caller of MSG_VIS_DRAW
;	who wants to modify the GrObjDrawFlags. To use the flags that
;	are returned you will need to call MSG_GB_DRAW instead of 
;	MSG_VIS_DRAW .
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	cl - DrawFlags
;
;RETURN:	
;	dx - GrObjDrawFlags
;
;DESTROYED:
;	ax
;


MSG_GB_SET_BOUNDS_WITHOUT_MARKING_DIRTY	message
;
;	Set the bounds of the graphic body *without* marking the object dirty.
;	This is useful if you need to tweak the GrObjBody bounds while
;	printing, for example.
;	
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:	GrObjBody
; Interception:	Unlikely
;
;PASS
;	ss:bp  - RectDWord
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_SET_GROBJ_DRAW_FLAGS_NO_BROADCAST	message
;
;	This message sets the grobj draw flags without requesting that
;	the attribute manager update other bodies in its list.
;
; Context:	GrObjBody Utility
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;
;	cx - GrObjDrawFlags to set
;	dx - GrObjDrawFlags to reset
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GB_QUICK_PASTE_CALL_BACK	message
;
;	The default handler adds the grobject to the body, draws it,
;	send MSG_GO_AFTER_QUICK_PASTE to the new object (generally
;	object will select itself, but some will go into edit mode), then
;	sends MSG_GO_SEND_ANOTHER_TOOL_ACTIVATED to the floater (this handles
;	problems of floater not matching mode the object goes into after quick
;	paste. eg. Doing quick move of spline with rectangle tool but can't
;	edit spline with rectangle tool).
;
; Context:	Sent to body after an object has been quick pasted
; Source:	GrObjBody
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	^lcx:dx - grobject not a child of anything
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


INCLUDE_TEST_CODE = 0

;------------------------------------------------------------------------------
;	GrObjBody Constants and Structures
;------------------------------------------------------------------------------

GrObjBodyPasteCallBackStruct	struct
	GOBPCBS_message	word
	GOBPCBS_optr	optr
GrObjBodyPasteCallBackStruct	ends


ATTR_GB_ACTION_NOTIFICATION	vardata		GrObjActionNotificationStruct
ATTR_GB_PASTE_CALL_BACK		vardata		GrObjBodyPasteCallBackStruct


DEFAULT_MAX_LINE_WIDTH = 7
DEFAULT_DESIRED_HANDLE_SIZE	=	8



GrObjCreateGStateType 	etype	word
BODY_GSTATE	enum	GrObjCreateGStateType,0	;Has only translation to
						;body upper left in it.
						;Useful for untransforming
						;device coords into document
						;coords

PARENT_GSTATE	enum	GrObjCreateGStateType	;Has body translation and
						;group transformations in it.
OBJECT_GSTATE	enum	GrObjCreateGStateType



GrObjFileStatus	record
	GOFS_MOUSE_GRAB:1	;True if body has mouse grab
	GOFS_SYS_TARGETED:1	;Body has the system target excl
	GOFS_TARGETED:1		;Body or one of its children has target
	GOFS_OPEN:1		;True if file is open
GrObjFileStatus	end


GrObjBodyUnsuspendOps	record
	GBUO_UI_NOTIFY GrObjUINotificationTypes: width GrObjUINotificationTypes
				;True fields signfy ui notification structures
				;that should be sent out when the body 
				;suspend counts get decrement to zero
GrObjBodyUnsuspendInfo end

GrObjBodyFlags	record
	GBF_HAS_ACTION_NOTIFICATION:1; True if body has an action notification
				;od in its var data
	GBF_DEFAULT_TARGET:1	;If true, GrObjBody will grab target
				;on vis open
	GBF_DEFAULT_FOCUS:1	;if true, GrObjBody will grab focus
				;on vis open

GrObjBodyFlags	end




;------------------------------------------------------------------------------
;	GrObjBodyClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

    GBI_bounds		RectDWord <>	;32 bit bounds of body

    GBI_drawComp	CompPart <>	;begining of linked list that is
					;the order in which the objects 
					;should be drawn

    GBI_reverseComp	CompPart <>	;begining of linked list that is in
					;the reverse order of the draw list

    GBI_childCount	word		;number of children in draw list


    GBI_selectionArray	optr		;chunk array of OD's of selected obj's

    GBI_targetExcl	HierarchicalGrab
public	GBI_targetExcl

    GBI_focusExcl	HierarchicalGrab

    GBI_mouseGrab	optr		;Floater or object in document to
					;send mouse events to.
public	GBI_mouseGrab
noreloc GBI_mouseGrab			;The object receiving mouse events
					;may not be in the vm file so it
					;cannot be relocated.

    GBI_objBlockArray		lptr	;chunk handle of obj block array

    GBI_defaultOptions		GrObjFunctionsActive
					;User selected defaults options
					;such as RESIZE_FROM_CENTER

    GBI_currentModifiers	GrObjFunctionsActive
					;Current keyboard modifiers that are
					;down

    GBI_currentOptions		GrObjFunctionsActive
					;Formed by combining the
					;defaultActionOptions, 
					;defaultSpeedOptions, with the keyboard
					;modifiers.

    GBI_flags			GrObjBodyFlags
					;Info without a home

    GBI_drawFlags		GrObjDrawFlags

    GBI_fileStatus		GrObjFileStatus
					;info about file such as TARGETED
public	GBI_fileStatus


    GBI_graphicsState	hptr.GState
noreloc GBI_graphicsState

    GBI_head		optr		;od of graphic head
noreloc	GBI_head
public	GBI_head

    GBI_goam		optr
public	GBI_goam

    GBI_ruler		optr
public	GBI_ruler


    GBI_priorityList	lptr.PriorityList


    GBI_desiredHandleSize byte		;The size for handles in DEVICE
					;coordinates
public GBI_desiredHandleSize

    GBI_curHandleWidth	byte		;The width in DOCUMENT coboords to
					;draw the handles to achieve the
					;desired handle size
public GBI_curHandleWidth

    GBI_curHandleHeight	byte		;The height in DOCUMENT coords to
					;draw the handles to achieve the
					;desired handle size
public GBI_curHandleHeight

    GBI_curNudgeX	BBFixed		;Points to move an object in x
					;direction to move one screen
					;unit at the current view scale
public GBI_curNudgeX

    GBI_curNudgeY	BBFixed		;Points to move an object in y
					;direction to move one screen
					;unit at the current view scale
public GBI_curNudgeY

    GBI_curScaleFactor	PointWWFixed  	;Current scale factor 
					;in the view

    GBI_interestingPoint PointDWFixed	;Point to paste to if it
					;is in the window. 

    GBI_lastPtr		PointDWFixed	;Location of last pointer event

    GBI_suspendCount	word		;The number of MSG_META_SUSPEND's
					;received that have not been
					;balanced by a MSG_META_UNSUSPEND

    GBI_unsuspendOps	GrObjBodyUnsuspendOps
					;Operations for the body to 
					;perform when it gets a
					;MSG_GB_UNSUSPEND and the 
					;suspend count goes to zero

    GBI_textUnsuspendOps	VisTextNotificationFlags
					;Operations for the body to 
					;perform when it gets a
					;MSG_GB_UNSUSPEND and the 
					;suspend count goes to zero

    GBI_reserved1	word

    GBI_reserved2	word

GrObjBodyClass	endc







;------------------------------------------------------------------------------
;	GroupClass
;------------------------------------------------------------------------------


GroupClass	class GrObjClass

;------------------------------------------------------------------------------
;	GroupClass Methods
;------------------------------------------------------------------------------

GroupAddGrObjFlags	record
	GAGOF_RELATIVE:1		;For Adding;
					;Position of center of object is
					;already relative to center of 
					;group. Otherwise object center
					;is absolute and must be adjusted
					;when it is added.

	GAGOF_REFERENCE:15
GroupAddGrObjFlags	end

GAGOF_FIRST =  CCO_FIRST
GAGOF_LAST = CCO_LAST


;****************************************************************************
MSG_GROUP_ADD_GROBJ	message
;
;	Add a child to the group and generate an undo chain to undo the add
;
; Context:	Group Utility
; Source:	Unrestricted
; Destination:  Group
; Interception: Unlikely
;
;PASS:		
;	cx:dx - optr of child to add
;	bp - GroupAddGrObjFlags
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GROUP_REMOVE_GROBJ	message
;
;	Remove the child from the group and generate and undo chain 
;	for undoing the add.
;
; Context:	Group Utility
; Source:	Unrestricted
; Destination:  Any group
; Interception: Unlikely
;
;PASS:		
;	cx:dx - optr of child to remove
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;************************************************
MSG_GROUP_CREATE_GSTATE 	message
;
;	Have a gstate created with the transformations of all groups
;	above it, plus its own
;
;PASS
; 	nothing
;		
;RETURN
;	bp - gstate
;
;DESTROYED:
;	ax
;


CallBackMessageData	struct
	CBMD_callBackOD		optr
	CBMD_callBackMessage	word
	CBMD_groupOD		optr
	CBMD_childOD		optr
	CBMD_extraData1		word
	CBMD_extraData2		word
CallBackMessageData	ends

;************************************************
MSG_GROUP_PROCESS_ALL_GROBJS_SEND_CALL_BACK_MESSAGE 	message
;
;	For each child in group send call back message to 
;	call back object with child's OD in cx:dx.
;	If call back message returns carry set it stops 
;	processing children and returns ax,cx,dx,bp from call back.
;
;PASS
;	ss:bp - stack frame that starts with a CallBackMessageData structure
; 	dx - size of struture on stack
;	     (dx must be passed even if using ObjCallInstanceNoLock or
;		calling from same thread)
;		
;RETURN
;	clc - all children processed
;		ax,cx,dx,bp - same as passed
;	stc - not all children processed
;		ax,cx,dx,bp - from call back object message handler
;


;****************************************************************************
MSG_GROUP_INITIALIZE	message
;
;	Initialize the ObjectTransform of a group for expansion
;	The group is initialized with no width and height because these
;	will be calculated later based on the objects added
;	to it. The group's center is initialized a 0,0. 
;	When the group is expanded (MSG_GROUP_EXPAND) the width and
;	height will be set so as to encompass all the children and
;	the group's center will be position correctly in the
;	middle of all the children.
;
; Context:	Sent to group right after it has been instantiated
; Source:	Unrestricted
; Destination:  A newly instantiated group
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GROUP_EXPAND	message
;
;	Expand and position a group to contain all its children.
;
; Context:	Sent to group after children have been added. The 
;		added children must have their positions relative to
;		the groups center. This message is usually used
;		in concert with MSG_GROUP_INITIALIZE.
; Source:	Unrestricted
; Destination:  A group
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GROUP_INSTANTIATE_GROBJ	message
;
;	Instantiate a grobject of the passed class in a block managed
;	by the body that the group is associated with. This message
;	is functionally equivalent to MSG_GB_INSTANTIATE_GROBJ, it merely
;	simplies the creation of groups.
;
; Context:	For creating objects on the fly as opposed to the user
;		interactively creating the object.
; Source:	Unrestricted.
; Destination:  Group
; Interception: Unlikely.
;
;PASS:		
;	cx:dx - fptr to class
;			
;RETURN:	
;	cx:dx - OD of new object
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GROUP_SET_HAS_PASTE_INSIDE_CHILDREN	message
;
;	Set whether group has paste inside children. Group uses it
;	to determine which drawing commands to send to its children.
;
; Context:	Group Utility. Usually sent by body to newly 
;		instantiated group while body is handling MSG_GB_PASTE_INSIDE
; Source:	Unrestricted
; Destination:  Any group
; Interception: Unlikely
;
;PASS:		
;	cl - TRUE/FALSE
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GROUP_PASTE_CALL_BACK_FOR_PASTE_INSIDE	message
;
;	Add the child to the group as a paste inside child
;
; Context:	Used with ATTR_GB_PASTE_CALL_BACK vardata in body. Each
;		object being pasted in will be sent to the group with
;		this message
; Source:	GrObjBody
; Destination:  Group
; Interception: Unlikely
;
;PASS:		
;	^lcx:dx - od of new pasted grobject
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GROUP_CREATE_GSTATE_FOR_BOUNDS_CALC 	message
;
;	Create a gstate with no window and no body translation, but
;	includes the transformations of this group and all the
;	groups above it.
;
;PASS
; 	nothing
;		
;RETURN
;	bp - gstate
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GROUP_VIS_TEXT_GENERATE_NOTIFY	message
;
;	Group equivalent of MSG_VIS_TEXT_GENERATE_NOTIFY, so that we
;	update the ui for text objects in selected group.
;
; Context:	Sent to selected group when sending MSG_VIS_TEXT_GENERATE_NOTIFY
;		to the selected text objects 
; Source:	Usually GrObjBody 
; Destination:  Selected group
; Interception: Unlikely
;
;PASS:		
;	same as MSG_VIS_TEXT_GENERATE_NOTIFY
;			
;RETURN:	
;	same as MSG_VIS_TEXT_GENERATE_NOTIFY
;
;DESTROYED:
;	same as MSG_VIS_TEXT_GENERATE_NOTIFY
;

;****************************************************************************
MSG_GROUP_CHECK_FOR_GROBJ_TEXTS	message
;
;	Determine if there are any text objects in the group
;
; Context:	Group Utility. Currently used as part of determining if there
;		are and selected text objects when deciding whether to
;		set the default text attrs.
; Source:	Unrestricted
; Destination:  Group
; Interception: unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	clc - no text objects in group
;	stc - at least one text object in group.
;
;DESTROYED:
;	ax
;


;------------------------------------------------------------------------------
;	GroupClass Structures and Records for Instance Data
;------------------------------------------------------------------------------
GroupUnsuspendOps	record
	GUO_EXPAND:1			;Group should send MSG_GROUP_EXPAND
					;to itself when suspend count goes
					;to zero.
GroupUnsuspendOps	end

;------------------------------------------------------------------------------
;	GroupClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

    GI_drawHead	CompPart <>
    GI_suspendCount	word
    GI_unsuspendOps	GroupUnsuspendOps


GroupClass	endc




;------------------------------------------------------------------------------
;	Pointer Class
;------------------------------------------------------------------------------

PointerClass	class GrObjClass


;------------------------------------------------------------------------------
;	PointerClass Methods
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;	PointerClass Structures and Records for Instance Data
;------------------------------------------------------------------------------
MIN_MARQUEE_DIMENSION = 7
MAX_PRIORITY_LIST_ELEMENTS = 5
;------------------------------------------------------------------------------
;	PointerClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

PointerModes	record
	PM_HANDLES_RESIZE:1
	PM_HANDLES_ROTATE:1
	PM_POINTER_IS_ACTION_OBJECT:1
PointerModes	end



;Instance data -- all fields private

	PTR_modes			PointerModes

PointerClass	endc





;------------------------------------------------------------------------------
;	RotatePointer Class
;------------------------------------------------------------------------------


RotatePointerClass	class PointerClass
RotatePointerClass	endc


;------------------------------------------------------------------------------
;	ZoomPointer Class
;------------------------------------------------------------------------------


ZoomPointerClass	class PointerClass
ZoomPointerClass	endc



;------------------------------------------------------------------------------
;	Rect Class
;------------------------------------------------------------------------------

RectClass	class GrObjClass


RectClass	endc

;------------------------------------------------------------------------------
;	RoundedRect Class
;------------------------------------------------------------------------------
RoundedRectClass	class RectClass

;****************************************************************************
MSG_RR_SET_RADIUS	message
;
;	Set the radius of the corner of the rounded rect in pts
;
; Context:	RoundedRect Utility
; Source:	Unrestricted
; Destination:  RoundedRectClass
; Interception: Unlikely
;
;PASS:		
;	cx - radius
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_RR_GET_RADIUS	message
;
;	Get the radius of the corner of the rounded rect in pts
;
; Context:	RoundedRect Utility
; Source:	Unrestricted
; Destination:  RoundedRectClass
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx - radius
;
;DESTROYED:
;	ax
;



	RRI_radius	word		;radius of the RoundedRect's corners
					;with the resolution shift already
					;figured in

RoundedRectClass	endc

;------------------------------------------------------------------------------
;	Ellipse Class
;------------------------------------------------------------------------------

EllipseClass	class	RectClass
EllipseClass	endc

;------------------------------------------------------------------------------
;	Line Class
;------------------------------------------------------------------------------

LineClass	class GrObjClass
					
LineClass	endc




;------------------------------------------------------------------------------
;	Arc Class
;------------------------------------------------------------------------------
ArcClass	class GrObjClass

;------------------------------------------------------------------------------
;	Arc Class Messages
;------------------------------------------------------------------------------


;****************************************************************************
MSG_ARC_SET_START_ANGLE	message
;
;	Set the starting angle of the ellipse
;
; Context:	Arc Utility
; Source:	Unrestricted
; Destination:  Unrestricted
; Interception: Unlikely
;
;PASS:		
;	dx:cx - WWFixed angle
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_ARC_SET_END_ANGLE	message
;
;	Set the ending angle of the ellipse
;
; Context:	Arc Utility
; Source:	Unrestricted
; Destination:  Unrestricted
; Interception: Unlikely
;
;PASS:		
;	dx:cx - WWFixed angle
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_ARC_SET_ARC_CLOSE_TYPE	message
;
;	Set the ArcCloseType
;
; Context:	Arc Utility
; Source:	Unrestricted
; Destination:  Unrestricted
; Interception: Unlikely
;
;PASS:		
;	cx - ArcCloseType
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_ARC_UNDO_REPLACE_ARC_GEOMETRY_INSTANCE_DATA	message
;
;	Replace the arcs instance data with the passed ArcBasicInit data
;	as part of an undo operation. A new undo chain is generated first
;	so that this operation will be undoable.
;
; Context:	Send by object to itself while handling MSG_META_UNDO
; Source:	Object itself
; Destination:  Object itself
; Interception: Unlikely
;
;PASS:		
;	dx - DB group
;	cx - DB item
;	bp - VM file handle
;
;	The referenced DBitem must contain a ArcBasicInit structure
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_ARC_REPLACE_ARC_GEOMETRY_INSTANCE_DATA	message
;
;	Replaces the arcs geometry related instance data with the
;	passed data.
;
; Context:	During undo of most geometry operations
; Source:	Object itself
; Destination:  Object itself
; Interception: Unlikely
;
;PASS:		
;	ss:bp - ArcBasicInit
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

ArcBasicInit	struct
	;Don't mess with this structure without changing the arcs
	;instance data. They should be the same.

    ABI_arcCloseType	ArcCloseType
    ABI_startAngle	WWFixed
    ABI_endAngle	WWFixed
    ABI_startPoint	PointWWFixed
    ABI_endPoint	PointWWFixed
    ABI_midPoint	PointWWFixed
    ABI_radius		WWFixed	
ArcBasicInit	ends


	;Don't mess with th instance data without changing the 
	;ArcBasicInit. They should be the same.

    AI_arcCloseType	ArcCloseType
    AI_startAngle	WWFixed
    AI_endAngle		WWFixed
    AI_startPoint	PointWWFixed
    AI_endPoint		PointWWFixed
    AI_midPoint		PointWWFixed
    AI_radius		WWFixed			;radius of circle that
						;3 point arc is a piece of

ArcClass	endc





;------------------------------------------------------------------------------
;	GString Class
;------------------------------------------------------------------------------

GStringClass	class GrObjClass

MSG_GSO_SET_GSTRING	message
; 	Set the gstring object's gstring to the passed gstring. 
;	Any existing gstring will be destroyed.
;
;
; Context:	Unrestricted
; Source:	Unrestricted
; Destination:  GString GrObject
; Interception: unlikely
;
; PASS:
;	cx = VM file handle of gstring
;	dx = VM block handle of gstring
;
;	If CX = 0, 
;		The gstring MUST be in the vm file that the GString object
;		is in. The GString object will not make a copy of the
;		the gstring. The GString object will use the gstring directly 
;		and will destroy the gstring and the gstrings data if a 
;		new gstring is passed to the gstring object.
;		Make sure you fully understand the implications of this
;		before you do this.
;	ELSE
;		The passed gstring is copied into the GString objects 
;		vm file and the GString object uses the copy
;		
; Return:	
;	nothing 
;
; Destroyed:	
;	ax


MSG_GSO_SET_GSTRING_FOR_1X_CONVERT	message
; 	Set the gstring object's gstring to the passed gstring. 
;	Any existing gstring will be destroyed. This does special
;	geometry that is only required when converting a 1.x
;	gstring object
;
;
; Context:	Unrestricted
; Source:	Unrestricted
; Destination:  GString GrObject
; Interception: unlikely
;
; PASS:
;	cx = VM file handle of gstring
;	dx = VM block handle of gstring
;
;	If CX = 0, 
;		The gstring MUST be in the vm file that the GString object
;		is in. The GString object will not make a copy of the
;		the gstring. The GString object will use the gstring directly 
;		and will destroy the gstring and the gstrings data if a 
;		new gstring is passed to the gstring object.
;		Make sure you fully understand the implications of this
;		before you do this.
;	ELSE
;		The passed gstring is copied into the GString objects 
;		vm file and the GString object uses the copy
;		
; Return:	
;	nothing 
;
; Destroyed:	
;	ax



;-----------------------------------------------------------------------------
;	Instance data		
;-----------------------------------------------------------------------------
 

    GSI_vmemBlockHandle		word	;vmem block handle of first
					;block of gstring.

    GSI_gstringCenterTrans	PointWWFixed	;Translation to get the
						;center of the gstring to 0,0

GStringClass	endc










;------------------------------------------------------------------------------
;	GrObjVisGuardianClass
;------------------------------------------------------------------------------


GrObjVisGuardianClass	class GrObjClass

;------------------------------------------------------------------------------
;	GrObjVisGuardianClass Methods
;------------------------------------------------------------------------------

;************************************************
MSG_GOVG_UPDATE_VIS_WARD_WITH_STORED_DATA			message
;
;	Force the vis ward to reflect any attributes stored in
;	the guardian
;
; Context:	Unrestricted. E.g., when the vis ward is created or
;		preparing to be edited.
; Source:	Unrestricted
; Destination:	Any GrObjVisGuardian
; Interception:	Must be intercepted by any GrObjVisGuardian with special
;		data. No default handler.
;
;PASS
;	nothing
; 		
;RETURN
;	nothing
;
;DESTROYED:
;	ax

;************************************************
MSG_GOVG_CONVERT_LARGE_MOUSE_DATA		message
;
;	Convert data in GrObjMouseData to LargeMouseData
;
;PASS
;		ss:cx - GrObjMouseData - 
;				GOMD_point - in PARENT coords
;				GOMD_gstate - not used
;				GOMD_goFA -
;				GOMD_buttonInfo - from orig system mouse event
;		ss:bp - LargeMouseData - empty
; 		
;RETURN
;		ss:bp - LargeMouseData 
;			LMD_point - in OBJECT coords of OVP
;			LMD_buttonInfo
;			LMD_uiFA
;
;WARNING: 	This routine takes data on two different areas 
;		of the stack and it returns data on the stack so it
;		may only be called from the same thread
;DESTROYED:
;	ax
;

;************************************************
MSG_GOVG_CREATE_VIS_WARD			message
;
;	Create vis object that is ward of guardian
;
; Context:	Generally shortly after the guardian has been created
; Source:	The Guardian itself
; Destination:	The Guardian itself
; Interception:	Possible. If the ward has any special initialize that
;		needs to be done (eg MSG_SPLINE_INITIALIZE or setting
;		up the style arrays in the text object), it should
;		subclass this message, call its superclass and then
;		do any special initialization
;
;PASS
;	cx - block to put ward in
; 		
;RETURN
;	cx:dx - OD of ward
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GOVG_ADD_VIS_WARD			message
;
;	Add vis object as ward of guardian
;
;PASS
;	cx:dx - od of ward
; 		
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GOVG_APPLY_OBJECT_TO_VIS_TRANSFORM	message
;
;	Apply transformation from OBJECT coordinate system to
;	the VIS coordinate system
;	
;	This will transform VIS coordinates into OBJECT coordinates
;
;PASS
;	dx - gstate
; 		
;RETURN
;	dx - gstate
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GOVG_CREATE_GSTATE		message
;
;	Create a gstate for the ward with the transformation of the body,
;	all groups, and the guardian in it.
;	
;
; Context:	Called when ward needs a gstate
; Source:	Vis ward
; Destination:	Any object vis guardian
; Interception:	Unlikely
;
;PASS:
;	nothing
;
;RETURNS:
;	bp - gstate
;
;DESTROYED:
;	ax
;


;*************************************************
MSG_GOVG_VIS_BOUNDS_SETUP		message
;
;	Time to initialize the bounds of the ward and perform any
;	related actions
;	
;
; Context:	Usually called when guardian changes size.
; Source:	Unrestriced, usually the guardian itself
; Destination:	Any object vis guardian
; Interception:	Possibly. Probably will call the superclass first. The default
;		handler sets the ward's vis bounds to match the guardians
;		dimensions and then sends ward MSG_VIS_NOTIFY_GEOMETRY_VALID.
;		This causes the ward to do any recalculations, such as
;		rewrapping text	that it needs.
;
;PASS:
;	nothing
;
;RETURNS:
;	nothing
;
;DESTROYED:
;	ax
;

VisWardMouseEventType	etype	byte, 0
VWMET_SMALL	enum VisWardMouseEventType
VWMET_LARGE	enum VisWardMouseEventType

;************************************************
MSG_GOVG_SET_VIS_WARD_MOUSE_EVENT_TYPE		message
;
;	Set type of mouse events that vis ward is interested in.
;	
;
; Context:	Unrestricted. Generally sent when vis ward grabs mouse
; Source:	Unrestricted, usually vis ward
; Destination:	Any object vis guardian
; Interception:	Unlikely. 
;
;PASS
;	cl - VisWardMouseEventTypes
; 		
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GOVG_UPDATE_EDIT_GRAB_WITH_STORED_DATA			message
;
;	Send any stored data to the edit grab
;
; Context:	Unrestricted. Usually sent to the floater by itself
;		when it gets a start select in an object to edit
;		preparing to be edited.
; Source:	Unrestricted
; Destination:	Any GrObjVisGuardian
; Interception:	Must be intercepted by any GrObjVisGuardian with special
;		data. No default handler.
;
;PASS
;	nothing
; 		
;RETURN
;	nothing
;
;DESTROYED:
;	ax


;****************************************************************************
MSG_GOVG_NORMALIZE	message
;
;	Convert the object into a rectangle (not RectClass) and set
;	its GrObjTransMatrix as the Identity Matrix. The width
;	and height of the object will be rounded to the nearest integer
;
; Context:	GrObjVisGuardian Utility. Generally only used during
;		handling of MSG_GO_COMPLETE_CREATE to remove the
;		scale from the GrObjTransMatrix and set the objects
;		width and height to the size of the rectangle the
;		user has created.
; Source:	Unrestricted. Generally the object itself.
; Destination:  Any GrObjVisGuardian
; Interception: Unlikely
;
;PASS:		
;	nothing			
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GOVG_NOTIFY_VIS_WARD_CHANGE_BOUNDS	message
;
;	Notify the guardian that the vis ward wishes to changes its
;	vis bounds.
;
; Context:	Sent to guardian when some action if performed on
;		the ward that causes it to want to change its vis 
;		bounds. Such as adding or deleting text or editing
;		spline bounds.
; Source:	Vis Ward
; Destination:  Guardian of ward changing bounds
; Interception: Possible. The default behaviour sets the OBJECT dimensions
;		to match the desired vis bounds. Sets the object's transform
;		to the identity matrix and moves the object the same amount
;		the center of the vis bounds moved by. Then it sets
;		the vis bounds of the ward to the desired size.
;
;PASS:		
;	ss:bp - Rectangle, desired vis bounds
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_GET_EDIT_CLASS	message
;
;	Return the highest class that the guardian can be used to edit.
;	It is assumed that if a guardian can edit a class it can
;	edit all subclasses of that class. For example, MultTextGuardianClass
;	can edit both TextGuardianClass and MultTextGuardianClass. 
;	TextGuardianClass class is the superclass of MultTextGuardianClass,
;	so the MultTextGuardianClass handler would return TextGuardianClass.

;
; Context:	GrObjVisGuardianUtility
; Source:	Unrestricted
; Destination:  GrObjVisGuardian
; Interception: The default handler returns the guardians class. If the
;		guardian can edit any of its superclasses, it needs to
;		intercept this message and not call its super class.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx:dx - fptr to class
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GOVG_GET_VIS_WARD_OD	message
;
;	Return the output descriptor of the vis ward
;
; Context:	GrObjVisGuardian Utility
; Source:	Unrestricted
; Destination:  Unrestricted
; Interception: Unlikely
;
;PASS:		
;	nothing
;		
;RETURN:	
;	cx:dx - optr
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_GET_TRANSFER_BLOCK_FROM_VIS_WARD		message
;
;	Request a transfer block from the ward
;
; Context:	GrObjVisGuardian Utility
; Source:	Unrestricted
; Destination:  Unrestricted
; Interception: No default handler, so must handle for cut/copy/paste
;
;PASS:		
;	VM override file set
;		
;RETURN:	
;	cx:dx - 32 bit identifier from ward
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_CREATE_WARD_WITH_TRANSFER			message
;
;	Create a ward and pass it the passed 32 bit identifier
;
; Context:	GrObjVisGuardian Utility
; Source:	Unrestricted
; Destination:  Unrestricted
; Interception: No default handler, so must handle for cut/copy/paste
;
;PASS:		
;	VM override file set
;	cx:dx - 32 bit identifier from ward
;		
;RETURN:	^lcx:dx - new ward
;
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_SET_VIS_WARD_CLASS	message
;
;	Set the class of the vis ward. The class must be set before the
;	vis ward is created.
;
; Context:	After creating guardian with MSG_GB_CREATE_GROBJ and
;		before sending MSG_GO_INITIALIZE to the guardian.
; Source:	Unrestricted.
; Destination:  Guardian
; Interception: Unlikely
;
;PASS:		
;		cx:dx - fptr to class of vis ward
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;************************************************
MSG_GOVG_APPLY_SPRITE_OBJECT_TO_VIS_TRANSFORM	message
;
;	Apply transformation from Sprite OBJECT coordinate system to
;	the VIS coordinate system
;	
;	This will transform VIS coordinates into Sprite OBJECT coordinates
;
;PASS
;	dx - gstate
; 		
;RETURN
;	dx - gstate
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_CHECK_FOR_EDIT_WITH_FIRST_START_SELECT	message
;
;	Determine if floater should edit object with the start select that
;	selects the object for editing.
;
; Context:	Sent to the floater that has just given the edit grab
;		to an object because the user clicked on the object.
; Source:	Floater
; Destination:  Floater
; Interception: The default hander returns carry set. If the floater
;		shouldn't edit the object with the start select then you
;		should return carry clear and not call the superclass.
;		For example, the beginner polyline and polycurve tools
;		normal add an anchor point when the user clicks on
;		the line of an existing spline.
;		But we don't want to add an anchor point
;		when the user is trying to choose the spline for editing.
;
;PASS:		
;	nothing
;			
;RETURN:	
;	carry set - edit object with the start select
;	carry clear - don't edit object with start select.
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_RULE_LARGE_START_SELECT_FOR_WARD	message
;
;	Do any constrain/snap to grid of a start select before passing
;	the event to the Vis Ward
;
; Context:	Sent to the guardian just before passing the mouse event
;		on the the vis ward.
; Source:	Self
; Destination:  Self
; Interception: The default handler does normal grobj constrain. Most classes
;		will subclass, since the desired mouse constraint behavior
;		across classes is apparently quite varied.
;
;PASS:		
;	ss:[bp] - GrObjMouseData
;			
;RETURN:	
;	ss:[bp] - GrObjMouseData with ruled GOMD_point, if desired
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_RULE_LARGE_PTR_FOR_WARD	message
;
;	Do any constrain/snap to grid of a ptr event before passing
;	the event to the Vis Ward
;
; Context:	Sent to the guardian just before passing the mouse event
;		on the the vis ward.
; Source:	Self
; Destination:  Self
; Interception: The default handler does normal grobj constrain. Most classes
;		will subclass, since the desired mouse constraint behavior
;		across classes is apparently quite varied.
;
;PASS:		
;	ss:[bp] - GrObjMouseData
;			
;RETURN:	
;	ss:[bp] - GrObjMouseData with ruled GOMD_point, if desired
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_RULE_LARGE_END_SELECT_FOR_WARD	message
;
;	Do any constrain/snap to grid of an end select before passing
;	the event to the Vis Ward
;
; Context:	Sent to the guardian just before passing the mouse event
;		on the the vis ward.
; Source:	Self
; Destination:  Self
; Interception: The default handler does normal grobj constrain. Most classes
;		will subclass, since the desired mouse constraint behavior
;		across classes is apparently quite varied.
;
;PASS:		
;	ss:[bp] - GrObjMouseData
;			
;RETURN:	
;	ss:[bp] - GrObjMouseData with ruled GOMD_point, if desired
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GOVG_CLEAR_VIS_WARD_OD	message
;
;	Set GOVGI_ward to zero
;
; Context:	Sent by vis ward when it is handling MSG_META_FINAL_OBJ_FREE
; Source:	vis ward
; Destination:  vis ward's guardian
; Interception: No
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

 
;------------------------------------------------------------------------------
;	GrObjVisGuardianClass Structures and Records for Instance Data
;------------------------------------------------------------------------------

GrObjVisGuardianCreateMode	etype	byte, 0
	;New objects cannot be create with the guardian.
	GOVGCM_NO_CREATE	enum GrObjVisGuardianCreateMode

	;Creating a new object is handled by the guardian and 
	;consists of dragging open a rectangular area. For example,
	;the text object.
	GOVGCM_GUARDIAN_CREATE	enum GrObjVisGuardianCreateMode

	;Creating a new object is handled by the ward and mouse
	;events during create should be sent to the ward. For example,
	;creating bitmap with pencil.
	GOVGCM_VIS_WARD_CREATE	enum GrObjVisGuardianCreateMode

GrObjVisGuardianFlags	record
	GOVGF_VIS_BOUNDS_HAVE_CHANGED:1	;If TRUE then the vis bounds of the
					;ward have changed since the last
					;time the bit was cleared. Each
					;guardian uses this bit differently
					;to help it determine when to 
					;send out GOANT_RESIZE action notifs.

	GOVGF_LARGE:1			;if TRUE send large mouse
					;events to object. if FALSE send
					;small mouse events

	GOVGF_UNUSED:1			;For future expansion

	GOVGF_ALSO_UNUSED:1		;For future expansion

	GOVGF_APPLY_OBJECT_TO_VIS_TRANSFORM:1
					;if True then you must send
					;MSG_GOVG_APPLY_OBJECT_TO_VIS_TRANSFORM
					;to the object, otherwise a utililty
					;routine can be used.

	GOVGF_CAN_EDIT_EXISTING_OBJECTS:1
					;if TRUE then floater can edit
					;existing objects in the document

	GOVGF_CREATE_MODE GrObjVisGuardianCreateMode:2

GrObjVisGuardianFlags	end

;Guarantee that the create mode is in the least significant bits of the
;record so that checking the enum is easier

CheckHack <offset GOVGF_CREATE_MODE eq 0 >	

;------------------------------------------------------------------------------
;	GrObjVisGuardianClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

    GOVGI_ward		optr
    GOVGI_class		fptr
    GOVGI_flags		GrObjVisGuardianFlags

GrObjVisGuardianClass	endc





;------------------------------------------------------------------------------
;	GrObjVisClass
;------------------------------------------------------------------------------


GrObjVisClass	class VisClass,  master, variant

;------------------------------------------------------------------------------
;	GrObjVisClass Methods
;------------------------------------------------------------------------------

;*****************************************
MSG_GV_GET_WWFIXED_CENTER		message
;
;	Get the WWFixed center of the visual bounds of the object
;	
;
;PASS:
;	nothing
;
;RETURN:
;	dx:cx - WWFixed x of center
;	bp:ax - WWFixed y of center
;
;
;DESTROYED:
;	ax
;

;*****************************************
MSG_GV_SET_GUARDIAN_LINK		message
;
;	Set guardian link to passed OD
;	
;
;PASS:
;	cx:dx - od of guardian
;
;RETURN:
;	nothing
;
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GV_SET_VIS_BOUNDS	message
;
;	Set the visual bounds of the vis ward
;
; Context:	Unrestricted.
; Source:	Unrestricted. Generally guardian
; Destination:  GrObjVis object
; Interception: Possible. The default handler sets the vis bounds using
;		standard VIS messages. Individual objects may have
;		an object specific message
;
;PASS:		
;		ss:bp - Rectangle
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_GV_GET_GROBJ_VIS_CLASS			message
;
;	Returns the class representing the object's "leaf" class
;	according to The GrObj.
;
; Context:	Sent by the object to itself when writing to the transfer item
;		so that in case a subclassing library writes the transfer
;		item, then goes away, we still have some class we can paste.
; Source:	Likely the guardian of the object, probably in the
;		MSG_GO_CREATE_TRANSFER method.
; Destination:  Any clipboardable GrObjVis.
;
; Interception: DO NOT INTERCEPT THIS MESSAGE. That's the whole point,
;		isn't it?
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx:dx - a class ptr recognized by GrObj
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GV_SET_REALIZED_AND_UPWARD_LINK	message
;
;	Set the object's realized bit and the upward link
;	to the body.
;
; Context:	Sent when guardian is added to the body
; Source:	Guardian
; Destination:  Ward
; Interception: Unlikely
;
;PASS:		
;		cx:dx - od of body
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GV_CLEAR_REALIZED_AND_UPWARD_LINK	message
;
;	Clear the object's realized bit and the upward link
;
; Context:	Sent when guardian is removed from the body
; Source:	Guardian
; Destination:  Ward
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GV_GET_GUARDIAN	message
;
;	Return guardian of vis ward
;
; Context:	GrObjVis Utility
; Source:	Unrestricted
; Destination:  GrObjVis
; Interception: Unlikely
;
;PASS:		
;	nothing		
;
;RETURN:	
;	cx:dx - od of guardian

;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_GV_GET_POTENTIAL_WARD_SIZE	message
;
;	Return the number of bytes that the ward can use up in
; 	its block. This includess instance data, chunks and vardata, but
;	not data in other blocks created by this object.
;
; Context:	Used to keep track of which document blocks can
;		have more objects added to them. 
; Source:	Guardian
; Destination:  GrObjVis
; Interception: The default handler will calculate the instance data size,
;		but if your object allocates chunks or vardata in its
;		block it must subclass this message. Call the superclass
;		first and then add in your extra bytes
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx - size in bytes
;
;DESTROYED:
;	ax
;


;------------------------------------------------------------------------------
;	GrObjVisClass Structures and Records for Instance Data
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;	GrObjVisClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

	GVI_guardian	optr				;OD of vis object's
							;guardian

GrObjVisClass	endc




;------------------------------------------------------------------------------
;	BitmapGuardianClass
;------------------------------------------------------------------------------


BitmapGuardianClass	class GrObjVisGuardianClass


;------------------------------------------------------------------------------
;	BitmapGuardianClass Methods
;------------------------------------------------------------------------------

;*************************************************
;MSG_GO_GROBJ_SPECIFIC_INITIALIZE	message
;
;	This commented out message definition exists only to define
;	the object specific data that the BitmapGuardian object 
;	expects with this message. See the definition of the
;	message under GrObjClass for the details.
;
; Context:	Sent to floater just after it has been created by head.
;		This is generally as a result of user choosing a tool
;		from the tool palette.
; Source:	Generally GrObjHead
; Destination:  BitmapGuardianGuardian
; Interception: Unlikely
;
;PASS:	
;	bp high  - GrObjVisGuardianFlags
;			only GOVGF_CAN_EDIT_EXISTING_OBJECTS and
;			GOVGF_CREATE_MODE matter
;
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;


BitmapGuardianBitmapPointerActiveStatus	etype	byte, 0
BGBPAS_ACTIVE	enum BitmapGuardianBitmapPointerActiveStatus
BGBPAS_INACTIVE	enum BitmapGuardianBitmapPointerActiveStatus


;****************************************************************************
MSG_BG_SET_TOOL_CLASS	message
;
;	Store class of bitmap tool
;
; Context:	BitmapGuardian Utility
; Source:	Unrestricted
; Destination:  BitmapGuardian
; Interception: Unlikely
;
;PASS:		
;	cx:dx - fptr to tool class
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;************************************************
MSG_BG_SET_BITMAP_POINTER_ACTIVE_STATUS		message
;
;	Notify bitmap guardian whether there is an active BitmapPointer tool
;	
; Context:	When a BitmapPointer floater is created or destroyed,
;		it must notify the editing bitmap object,so the
;		bitmap knows whether to draw its real estate handles.
;		Also sent by object to itself when it loses the grab.
; Source: 	Unrestricted, usually the BitmapPointer or the object
; Destination:	Only BitmapGaurdians being edited
; Interception: Unlikely
;		
;
;PASS
;	cl - BitmapGuardianBitmapPointerActiveStatus
; 		
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_BG_REAL_ESTATE_HANDLE_HIT_DETECTION	message
;
;	Determine if one of the real estate handles of the object would be hit
;	by the passed point
;
; Context:	Usually called as direct action of user clicking with
;		the bitmap pointer tool. 
; Source:	Unrestricted, generally the floater
; Destination:	Any BitmapGuardian object. The message will be ignored unless
;		both the GOTM_EDIT_INDICATOR_DRAWN and BGF_POINTER_ACTIVE
;		bits are set
; Interception:	Unlikely
;
;PASS
;	ss:bp - PointDWFixed in PARENT
;
;RETURN
;	al - EVALUATE_NONE - handles not hit
;		ah - destroyed
;	al - EVALUATE_HIGH - handle hit
;		ah - tranformFlags - only handle info applies
;
;	dx - 0 ( blank EvaluatePositionNotes)
;
;DESTROYED:
;	see RETURN
;

;*************************************************
MSG_BG_ACTIVATE_REAL_ESTATE_RESIZE		message
;
;	Sets up object for real estate resize. 
;
; Context:	Usually called when user clicks on real estate resize handle
; Source:	Unrestricted, generally bitmap pointer object
; Destination:	BitmapGuardian that has edit grab
; Interception:	Unlikely

;PASS:
;	nothing
;		
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_BG_JUMP_START_REAL_ESTATE_RESIZE		message
;
;	Jump starts resize by doing an activate, start and drag stuff
;
; Context:	Quickly start an interactive resize. Usually called
;		when user clicks on resize handle
; Source:	Unrestricted, generally bitmap pointer object
; Destination:	BitmapGuardian that has edit grab
; Interception:	Unlikely
;
;
;PASS:
;	bp - GrObjFunctionsActive
;	dx - gstate or 0
;
;RETURN:
;
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_BG_PTR_REAL_ESTATE_RESIZE		message
;
;	Sent to update position of mouse during an interactive resize
;	
;
; Context:	During an interactive resize. This message 
;		cooresponds to an MSG_META_PTR when the object is
;		in real estate resize mode
; Source:	Unrestricted, generally pointer object
; Destination:	BitmapGuardian that has edit grabbed and is being
;		real estate resized interactively
; Interception:	Unlikely
;		
;		
;
;PASS:
;	ss:bp = GrObjResizeMouseData
;		GORSMD_point - deltas to resize
;		GORSMD_gstate - gstate to draw with
;		GORSMD_goFA - GrObjFunctionsActive
;		GORSMD_anchor - anchored handle
;	
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_BG_END_REAL_ESTATE_RESIZE		message
;
;	Sent to complete an interactive resize on an object
;
;
; Context:	At the end of an interactive resize. This message 
;		cooresponds to an MSG_META_END_SELECT when the object is
;		in real estate resize mode
; Source:	Unrestricted, generally bitmap pointer object
; Destination:	BitmapGuardian with edit grab. If the
;		object is not currently being resized interactively
;		the message will be ignored.
; Interception:	Unlikely
;
;
;PASS:
;	ss:bp = GrObjResizeMouseData
;		GORSMD_point - deltas to resize
;		GORSMD_anchor - anchored handle
;		GORSMD_grabbed - grabbed handle
;		GORSMD_gstate - gstate to draw with
;		GORSMD_goFA - GrObjFunctionsActive
;
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
MSG_BG_CREATE_VIS_BITMAP		message
;
;	Sent to force the bitmap to allocate its vidmem
;
;
;PASS:
;	cx,dx - width, height of bitmap to allocate
;	bp - gstring to initialize bitmap with (0 for none)
;
;RETURN:
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_BG_GET_TOOL_CLASS	message
;
;	Get stored class of bitmap tool
;
; Context:	BitmapGuardian Utility
; Source:	Unrestricted
; Destination:  BitmapGuardian
; Interception: Unlikely
;
;PASS:		
;	nothing
;			
;RETURN:	
;	cx:dx - fptr to tool class
;
;DESTROYED:
;	ax
;


;------------------------------------------------------------------------------
;	BitmapGuardianClass Structures and Records for Instance Data
;------------------------------------------------------------------------------

BitmapGuardianFlags	record
	BGF_POINTER_ACTIVE:1		;if TRUE then the floater is a
					;BitmapPointer, so the bitmap
					;should display handles instead
					;of a dotted box for its edit indicator
					;and it should respond to clicks
					;on those handles. The BitmapPointer
					;is used for changing the bitmap
					;width and height.
	BGF_REAL_ESTATE_RESIZE:1	;if TRUE then current resize
					;action is actually a real
					;estate resize			

BitmapGuardianFlags	end

;------------------------------------------------------------------------------
;	BitmapGuardianClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

    BGI_flags		BitmapGuardianFlags
    BGI_toolClass	fptr



BitmapGuardianClass	endc



;------------------------------------------------------------------------------
;	GrObjBitmapClass
;------------------------------------------------------------------------------


GrObjBitmapClass	class GrObjVisClass
uses	VisBitmapClass
;------------------------------------------------------------------------------
;	GrObjBitmapClass Methods
;------------------------------------------------------------------------------



;------------------------------------------------------------------------------
;	GrObjBitmapClass Structures and Records for Instance Data
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;	GrObjBitmapClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------


GrObjBitmapClass	endc


;------------------------------------------------------------------------------
;	SplineGuardianClass
;------------------------------------------------------------------------------


SplineGuardianClass	class GrObjVisGuardianClass

;------------------------------------------------------------------------------
;	SplineGuardianClass Methods
;------------------------------------------------------------------------------

MSG_SG_SET_SPLINE_MODE			message
;
;	Set the instance data in the guardian regarding Spline mode and
;	forward the info to the ward, if necessary.
;
; Context:	Spline Guardian utility
; Source: 	Unrestricted
; Destination:	Any SplineGuardian
; Interception: Unlikely
;		
;
;PASS
;	cl - SplineGuardianMode
; 		
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_SG_GENERATE_SPLINE_NOTIFY		message
;
;	If relayed bit is set, then pass the message on down to the ward,
;	otherwise pass it up to the body.
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - SplineGenerateNotifyParams
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;*************************************************
;MSG_GO_GROBJ_SPECIFIC_INITIALIZE	message
;
;	This commented out message definition exists only to define
;	the object specific data that the SplineGuardian object 
;	expects with this message. See the definition of the
;	message under GrObjClass for the details.
;
; Context:	Sent to floater just after it has been created by head.
;		This is generally as a result of user choosing a tool
;		from the tool palette.
; Source:	Generally GrObjHead
; Destination:  SplineGuardian
; Interception: Unlikely
;
;PASS:	
;	bp low 
;		low nibble - SplineMode for creating new splines
;		high nibble  - SplineMode for editing existing splines
;	bp high - GrObjVisGuardianFlags
;		only GOVGF_CAN_EDIT_EXISTING_OBJECTS matters
;
;
;
;RETURN
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_SG_SWITCH_TO_SPLINE_CREATE_MODE		message
;
;	Use SplineMode stored in SGI_splineCreateMode.
;
; Context:	Unrestricted. Generally sent by object to itself when
;		handling MSG_GO_BEGIN_CREATE.
; Source:	Unrestricted
; Destination:  SplineGuardian
; Interception: Unlikely
;
;PASS:		
;	nothing
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_SG_SWITCH_TO_SPLINE_AFTER_CREATE_MODE		message
;
;	Use SplineMode stored in SGI_splineAfterCreateMode if the
;	SGI_splineMode field is one of the splines create modes.
;
;
; Context:	Unrestricted. Generally sent by object to itself when it
;		receives a double click.
; Source:	Unrestricted
; Destination:  SplineGuardian
; Interception: Unlikely
;
;PASS:		
;	nothing
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_SG_SET_SPLINE_CREATE_AND_AFTER_CREATE_MODES		message
;
;	Set SGI_splineAfterCreateMode and SGI_splineCreateMode.
;
; Context:	Unrestricted. Generally sent to object by floater when
;		the floater is handling 
;		MSG_GOVG_UPDATE_EDIT_GRAB_WITH_STORED_DATA
; Source:	Unrestricted
; Destination:  SplineGuardian
; Interception: Unlikely
;
;PASS:		
;	nothing
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;------------------------------------------------------------------------------
;	SplineGuardianClass Structures and Records for Instance Data
;------------------------------------------------------------------------------


;------------------------------------------------------------------------------
;	SplineGuardianClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

	;   These fields are generally set in the floater and then they
	;   are copied to the splines being duplicated from or edited by
	;   the floater.
	;

	SGI_splineCreateMode	SplineMode	;Mode for adding points to
						;splines that have just been
						;duplicated from the floater.

	SGI_splineAfterCreateMode SplineMode	;Mode a spline in one of the 
						;spline create modes will
						;switch to if it receives
						;a double click.

	SGI_splineMode	SplineMode		;If this object is the floater
						;then edit existing splines
						;with this mode.
						;If this object is in the 
						;document then it is being
						;modified in this mode.

SplineGuardianClass	endc



;------------------------------------------------------------------------------
;	GrObjSplineClass
;------------------------------------------------------------------------------


GrObjSplineClass	class GrObjVisClass
uses	VisSplineClass
;------------------------------------------------------------------------------
;	GrObjSplineClass Methods
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;	GrObjSplineClass Structures and Records for Instance Data
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;	GrObjSplineClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------


GrObjSplineClass	endc


;------------------------------------------------------------------------------
;	TextGuardianClass
;------------------------------------------------------------------------------


TextGuardianClass	class GrObjVisGuardianClass

;------------------------------------------------------------------------------
;	TextGuardianClass Methods
;------------------------------------------------------------------------------

;****************************************************************************
MSG_TG_CALC_DESIRED_MIN_HEIGHT	message
;
;	Calculate and set the TGI_desiredMinHeight field in the text guardian
;	object based on the current OBJECT height
;
; Context:	TextGuardian Utility. Usually sent at the end of an
;		interactive resize or create.
; Source:	Unrestricted. Usually TextGuardian itself
; Destination:  Unrestricted. Usually TextGuardian itself
; Interception: Unlikely
;
;PASS:		
;	nothing		
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;****************************************************************************
MSG_TG_SET_DESIRED_MIN_HEIGHT	message
;
;	Set the TGI_desiredMinHeight field in the text guardian object. 
;
; Context:	Unrestricted. Usually sent as result of 
;		MSG_TG_CALC_DESIRED_MIN_HEIGHT
; Source:	Unrestricted. Usually TextGuardian itself
; Destination:  Unrestricted. Usually TextGuardian itself
; Interception: Unlikely
;
;PASS:		
;	cx - height in points
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_TG_HEIGHT_NOTIFY	message
;
;	Adjust the height of the guardian and ward
;
;
; Context:	The ward received MSG_VIS_TEXT_HEIGHT_NOTIFY
; Source:	GrObjText vis ward
; Destination:  TextGuardian
; Interception: Unlikely
;
;PASS:		
;		dx - height text object wants to be.
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;


;****************************************************************************
MSG_TG_GENERATE_TEXT_NOTIFY		message
;
;	If relayed bit is set, then pass the message on down to the ward,
;	otherwise pass it up to the body.
;
; Context:	Unrestricted.
; Source:	Unrestricted
; Destination:  GrObjBody
; Interception: Unlikely
;
;PASS:		
;	ss:bp - VisTextGenerateNotifyParams
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_TG_CALC_DESIRED_MAX_HEIGHT	message
;
;	Calculate and set the TGI_desiredMaxHeight field in the text guardian
;	object based on the current OBJECT height
;
; Context:	TextGuardian Utility. Usually sent at the end of an
;		interactive resize or create.
; Source:	Unrestricted. Usually TextGuardian itself
; Destination:  Unrestricted. Usually TextGuardian itself
; Interception: Unlikely
;
;PASS:		
;	nothing		
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;
;****************************************************************************
MSG_TG_SET_DESIRED_MAX_HEIGHT	message
;
;	Set the TGI_desiredMaxHeight field in the text guardian object. 
;
; Context:	Unrestricted. Usually sent as result of 
;		MSG_TG_CALC_DESIRED_MAX_HEIGHT
; Source:	Unrestricted. Usually TextGuardian itself
; Destination:  Unrestricted. Usually TextGuardian itself
; Interception: Unlikely
;
;PASS:		
;	cx - height in points
;
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;****************************************************************************
MSG_TG_SET_TEXT_GUARDIAN_FLAGS	message
;
;	Set the text guardian flags
;
; Context:	Text Guardian Utility
; Source:	Unrestricted
; Destination:  Text Guardian
; Interception: Unlikely
;
;PASS:		
;	cl - TextGuardianFlags to set
;	dl - TextGuardianFlags to reset
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;



;------------------------------------------------------------------------------
;	TextGuardianClass Structures and Records for Instance Data
;------------------------------------------------------------------------------

TEXT_GUARDIAN_DESIRED_HEIGHT_UNDEFINED equ 0xffff

TextGuardianFlags	record
	TGF_ENFORCE_DESIRED_MIN_HEIGHT:1	;If TRUE then text object
						;will not shrink below
						;the desiredMinHeight while
						;it is being edited or when
						;some attribute changes

	TGF_ENFORCE_DESIRED_MAX_HEIGHT:1	;If TRUE then text object
						;will not expand above
						;the desiredMaxHeight while
						;it is being edited or when
						;some attribute changes

	TGF_DISABLE_ENFORCED_DESIRED_MAX_HEIGHT_WHILE_EDITING:1
						;If TRUE, text object
						;can grow beyond 
						;desiredMaxHeight during
						;editing, but when the
						;object stops be edited
						;it will shrink back to
						;desiredMaxHeight.
						;Meaningless if 
						;TGF_ENFORCE_DESIRED_MAX_HEIGHT
						;is not set.

	TGF_ENFORCE_MIN_DISPLAY_SIZE:1		;If TRUE, then during resize
						;don't allow text
						;object to become shorter
						;than is necessary to display
						;all the text.

	TGF_SHRINK_WIDTH_TO_MIN_AFTER_EDIT:1
						;If TRUE then when the
						;text object loses the
						;edit grab shrink
						;the width to minimum
						;needed to
						;hold the text. Used when
						;user clicks and releases
						;in the same spot to
						;create.

TextGuardianFlags	end

;------------------------------------------------------------------------------
;	TextGuardianClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

	TGI_flags	TextGuardianFlags
	TGI_desiredMinHeight	word
	TGI_desiredMaxHeight	word

TextGuardianClass	endc

;------------------------------------------------------------------------------
;	MultTextGuardianClass
;------------------------------------------------------------------------------


MultTextGuardianClass	class TextGuardianClass

;------------------------------------------------------------------------------
;	MultTextGuardianClass Methods
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;	MultTextGuardianClass Structures and Records for Instance Data
;------------------------------------------------------------------------------


;------------------------------------------------------------------------------
;	MultTextGuardianClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

MultTextGuardianClass	endc

;------------------------------------------------------------------------------
;	EditTextGuardianClass
;------------------------------------------------------------------------------


EditTextGuardianClass	class TextGuardianClass

;------------------------------------------------------------------------------
;	EditTextGuardianClass Methods
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;	EditTextGuardianClass Structures and Records for Instance Data
;------------------------------------------------------------------------------


;------------------------------------------------------------------------------
;	EditTextGuardianClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------

EditTextGuardianClass	endc

;------------------------------------------------------------------------------
;	GrObjTextClass
;------------------------------------------------------------------------------


GrObjTextClass	class GrObjVisClass
uses	VisTextClass
;------------------------------------------------------------------------------
;	GrObjTextClass Methods
;------------------------------------------------------------------------------
;****************************************************************************
MSG_GT_ADJUST_MARGINS_FOR_LINE_WIDTH	message
;
;	Change the margins of the text object so that the test won't 
;	collide with the line drawn around it.
;
; Context:	Unrestricted. Usually sent when line attributes change
; Source:	Unrestricted. Generally TextGuardian
; Destination:  Any GrObjText
; Interception: Unlikely
;
;PASS:		
;	dx:cx - WWFixed line thickness
;			
;RETURN:	
;	nothing
;
;DESTROYED:
;	ax
;

;------------------------------------------------------------------------------
;	GrObjTextClass Structures and Records for Instance Data
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;	GrObjTextClass Instance Data, INSTANCE DATA, instance data
;------------------------------------------------------------------------------


GrObjTextClass	endc

;------------------------------------------------------------------------------
;	GrObjUtils - utility routines exported by library
;------------------------------------------------------------------------------

global GrObjBodyProcessAllGrObjsInDrawOrderCommon:far
global GrObjBodyProcessSelectedGrObjsCommon:far
global GrObjMessageToBody:far

; C stubs
global GROBJBODYPROCESSALLGROBJSINDRAWORDERCOMMON:far
global GROBJBODYPROCESSSELECTEDGROBJSCOMMON:far
global GROBJBODYPROCESSSELECTEDGROBJSCOMMONPASSFLAG:far
global GROBJGETSPRITEOBJECTDIMENSIONS:far
global GROBJGETNORMALOBJECTDIMENSIONS:far
global GROBJCALCCORNERS:far
global GROBJRESIZESPRITERELATIVETOSPRITE:far
global GROBJGETABSSPRITEOBJECTDIMENSIONS:far
global GROBJGETBODYOD:far
global GROBJMESSAGETOBODY:far

global GrObjGetCurrentHandleSize:far
global GrObjDrawOneHandle:far

global GrObjGetNormalOBJECTDimensions:far
global GrObjCalcCorners:far
global GrObjGetCurrentNudgeUnits:far

global GrObjGetSpriteOBJECTDimensions:far
global GrObjGetAbsSpriteOBJECTDimensions:far
global GrObjResizeSpriteRelativeToSprite:far
global GrObjDraw32BitRect:far

global GrObjGetGrObjFullLineAttrElement:far
global GrObjBodyParseGString:far

global SplineGuardianTransformSplinePoints:far
global GrObjApplyNormalTransform:far

global GrObjTestSupportedTransferFormats:far

global GROBJGETCURRENTHANDLESIZE:far
global GROBJDRAWONEHANDLE:far
global GROBJGETCURRENTNUDGEUNITS:far
global GROBJDRAW32BITRECT:far
global GROBJBODYPARSEGSTRING:far
global SPLINEGUARDIANTRANSFORMSPLINEPOINTS:far
global GROBJAPPLYNORMALTRANSFORM:far
global GROBJTESTSUPPORTEDTRANSFERFORMATS:far

EndLibrary	grobj


