COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



	Copyright (c) Geoworks 1995 -- All Rights Reserved



PROJECT:	Legos

MODULE:		Gool Library

FILE:		gool.def



AUTHOR:		David Loftesness, Jan  3, 1995



MACROS:

	Name			Description

	----			-----------



REVISION HISTORY:

	Name	Date		Description

	----	----		-----------

	dloft	1/ 3/95		Initial revision





DESCRIPTION:

	

	$Id: gool.def,v 1.1 97/12/05 12:16:22 gene Exp $		

	$Revision: 1.1 $



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@



SetDef __GOOL



StartLibrary	gool



UseLib legos/ent.def



;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

; 			Class Definitions

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



GoolClass		class 	EntVisClass



StartPropertyMessages		Gool, EntVis

MSG_GOOL_GET_MONIKER		message

MSG_GOOL_SET_MONIKER		message

MSG_GOOL_GET_MONIKER_COLOR	message

MSG_GOOL_SET_MONIKER_COLOR	message

MSG_GOOL_GET_DRAWBOX		message

MSG_GOOL_SET_DRAWBOX		message

MSG_GOOL_GET_FONT		message

MSG_GOOL_SET_FONT		message

MSG_GOOL_GET_FONT_SIZE		message

MSG_GOOL_SET_FONT_SIZE		message

MSG_GOOL_GET_GSTRING_MONIKER	message

MSG_GOOL_SET_GSTRING_MONIKER	message

MSG_GOOL_GET_BGPATTERN		message

MSG_GOOL_SET_BGPATTERN		message

MSG_GOOL_GET_NO_MONIKER		message

MSG_GOOL_SET_NO_MONIKER		message

MSG_GOOL_GET_LEFT		message

MSG_GOOL_SET_LEFT		message

MSG_GOOL_GET_TOP		message

MSG_GOOL_SET_TOP		message

MSG_GOOL_GET_HEIGHT		message

MSG_GOOL_SET_HEIGHT		message

MSG_GOOL_GET_WIDTH		message

MSG_GOOL_SET_WIDTH		message

EndPropertyMessages		Gool, EntVis, 24 ; no more than

						 ; 24 properties

StartActionMessages		Gool, EntVis

MSG_GOOL_ACTION_UPDATE		message

MSG_GOOL_ACTION_SET_COLOR	message

MSG_GOOL_ACTION_SET_SIZE	message

MSG_GOOL_ACTION_POSITIONED	message

EndActionMessages		Gool, EntVis, 16 ; no more than 16 actions

	

	GI_goolVisMoniker	nptr	; chunk that holds the vis moniker

	GI_bgPattern		SystemDrawMask



GoolClass 		endc



GenDummyClass		class	VisClass, master



GenDummyClass		endc



GoolVisClass		class	GoolClass



StartPropertyMessages		GoolVis, Gool

MSG_GOOL_VIS_GET_POS	message

MSG_GOOL_VIS_SET_POS	message

MSG_GOOL_VIS_GET_SIZE	message

MSG_GOOL_VIS_SET_SIZE	message

EndPropertyMessages		GoolVis, Gool, 8



StartActionMessages		GoolVis, Gool

MSG_GOOL_VIS_ACTION_CREATE	message

MSG_GOOL_VIS_ACTION_BOX		message

MSG_GOOL_VIS_ACTION_DRAW	message

MSG_GOOL_VIS_ACTION_LINE	message

MSG_GOOL_VIS_ACTION_TEXT	message

MSG_GOOL_VIS_ACTION_AREA_COLOR	message

MSG_GOOL_VIS_ACTION_LINE_COLOR	message

MSG_GOOL_VIS_ACTION_TEXT_COLOR	message

MSG_GOOL_VIS_ACTION_SIZE	message

MSG_GOOL_VIS_ACTION_POSITION	message

MSG_GOOL_VIS_ACTION_BOX_THICKNESS	message

EndActionMessages		GoolVis, Gool, 16



	GLVI_gstate		hptr

	GLVI_gstring		lptr

	GLVI_text		lptr

	GLVI_textX		word

	GLVI_textY		word

	GLVI_textColor		RGBValue

	GLVI_textColorFlag	ColorFlag

	GLVI_rectColor		RGBValue

	GLVI_x1			word

	GLVI_y1			word

	GLVI_x2			word

	GLVI_y2			word

	GLVI_boxColor		RGBValue

	GLVI_boxColorFlag	ColorFlag

	GLVI_boxThickness	byte

GoolVisClass		endc



GoolGeomFlags	record

	:7

	GGF_MANAGED:1

GoolGeomFlags	end



GoolGeomClass		class	GoolClass



StartPropertyMessages		GoolGeom, Gool

MSG_GOOL_GEOM_GET_ORIENT		message

MSG_GOOL_GEOM_SET_ORIENT		message

MSG_GOOL_GEOM_GET_JUSTIFY_CHILDREN	message

MSG_GOOL_GEOM_SET_JUSTIFY_CHILDREN	message

MSG_GOOL_GEOM_GET_COMPACT		message

MSG_GOOL_GEOM_SET_COMPACT		message

MSG_GOOL_GEOM_GET_MANAGED		message

MSG_GOOL_GEOM_SET_MANAGED		message

EndPropertyMessages		GoolGeom, Gool, 16

	;

	; GoolGeomClass serves as superclass to geometry-providing components

	; like form, frame, list, etc.  Not exported as a component itself.

	;



	GGI_flags		GoolGeomFlags



GoolGeomClass		endc



GoolTriggerClass	class	GoolClass



StartPropertyMessages		GoolTrigger, Gool

MSG_GOOL_TRIGGER_GET_RESPONSE	message

MSG_GOOL_TRIGGER_SET_RESPONSE	message

EndPropertyMessages		GoolTrigger, Gool, 8



	uses GenTriggerClass

	

GoolTriggerClass	endc





GoolEntryClass		class	GoolClass



StartPropertyMessages		GoolEntry, Gool

MSG_GOOL_ENTRY_GET_TEXT		message

MSG_GOOL_ENTRY_SET_TEXT		message

MSG_GOOL_ENTRY_GET_DATA		message

MSG_GOOL_ENTRY_SET_DATA		message

EndPropertyMessages		GoolEntry, Gool, 8



StartActionMessages		GoolEntry, Gool

MSG_GOOL_ENTRY_ACTION_APPEND	message

EndActionMessages		GoolEntry, Gool, 4



	uses GenTextClass

MSG_GOOL_ENTRY_APPLY	message

;

; Apply message that is sent out to itself

;

GoolEntryClass		endc



GoolEvalEntryClass	class	GoolEntryClass

	uses GenTextClass

MSG_GOOL_EVAL_ENTRY_TEXT	message

;

; Send the text of the entry to the interpreter

;

GoolEvalEntryClass		endc



GoolLabelClass		class	GoolClass

	uses GenGlyphClass



GoolLabelClass		endc





GoolFormClass		class	GoolGeomClass



StartPropertyMessages		GoolForm, GoolGeom

MSG_GOOL_FORM_GET_MONIKER	message

MSG_GOOL_FORM_SET_MONIKER	message

MSG_GOOL_FORM_GET_NOTRESIZABLE	message

MSG_GOOL_FORM_SET_NOTRESIZABLE	message

EndPropertyMessages		GoolForm, GoolGeom, 8

	

	uses GenPrimaryClass



GoolFormClass		endc



GoolValueClass		class	GoolClass



MSG_GOOL_VALUE_APPLY	message

; Object sends to itself on an apply

; Context:	

; Source:	

; Destination:  self

; Interception: nope

;		

;

; Pass:		nothing

; Return:	

; Destroyed:	



StartPropertyMessages		GoolValue, Gool

MSG_GOOL_VALUE_GET_VALUE	message

MSG_GOOL_VALUE_SET_VALUE	message

MSG_GOOL_VALUE_GET_MINIMUM	message

MSG_GOOL_VALUE_SET_MINIMUM	message

MSG_GOOL_VALUE_GET_MAXIMUM	message

MSG_GOOL_VALUE_SET_MAXIMUM	message

MSG_GOOL_VALUE_GET_INCREMENT	message

MSG_GOOL_VALUE_SET_INCREMENT	message

MSG_GOOL_VALUE_GET_DISPLAY_FORMAT	message

MSG_GOOL_VALUE_SET_DISPLAY_FORMAT	message

EndPropertyMessages		GoolValue, Gool, 16



StartActionMessages		GoolValue, Gool

MSG_GOOL_VALUE_ACTION_INC		message	

MSG_GOOL_VALUE_ACTION_SET_VALUE		message	

EndActionMessages		GoolValue, Gool, 8



	uses GenValueClass



GoolValueClass		endc



GoolFrameClass		class	GoolGeomClass

	uses GenInteractionClass



GoolFrameClass		endc



GoolListClass		class	GoolGeomClass



StartPropertyMessages		GoolList, GoolGeom

MSG_GOOL_LIST_GET_TYPE		message

MSG_GOOL_LIST_SET_TYPE		message

MSG_GOOL_LIST_GET_SELECTION	message

MSG_GOOL_LIST_SET_SELECTION	message

MSG_GOOL_LIST_GET_SELECTED_COMP	message

MSG_GOOL_LIST_SET_SELECTED_COMP	message

MSG_GOOL_LIST_GET_SCROLLABLE	message

MSG_GOOL_LIST_SET_SCROLLABLE	message

MSG_GOOL_LIST_GET_POPUP		message

MSG_GOOL_LIST_SET_POPUP		message

EndPropertyMessages		GoolList, GoolGeom, 16



	uses GenItemGroupClass



	MSG_GOOL_LIST_SEND_STATUS_MSG	message



GoolListClass		endc



GoolListitemClass	class	GoolClass



StartPropertyMessages		GoolListitem, Gool

MSG_GOOL_LIST_ITEM_GET_ID	message

MSG_GOOL_LIST_ITEM_SET_ID	message

EndPropertyMessages		GoolListitem, Gool, 8



	uses GenItemClass



GoolListitemClass	endc



GoolDialogClass		class	GoolFrameClass



StartActionMessages		GoolDialog, Gool

MSG_GOOL_DIALOG_ACTION_SHOW	message

MSG_GOOL_DIALOG_ACTION_HIDE	message

EndActionMessages		GoolDialog, Gool, 8



	uses GenInteractionClass

	

GoolDialogClass		endc



GoolMenuClass		class	GoolClass

	uses GenInteractionClass

GoolMenuClass		endc



GoolFileSelectorClass	class	GoolClass

	uses	GenFileSelectorClass

GoolFileSelectorClass	endc



GoolCanvasClass		class	GoolClass



StartPropertyMessages		GoolCanvas, Gool



MSG_GOOL_CANVAS_GET_PACK	message

MSG_GOOL_CANVAS_SET_PACK	message

MSG_GOOL_CANVAS_GET_SIZE	message

MSG_GOOL_CANVAS_SET_SIZE	message

MSG_GOOL_CANVAS_GET_BGCOLOR	message

MSG_GOOL_CANVAS_SET_BGCOLOR	message



EndPropertyMessages		GoolCanvas, Gool, 16

	

	uses GenViewClass

GoolCanvasClass		endc



GoolFigClass		class	GoolVisClass

	uses VisClass

GoolFigClass		endc



GoolFig2Class	class	GoolFigClass

	uses	VisClass

GoolFig2Class	endc

	



GoolTimerClass		class	GoolClass



MSG_GOOL_TIMER_BUZZED	message



MSG_GOOL_TIMER_SET_INTERVAL message

; pass in dx



MSG_GOOL_TIMER_GET_INTERVAL message

; return in ax



; requisite handlers for the interval property



StartPropertyMessages		GoolTimer, Gool

MSG_GOOL_TIMER_GET_INTERVAL_PROP	message

MSG_GOOL_TIMER_SET_INTERVAL_PROP	message

EndPropertyMessages		GoolTimer, Gool, 4

	

StartActionMessages		GoolTimer, Gool

MSG_GOOL_TIMER_ACTION_START		message

MSG_GOOL_TIMER_ACTION_STOP		message

EndActionMessages		GoolTimer, Gool, 4



;

; Gets sent out whenever the timer goes off.

;

	GTI_id		word

	GTI_handle	hptr

	GTI_interval	word		; num of tenths of secs before next.

	GTI_eventKey	dword		; function key to pass to

					; MSG_ENT_HANDLE_EVENT_WITH_KEY



GoolTimerClass		endc



GoolSoundClass		class	GoolClass



MSG_GOOL_SOUND_SET_SOUND	message

; pass in dx



MSG_GOOL_SOUND_GET_SOUND	message

; return in ax



	

; requisite property get and set methods

StartPropertyMessages		GoolSound, Gool

MSG_GOOL_SOUND_GET_SOUND_PROP	message

MSG_GOOL_SOUND_SET_SOUND_PROP	message

EndPropertyMessages		GoolSound, Gool, 8

	

StartActionMessages		GoolSound, Gool

MSG_GOOL_SOUND_ACTION_BEEP	message

EndActionMessages		GoolSound, Gool, 4



	GSI_sound	word



GoolSoundClass		endc



GoolTextComponentClass	class	EntVisClass



StartActionMessages		GoolTextComponent, EntVis

MSG_GOOL_TEXT_ACTION_COPY_TEXT 			message

MSG_GOOL_TEXT_ACTION_REPLACE_TEXT 		message

MSG_GOOL_TEXT_ACTION_APPEND_STRING 		message

MSG_GOOL_TEXT_ACTION_REPLACE_STRING 		message

MSG_GOOL_TEXT_ACTION_CHAR_FGC 			message

MSG_GOOL_TEXT_ACTION_CHAR_BGC 			message

MSG_GOOL_TEXT_ACTION_PARA_BGC 			message

MSG_GOOL_TEXT_ACTION_GET_SELECTION_RANGE 	message

MSG_GOOL_TEXT_ACTION_GET_TEXT_LENGTH 		message

MSG_GOOL_TEXT_ACTION_SQUARE 			message

EndActionMessages		GoolTextComponent, EntVis, 16

	

	uses	GenTextClass



GoolTextComponentClass	endc





;=======================================

; Controller components that work with text

;========================================



;

; GoolControlComponentClass isn't exported as

; a component but is used for common functionality

; such as adding to gcnlists and setting output.



GoolControlComponentClass class EntVisClass

	uses	GenControlClass



GoolControlComponentClass endc



GoolFontComponentClass class GoolControlComponentClass



GoolFontComponentClass endc



GoolCharBGColorComponentClass class	GoolControlComponentClass



GoolCharBGColorComponentClass endc



GoolCharFGColorComponentClass class GoolControlComponentClass



GoolCharFGColorComponentClass endc



GoolParaBGColorComponentClass class GoolControlComponentClass



GoolParaBGColorComponentClass endc



GoolPointSizeComponentClass class GoolControlComponentClass



GoolPointSizeComponentClass endc 



GoolTextStyleComponentClass class GoolControlComponentClass



GoolTextStyleComponentClass endc





EndLibrary	gool

