COMMENT @----------------------------------------------------------------------

	Copyright (c) GeoWorks 1991 -- All Rights Reserved

PROJECT:	PC GEOS
MODULE:		Include/Objects
FILE:		genC.def

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	brianc	7/91		Initial version

DESCRIPTION:
	Object definitions for GenClass.   

	$Id: genC.def,v 1.1 97/04/04 14:17:55 newdeal Exp $

------------------------------------------------------------------------------@

SetDef	__GENC

StartLibrary	ui

include ui.def

include file.def	; XXX: until vardata can be exported
include disk.def	; XXX: until vardata can be exported

GenClass	class	VisClass, master, variant

;
; Some GOLDEN RULES regarding generic trees:
;
;	1. If a generic object is specifically built (As in variant specific
; 	   class has been determined), then all generic parents of the object
;	   must be specifically built as well.  This allows us to optimally
;	   search a tree in order to find all specifically-grown generic
;	   objects within a branch.
;
;	2. An object is considered FULLY USABLE if it is marked as GS_USABLE,
;	   AND all generic parents of the object are marked as GS_USABLE.
;	   An object which is not fully USABLE is not considered to be part
;	   of the interface of the application, & may not appear on-screen.
;	   When an object becomes fully USABLE, its instance data is first
;	   shrunk back so that it is not specifically grown, to ensure that
;	   as it is rebuilt & incorporated into the UI of the application,
;	   ONLY the generic instance data & position in the generic tree is
;	   used to determine what specific class it should become, & what its
;	   attributes will be
;
;	3. Any generic branch which is NOT FULLY USABLE must NOT be visibly
;	   built.  This rule is temporarily ignored within the handling of
;	   MSG_GEN_SET_NOT_USABLE, where the object is marked as NOT_USABLE,
;	   and THEN visibly closed & unbuilt.  This is the only allowed
;	   exception.
;
;				-- Doug
;



;------------------------------------------------------------------------------
;	Methods
;------------------------------------------------------------------------------

;
;	Export method space so that the Specific UI can add methods to GenClass
;
;
;	Specific UI methods for GenClass
;
GenSpecMessages	export DEFAULT_EXPORTED_MESSAGES*3

;
;	Export method space so that the Application can add methods to GenClass
;
;
;	Application methods for GenClass
;
GenAppMessages	export DEFAULT_EXPORTED_MESSAGES*5

;------------------------------------------------------------------------------
;	Methods related to getting/setting instance data
;------------------------------------------------------------------------------

;-------------------------------------------------
;		State query and setting
;-------------------------------------------------
;
; GENERAL:
;
; All state setting methods first call the specific UI.  If the specific
; UI wants to implement the method, it does so and returns the carry set.
; The generic action is generally to set the given state and send a
; MSG_VIS_DRAW or MSG_VIS_VUP_UPDATE_WIN_GROUP to the object.

MSG_GEN_SET_ENABLED				message
;
; Enables a generic object, so that the user may interact with it.
; Objects are enabled by default, until they receive a
; MSG_GEN_SET_NOT_ENABLED.  Disabled object do not respond to the mouse, 
; & are typically drawn "grayed out" by the specific UI.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message sent to set GenClass object enabled
; Source:	Anyone
; Destination:	Any GenClass object
; Interception:	Generally not intercepted, though the specific UI may have
;		a handler.  However, custom gadgets may handle.  In this
;		case, call superclass if supplementing default functionality
;		else no need to call superclass if replacing default
;		functionality.
;
; Pass:		dl - VisUpdateMode
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_SET_NOT_ENABLED			message
;
; Disables a generic object, so that the user may NOT interact with it.
; Objects are enabled by default, until they receive a
; MSG_GEN_SET_NOT_ENABLED.  Disabled object do not respond to the mouse, 
; & are typically drawn "grayed out" by the specific UI.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message sent to get or set GenClass object not enabled
; Source:	Anyone
; Destination:	Any GenClass object
; Interception:	Generally not intercepted, though the specific UI may have
;		a handler.  However, custom gadgets may handle.  In this
;		case, call superclass if supplementing default functionality
;		else no need to call superclass if replacing default
;		functionality.
;
; Pass:		dl - VisUpdateMode
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_GET_ENABLED		message
;
; Checks the enabled state of a generic object.  See MSG_GEN_SET_ENABLED and
; MSG_GEN_SET_NOT_ENABLED.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message sent to get GenClass object's enabled state
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		nothing
; Return:	carry set if enabled
;		carry clear if not enabled
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_SET_USABLE		message
;
; A general-purpose methods for setting objects as "USABLE".
; Objects which are not USABLE, or have any generic parents which are
; NOT_USABLE, will not appear as part of the interface for an application.
; Objects may be set USABLE only after they are attached to the system-wide
; generic tree, at which point the object becomes part of the interface for the
; application.  If the window on which the object lies is realized,
; the object will be visually built & updated.
;
; Note that in theory, when a top object of a branch which otherwise
; consists of USABLE object is itself set USABLE, all objects within that
; branch suddenly become USABLE.  This is true for GenPrimarys and GenDisplays.
; However, all dialog GenInteractions will NOT immediately come up on screen,
; but are simply now available to be brought up by the application, using
; MSG_GEN_INTERACTION_INITIATE.  This explains why ALL windows of an
; application don't suddenly pop up on screen when the application object is
; set USABLE on being ATTACHED.  Windows which are in the application object's
; ACTIVE LIST, will, however be made immediately visible by the specific UI
; when the application is ATTACHED.  Thus, any windows you want to be initially
; visible should be listed in the ACTIVE LIST of the app object.
;
; This is a very high-level function, for ALL generic objects except
; GenApplication, GenField, & GenSystem.  The latter three are controlled
; at the highest level using MSG_META_ATTACH & MSG_META_DETACH
; (MSG_GEN_SET_USABLE should NOT be sent to those objects, unless you
; are implementing MSG_META_ATTACH for them in the generic or specific UI)
;
; INSIDER'S NOTE:  The active list concept replaces the simpler, but 
; performance damaging alternative of notifying ALL objects in a branch
; when they become totally USABLE.  You can see that this would be a bad
; idea as the entire interface for an application would have to be loaded
; in on start up, when the top application object is set USABLE as part
; of being ATTACHED.  Of course, this does mean that an object won't be
; informed when it becomes usable, unless it is the top object becoming
; usable.  This works fine for our visual generic objects within a single 
; window, as the MSG_SPEC_BUILD_BRANCH gets sent recursively down the
; tree, informing all objects to become visible, & this suffices to let the
; objects know that they are coming alive.  It also doesn't hurt windowed
; generic objects below this point, for their first need of the knowledge
; that they are USABLE is when they receive the
; MSG_GEN_INTERACTION_INITIATE.   Should new, non-visual generic object types
; be created which need to know when they are USABLE, some equivalent 
; mechanism to the SPEC_BUILD one will have to be created for the groups
; which they are in.
;
; This method DOES force the specific building of the object, but ONLY in the
; case that all generic parents up the tree are also marked as USABLE.
;
; Context:	Utility message sent to set GenClass object usable.  This is
;		the primary mechanism for activating generic objects that have
;		been added or are already part of your application's generic
;		object tree.
; Source:	Anyone
; Destination:	Any GenClass object EXCEPT GenApplication, GenField, and
;		GenSystem (these are controlled by MSG_META_ATTACH and MSG_META_DETACH)
; Interception:	Generally not intercepted, though the specific UI may have
;		a handler.  However, custom gadgets may handle.  In this
;		case, call superclass if supplementing default functionality
;		else no need to call superclass if replacing default
;		functionality.
; 
; Pass:		dl - VisUpdateMode
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_SET_NOT_USABLE			message
;
; Set object as being not usable.  If hooked into generic tree
; that is visualized, will have to be visually unbuilt & updated
;
; This is a very high-level function, for ALL generic objects
; except GenApplication, GenField, & GenSystem.  The latter
; three are controlled at the highest level using MSG_META_ATTACH
; & MSG_META_DETACH (MSG_GEN_SET_NOT_USABLE should NOT be sent
; to those objects, unless you are implementing part of
; MSG_META_DETACH for them)
;
; This method DOES force the specific building of the object, but ONLY in the
; case that the object & all generic parents up the tree were marked as
; USABLE before this method call (i.e. the object was FULLY USABLE).
;
; WHO CAN USE:	Application, Specific UI only for gen objects it creates.
; 		The single exception is for the Application object, which
; 		the specific UI controls with this routine
;
; Context:	Utility message sent to set GenClass object not usable
; Source:	Anyone
; Destination:	Any GenClass object EXCEPT GenApplication, GenField, and
;		GenSystem (these are controlled by MSG_META_ATTACH and MSG_META_DETACH)
; Interception:	Generally not intercepted, though the specific UI may have
;		a handler.  However, custom gadgets may handle.  In this
;		case, call superclass if supplementing default functionality
;		else no need to call superclass if replacing default
;		functionality.
;
; Pass:		dl - VisUpdateMode (VUM_MANUAL NOT ALLOWED)
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;
; VUM_MANUAL has been outlawed with a FATAL_ERROR for the same reason that there
; is a warning in MSG_GEN_UPDATE_VISUAL about needing to send a
; MSG_GEN_UPDATE_VISUAL to EVERY generic object you've marked as needing
; visual updating via VUM_MANUAL.  The problem is this:
; An application should make no assumption
; about the visual construction of a generic tree; in other words, if you
; mark two triggers as IMAGE_INVALID, you shouldn't assume that you can
; just update the display that they are on, since the buttons may visually
; be placed on some window other than the display.  This problem is solved
; by having the MSG_GEN_UPDATE_VISUAL, since the specific UI can implement
; this method by invalidating all visual aspects of the object wherever
; (as in whatever window they're in) they may be.  Whew!
;
; So, how does this relate to VUM_MANUAL & MSG_GEN_SET_NOT_USABLE?  Well,
; when an object is marked not usable, it is visually torn down, & may actually
; have the visible instance data discarded.  In this state,
; MSG_GEN_UPDATE_VISUAL does nothing, since the object isn't specifically built.
; 
; How to get around this?  I'd recommend using one of the
; VUM_DELAYED_VIA_??_QUEUE modes for these calls, if you're trying to avoid
; flickering of your display in bringing down UI components.  Note that
; calling multiple MSG_GEN_SET_NOT_USABLE's w/ a DELAYED update mode only
; generates one method which goes through the queue to perform the udpate later.

MSG_GEN_GET_USABLE		message
;
; Checks the usable state of a generic object.  See MSG_GEN_SET_USABLE and
; MSG_GEN_SET_NOT_USABLE.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message sent to get GenClass object's usable state
; Source:	Anyone
; Destination:	Any GenClass object EXCEPT GenApplication, GenField, and
;		GenSystem (these are controlled by MSG_META_ATTACH and MSG_META_DETACH)
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		nothing
; Return:	carry set if usable
;		carry clear if not usable
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_CHECK_IF_FULLY_ENABLED	message
;
; Returns whether this object is fully enabled, checking all of the enabled
; bits up to the application.
;
; Context:	Utility message sent to get GenClass object's fully enabled
;		state
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		nothing
; Return:	carry set if fully enabled
;

MSG_GEN_CHECK_IF_FULLY_USABLE	message
;
; Returns whether this object is fully usable, checking all of the usable
; bits up to the application.
;
; Context:	Utility message sent to get GenClass object's fully usable
;		state
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		nothing
; Return:	carry set if fully usable
;

;-------------------------------------------------
;		Generic Attributes
;-------------------------------------------------

MSG_GEN_SET_ATTRS		message
;
; Sets the GenAttrs for this object.
;
; This method is guaranteed NOT to force the specific building of any object.
;
; Context:	Utility message sent to set GenClass object's attributes
; Source:	Anyone
; Destination:	Any NOT USABLE GenClass object, as the attributes are used
;		when specifically resolving.  new attributes when that are
;		set when already specifically (USABLE) resolved will not have
;		effect until set NOT USABLE and USABLE again.
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
;
; Pass:		cl - GenAttrs to set
;		ch - GenAttrs to clear
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_GET_ATTRIBUTES		message
;
; Gets the GenAttrs for this object.
;
; This method is guaranteed NOT to force the specific building of any object.
;
; Context:	Utility message sent to set GenClass object's attributes
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
;
; Pass:		nothing
; Return:	cl - GenAttrs
;		ax, ch, dx, bp - destroyed
;

;-------------------------------------------------
;		Visual monikers
;-------------------------------------------------
;
; GENERAL:
;
; A visual moniker is the visual representation of an object.  A visual moniker
; is either a text string of a graphics string (while a text string can be a
; type of graphics string, it is useful to make the distinction between the
; two).  See Include/Objects/visC.def for more information about visual
; monikers.
;
; GenClass provides storage of an object's visual moniker and several methods
; to manipulate visual monikers.

MSG_GEN_GET_VIS_MONIKER			message
;
; Fetches the moniker from a generic object. Returns the chunk handle
; of the current visual moniker in use.
;
; This method is guaranteed NOT to force the specific building of any object.
;
; Context:	Utility message sent to get GenClass object's visual moniker
;		chunk
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		nothing
; Return:	ax - chunk handle of VisMoniker in use
;		cx, dx, bp - destroyed
;

MSG_GEN_USE_VIS_MONIKER			message
;
; MSG_GEN_USE_VIS_MONIKER is called to switch the moniker being
; used for this generic object.  The moniker itself must already exist in
; the same block as the object.  Use MSG_GEN_USE_VIS_MONIKER if the moniker
; already exists in the same block as the object.  Use
; MSG_GEN_REPLACE_VIS_MONIKER to create a new moniker from some other
; source.  Visual updates as specified.
;
; This method is guaranteed NOT to force the specific building of any object.
;
; Context:	Utility message sent to set GenClass object's visual moniker
;		to an existing moniker chunk
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		cx - chunk handle of new moniker to use.
;		dl - VisUpdateMode
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_REPLACE_VIS_MONIKER			message
;
; Replaces the visual moniker of an object.  New visual moniker is created from
; either a complete visual moniker, a visual moniker list, a text string, a
; graphics string, or a token.db token.  The source may be referenced by either
; a far pointer, a global heap block handle, or an optr.
;
; MSG_GEN_REPLACE_VIS_MONIKER always creates a new Visual Moniker chunk and
; points the GI_visMoniker field at the new moniker.  Because the old visual
; moniker is overwritten, the object is visually updated.  The VisUpdateMode
; passed determines how this visual update occurs.
;
; When a text string or a gstring is passed, a visual moniker structure will be
; created for the text string or gstring.
;
; Both the object and visual moniker chunk are marked as dirty (ObjSetFlags may
; be used to undo, if necessary).
;
; If a moniker list is passed to this message, and the destination object is
; specifically resolved, the appropriate moniker based on the DisplayScheme of
; the application object and specific UI preferences will be set for the object.
; If the object is not specifically resolved yet, the source moniker list will
; replace the object's current visual moniker.  A moniker is selected from the
; moniker list when the object is specifically resolved.  You must ensure that
; the monikers in the moniker list will exist at that time.  (If some specific
; moniker in the list is desired, the moniker list can be resolved manually
; with the GenFindMoniker or VisFindMoniker routines.)  When passing a moniker
; list, you must ensure that the moniker list will be relocated when the
; moniker list is resolved.  This can be done with either having the moniker
; list be the moniker for an object that will be relocated, or by relocating
; the moniker list manually with MSG_GEN_RELOC_MONIKER_LIST (or
; GenRelocMonikerList for assembly).
;
; If VMDT_TOKEN is passed to indicate that the source is a GeodeToken, the
; destination object must be usable, as it is the Specific UI who must decide
; which moniker to choose from the moniker list in the Token Database.  It
; chooses based on the current video mode and its internal preferences.  If the
; destination object is not usable, its moniker will be cleared.  Since any
; moniker set via VMDT_TOKEN may be based on video mode, it must not be saved
; and restored to and from state file, as the video mode could be changed
; during that time.  Alternately, the moniker can be reset at each startup.
;
; This method is guaranteed NOT to force the specific building of any object.
;
; Context:	Utility message sent to replace a GenClass object's visual
;		moniker.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		ss:bp - ptr to ReplaceVisMonikerFrame
;			ReplaceVisMonikerFrame	struct
;				RVMF_source	dword
;				RVMF_sourceType	VisMonikerSourceType
;				RVMF_dataType	VisMonikerDataType
;				RVMF_length	word
;				RVMF_width	word
;				RVMF_height	word
;				RVMF_updateMode	VisUpdateMode
;			ReplaceVisMonikerFrame	ends
;		dx - size of ReplaceVisMonikerFrame
; Return:	ax - chunk handle of object's visual moniker
;		cx, dx, bp - destroyed
;

MSG_GEN_REPLACE_VIS_MONIKER_OPTR		message
MSG_GEN_REPLACE_VIS_MONIKER_TEXT		message
;
; Simplified messages for replacing objects current visual moniker.
;
; This method is guaranteed NOT to force the specific building of any object.
;
; Context:	Simplified messages for replacing objects current visual
;		moniker.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: No need to intercept.  Uses MSG_GEN_REPLACE_VIS_MONIKER, so
;		intercepting that is sufficient.
;
; Pass:		MSG_GEN_REPLACE_VIS_MONIKER_OPTR
;		^lcx:dx - source VisMoniker
;		bp - VisUpdateMode
;		MSG_GEN_REPLACE_VIS_MONIKER_TEXT
;		cx:dx - fptr to source null-terminated text string
;		bp - VisUpdateMode
; Return:	ax - chunk handle of object's visual moniker
;		cx, dx, bp - destroyed

MSG_GEN_CREATE_VIS_MONIKER			message
;
; Creates a visual moniker chunk.  New visual moniker is created from
; either a complete visual moniker, a visual moniker list, a text string, a
; graphics string, or a token.db token.  The source may be referenced by either
; a far pointer, a global heap block handle, or an optr.
; MSG_GEN_CREATE_VIS_MONIKER creates a new Visual Moniker chunk in the resource
; block of the object MSG_GEN_CREATE_VIS_MONIKER is sent to.  When a text
; string or a gstring is passed, a visual moniker structure will be create for
; the text string or gstring.  The new visual moniker chunk is marked as dirty
; or ignore dirty according to the CVMF_DIRTY flag passed.  If a moniker list
; is passed to this message, it will be copied into the destination object's
; block.  You must ensure that the monikers in the moniker will exists when the
; list is used.  (If some specific moniker in the list is desired, the moniker
; list can be resolved manually with the GenLookupMoniker routine.)
;
; This method is guaranteed NOT to force the specific building of any object.
;
; Context:	Utility message sent to create a visual moniker in the
;		destination object's resource block.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		ss:bp - ptr to CreateVisMonikerFrame
;			CreateVisMonikerFrame	struct
;				CVMF_source	dword
;				CVMF_sourceType	VisMonikerSourceType
;				CVMF_dataType	VisMonikerDataType
;				CVMF_length	word
;				CVMF_width	word
;				CVMF_height	word
;				CVMF_flags	CreateVisMonikerFlags
;			CreateVisMonikerFrame	ends
;		dx - size of CreateVisMonikerFrame
; Return:	ax - chunk handle of new visual moniker
;		cx, dx, bp - destroyed
;

MSG_GEN_DRAW_MONIKER				message
;
; Draws a moniker for the object.  This message will primarily be used
; in C.  Assembly language programmers can use GenDrawMoniker.  See
; that library routine for information about parameters.
;
; This method forces specific building of object, & therefore shouldn't
; be done prior to setting up pre-specifically built hints, attributes,
; & for some objects, tree location.
;
; Context:	Utility message sent to draw generic object's visual moniker
; Source:	Anyone
; Destination:	Any USABLE GenClass object
; Interception:	Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		ss:bp - GenMonikerMessageFrame
;		dx - size GenMonikerMessageFrame
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_GET_MONIKER_POS				message
; 
; Returns the position where the passed moniker would be drawn using the passed
; parameters, but doesn't actually draw the moniker.  Useful, along with 
; MSG_GEN_GET_MONIKER_SIZE, for finding out where a moniker will be drawn.
; This message will primarily be used in C.  Assembly language programmers
; can use GenGetMonikerPosition.  See that library routine for more information
; about parameters.
;
; Context:	Utility message sent to get position of GenClass object's
;		visual moniker
; Source:	Anyone
; Destination:	Any USABLE GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		ss:bp - GenMonikerMessageFrame
;		dx - GenMonikerMessageFrame
; Return:	ax, bp - x and y origin for moniker (zeroes if no moniker)
;		cx, dx - destroyed
;

MSG_GEN_GET_MONIKER_SIZE			message
;
; MSG_GEN_GET_MONIKER_SIZE is called to get the size of a generic object's
; visual moniker.  The graphics state is returned unchanged with the exception
; of the pen position which is destroyed.  This message will primarily be
; used in C.  Assembly language programmers can use GenGetMonikerSize.
; See that library routine for more information about parameters.
;
; This method forces specific building of object, & therefore shouldn't
; be done prior to setting up pre-specifically built hints, attributes,
; & for some objects, tree location.
;
; Context:	Utility message sent to get size of GenClass object's
;		visual moniker
; Source:	Anyone
; Destination:	Any USABLE GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		dx - height of system text, if known, else pass 0
;			(allows speed optimization)
;		bp - gstate to use
; Return:	cx - width of moniker
;		dx - height of moniker
;		ax, bp - destroyed
;

MSG_GEN_FIND_MONIKER				message
;
; Find the specified moniker (or most approriate moniker) in this object's
; VisMonikerList, and optionally copy the Moniker into this generic object's
; block, OR replace the VisMonikerList with the moniker.
;
; Context:	Utility message sent to find specific moniker in a generic
;		object's visual moniker list
; Source:	Anyone
; Destination:	Any USABLE GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		dx - non-zero to use GenApplication's MonikerList
;		bp - VisMonikerSearchFlags (see visClass.asm)
;			flags indicating what type of moniker to find
;			in the VisMonikerList, and what to do with
;			the Moniker when it is found.
;		cx - handle of destination block (if bp contains
;			VMSF_COPY_CHUNK command)
; Return:	^lcx:dx - VisMoniker (^lcx:dx = NIL if none)
;		ax, bp - destroyed
;

MSG_GEN_RELOC_MONIKER_LIST			message
;
; This method [un]relocates a passed moniker list. It must be sent to an 
; object in the same block as the moniker list.
;
; Context:	Utility message sent to relocate generic object's visual
;		moniker list
; Source:	Anyone
; Destination:	Any GenClass object
; Interception:	Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		cx - chunk handle of moniker list
;		dx - block whose owner's relocation table should be used
;		     (Will normally just be block that moniker list is in)
;		bp - 0 = relocate, 1 = unrelocate
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

global		GenRelocMonikerList:far
;
; Routine equivalent of MSG_GEN_RELOC_MONIKER_LIST.
;
; Pass:		*ds:cx	- VisualMoniker (may be a list)
;		dx - block whose owner's relocation table should be used
;		bp - 0 = relocate, 1 = unrelocate
; Return:	nothing
; Destroyed:	nothing

;-------------------------------------------------
;		Keyboard accelerators
;-------------------------------------------------

MSG_GEN_SET_KBD_ACCELERATOR			message
;
; MSG_GEN_SET_KBD_ACCELERATOR sets a new keyboard accelerator.
; Will not force specific building of an object.  Object will not be updated
; visually if it is currently onscreen.
;
; Context:	Utility message sent to set GenClass object's keyboard
;		accelerator
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		cx - KeyboardShortcut (or zero if removing a kbdAccelerator)
;		dl - UpdateMode
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;
	
MSG_GEN_GET_KBD_ACCELERATOR			message
;
; Returns the current keyboard accelerator. Does not cause specific build.
;
; Context:	Utility message sent to get GenClass object's keyboard
;		accelerator
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		nothing
; Return:	cx - KeyboardShortcut, or zero if no shortcut.
;		ax, dx, bp - destroyed
;
	
MSG_GEN_CHANGE_ACCELERATOR	message
;
; (Most people will want to use MSG_GEN_SET_KBD_ACCELERATOR.)
; Changes the accelerator, clearing some parts and setting some parts:
;		cx=ffffh, dx=0		;clears the accelerator
;		cx=0, dx = KSS_ALT	;sets the alt bit
;		cx=0, dx = KSS_CTRL	;sets the ctrl bit
;
; Context:	Utility message sent to set GenClass object's keyboard
;		accelerator
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		cx	- mask (bits to clear before setting)
;		dx	- value to OR in
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

;-------------------------------------------------
;		Help
;-------------------------------------------------
	
MSG_GEN_GET_HELP				message
;	NOT YET IMPLEMENTED

MSG_GEN_SET_HELP				message
;	NOT YET IMPLEMENTED

;-------------------------------------------------
;		Generic Composite Operations
;-------------------------------------------------

MSG_GEN_ADD_CHILD			message
;
; Adds a new child under this object in the generic tree.  The child must
; be NOT_USABLE in order to be added.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message to add generic child
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^lcx:dx - child object to add
;		bp - flags for how to add child (CompChildFlags)
; Return:	nothing
;		cx, dx - unchanged
;		ax, bp - destroyed
;

MSG_GEN_REMOVE_CHILD			message
;
; Removes a child from this object in the generic tree.  The child must be
; NOT_USABLE in order to be removed.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message to remove generic child
; Source:	Anyone
; Destination:	Any GenClass object (parent object)
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^lcx:dx - child object to remove
;		bp - mask CCF_MARK_DIRTY if we want to mark the links as dirty
; Return:	nothing
;		cx, dx - unchanged
;		ax, bp - destroyed
;

MSG_GEN_ADD_CHILD_UPWARD_LINK_ONLY	message
;
; Sets the parent link of the child to point to the parent.  This is a 
; "One way" link, in that the parent does not have the child anywhere amongst
; its children.  NOTE:  Does not mark any objects as dirty.
; NOTE:  If you can avoid it, don't use this method.  It was created 11/1/90,
; one day before the big retail BETA, in order to fix a bug in the Cards
; Library without having to rewrite a ton of code.  I think the long term
; solution is to change CompChildFlags to include a new bit
; CCF_UPWARD_LINK_ONLY, and to just have ADD_GEN_CHILD & COPY_TREE support
; that bit.  Till then...		-- Doug
;
; Context:	Utility message to add generic object with upward link only
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^lcx:dx - child object to add
; Return:	nothing
;		cx, dx - unchanged
;		ax, bp - destroyed
;

MSG_GEN_MOVE_CHILD			message
;
; Moves a child to a new position under this object in the generic
; tree.  Basically does a REMOVE, then ADD.  The child must be NOT_USABLE
; in order to be removed.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message to move generic child within siblings
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^lcx:dx - child object to move
;		bp - flags for how to re-add the child (CompChildFlags)
; Return:	nothing
;		cx, dx - unchanged
;		ax, bp - destroyed
;

MSG_GEN_FIND_CHILD			message
;
; Determines the position of a generic child of this object
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message to find generic child given optr.  Use
;		MSG_GEN_FIND_CHILD_AT_POSITION if given child position.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:	 	^lcx:dx - child object
; Return:	carry - set if NOT FOUND
;		bp - child position (0 = first child, -1 if not found)
;		cx, dx - unchanged
;		ax, - destroyed
;

MSG_GEN_FIND_CHILD_AT_POSITION			message
;
; Looks up a child's address, given its position in the tree.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message to find generic given child position.  Use
;		MSG_GEN_FIND_CHILD if given optr.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:	 	cx - # of child to find
; Return:	carry - set if NOT FOUND
;		^lcx:dx  - child, or null if no child at that position
;		ax, bp - destroyed
;

MSG_GEN_FIND_PARENT			message
;
; Finds the generic parent of this object
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message to find parent of generic object.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		nothing
; Return:	^lcx:dx - parent, or null if none
;		ax, bp - destroyed
;

MSG_GEN_COUNT_CHILDREN		message
;
; Counts the generic children of an object. 
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message to count generic children of object.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.
;
; Pass:		nothing
; Return:	dx - # of generic children 
;		ax, cx, bp - destroyed
;
 
;-------------------------------------------
;	Generic Composite Communication
;-------------------------------------------
  
MSG_GEN_CALL_PARENT				message
;
; This method simply delivers a method to the generic parent of the
; object which receives it.
;
; Context:	Utility message to send message to generic parent of object,
;		returning return values from handler.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^hcx - ClassedEvent to call on parent
; Return:	carry clear if no parent
;		else, carry as returned by method handler
;		ax, cx, dx, bp - as returned by method handler
;		(event handle freed)
;
  
MSG_GEN_SEND_TO_PARENT				message
;
; This method simply delivers a method to the generic parent of the
; object which receives it.
;
; Context:	Utility message to send message to generic parent of object,
;		without returning return values from handler.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^hcx - ClassedEvent to call on parent
; Return:	nothing
;		(event handle freed)
;

MSG_GEN_SEND_TO_CHILDREN			message
;
; This method is used to send a method to all children of a generic object.
; The method is in the form of a classed event.  Any method data is
; encapsulated with the classed event.
;
; Context:	Utility message to send message to generic children of object,
;		without returning return values from handler.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^hcx - ClassedEvent handle
; Return:	Nothing
;		(event handle freed)
;

;MSG_META_SEND_CLASSED_EVENT	message	(MetaClass)
;
; This method is defined in MetaClass, & augmented by any class that wishes
; to do so, by the addition of new TravelOption types.  MetaClass provides
; TO_NULL & TO_SELF.
;
; GenClass extends TravelOption options to include a way to send a method
; up the generic tree to an object of a certain class, & a way to send
; a method down the focus, target, & model hierarchies.  Special
; note:  Passing a ClassedEvent with a class of null results in the event
; being passed all the way to the leaf of the hierarchy specified.
;
; Context:	This is THE way to get a message delivered to an object
;		whose optr is unkown, but it is know to be currently
;		actively within one of the hierarchies listed in the
;		"TravelOption" enumeration.
; Source:	no restrictions
; Destination:	Any object may receive this message, though usefullness will
;		depend to TravelOption type.  See "TravelOption" enumeration
;		declarations for info on where the message may usefully be sent.
; Interception:	Intercepted by Focus, Target, or Model nodes,
;		or any object defining a new "TravelOption" level, in order
;		to implement requests for sending to that destination.  If
;		the TravelOption passed does not match the type your handler
;		is redirecting, the request should be passed on to the 
;		superclass.
; Pass:		^hcx	- ClassedEvent
;		dx	- TravelOption
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;		(event handle freed)

TO_GEN_PARENT			enum TravelOption, first GenMessages
; Destination:  Any generic object
; Object is first generic parent of the class specified.


TO_FOCUS			enum TravelOption
; Destination:  Any focus node
; Object is the active focus below this point in the generic tree, or, if a
; specific class is specified, the first object down the active focus
; hierarchy belonging to that class.

TO_TARGET			enum TravelOption
; Destination:  Any target node
; Object is the active target below this point in the generic tree, or, if a
; specific class is specified, the first object down the active target
; hierarchy belonging to that class.

TO_MODEL			enum TravelOption
; Destination:  Any model or target node
; Object is the active data model object below this point in generic tree, or,
; if a specific class is specified, the first object down the active model
; hierarchy belonging to that class.

TO_APP_FOCUS			enum TravelOption
; Destination:	Any visible or generic object
; Object is the active focus object within the application, or, if a
; specific class is specified, the first object down the active focus
; hierarchy belonging to that class.  This request is converted to "TO_FOCUS"
; & send to the GenApplication object for the requesting app.

TO_APP_TARGET			enum TravelOption
; Destination:	Any visible or generic object
; Object is the active target object within the application, or, if a
; specific class is specified, the first object down the active target
; hierarchy belonging to that class.  This request is converted to "TO_TARGET"
; & send to the GenApplication object for the requesting app.

TO_APP_MODEL			enum TravelOption
; Destination:	Any visible or generic object
; Object is the active data model object within the application, or, if a 
; specific class is specified, the first object down the active model
; hierarchy belonging to that class. This request is converted to
; "TO_MODEL" & sent to the GenApplication object for the requesting app.

TO_SYS_FOCUS			enum TravelOption
; Destination:	Any visible or generic object
; Object is the active focus object within the system, or, if a specific
; class is specified, the first object down the active focus hierarchy
; belonging to that class.   This request is converted to a "TO_FOCUS"
; request & send to the GenSystem object internally.

TO_SYS_TARGET			enum TravelOption
; Destination:	Any visible or generic object
; Object is the active target object within the system, or, if a specific
; class is specified, the first object down the active target hierarchy
; belonging to that class.   This request is converted to a "TO_TARGET"
; request & send to the GenSystem object internally.

TO_SYS_MODEL			enum TravelOption
; Destination:	Any visible or generic object
; Object is the active data model object within the system, or, if a 
; specific class is specified, the first object down the active model
; hierarchy belonging to that class. This request is converted to a
; "TO_MODEL" request & send to the GenSystem object internally.


;Sample Code/Programming Tips
;----------------------------
; The following example routine will change any selection made in the
; currently selected data text object to be 18 points in size:
;
; SetTargetTextTo18Point	proc	near
;	; Documentation for GetTextSet18PointSizeClassedEvent is in the
;	; Sample Code section for "ClassedEvent", in Include/Objects/metaC.def.
;	;
; 	call	GetTextSet18PointSizeClassedEvent
;
;	; ^hdi = ClassedEvent
;
;	mov	cx, di			; Pass handle of ClassedEvent in cx
;	mov	ax, MSG_META_SEND_CLASSED_EVENT
;	mov	dx, TO_APP_ACTIVE_MODEL
;	call	UserCallApplication
;	ret
; SetTargetTextTo18Point	endp
;

MSG_GEN_GUP_CALL_OBJECT_OF_CLASS		message
;
; Call up the generic tree until an object of the class specified in the event
; is found, & call it with the event passed.
;
; Context:	Utility message to send message to an object of a given
;		class somewhere up the generic tree, returning return values
;		from the handler.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.  Also, as an example,
;		an application that has a view that simulates a field will
;		want to intercept this message and look for and handle
;		ClassedEvent destined for a field object.
;
; Pass:		^hcx	- ClassedEvent
; Return:	carry, ax, cx, dx, bp - return values from call
;		(event handle freed)
;
;Sample Code/Programming Tips
;----------------------------
; The following example code, if passed a generic object optr in bx:si,
; will iconify the GenPrimary that the object resides in:
;
; IconifyPrimaryThatObjectIsIn	proc	near
;	push	bx
;	push	si
;	mov	ax, MSG_GEN_DISPLAY_SET_MINIMIZED
;	mov	dl, VUM_NOW
;				; Deliver to GenPrimary
;	mov	bx, segment GenPrimaryClass
;	mov	si, offset GenPrimaryClass
;	mov	di, mask MF_RECORD
;	call	ObjMessage
;	mov	cx, di		; Get handle to ClassedEvent in cx
;	pop	si		; Get object below primary to be iconified
;	pop	bx
;	clr	di
;	mov	ax, MSG_GEN_GUP_CALL_OBJECT_OF_CLASS
;	call	ObjMessage
;	ret
;	
; IconifyPrimaryThatObjectIsIn	endp
;

MSG_GEN_GUP_SEND_TO_OBJECT_OF_CLASS		message
;
; Sends event up the generic tree until an object of the class
; specified in the event is found, at which point the event is
; delivered to that object.  (Like MSG_GEN_GUP_CALL_OBJECT_OF_CLASS,
; but sends instead of calls, meaning no return parameters)
;
; Context:	Utility message to send message to an object of a given
;		class somewhere up the generic tree, without returning return
;		values from the handler.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.  Also, as an example,
;		an application that has a view that simulates a field will
;		want to intercept this message and look for and handle
;		ClassedEvent destined for a field object.
;
; Pass:		^hcx	- ClassedEvent
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;		(event handle freed)
;

MSG_GEN_GUP_TEST_FOR_OBJECT_OF_CLASS		message
;
; Probes up the generic tree to see if an object of the specified
; class exists.  Useful if there is question as to whether a 
; MSG_GEN_GUP_CALL_OBJECT_OF_CLASS can be handled.
;
; Context:	Utility message to check if an object of a given class exists
;		somewhere up the generic tree.  Useful to check whether
;		MSG_GEN_GUP_CALL_OBJECT_OF_CLASS will succeed.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.  Also, as an
;		example, an application that has a view that simulates a
;		field will want to intercept this message and look for and
;		handle ClassedEvent destined for a field object.
;
; Pass:		cx:dx - segment:offset of class
; Return:	carry set if object of class found
;		carry clear if object of class not found
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_GUP_FIND_OBJECT_OF_CLASS		message
;
; Searches up the generic tree for an object of the specified class.
; MSG_GEN_GUP_SEND_TO_OBJECT_OF_CLASS should be used if the object is
; to receive methods.
;
; Context:	Utility message to get the optr of an object of a given class
;		somewhere up the generic tree.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, superclass will not need to be
;		called as default functionality is replaced.  Also, as an
;		example, an application that has a view that simulates a
;		field will want to intercept this message and look for and
;		handle ClassedEvent destined for a field object.
;
; Pass:		cx:dx - segment:offset of class
; Return:	carry set if object of class found
;		^lcx:dx - object if found, or null if not found
;		ax, bp - destroyed
;

MSG_GEN_CALL_APPLICATION			message
;
; This method simply delivers a message to the GenApplication to which the
; object which receives this message is connected to.
;
; Context:	Utility message to send message to GenApplication to which
;		this object is connected.
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^hcx - ClassedEvent to call on GenApplication
; Return:	carry set if GenApplication not found
;		else, carry as returned by method handler
;		ax, cx, dx, bp - as returned by method handler
;		(event handle freed)
;

MSG_GEN_SEND_TO_PROCESS				message
;
; This method simply delivers a message to the process which owns the
; object which receives this message.  Since this may need to cross over
; to a different thread, return values cannot be returned.
;
; Context:	Utility message to send message to process which owns
;		this object
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^hcx - Event to send to process (NOT a ClassedEvent --
;		       "destination" field is ignored)
; Return:	none
;		ax, cx, dx, bp - destroyed
;		(event handle freed)
;

MSG_GEN_CALL_SYSTEM				message
;
; This method simply delivers a message to the UI system object.
; This method can be sent to any generic object.
;
; Context:	Utility message to send message to UI system object
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		^hcx - ClassedEvent to call on UI system object
; Return:	carry as returned by method handler
;		ax, cx, dx, bp - as returned by method handler
;		(event handle freed)
;

MSG_GEN_OUTPUT_ACTION				message
;
; This message is used to send output via the output optr of an object.
;
; Context:	Utility message
; Source:	Normally sent by an object to itself
; Destination:	Normally sent by an object to itself
; Interception:	Normally not intercepted
; Pass: 	cx:dx	- optr to dispatch event to.
;		bp	- Event to dispatch.  Stored destination is ignored.
;		-OR-
;		cx	- 0
;		dx	- TravelOption to use with MSG_META_SEND_CLASSED_EVENT,
;			  which will be called either on this object, or the
;			  one specified with ATTR_GEN_OUTPUT_TRAVEL_START, with
;			  the passed ClassedEvent as a parameter.
;		bp	- ClasssedEvent.  The class stored will be overwritten
;			  if an ATTR_GEN_DESTINATION_CLASS is found on the
;			  object, with the class stored in that attribute.
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;		(event handle freed)


;-------------------------------------------------
;		Generic Branch Construction/Destruction
;-------------------------------------------------

MSG_GEN_COPY_TREE			message
;
; MSG_GEN_COPY_TREE may be used to copy a generic object tree, starting at the
; object first called.  GenClass provides the default behavior of broadcasting
; the method down the tree, plus making a copy of itself, as far as it can
; know how to do -- it creates a chunk the size of the chunk that it is in,
; copies over the entire contents of that chunk (which includes both the fixed
; & variable portions of the instance data), & plus creates & copies a 
; chunk for the VisualMoniker, if any.   As it doesn't know about, & therefore
; can't copy any chunks of memory referenced by instance data of subclasses,
; each subclass is responsible for allocated, copying over, and updating the
; reference to, any chunk or other type of data stored outside the object chunk
; itself.
;
; NOTE:  MSG_GEN_COPY_TREE & MSG_GEN_BRANCH_REPLACE_OUTPUT_OPTR_CONSTANT are
; not much used anymore.  The reason is because other mechanisms have proved
; easier to use & less difficult to keep robust:
; 
;        ObjDuplicateResource -- duplicate an entire block of UI.  The new
;                                  block handle is returned, meaning it can
;                                  be locked using ObjLockObjBlock, & the
;                                  objects called at
;                                  ^l<new block handle><original chunk offset>,
;                                  such as:
;                                                        ; bx = new block
;                                  mov   si, offset MyTextObject
;                                  mov   di, mask MF_CALL or mask MF_FIXUP_DS
;                                  call  ObjMessage
;
;        TravelOptions -- any destination or output of a UI object can be set
;                         to having the handle = 0, which means that the chunk
;                         is interpreted as being a constant of type
;                         TravelOption.  TravelOptions allow the transmission
;                         of messages to symbolic destinations such as
;                         the current focus/target object within the app.  See
;                         the TravelOptions defined in metaC.def, & those
;                         in genC.def.  Such TravelOptions can be set at
;                         compile time & needn't ever be changed.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message for generic tree construction
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Handled by all generic objects that reference lmem chunks as
;		part of their instance data.  Handlers should first call their
;		superclass, then must allocate space for, copy over, & update
;		the instance reference to, any lmem chunks that are referenced
;		in the new subclass's instance data.
;
; Pass:		cx - block to copy tree into (CANNOT BE SAME AS SOURCE BLOCK!)
;		dx - 0 to copy tree w/no parent, else is chunk handle of
;		     generic object in destination block to add onto
;		bp - CompChildFlags
;			if CCF_MARK_DIRTY is set, created generic object tree
;				is marked dirty (so will be saved to state file)
;			if CCF_MARK_DIRTY is clear, created generic object tree
;				is marked IGNORE_DIRTY (so that it will be
;				tossed out at DETACH time, & not saved to
;				state file).  If this option is used, you must
;				be careful to make sure that no references to
;				this new generic object tree are stored in
;				structures that ARE being saved out to the state
;				file, for at re-attach time, those references
;				will be invalid.  One such reference to watch
;				out for that is non-obvious is the linkage
;				between objects; for instance, if you add
;				an IGNORE_DIRTY child to a dirty generic parent,
;				then the downward link from the parent to the
;				child will be invalid if the application is
;				stored to state & then re-attached later.  The
;				solution is to either disconnect these before
;				detach time, or to add the child with a
;				one-way, i.e. upward link.  (See
;				GenAddChildUpwardLinkOnly)
;		     The full CompChildFlags are also passed on to
;		     MSG_GEN_ADD_CHILD in the case that the new generic
;		     tree is to be added onto a parent generic object (the
;		     case if dx is non-zero)
;				
; Return: 	^lcx:dx	- new object created
;		ax, bp	- destroyed
;

MSG_GEN_DESTROY		message
;
; Sets object branch NOT_USABLE, removes it from the generic tree,
; & destroys it, including any chunks associated with the objects, 
; including hints, monikers, active list chunks, text, etc.  Leave the
; block(s) that the objects lie in intact.  Any chunks coming from resources
; are marked dirty & resized to zero.
;
; Context:	Utility message for generic tree destruction
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted, as GenClass does the job.  Objects
;		having references to chunks or other data outside of the
;		object chunk should subclass MSG_META_FINAL_OBJ_FREE, however,
;		to nuke those resources.
;
; Pass:		dl	- VisUpdateMode to use when updating parent
;		bp	- mask CCF_MARK_DIRTY if we want to mark the parent
;			  as dirty
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;
 
MSG_GEN_BRANCH_REPLACE_PARAMS		message
;
; This method is used to help construct generic branches, particularly
; in cases where an entire branch is copied, & then slightly modified, before
; being used.  This method recurses down the tree, & replaces any instance
; data of the type specified which matches the "searchParam" with 
; the "replaceParam". A typical way to use this is to set up a "template"
; UI branch, in the .ui file of the library which is creating the UI
; (whether specific UI, spooler, import library, etc.), which has optr's
; which need to be changed at creation time initially set to enumerated
; values starting at BRP_DUMMY_OPTR_START.   Then, this routine is called
; w/cx = BRPT_OUTPUT_OPTR, passing the enumerated value for a source param,
; & a particular object or process optr as the replace param.
;
; Affects all optr's stored in destination optr fields.  Generic linkage is NOT
; affected.  Currently implemented for:
;
;	GenTrigger, GeoBooleanGroup, GenItemGroup, GenValue, GenText:
;		destination optr's.
;	GenView:  GVI_content
;	
; Note about current disuse in MSG_GEN_BRANCH_REPLACE_OUTPUT_OPTR_CONSTANT
; also applies for MSG_GEN_BRANCH_REPLACE_PARAMS.  In addition, all generic
; objects provide messages to get & set any optr stored in their instance data,
; which should be used where possible instead of this message.
;
; Context:	Utility message for generic tree construction
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Handled by generic objects that have instance data fields
;		of the type specified.  Handlers should first call their
;		superclass to replace any of their instance data fields, then
;		should replace any of its own instance fields.  Note that
;		this message is not widely used and so it needs only be handled
;		if you intend to use it for copying generic trees and replacing
;		instance data fields of objects in those trees.
;
; Pass:	 	ss:bp	- offset to BranchReplaceParams
;		dx	- size BranchReplaceParams structure
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

BRP_DUMMY_OPTR_START	= 1
; First marker for MSG_GEN_BRANCH_REPLACE_PARAMS(BRPT_OUTPUT_OPTR) to be 
; stored in the output field of a generic object supporting
; MSG_GEN_BRANCH_REPLACE_PARAMS, to be replaced before execution by
; MSG_GEN_BRANCH_REPLACE_PARAMS, or MSG_GEN_BRANCH_REPLACE_OUTPUT_OPTR_CONSTANT,
; which calls MSG_GEN_BRANCH_REPLACE_PARAMS.  If only a single optr needs
; replacing, just use this constant.  If multiple optrs are involved, set up
; an enumerated type, beginning at this number. Store those constants in the
; destination fields of the objects involved, & pass that constant as
; the "source" constant to MSG_GEN_BRANCH_REPLACE_PARAMS/
; MSG_GEN_BRANCH_REPLACE_OUTPUT_OPTR_CONSTANT.
;
; NOTE that TravelOptions (see MSG_META_SEND_CLASSED_EVENT) are also stored
; as enumerated constants in the optr, & in fact is the default interpretation
; where the handle of the optr is 0.  Because of this:
;
;	1) Don't use TravelOptions in any branch where optrs are going to
;	   be fixed up using MSG_GEN_BRANCH_REPLACE_OUTPUT_OPTR_CONSTANT/
;	   MSG_GEN_BRANCH_REPLACE_PARAMS, & visa versa.  You must choose one
;	   or the other approach.
;
;	2) MSG_GEN_BRANCH_REPLACE_OUTPUT_OPTR_CONSTANT/
;	   MSG_GEN_BRANCH_REPLACE_PARAMS *must* be called on a generic tree
;	   before anything else is done to is, so that its objects don't
;	   try to send something out the dummy optr, which is often a legal
;	   destination because of the incorrect interpretation as being
;	   a TravelOption.  "0" in the handle, & "1" in the chunk is
;	   interpreted as "TO_SELF", for example, so an optr stuffed with
;	   the replace constant BRP_DUMMY_OPTR_START if not replaced right
;	   away,  & actually used, will in fact happen to send the message to
;	   the object itself.

BranchReplaceParamType	etype	word
BRPT_OUTPUT_OPTR		enum BranchReplaceParamType

BranchReplaceParams	struct
	BRP_searchParam		dd	(?)
	; Search param, which is compared w/instance data.  Single word
	; compare values should be stored in first word, single byte in
	; first byte.
	;
	BRP_replaceParam	dd	(?)
	; Replace param, which replaces any instance data which matches
	; the search parameter.  Single word compare values should be
	; stored in first word, single byte in first byte.

	BRP_type		BranchReplaceParamType
	; Type of replace operation
	;
BranchReplaceParams	ends

MSG_GEN_BRANCH_REPLACE_OUTPUT_OPTR_CONSTANT	message
;
; This is simply a special case of MSG_GEN_BRANCH_REPLACE_PARAMS,
; where the param type is BRPT_OUTPUT_OPTR, & the search paramater
; optr.handle = 0.   It simply maps into calling the more elaborate method,
; but is provided as a simpler interface to do a common action when
; building UI components  from template .ui files.
;
; NOTE:  MSG_GEN_COPY_TREE & MSG_GEN_BRANCH_REPLACE_OUTPUT_OPTR_CONSTANT are
; not much used anymore.  The reason is because other mechanisms have proved
; easier to use & less difficult to keep robust:
; 
;        ObjDuplicateResource -- duplicate an entire block of UI.  The new
;                                  block handle is returned, meaning it can
;                                  be locked using ObjLockObjBlock, & the
;                                  objects called at
;                                  ^l<new block handle><original chunk offset>,
;                                  such as:
;                                                        ; bx = new block
;                                  mov   si, offset MyTextObject
;                                  mov   di, mask MF_CALL or mask MF_FIXUP_DS
;                                  call  ObjMessage
;
;        TravelOptions -- any destination or output of a UI object can be set
;                         to having the handle = 0, which means that the chunk
;                         is interpreted as being a constant of type
;                         TravelOption.  TravelOptions allow the transmission
;                         of messages to symbolic destinations such as
;                         the current focus/target object within the app.  See
;                         the TravelOptions defined in metaC.def, & those
;                         in genC.def.  Such TravelOptions can be set at
;                         compile time & needn't ever be changed.
;
; Affects all optr's stored in destination optr fields.  Generic linkage is NOT
; affected.  Currently implemented for:
;
;	GenTrigger, GeoBooleanGroup, GenItemGroup, GenValue, GenText:
;		destination optr's.
;	GenView:  GVI_content
;	
; Context:	Utility message for generic tree construction
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  Generic objects should be
;		handling MSG_GEN_BRANCH_REPLACE_PARAMS instead.
;
; Pass:		^lcx:dx	- optr to use to replace any output optrs of objects
;			  which match the constant value below.
;		bp	- constant value to search for.  (Chunk portion of
;			  an output optr whose Handle portion is 0)
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

;-------------------------------------------
;	Display/Interaction Control Methods
;-------------------------------------------

MSG_GEN_BRING_TO_TOP			message
;
; Causes object to be raised to top, if in overlapping arrangement &
; this is possible.  Depending on the specific UI, this function may also
; invoke MSG_META_GRAB_FOCUS_EXCL & MSG_META_GRAB_TARGET_EXCL on the
; window/app as well.  Useful for Displays, Interaction groups (if in dlg
; box form), applications, etc.
;
; This method forces specific building of object, & therefore shouldn't
; be done prior to setting up pre-specifically built hints, attributes,
; & for some objects, tree location.
;
; Context:	Utility message for high-level window layering
; Source:	Anyone
; Destination:	Any USABLE GenClass object, though only GenDisplays,
;		independently displayable GenInteractions, GenPrimarys
;		and GenApplications are affected
; Interception:	Generally not intercepted
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_LOWER_TO_BOTTOM		message
;
; Causes object to be lowered to bottom, if in overlapping arrangement &
; this is possible.  Depending on the specific UI, this function may also
; invoke MSG_META_RELEASE_FOCUS_EXCL & MSG_META_RELEASE_TARGET_EXCL on
; the window/app as well, passing the focus/target on to the new top object.
; Useful for Displays, Interaction groups (if in dlg box form), applications,
; etc.
;
; This method forces specific building of object, & therefore shouldn't
; be done prior to setting up pre-specifically built hints, attributes,
; & for some objects, tree location.
;
; Context:	Utility message for high-level window layering
; Source:	Anyone
; Destination:	Any USABLE GenClass object, though only GenDisplays,
;		independently displayable GenInteractions, GenPrimarys
;		are affected
; Interception:	Generally not intercepted
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;


;-------------------------------------------------
;		Other Focus/Target methods
;-------------------------------------------------

MSG_GEN_MAKE_FOCUS	equ	MSG_META_GRAB_FOCUS_EXCL
MSG_GEN_MAKE_NOT_FOCUS	equ	MSG_META_RELEASE_FOCUS_EXCL
MSG_GEN_MAKE_TARGET	equ	MSG_META_GRAB_TARGET_EXCL
MSG_GEN_MAKE_NOT_TARGET	equ	MSG_META_RELEASE_TARGET_EXCL
;
; Messages to grab/release focus/target within level.  See documentation of
; MetaUIMessages in Objects/uiInputC.def
;


;MSG_META_GET_TARGET_AT_TARGET_LEVEL	message	(MetaClass)
;
; This method may be used to determine the current target (window/object
; etc.) below a certain point in the target hierarchy.
; From any node in the hierarchy, you may ask for the current object
; at any node lower down in the hierarchy.  Since the hierarchy
; "remembers" the child at each node, even if that branch of the
; heierarch is not active, you can still determine, for instance, which object
; in an application has the target within that application, even if the
; application itself does not have the focus.
;
; (Needs to be MetaUIMessages as can be sent to both Gen and Vis objects)
;
; This method may be sent to any of the following generic objects, to
; determine the current target below that point:
; GenSystem, GenField, GenApplication, GenPrimary, GenDisplayGroup,
; GenDisplay, GenView (if isolated), GenContent (if isolated)
;
; & the following Visible objects:  VisContent
;
; Pass:		cx	- TargetLevel  -- Set to TL_TARGET for basic
;			  lookup of the current target, or use one
;			  of the other equates to determine a particular
;			  type of target, such as TL_GEN_DISPLAY.
;
; Return:	^lcx:dx - current object within application.
;		ax:bp 	- Class of target object being returned
;
; Since this is normally subclassed to ADD behavior, be sure to call
; superclass.
;
; NOTES ON USAGE:
;
;	1) The class returned  will be the bottom-most subclass in the
;	   class hierarchy for this object.  If you
;	   need to know if the object belongs to one of
;	   the intermediate classes, use  ObjIsObjectInClass to find out.
;
;	2) Targets at the content & lower levels,
;	   when requested via a call from a higher level,
;	   will not be accessible until the content has
;	   been realized (Actually, the UI is updated from within the
;	   content handler for MSG_VIEW_OPENING).
; 	   This is because the content has not had an opportunity
;	   to update the targetInfo data being stored in the View
;	   until that time.
;
;	3) In addition, queries for target across an isolated
;	   View/Content will NOT return synchronous results;
;	   The content must notify the view of the change
;	   in target via a message sent through the UI queue.
;	   It is possible to get slightly out-of-date 
;	   information regarding the current TARGET within
;	   the view (by one message queue's worth of methods)
;	   A method sent directly to the content will always
;	   return correct & synchronous information.
;
;	4) If you have an isolated View, and are not using a VisContent
;	   or subclass thereof as the content, then you will need
;	   to keep the View up to date with current target information
;	   within the content, using MSG_VIEW_UPDATE_CONTENT_TARGET_INFO
;	   (documented in visClass.asm)
;
;					-- Doug

TargetLevel 		etype word
TL_TARGET		enum TargetLevel, 0	; Final target object
						; (Currently, just text
						; objects, such as VisText,
						; GenTextDisplay or
						; GenText)

TL_CONTENT		enum TargetLevel	; ISO content within view
						; (generic, visual, or whatever)

TL_GENERIC_OBJECTS	enum TargetLevel, 1000
TL_GEN_SYSTEM		enum TargetLevel	; the system object itself
TL_GEN_FIELD		enum TargetLevel	; field within system
TL_GEN_APPLICATION	enum TargetLevel	; application within field
TL_GEN_PRIMARY		enum TargetLevel	; primary within application
TL_GEN_DISPLAY_CTRL	enum TargetLevel	; display ctrl within primary
TL_GEN_DISPLAY		enum TargetLevel	; display within display ctrl
TL_GEN_VIEW		enum TargetLevel	; ISO view within display

; Place PC/GEOS library extensions here (Graphics tree?)
TL_LIBRARY_LEVELS	enum TargetLevel, 2000

; EXPORTED FOR INDIVIDUAL APPLICATIONS
TL_APPLICATION_OBJECTS	enum TargetLevel, 3000


MSG_GEN_START_BROADCAST_FOR_DEFAULT_FOCUS		message
;
; This method is used by the specific UI to initiate a BROADCAST method in the
; window, to find the object which has HINT_DEFAULT_FOCUS, or the windowed
; object which has HINT_MAKE_DEFAULT_FOCUS_WIN. There should only be one such
; object in a window. See MSG_SPEC_START_BROADCAST_FOR_DEFAULT_FOCUS also.
;
; Context:	Internal message used by specific UI
; Source:	Only the specific UI should use this
; Destination:	Any USABLE GenClass object
; Interception:	Should not be intercepted.
;
; Pass:		nothing
; Return:	^lcx:dx - object with HINT (0 if none)
;		ax, bp - destroyed
;

;-------------------------------------------------
;		Window Size and Position Methods
;-------------------------------------------------

MSG_GEN_SET_WIN_POSITION			message
;
; Provides a way for a window (GenPrimary, GenInteraction, etc) to override its
; window positioning.
;
; Context:	Utility message for high-level geometry operations for windows
; Source:	Anyone
; Destination:	Any USABLE GenPrimary, independently displayable
;		GenInteractions
; Interception:	Generally not intercepted.
;
; Pass:		dl - VisUpdateMode
;		dh - WinPositionType (WPT_AT_RATIO, etc)
;		cx - X position (SpecWinSizeSpec)
;		bp - Y position (SpecWinSizeSpec)
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_SET_WIN_SIZE				message
;
; Provides a way for a window (GenPrimary, GenInteraction, etc) to override its
; window sizing.
;
; Context:	Utility message for high-level geometry operations for windows
; Source:	Anyone
; Destination:	Any USABLE GenPrimary, independently displayable
;		GenInteractions
; Interception:	Generally not intercepted.
;
; Pass:		dl = VisUpdateMode
;		dh = WinSizeType (WST_AS_RATIO_OF_PARENT, etc)
;		cx = width (SpecWinSizeSpec)
;		bp = height (SpecWinSizeSpec)
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_RESET_TO_INITIAL_SIZE	message
;
; Sent to an object, and propagated to every child under that object, to cause
; it to recalculate its geometry as if it were coming up for the first time.
; Objects will respond to a HINT_INITIAL_SIZE when calculating geometry.
; If this is sent to a GenPrimary, GenDisplay, or windowed GenInteraction,
; the window's size will be re-done as it would be initially, unless it is
; maximized.
;
; Context:	Utility message for high-level geometry operations for windows
; Source:	Anyone
; Destination:	Any USABLE GenClass object.
; Interception:	Generally not intercepted.
;
; Pass:		dl -- VisUpdateMode
; Return:	nothing
;		ax, cx, dx, bp -- destroyed
;
	
MSG_GEN_SET_WIN_CONSTRAIN			message
;
; This method provides a way for a window (GenPrimary, GenInteraction, etc)
; to override its window constrain attributes.
;
; Context:	Utility message for high-level geometry operations for windows
; Source:	Anyone
; Destination:	Any USABLE GenPrimary, independently displayable
;		GenInteractions
; Interception:	Generally not intercepted.
;
; Pass:		dl = VisUpdateMode
;		dh = WinConstrainType (WCT_KEEP_VISIBLE, etc)
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;
 
;-------------------------------------------------
;		Geometry Methods
;-------------------------------------------------
	
MSG_GEN_SET_INITIAL_SIZE	message
;
; Sets an initial desired size for the generic object by creating a HINT_
; INITIAL_SIZE or by changing the existing one, if any.  This is the size
; the object will try to be when it first opens.  Currently supported in
; the GenView and GenDocumentControl only.  Geometry will *not* be redone
; on the object.  The object would need to be set not-usable and then usable
; again for this to have an affect.  See discussion on setting desired sizes.
;
; Context:	Utility message for high-level geometry operations
; Source:	Anyone
; Destination:	Any GenClass objects, though only certain objects respond to
;		geometry information (see Geometry Manager documentation)
; Interception:	Generally not intercepted.
;
; Pass:		ss:bp -- SetSizeArgs: new desired size, update mode
;		dx -- size SetSizeArgs
; Return:	nothing
;		ax, cx, dx, bp -- destroyed
;
	
SetSizeArgs	struct
    SSA_width		SpecWidth <>		;Width of the composite
    SSA_height		SpecHeight <>		;Height of each child
    SSA_count		sword			;# children, or zero if 
    						;   not applicable
    SSA_updateMode	VisUpdateMode		;update mode, for
    align	word				;   redoing geometry
SetSizeArgs	end
		
		
	
MSG_GEN_SET_MINIMUM_SIZE	message
; 
; Sets an initial minimum size for the object by creating a HINT_MINIMUM_SIZE
; or by changing the existing one.  This will force the object to stay at
; least this big.  See discussion on setting desired sizes.  Geometry will
; be re-done on the object.  This method affects GenTriggers, GenLists,
; GenListEntries, GenViews, GenDisplayGroups, GenTextDisplays, GenTextEdits,
; GenRanges, GenGlyphDisplays and not-independently-displayable GenInteractions.
; NOTE: do not use this on windowed objects / independently-displayable
; GenInteractions -- use HINT_SIZE_WINDOW_AS_RATIO_OF_PARENT, etc. for them
;
; Context:	Utility message for high-level geometry operations
; Source:	Anyone
; Destination:	Any GenClass objects, though only certain objects respond to
;		geometry information (see Geometry Manager documentation)
;		(currently affects GenTriggers, GenLists, GenListEntries,
;		GenViews, GenDisplayGroups, GenTextDisplays, GenTextEdits,
;		GenRanges, GenGlyphDisplays and not-independently-displayable
;		GenInteractions)
; Interception:	Generally not intercepted.
;
; Pass:		ss:bp -- SetSizeArgs: new desired size, update mode
;		dx -- size SetSizeArgs
; Return:	nothing
;		ax, cx, dx, bp -- destroyed
;
	
		
MSG_GEN_SET_MAXIMUM_SIZE	message
; 
; Sets an initial maximum size for the object by creating a HINT_MAXIMUM_SIZE
; or by changing the existing one.  Object may be forced to exceed this size
; if it doesn't fit.  See discussion on setting desired sizes.  Geometry will
; be re-done on the object.  This method affects GenTriggers, GenLists,
; GenListEntries, GenViews, GenDisplayGroups, GenTextDisplays, GenTextEdits,
; GenRanges, GenGlyphDisplays and not-independently-displayable GenInteractions.
; NOTE: do not use this on windowed objects / independently-displayable
; GenInteractions -- use HINT_SIZE_WINDOW_AS_RATIO_OF_PARENT, etc. for them
;
; Context:	Utility message for high-level geometry operations
; Source:	Anyone
; Destination:	Any GenClass objects, though only certain objects respond to
;		geometry information (see Geometry Manager documentation)
;		(currently affects GenTriggers, GenLists, GenListEntries,
;		GenViews, GenDisplayGroups, GenTextDisplays, GenTextEdits,
;		GenRanges, GenGlyphDisplays and not-independently-displayable
;		GenInteractions)
; Interception:	Generally not intercepted.
;
; Pass:		ss:bp -- SetSizeArgs: new desired size, update mode
;		dx -- size SetSizeArgs
; Return:	nothing
;		ax, cx, dx, bp -- destroyed
;
	
MSG_GEN_SET_FIXED_SIZE	message
; 
; Sets an initial fixed size for the object by creating a HINT_FIXED_SIZE
; or by changing the existing one.  This will force the object to stay this
; size, if it is able.  See discussion on setting desired sizes. Geometry will
; be re-done on the object.  This method affects GenTriggers, GenLists,
; GenListEntries, GenViews, GenDisplayGroups, GenTextDisplays, GenTextEdits,
; GenRanges, GenGlyphDisplays and not-independently-displayable GenInteractions.
; NOTE: do not use this on windowed objects / independently-displayable
; GenInteractions -- use HINT_SIZE_WINDOW_AS_RATIO_OF_PARENT, etc. for them
;
; Context:	Utility message for high-level geometry operations
; Source:	Anyone
; Destination:	Any GenClass objects, though only certain objects respond to
;		geometry information (see Geometry Manager documentation)
;		(currently affects GenTriggers, GenLists, GenListEntries,
;		GenViews, GenDisplayGroups, GenTextDisplays, GenTextEdits,
;		GenRanges, GenGlyphDisplays and not-independently-displayable
;		GenInteractions)
; Interception:	Generally not intercepted.
;
; Pass:		ss:bp -- SetSizeArgs: new desired size, update mode
;		dx -- size SetSizeArgs
; Return:	nothing
;		ax, cx, dx, bp -- destroyed
;
	

MSG_GEN_GET_INITIAL_SIZE	message
;
; Returns the current initial size, if any.
;
; Context:	Utility message for high-level geometry operations
; Source:	Anyone
; Destination:	Any GenClass objects, though only certain objects respond to
;		geometry information (see Geometry Manager documentation)
; Interception:	Generally not intercepted.
;
; Pass:		nothing
; Return:	cx -- SpecWidth: initial width, or 0 if none
;		dx -- SpecHeight: initial width, or 0 if none
;		ax -- SpecNumberOfChildren: number of children, if specified
;		bp -- destroyed
;
	
MSG_GEN_GET_MINIMUM_SIZE	message
;
; Returns the current minimum size, if any.  Will not return implied minimums 
; from a fixed size hint; use MSG_GEN_GET_FIXED_SIZE for that.
;
; Context:	Utility message for high-level geometry operations
; Source:	Anyone
; Destination:	Any GenClass objects, though only certain objects respond to
;		geometry information (see Geometry Manager documentation)
; Interception:	Generally not intercepted.
;
; Pass:		nothing
; Return:	cx -- SpecWidth: minimum width, or 0 if none
;		dx -- SpecHeight: minimum width, or 0 if none
;		ax -- SpecNumberOfChildren: number of children, if specified
;		bp -- destroyed
;
	
MSG_GEN_GET_MAXIMUM_SIZE	message
;
; Returns the current maximum size, if any.  Will not return implied maximums
; from a fixed size hint; use MSG_GEN_GET_FIXED_SIZE for that.
;
; Context:	Utility message for high-level geometry operations
; Source:	Anyone
; Destination:	Any GenClass objects, though only certain objects respond to
;		geometry information (see Geometry Manager documentation)
; Interception:	Generally not intercepted.
;
; Pass:		nothing
; Return:	cx -- SpecWidth: maximum width, or 0 if none
;		dx -- SpecHeight: maximum width, or 0 if none
;		ax -- SpecNumberOfChildren: number of children, if specified
;		bp -- destroyed
;
	
MSG_GEN_GET_FIXED_SIZE	message
;
; Returns the current fixed size, if any.
;
; Context:	Utility message for high-level geometry operations
; Source:	Anyone
; Destination:	Any GenClass objects, though only certain objects respond to
;		geometry information (see Geometry Manager documentation)
; Interception:	Generally not intercepted.
;
; Pass:		nothing
; Return:	cx -- SpecWidth: fixed width, or 0 if none
;		dx -- SpecHeight: fixed width, or 0 if none
;		ax -- SpecNumberOfChildren: number of children, if specified
;		bp -- destroyed
;

;-------------------------------------------------
;		Generic Visual Update Method
;-------------------------------------------------

MSG_GEN_UPDATE_VISUAL			message
;
; Performs visual update on whole generic object, even if it
; is implemented as pieces in different UI windows.  Actually, the
; WIN_GROUP's that the visible pieces are in are updated.  Useful when
; you'd like to make a whole mess of things GS_USABLE & then want to
; have more control over when stuff is updated on screen:
; Pass VUM_MANUAL with each GS_USABLE, & then call this method
; with VUM_NOW.  NOTE that to be "generically correct" you need to send
; this method to each object that was not updated earlier.  This will not
; actually cause a redraw each time, but only once for each UI window, since
; the update code checks flags to see if work is done.  You MAY be able to
; cheat, but be careful, in the case of a group of simple gadgets, where you
; may be able to get away w/just sending this method to the GenDisplay,
; GenInteraction or GenPrimary in which they are placed.  Be careful, as
; an interaction group which has become a pinned menu would not get
; updated -- For simple gadgets, it is probably safe to only send this method
; to the immediate composite, but risky beyond that.
; 
; This method is guaranteed NOT to force the specific building of any object.
;
; Context:	Utility message for visual update (use in conjunction with
;		VUM_MANUAL update mode)
; Source:	Anyone
; Destination:	Any GenClass object
; Interception:	Generally not intercepted.
;
; Pass:		dl - VisUpdateMode
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

;-------------------------------------------------
;		Gadget Apply/Reset/Activation Methods
;-------------------------------------------------

MSG_GEN_APPLY					message
;
; Sent to property gadgets (GenItemGroup, GenBooleanGroup, GenRange)
; to cause them to send out their "apply" message, and at the same time
; reset any "modified" bits.  If sent to a GenInteraction either at the top
; of a dialog, or somewhere within it, this message is  propogated to all
; gadgets within the dialog below that point in the tree.
;
; Context:	Property Gadget/Dialog mechanism
; Source:	GIT_PROPERTIES style GenInteraction, on reciept of
;		MSG_GEN_GUP_INTERACTION_COMMAND(IC_APPLY), or a property
;		gadget itself, if it does not lie within a property dialog.
; Destination:	GenInteraction, property gadgets (GenItemGroup, GenBooleanGroup,
;		GenRange)
; Interception:	Not generally intercepted, as gadgets provide default behavior
;		of "applying" their current state, that is, sending their
;		current state via the "applyMsg" to the object's "destination",
;		and resetting the "modified" status of the gadget, to indicate
;		that any user changes have been "applied", or now represent
;		current status.
; Pass:	 	nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_RESET					message
;
; This message, if sent to a GenInteraction either at the top of a dialog,
; or somewhere within it, is propogated to all gadgets within the dialog
; below that point in the tree, in the same manner as MSG_GEN_APPLY.  The
; only internal UI source is a GIT_PROPERTIES GenInteraction, which will
; broadcast this message within the dialog on receipt of
; MSG_GEN_GUP_INTERACTION_COMMAND(IC_RESET).  Note that there is NO default
; handling of MSG_GEN_RESET by generic UI gadgets.  This message is supplied
; for cases where it is desirable to implement RESET behavior locally by
; subclassing individual gadgets.  Note that the normal implementation of
; RESET is to replace the standard RESET trigger within a properties dialog
; with your own, & then handle the message that it sends out by 
; resetting all gadgets within the dialog to reflect current status of your
; data, & finally notifying the GenInteraction that you are done via
; MSG_GEN_GUP_INTERACTION_COMMAND(IC_RESET).  In GenControl subclassings, 
; the updating of current status may easily be accomplished by calling
; MSG_GEN_CONTROL_ADD_TO_GCN_LISTS on oneself, which results in the current
; cached status message to be resent to the controller, which results in
; it calling MSG_GEN_CONTROL_UPDATE_UI on itself.
;
; Context:	Property Gadget/Dialog mechanism
; Source:	GIT_PROPERTIES style GenInteraction, on reciept of
;		MSG_GEN_GUP_INTERACTION_COMMAND(IC_RESET)
; Destination:	GenInteraction, property gadgets (GenItemGroup, GenBooleanGroup,
;		GenRange)
; Interception:	May be intercepted by subclassings of property gadgets to
;		implement RESET locally.  (Consider alternate approach discussed
;		above first)
; Pass:	 	nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;	
; (See MSG_GEN_MAKE_APPLYABLE, below.)

MSG_GEN_PRE_APPLY		message
;
; Method sent out by properties dialogs before MSG_GEN_APPLY.  This can be used
; to do validation of settings or to prepare for "apply"ing of changes.
;
; Context:	Utility message for "apply"ing gadgetry running in delayed mode
; Source:	Normally only sent by properties dialog, before sending
;		MSG_GEN_APPLY.
; Destination:	Same as MSG_GEN_APPLY
; Interception:	Must be intercepted to handle properties validation.
;
; Pass:		nothing
; Return:	carry set if validation problem
;

MSG_GEN_POST_APPLY		message
;
; Method sent out by properties dialogs after MSG_GEN_APPLY.  This can be used
; to clean up after "apply"ing of changes.
;
; Context:	Utility message for "apply"ing gadgetry running in delayed mode
; Source:	Normally only sent by properties dialog, after sending
;		MSG_GEN_APPLY.
; Destination:	Same as MSG_GEN_APPLY
; Interception:	Can be intercepted to handle clean up work after MSG_GEN_APPLY.
;
; Pass:		nothing
; Return:	nothing
;

MSG_GEN_MAKE_APPLYABLE				message
;
; Sent to an object, makes the summons that the object is in applyable. 
; Apply and reset buttons will be enabled.
;
; Context:	Utility message for supporting UI gadgetry
; Source:	Anyone
; Destination:	Any USABLE GenClass object, though only meaningful for objects
;		sitting in a independently displayable GenInteraction Since
;		this traverses up the visual tree to the appropriate
;		interaction, it can be sent to any of the objects sitting in
;		interaction, any of the objects along the way up, or the
;		interaction itself.
; Interception:	Generally not intercepted.
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_MAKE_NOT_APPLYABLE				message
;
; Sent to an object, makes the summons that the object is in not applyable. 
; Apply and reset buttons will be disabled.
;
; Context:	Utility message for supporting UI gadgetry
; Source:	Anyone
; Destination:	Any USABLE GenClass object, though only meaningful for objects
;		sitting in a independently displayable GenInteraction Since
;		this traverses up the visual tree to the appropriate
;		interaction, it can be sent to any of the objects sitting in
;		interaction, any of the objects along the way up, or the
;		interaction itself.
; Interception:	Generally not intercepted.
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_ACTIVATE			message
; This method can be sent to any GenTrigger or property gadget (GenItem,
; GenBoolean, etc.) to simulate the user clicking within it.
; When a button detects its keyboard shortcut, it will
; send itself this method. This method is also sent to the default button when
; the window receives a MSG_GEN_GUP_QUERY with cx = SGQT_ACTIVATE_DEFAULT.
;
; Context:	Utility message to activate UI gadgetry
; Source:	Anyone
; Destination:	USABLE generic objects that have support user and actual
;		states, EXECPT GenListEntry
; Interception:	Generally not intercepted.  May be handled for custom gadgets.
;		In this case, superclass need not be called as all the
;		necessary behavior is supplied by the handler.
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_ACTIVATE_INTERACTION_DEFAULT	message
;
; May be sent by gadgets such as a GenList, when the user has double
; clicked the mouse on an item. The method travels up the VISIBLE tree to the
; first VisCompClass object which is a WIN_GROUP (in other words, the
; GenPrimary or independently displayable GenInteraction level), where it
; causes the WIN_GROUP object to send a MSG_GEN_ACTIVATE to the object which
; has the default exclusive for the window. This is usually a GenTrigger which
; has HINT_DEFAULT_DEFAULT_ACTION, although it can be another Trigger which has
; been navigated to or clicked on.
;
; This method forces specific building of object, & therefore shouldn't
; be done prior to setting up pre-specifically built hints, attributes,
; & for some objects, tree location.
;
; Context:	Utility message for supporting UI gadgetry
; Source:	Anyone, though usually sent by gadgets sitting in an
;		interaction which contains some default exclusive gadget,
;		when the first gadget is double-clicked.  Gadgets
;		are requested to have this behavior with the
;		DAM_ACTIVATE_INTERACTION_DEFAULT value in the
;		GA_DEFAULT_ACTIONS field of the GadgetAttrs flags.
;		<Currently GenList, GenRange, and GenText have the
;		GadgetAttrs flags.  Of the three, only GenList sends this
;		message.>  Custom gadgets, if marked with
;		DAM_ACTIVATE_INTERACTION_DEFAULT, should send this.
;		Also, if the output optr of such a gadget needs to do some
;		work before the interaction default is activated, the
;		DAM_ACTIVATE_INTERACTION_DEFAULT attribute can be removed from
;		the gadget and the output can manually send
;		MSG_GEN_ACTIVATE_INTERACTION_DEFAULT after the work.
; Destination:	Any USABLE GenClass object, though only meaningful for objects
;		sitting in a independently displayable GenInteraction.  Since
;		this traverses up the visual tree to the appropriate
;		interaction with the interaction default, it can be sent to
;		any of the objects sitting in interaction, any of the objects
;		along the way up, or the interaction itself.  It is most
;		convenient to sent it to the visual parent of the gadget
;		marked with DAM_ACTIVATE_INTERACTION_DEFAULT (VisCallParent),
;		or the gadget itself (ObjCallInstanceNoLock).
; Interception:	Generally not intercepted.  GenClass provides the appropriate
;		behavior.
;
; Pass:		nothing
; Return:	carry set	- if activated default action.
;		ax, cx, dx, bp - destroyed
;

;-------------------------------------------------
;		Navigation Methods
;-------------------------------------------------

MSG_GEN_NAVIGATE_TO_NEXT_FIELD	message
MSG_GEN_NAVIGATE_TO_PREVIOUS_FIELD	message
;
; These may be sent by gadgets such as a GenText, when they want the
; navigation cursor to move to the next or previous control (as if the user
; pressed the TAB or Shift-TAB keys in CUA.) The method travels up the
; VISIBLE tree to the first VisCompClass object which is a WIN_GROUP
; (in other words, the GenPrimary or independently displayable GenInteraction
; level), where it causes WIN_GROUP object to move the focus exclusive.
; Specific UI's may provide alternate intrepretation of this method.
; Applications may send this method, but that would be unusual.
;
; This method forces specific building of object, & therefore shouldn't
; be done prior to setting up pre-specifically built hints, attributes,
; & for some objects, tree location.
;
; Context:	Utility message for gadget navigation (i.e. moving of the
;		focus exclusive)
; Source:	Normally sent by the UI to effect gadget navigation, which
;		is defined by the specific UI.  Also, gadgets may be requested
;		to navigate when activated (e.g. double-clicked) with the
;		DAM_NAVIGATE_TO_NEXT_FIELD value in the GA_DEFAULT_ACTIONS
;		field of the GadgetAttrs flags.  <Currently GenList, GenRange,
;		and GenText have the GadgetAttrs flags.  All three deal
;		with DAM_NAVIGATE_TO_NEXT_FIELD correctly.>  Custom gadgets,
;		if marked with DAM_NAVIGATE_TO_NEXT_FIELD, should use this
;		message when activated.
; Destination:	Any USABLE GenClass object, will travel up to the first window.
;		Since this traverses up the visual tree, it is convenient
;		to send it to the visual parent of the gadget marked with
;		DAM_ACTIVATE_INTERACTION_DEFAULT (VisCallParent), or the
;		gadget itself (ObjCallInstanceNoLock).
; Interception:	Generally not intercepted.  To alter navigation functionality,
;		intercept MSG_SPEC_NAVIGATION_QUERY (not
;		MSG_GEN_NAVIGATION_QUERY).
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;


MSG_GEN_NAVIGATION_QUERY		message
; This method can be used by applications to initiate navigation-oriented
; query, as the MSG_GEN_NAVIGATE_TO_NEXT/PREVIOUS_FIELD methods do.
; See MSG_SPEC_NAVIGATION_QUERY for full documentation on this method.
;
; NOTE: if you simply want navigation to occur in a window, see
;	MSG_GEN_NAVIGATE_TO_NEXT/PREVIOUS_FIELD defined above.
;
; Context:	Utility message for gadget navigation (i.e. moving of the
;		focus exclusive)
; Source:	see MSG_SPEC_NAVIGATION_QUERY
; Destination:	see MSG_SPEC_NAVIGATION_QUERY
; Interception:	Generally not intercepted.  To alter navigation functionality,
;		intercept MSG_SPEC_NAVIGATION_QUERY.
;
; Pass:		^lcx:dx	= object which originated this query
;		bp	= NavigateFlags
;
; Return:	carry set if object to give focus to, with:
;			^lcx:dx	= object which is replying
;		else
;			^lcx:dx = next object to query
;		bp	= NavigateFlags (will be altered as message is
;			  passed around)
;		al	= set if the object is focusable via backtracking
;			  (i.e. can take the focus if it is previous to the
;			  originator in backwards navigation)
;

;-------------------------------------------------
;		Generic Upward Queries
;-------------------------------------------------

MSG_GEN_GUP_QUERY			message
;
; MSG_GEN_GUP_QUERY is used to query up the generic composite tree.
; Other methods, starting with MSG_GEN_GUP_QUERY*, do this same action, but are
; only available within the generic UI itself.  MSG_GEN_GUP_QUERY is
; extensible, in that the specific UI may add new types of data to be queried
; for.
;
; Context:	Utility message for getting information by looking up the
;		generic tree.
; Source:	Anyone
; Destination:	Any USABLE GenClass object, though only certain objects will
;		answer certain queries.
; Interception:
;
; Pass:		cx - GenUpwardQueryType, or SpecGenUpwardQueryType
;
; Return:	carry - set if query has been responded to
;		ax, cx, dx, bp - response data (depends on query type)
;
; Since this is normally subclassed to ADD behavior, be sure to call
; superclass.
;
; Generic Upward Query equates
;
;
GenUpwardQueryType 		etype word
GUQT_UI_FOR_APPLICATION		enum GenUpwardQueryType
GUQT_UI_FOR_SCREEN		enum GenUpwardQueryType
GUQT_UI_FOR_FIELD		enum GenUpwardQueryType
GUQT_UI_FOR_MISC		enum GenUpwardQueryType
; Returns specific UI to use for new instances of objects.
;
; Context:	Used internally when building objects.
; Source:	Internal use only.
; Destination:	Internal use only.
; Interception:	Internal use only.
;
; Pass:		nothing
; Return:	ax - handle of specific UI
;

GUQT_FIELD			enum GenUpwardQueryType
; Returns Field object in ^lcx:dx, Window (if realized) in ^hbp.
; Believe it or not, this is actually a reasonably safe thing to do, since the
; field window will remain open until all applications within the field are
; shut down.
;
; Context:	May be used to find information about field object, can also
;		use MSG_GEN_GUP_{CALL,SEND,FIND}_OBJECT_OF_CLASS.
; Source:	Anyone
; Destination:	Any USABLE GenClass object, travels up to and answered by
;		field object
;		(in the specific UI)
; Interception:	Would only be handled in a new field object class or a
;		substitute for a field object, which is possible
;
; Pass:		nothing
; Return:	^cx:dx - current field
;		bp - Window (if realized)
;
GUQT_SCREEN			enum GenUpwardQueryType
; Returns Screen object in ^lcx:dx, Window (if realized) in ^hbp.
; Believe it or not, this is actually a reasonably safe thing to do, since
; the screen window will remain open until all applications within the field
; are shut down.  Screen object being returned will be default screen for the
; field.
;
; Context:	May be used to find information about screen object, can also
;		use MSG_GEN_GUP_{CALL,SEND,FIND}_OBJECT_OF_CLASS.
; Source:	Anyone
; Destination:	Any USABLE GenClass object, travels up to and answered by
;		screen object (in the specific UI)
; Interception:	Would only be handled in a new screen object class or a
;		substitute for a screen object, which is unlikely
;
; Pass:
; Return:	^lcx:dx - screen object
;		bp - Window (if realized)
;

GUQT_DELAYED_OPERATION	enum GenUpwardQueryType
;
; Determine if a gadget should be operating in "delayed mode," i.e. whether it
; should wait for a MSG_GEN_APPLY before sending notification to its output,
; or whether it should send notification whenever it changes state.
;
; Context:	May be used by any gadget that sends notification of its
;		state change.
; Source:	Anyone
; Destination:	Any USABLE GenClass object. Travels up to, and is answered by,
;		the nearest composite Gen object (e.g. GenInteraction, or
;		GenItemGroup).
; Interception:	If the specific UI used this to determine whether it should
;		operate in delayed mode, it might be useful to intercept this
;		and provide custom behaviour, such as having some things in
;		a dialog box operate in immediate mode, while the rest operate
;		in delayed mode. Since the specific UI (currently) doesn't
;		use this, interception is likely unhelpful.
;
; Pass:		nothing
; Return:	ax	= non-zero if gadget should operate in delayed mode.
; 

; Export start of specific query types
SPEC_GEN_QUERY_START		enum GenUpwardQueryType, 2000


MSG_GEN_GUP_INTERACTION_COMMAND	message
;
; Travels up the generic tree until it reaches a non-GIT_ORGANIZATIONAL
; GenInteraction.  Once there, it performs the indicated InteractionCommand.
; See InteractionCommand declaration for the different command types and how
; specific UI's interpret the commands.  If the GenInteraction is a dialog
; brought up with UserDoDialog, InteractionCommand will be returned to the
; caller, after performing the command, via
; MSG_GEN_INTERACTION_RELEASE_BLOCKED_THREAD_WITH_RESPONSE.
;
; Context:	Used to unconditionally perform one of the InteractionCommand
;		types.
; Source:	Anyone.  Normally sent by MSG_GEN_INTERACTION_ACTIVATE_COMMAND
;		handler or by a custom trigger's action message handler to
;		perform some default command after perform some application-
;		specific function.
; Destination:	Any GenClass object.  Will travel up generic tree, stopping at
;		first non-GIT_ORGANIZATIONAL GenInteraction.
; Interception:	Not normally intercepted.
;
; Pass:		cx - InteractionCommand
; Return:	carry set if handled (stops upward query)
;

;-------------------------------------------------
;		Keyboard shortcut search methods (Internal)
;-------------------------------------------------

MSG_GEN_FIND_KBD_ACCELERATOR	message
;
; This checks keyboard chars against the object's keyboard accelerator,
; and those of its generic descendants, to see if the object should be 
; activated.  
;
; Context:	Internal message for keyboard accelerators
; Source:	Sent by specific UI to search for objects with keyboard
;		accelerator character matching that passed
; Destination:	Sent down various generic object trees, searching for object
;		with matching keyboard accelerator
; Interception:	Normally not intercepted, the default behavior is to check
;		for the keyboard accelerator specified in the object's
;		GenClass instance data.   Can possibly be intercepted to
;		allow an object to be actived by some non-standard keyboard
;		accelerator that cannot be specified by the instance data.
;		In this case, be sure that the keyboard accelerator search
;		path bit is set for the object (see MSG_GEN_SET_KBD_MKR_PATH).
;
; Pass:		cx = character value
;		dl = CharFlags
;		dh = ShiftState (ModBits)
;		bp low = ToggleState
;		bp high = scan code
; Return:	carry set if accelerator found
;		ax, cx, dx, bp - destroyed
;
	
MSG_GEN_SET_KBD_MKR_PATH			message
;	
; Sets the keboard accelerator search path bit for this object, if not set
; already, and extends path bits upward to the GenApplication level.  Used
; to optimize searching.
;
; Context:	Internal message for keyboard accelerators
; Source:	Sent by generic UI to set GA_KBD_SEARCH_PATH bit whenever
;		necessary (keyboard accelerator is set, child object is added,
;		etc.)
; Destination:	Any GenClass object that needs to have keyboard accelerator
;		search bit set, sets all bits upward to the GenApplication.
; Interception:	Normally not intercepted.
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;
	
;-------------------------------------------------
;		Enable notify methods (Internal)
;-------------------------------------------------

MSG_GEN_NOTIFY_ENABLED			message
;
; Goes down the generic tree looking for specifically built objects and
; setting VA_FULLY_ENABLED bits until it encounters a generically disabled
; object, in which case no more work needs to be done.  Will not build out
; specific and visual parts.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Internal message for state changing
; Source:	Sent by generic UI when object is set enabled and by UI
;		gadgets that have gadgetry that is not connected to the
;		generic tree in a normal fashion (i.e. one-way links).
; Destination:	Any generic object whose generic parent is fully GENS_USABLE
; Interception:	Normally not intercepted.  To deal with gadgetry that is
;		not connected to the generic tree in a normal fashion,
;		intercept MSG_SPEC_NOTIFY_ENABLED.
; 
; Pass:		dl -- update mode
;		dh -- NotifyEnabledFlags  (see below)
; Return:	carry set if visual state changed
;		ax, cx, dx, bp - destroyed
;
;	
NotifyEnabledFlags	record
	NEF_STATE_CHANGING:1,	;this is the object whose state is changing
	:7
NotifyEnabledFlags	end
			
			
MSG_GEN_NOTIFY_NOT_ENABLED			message
;
; Goes down the generic tree looking for specifically built objects and
; clearing VA_FULLY_ENABLED bits until it encounters a generically disabled
; object, in which case no more work needs to be done.  Will not build out
; specific and visual parts.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Internal message for state changing
; Source:	Sent by generic UI when object is set not enabled and by UI
;		gadgets that have gadgetry that is not connected to the
;		generic tree in a normal fashion (i.e. one-way links).
; Destination:	Any generic object whose generic parent is fully GENS_USABLE
; Interception:	Normally not intercepted.  To deal with gadgetry that is
;		not connected to the generic tree in a normal fashion,
;		intercept MSG_SPEC_NOTIFY_NOT_ENABLED.
; 
; Pass:		dl -- update mode
;		dh -- NotifyEnabledFlags  (see above)
; Return:	carry set if visual state changed
;		ax, cx, dx, bp - destroyed
;
 
;-------------------------------------------------
;		GenView Utility Methods (Internal)
;-------------------------------------------------

MSG_GEN_FIND_VIEW_RANGES	message
;
; Used by the view to go searching for descendant range objects,
; returning their desired position under the view if they exist.  This
; need not be made public.
;
; Context:	Internal message for GenView management
; Source:	GenView objects
; Destination:	Sent to children of GenView, traverses down generic tree.
;		GenRange handles.
; Interception:	Normally not intercepted, use HINT_RANGE_X_SCROLLER and
;		HINT_RANGE_Y_SCROLLER hints to specify which GenRanges to use for
;		scrollbars
;
; Pass:		cl -- RequestedViewArea, if any, so far, for horizontal range
;		dx -- chunk handle of horizontal range, if any
;		ch -- RequestedViewArea, if any, so far, for vertical range
;		bp -- chunk handle of vertical range, if any
; Return:	cl -- RequestedViewArea, update if horiz scrollbar found at 
;				or under this object
;		dx -- chunk handle of horizontal range, if any
;		ch -- RequestedViewArea, update if vertical scrollbar found
;				at or under this object.
;		bp -- chunk handle of vertical range, if any
;		ax -- destroyed
;
	
RequestedViewArea	etype	byte
	RVA_NO_AREA_CHOICE	enum	RequestedViewArea  ;no choice made here
	RVA_X_SCROLLER_AREA	enum	RequestedViewArea  ;put with x scroller
	RVA_Y_SCROLLER_AREA	enum	RequestedViewArea  ;put with y scroller
	RVA_LEFT_AREA		enum	RequestedViewArea  ;put in left area
	RVA_TOP_AREA		enum	RequestedViewArea  ;put in top area
	RVA_RIGHT_AREA		enum	RequestedViewArea  ;put in right area
	RVA_BOTTOM_AREA		enum	RequestedViewArea  ;put in bottom area
	

MSG_GEN_QUERY_VIEW_AREA	message
;
; Used by the view to query children about where they'd prefer to be located
; in the view.  Basically returns the first hint we find, or null if no 
; preference.  This also need not be public (and maybe should be imported
; under MetaClass from OLPaneClass)
;
; Context:	Internal message for GenView management
; Source:	GenView objects
; Destination:	Sent to children of GenView, traverses down generic tree until
;		RequestedViewArea is found.  GenRange handles by returning
;		scroller areas (RVA_X_SCROLLER_AREA, RVA_Y_SCROLLER_AREA) if
;		marked with HINT_RANGE_X_SCROLLER, HINT_RANGE_Y_SCROLLER.
; Interception:	Normally not intercepted.
;
; Pass:		cl -- RequestedViewArea: anything chosen previous to this object
; Return:	cx -- RequestedViewArea: the object's preference, if nothing
;				chosen previously
;		ax, dx, bp -- destroyed
;


MSG_GEN_QUERY_NEED_TO_BE_ON_ACTIVE_LIST	message
;
; Called when a mechanism within a class has decided that the object no
; longer needs to be on the active list, to see if any other mechanism would
; like to keep it there.  Windowed specific UI objects, for instance, will
; return carry set if ATTR_INITIATE_ON_STARTUP is present on the object, as
; this attribute requires the object to be on the active list.
;
; Context:	Part of active list mechanism
; Source:	No restrictions, though is generally called on self to see 
;		if any class of the object wishes for the object to still be
;		on the active list. 
;		Specifically, if an object is no longer needed on the active
;		list for one particular reason, this message should be called
;		on the object to see if it should remain on the active list
;		for any other reason.  If so, the caller should NOT remove
;		the object from the active list.  The only exception to this
;		would be if the object is being destroyed, in which case the
;		object should be removed in any case.
; Destination:	Any generic object
; Interception:	Object classes which add the object to the active list MUST
;		intercept this message and return carry set if the class 
;		desires for the object to remain on the active list.  If
;		the message is intercepted & this is not the case, it should
;		be sent onto the superclass for  handling.
; Pass:		nothing
; Return:	carry	- set if object should be on the active list
;		ax, cx, dx, bp - destroyed
;


MSG_GEN_LOAD_OPTIONS		message
;
; Called when the object should load its options
;
; Context:	Part of options mechanism
; Source:	Sent by GenClass on MSG_META_ATTACH.  GenClass generates the
;		GenOptionsParams structure by looking in the object's vardata
;		and by querying up the generic tree if needed.
; Destination:	Any gen object
; Interception:	Various Gen classes intercept this and provide default
;		behavior
; Pass:		ss:bp - GenOptionsParams
; Return:	none

GenOptionsParams	struct
    GOP_category	char INI_CATEGORY_BUFFER_SIZE dup (?)
    GOP_key		char INI_CATEGORY_BUFFER_SIZE dup (?)
GenOptionsParams	ends

MSG_GEN_SAVE_OPTIONS		message
;
; Called when the object should save its options
;
; Context:	Part of options mechanism
; Source:	Sent by GenClass on MSG_META_SAVE_OPTIONS.  GenClass generates
;		the GenOptionsParams structure by looking in the object's
;		vardata and by querying up the generic tree if needed.
; Destination:	Any gen object
; Interception:	Various Gen classes intercept this and provide default
;		behavior
; Pass:		ss:bp - GenOptionsParams
; Return:	none

MSG_GEN_ADD_GEOMETRY_HINT	message
; 
; Adds the passed geometry hint to the object, using ObjVarAddData.  Ensures
; that the object's geometry is redone if needed.  Can be used for the following
; hints:
;	HINT_ALLOW_CHILDREN_TO_WRAP		
;	HINT_BOTTOM_JUSTIFY_CHILDREN		
;	HINT_CENTER_CHILDREN_HORIZONTALLY	
;	HINT_CENTER_CHILDREN_ON_MONIKERS	
;	HINT_CENTER_CHILDREN_VERTICALLY		
;	HINT_CENTER_MONIKER			
;	HINT_CUSTOM_CHILD_SPACING		
;	HINT_DONT_ALLOW_CHILDREN_TO_WRAP	
;	HINT_DONT_FULL_JUSTIFY_CHILDREN		
;	HINT_DONT_INCLUDE_ENDS_IN_CHILD_SPACING	
;	HINT_DO_NOT_USE_MONIKER			
;	HINT_DRAW_IN_BOX			
;	HINT_EXPAND_HEIGHT_TO_FIT_PARENT	
;	HINT_EXPAND_WIDTH_TO_FIT_PARENT		
;	HINT_FULL_JUSTIFY_CHILDREN_HORIZONTALLY	
;	HINT_FULL_JUSTIFY_CHILDREN_VERTICALLY	
;	HINT_INCLUDE_ENDS_IN_CHILD_SPACING	
;	HINT_LEFT_JUSTIFY_CHILDREN		
;	HINT_LEFT_JUSTIFY_MONIKERS		
;	HINT_NO_TALLER_THAN_CHILDREN_REQUIRE	
;	HINT_NO_WIDER_THAN_CHILDREN_REQUIRE	
;	HINT_ORIENT_CHILDREN_HORIZONTALLY	
;	HINT_ORIENT_CHILDREN_VERTICALLY		
;	HINT_PLACE_MONIKER_ABOVE		
;	HINT_ALIGN_LEFT_MONIKER_EDGE_WITH_CHILD
;	HINT_PLACE_MONIKER_TO_LEFT		
;	HINT_PLACE_MONIKER_TO_RIGHT		
;	HINT_RIGHT_JUSTIFY_CHILDREN		
;	HINT_TOP_JUSTIFY_CHILDREN		
;	HINT_WRAP_AFTER_CHILD_COUNT		
;	HINT_DIVIDE_WIDTH_EQUALLY
;	HINT_DIVIDE_HEIGHT_EQUALLY
;	HINT_USE_INITIAL_BOUNDS_WHEN_RESTORED		
;	HINT_KEEP_INITIALLY_ONSCREEN	
;	HINT_DONT_KEEP_INITIALLY_ONSCREEN	
;	HINT_KEEP_PARTIALLY_ONSCREEN			
;	HINT_KEEP_ENTIRELY_ONSCREEN			
;	HINT_KEEP_ENTIRELY_ONSCREEN_WITH_MARGIN		
;	HINT_DONT_KEEP_PARTIALLY_ONSCREEN		
;	HINT_POSITION_WINDOW_AT_RATIO_OF_PARENT		
;	HINT_STAGGER_WINDOW				
;	HINT_CENTER_WINDOW				
;	HINT_TILE_WINDOW				
;	HINT_POSITION_WINDOW_AT_MOUSE			
;	HINT_EXTEND_WINDOW_TO_BOTTOM_RIGHT		
;	HINT_EXTEND_WINDOW_NEAR_BOTTOM_RIGHT		
;	HINT_SIZE_WINDOW_AS_DESIRED			
;	HINT_CAN_CLIP_MONIKER_WIDTH
;	HINT_CAN_CLIP_MONIKER_HEIGHT
;	HINT_SHOW_ENTIRE_MONIKER		
;	ATTR_GEN_POSITION				
;	ATTR_GEN_POSITION_X				
;	ATTR_GEN_POSITION_Y				
;
; Context:	Can be called at any time.
; Source:	Anyone.
; Destination:	Any GenClass object.
; Interception:	Not normally intercepted.
;
; Pass:		cx -- geometry hint
;		bp -- word of data for hint, if any.
;		dl -- VisUpdateMode
;

MSG_GEN_REMOVE_GEOMETRY_HINT	message
; 
; Adds the passed geometry hint to the object, using ObjVarAddData.  Ensures
; that the object's geometry is redone if needed.  Can be used for hints 
; listed with MSG_GEN_REMOVE_GEOMETRY_HINT, plus:
;	HINT_FIXED_SIZE
;	HINT_INITIAL_SIZE
;	HINT_MINIMUM_SIZE
;	HINT_MAXIMUM_SIZE
;	HINT_SIZE_WINDOW_AS_RATIO_OF_PARENT
;	HINT_SIZE_WINDOW_AS_RATIO_OF_FIELD
;	HINT_POSITION_WINDOW_AT_RATIO_OF_PARENT
;
; Context:	Can be called at any time.
; Source:	Anyone.
; Destination:	Any GenClass object.
; Interception:	Not normally intercepted.
;
; Pass:		cx -- geometry hint
;		dl -- VisUpdateMode
;
	
;-------------------------------------------
;	Generic Directory Path Support
;-------------------------------------------
;
; These aren't actually used by GenClass, but handlers and definitions exist
; here to make the use of these things by generic objects (e.g. the file
; selector and document control) as easy as possible.
;
; Because handlers for all these messages are implemented in GenClass, it is
; possible to store a path with any generic object, whether the particular
; object normally does anything with the filesystem or not. For example, you
; could subclass GenTrigger and store a path with it that your subclass would
; then use.
;
; The path itself is stored in the object's vardata under the tag
; ATTR_GEN_PATH_DATA. In the absence of such an attribute, GenClass will
; default the path to SP_TOP, should anyone ask it. Subclasses can change this
; default by intercepting MSG_META_INITIALIZE_VAR_DATA, filling in the
; GenFilePath structure after it has called the superclass (which will actually
; allocate the attribute).
;
GenFilePath	struct
    GFP_disk	word	SP_TOP	; handle of disk on which the path resides; may
				;  be initialized to a StandardPath constant.
    GFP_path	PathName	; absolute path (relative if GFP_disk is a
				;  StandardPath constant) to the directory
GenFilePath	ends
ATTR_GEN_PATH_DATA			vardata	GenFilePath
;
;	Place where the current path/file for the object is stored.
;

TEMP_GEN_PATH_SAVED_DISK_HANDLE		vardata
;
;	Place where DiskSave has stored data to restore the disk handle in
;	ATTR_GEN_FILE_PATH. Don't even think of defining this in your .ui
;	file.
;

MSG_GEN_PATH_SET			message
;
; Set path bound to the object.  Normally, a complete pathname must
; be passed (but, no drive specifier -- drive is determined by disk handle), but
; you can set a path relative to a standard path by passing the StandardPath
; constant for the disk handle. If you pass a disk handle of 0 and a relative
; path, it will be taken relative to the object's current path.
;
; Context:	Utility message sent to set an object's path. Most generic
;		objects do not actually have a path, however. For those that
;		do, whether the path is for a directory or a file depends on
;		the object itself. A GenFileSelector has a directory, for
;		example, while a GenDocument has a file.
; Source:	Anyone
; Destination:	Gen object that's defined to have a path.
; Interception:	Generally not intercepted.  May be subclassed to replace or
;		supplement default functionality.  If replacing, don't need to
;		call superclass in handler.  If supplementing, superclass may
;		be called before or after your processing, depending on what
;		additional processing you do.
;
;		If the object is specifically grown, the message will be
;		forwarded to the specific class *after* it has been acted upon
;		by GenClass.
;
; Pass:	 	cx:dx - null-terminated pathname; may not be in the same
;			block as the object receiving this message.
;			(if null, uses root directory of disk specified by
;			 disk handle; if relative, path is taken current to
;			 selector's current path)
;		bp - disk handle of path, or StandardPath constant
;			(if 0, will use object's current disk handle)
; Return:	carry set if path couldn't be set (was invalid):
; 			ax - error code (FileError)
; 		carry clear if path successfully set:
; 			ax - destroyed
;		cx, dx, bp - destroyed
;

MSG_GEN_PATH_GET			message
;
; Returns null-terminated complete path (no drive letter -- drive is
; determined by disk handle) for the object. Note that as for
; FileGetCurrentPath, if the object is within a standard directory, the
; disk handle will be a StandardPath constant and the path will appear
; to be relative.
;
; Context:	Utility message sent to get path bound to a generic object.
;		Most generic objects do not actually have a path, however.
;		For those that do, whether the path is for a directory or
;		a file depends on the object itself.
; Source:	Anyone
; Destination:	Gen object that's defined to have a path.
; Interception:	Generally not intercepted.  May be subclassed to replace or
;		supplement default functionality.  If replacing, don't need to
;		call superclass in handler.  If supplementing, call superclass
;		first to get the default return values and modify them or
;		do your processing first then call superclass to use default
;		return values.
;
; Pass:		dx:bp - address to which to copy. if dx is 0, the path is
;			copied to a block allocated on the global heap and
;			cx is ignored.
;		cx - size of buffer (may be zero)
; Return:	carry set if error (path won't fit in the passed buffer or is
;			invalid):
; 			ax - number of bytes required (0 => path is invalid)
;			cx - disk handle of path
;		carry clear if ok:
;			if dx:bp passed as far pointer:
;				dx:bp - filled with path (fptr preserved)
;			if dx 0:
;				dx - handle of block containing the path
;			cx - disk handle of path
;			ax - destroyed

MSG_GEN_PATH_GET_DISK_HANDLE		message
;
; Returns the disk handle for the path bound to the object. This is intended
; primarily for use from C, where multiple return values are a pain in the
; butt.
;
; Context:	Utility message sent to get path bound to a generic object.
;		Most generic objects do not actually have a path, however.
;		For those that do, whether the path is for a directory or
;		a file depends on the object itself.
; Source:	Anyone
; Destination:	Gen object that's defined to have a path.
; Interception:	Generally not intercepted.  May be subclassed to replace or
;		supplement default functionality.  If replacing, don't need to
;		call superclass in handler.  If supplementing, call superclass
;		first to get the default return values and modify them or
;		do your processing first then call superclass to use default
;		return values.
;
; Pass:		nothing
; Return:	cx	= disk handle of path (0 if path is invalid)

;MSG_META_GEN_PATH_RESTORE_DISK_PROMPT	message	MetaUIMessage
;
; see documentation in ui.def
;

GenPathDiskRestoreArgs	struct
    GPDRA_pathType	word		; vardata tag under which the path
					;  itself is stored
    GPDRA_savedDiskType	word		; vardata tag under which the disk
					;  handle is saved
    GPDRA_driveName	fptr.char	; drive name, null-terminated with
					;  a trailing ':'
    GPDRA_diskName	fptr.char	; disk name, null-terminated
    GPDRA_errorCode	DiskRestoreError; error code that will be returned to
					;  DiskRestore
GenPathDiskRestoreArgs	ends

;
; The following routines are more general-purpose than the above two messages,
; which work only with the predefined ATTR_GEN_PATH_DATA and
; TEMP_GEN_PATH_SAVED_DISK_HANDLE vardata types. These routines are intended to
; allow an object to have an arbitrary number of paths, if it so desires,
; each stored under its own vardata type.
; 
global		GenPathSetCurrentPathFromObjectPath:far
;
; Sets the thread's current path from the path stored under the passed vardata
; type.
;
; Context:	this is intended to be used internally to an object before it
;		performs whatever operation for which the saved path is intended
; Pass:		*ds:si - object
;		ax - vardata type under which the path is stored.
; 		dx - vardata type under which the disk handle might have
;		     been saved on shutdown.
; Return:	carry set if current path couldn't be set:
; 			ax - error code (FileError)
; 

global		GenPathSetObjectPath:far
;
; Sets the object's path stored under the passed vardata type.
;
; Context:	a utility routine for use by objects to record a path under
;		an arbitrary vardata tag.
; Pass:		*ds:si - object
;		es:di - path to set (may not be in same block as object)
;		ax - vardata type under which the path is stored.
;		dx - vardata type under which the disk handle should be saved
;		     for shutdown
;		bp - disk handle
; Return:	carry set if passed path is invalid:
; 			ax - error code
; 

global		GenPathGetObjectPath:far
;
; Sets the object's path stored under the passed vardata type.
;
; Context:	a utility routine for use by objects to fetch a path recorded
;		under an arbitrary vardata tag.
; Pass:		*ds:si - object
;		es:di - buffer in which to store the path. If es is 0, a
;			block will be allocated for the path and the handle
;			returned.
;		cx - number of bytes in the buffer.
;		ax - vardata type under which the path is stored.
;		dx - vardata type under which the disk handle should be saved
;		     for shutdown
; Return:	carry set if passed buffer is too small or path is invalid:
; 			ax - number of bytes required (0 => path invalid)
; 			cx - disk handle for path
; 		carry clear if ok:
; 			cx - disk handle for path
; 			es:di - filled, null-terminated buffer, unless es was
;				0
;			ax - handle of block containing the path, if es was 0
; 

global		GenPathConstructFullObjectPath:far
;
; Constructs a full path from the object's path stored under the passed vardata
; type. 
;
; Context:	because the kernel returns StandardPath constants and relative
;		path tails (and this is how paths are stored in a GenFilePath),
;		GenPathGetObjectPath will not always get you what you need:
;		a user-readable representation of the full path bound to the
;		object. This routine gives you that.
; Pass:		*ds:si - object
; 		ax - vardata type under which the path is stored
; 		dx - vardata type under which the disk handle is saved for
;		     shutdown
;		es:di - buffer in which to place constructed path
;		cx - size of this buffer
;		bp - non-zero to place drive specifier before the absolute
;		     path that's returned.
; Return:	carry set if whole path won't fit
;		carry clear if whole path in buffer:
;			es:di - points at null
;			bx - disk handle for path
; Destroyed:	ax, dx, bp
; 

global		GenPathUnrelocObjectPath:far
;
; Must be called when object receives MSG_META_UNRELOCATE so these routines know
; when they need to restore the saved disk handle. This implies any class
; using these routines must have a handler bound to the "reloc" message.
;
; Context:	a utility routine that must be called when an object receives
;		MSG_META_UNRELOCATE, once for each path the object is storing.
;		>>> THIS IS NOT PERFORMED BY GenClass BY DEFAULT. <<<
; Pass:		*ds:si - object
; 		ax - vardata type under which the path is stored
;		dx - vardata type under which the disk handle is saved for
;		     shutdown.
; Return:	nothing
; 

global		GenPathFetchDiskHandleAndDerefPath:far
;
; Make sure the disk handle for a bound path is valid and return both the
; handle and the base of the GenFilePath structure that holds the path.
;
; Context:	a utility routine for use by objects to fetch a path recorded
;		under an arbitrary vardata tag.
; Pass:		*ds:si - object
;		ax - vardata type under which the path is stored.
;		dx - vardata type under which the disk handle should be saved
;		     for shutdown
; Return:	ax	= disk handle (0 if needed to restore the disk but
;			  couldn't)
;		ds:bx	= GenFilePath
; 

MSG_GEN_FIND_OBJECT_WITH_TEXT_MONIKER		message
;
; Given some null-terminated text, will search through the generic tree
; below this object until it finds an object whose moniker that matches the 
; passed text.  Will make partial matches, i.e. if the passed text is not
; the complete moniker, the message will return the first moniker whose first
; characters match the text passed.
;
; Pass:		cx:dx -- null terminated text
;		bp    -- GenFindObjectWithMonikerFlags
; Return:	carry set if match found, with:
;			^lcx:dx -- optr of matching object
;		ax, bp - destroyed

GenFindObjectWithMonikerFlags	record
	GFOWMF_EXACT_MATCH:1
		;If set, text must match completely.  The passed text will not
		;match if it is only a subset of an object's moniker text.

	GFOWMF_SKIP_THIS_NODE:1
		;Skip this object, just check objects below it in the generic
		;tree.

	:14
GenFindTextMonikerFlags end

MSG_GEN_GROW_PARENTS				message
;
; Internal message to makes sure that this object's generic parent, & that
; obj's parent, all the way to the top, are specifically grown.  This is 
; required of the parents of any generic object before it itself may be
; specifically grown.  The handlers use this requirement as well, to optimize
; the effort:  If we run into one that is already grown, we may safely
; assume that they are grown all the way to the top.
;
; Pass:		nothing
; Return:	nothing

MSG_GEN_GUP_ENSURE_UPDATE_WINDOW		message
;
; Internal message generated from MSG_META_UPDATE_WINDOW handlers to ensure
; that windowed up the generic tree are specifically built, so that the window
; handling MSG_META_UPDATE_WINDOW can itself be updated.  Travels up generic
; tree as that is possibly the only linkage avaiable at the time of
; MSG_META_UPDATE_WINDOW.  This assumes that the generic tree is similar to the
; visible tree wrt to these windowed objects.
;
; Pass:		cx - UpdateWindowFlags
;		dl - VisUpdateMode
; Return:	carry set to stop gup
;		carry clear to continue up generic tree

MSG_GEN_GUP_FINISH_QUIT				message
;
; Message to be used by nodes that implement an GCN active list
; (MGCNLT_ACTIVE_LIST).  This is should be used if MSG_META_QUIT is handled
; and send to the active list items by that node.  When a node has finished
; sending MSG_META_QUIT to the active list or if the quit is aborted, this
; allows notifying the above node in the generic tree.
;
; Context:	Message for quit mechanism
; Source:	Sent by active list nodes that implement the quit mechanism
; Destination:	Any GenClass object involved in quit machanism
; Interception:	Generally not intercepted.  Default handler sends
;		MSG_META_FINISH_QUIT to self, then sends to generic parent if
;		flag indicates such.  MSG_META_FINISH_QUIT is normally the
;		message to intercept to know when a quit is aborted or finished.
; Pass:		cx - abort flag (non-zero if abort)
;			(passed on to MSG_META_FINISH_QUIT)
;		dx - TRUE to notify parent of finished quit sequence
; Return:	nothing

MSG_GEN_REMOVE					message
;
; Removes from this object from the generic tree.  Unlike MSG_GEN_REMOVE_CHILD,
; this message is sent to the child object, not the parent object.  Also, the
; object to be removed need not be NOT_USABLE, this message will set the object
; not usable and remove it.
;
; This method is guaranteed NOT to force the specific building of any object
;
; Context:	Utility message to remove generic child
; Source:	Anyone
; Destination:	Any GenClass object
; Interception: Generally not intercepted.  However, custom gadgets may
;		handle.  In this case, call superclass if supplementing
;		default functionality else no need to call superclass if
;		replacing default functionality.
;
; Pass:		dl - VisUpdateMode (VUM_MANUAL not allowed as documented
;			in MSG_GEN_SET_NOT_USABLE)
;		bp - mask CCF_MARK_DIRTY if we want to mark the links as dirty
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

MSG_GEN_DESTROY_AND_FREE_BLOCK		message
;
; Utility to destroy a generic branch which resides completely within
; one block.  The block is freed.  The object called with this message
; must be the only top object in the block.  Called by UserDestroyDialog.
; Implementation:  If any object within the block resides on the application
; active list, or the object is not a window, the slow, non-optimized
; approach is taken:  The branch is set NOT_USABLE(VUM NOW), removed from the
; generic tree, & sent MSG_META_BLOCK_FREE.
; If no object of the block can be found on this list, an optimized approach
; is taken:  The window is taken off the screen, FTVMC, mouse, etc
; exclusives released, the linkage changed to be one-way upward, & the
; block sent MSG_META_BLOCK_FREE.  In other words, the whole unbuild process
; is carefully avoided.
;
; Pass:		nothing
; Return:	carry - set if handled
;		ax, cx, dx, bp - destroyed


MSG_GEN_SET_KBD_OVERRIDE		message
;
; Message sent to force a window to provide or not provide a keyboard for
; text input.
;
; Pass:		cx - KeyboardOverride
; Return:	nothing
;		ax, cx, dx, bp - destroyed
;

KeyboardOverride	etype	word
	KO_NO_KEYBOARD		enum	KeyboardOverride
	; This forces the window to act as if none of the child objects
	; accept text input - no floating keyboard will be made available

	KO_KEYBOARD_REQUIRED	enum	KeyboardOverride
	; This forces the window to act as if a child object required text
	; input, so a floating keyboard will be brought on screen.

	KO_KEYBOARD_EMBEDDED	enum	KeyboardOverride
	; If this is present, it means that the application is providing an
	; keyboard directly inside the box - no floating keyboard is needed

MSG_GEN_SET_KBD_POSITION		message
;
; Message sent to set the position that the floating keyboard will move to
; when this window gets the focus.	
;
; Pass:		cx - x position
;		dx - y position
; Return:	nothing
; 		ax, cx, dx, bp - destroyed
;

protominor NewForJediAndBeyond

MSG_GEN_FIND_OBJECT_WITH_TEXT_MONIKER_C		message
;
; Given some null-terminated text, will search through the generic tree
; below this object until it finds an object whose moniker that matches the 
; passed text.  Will make partial matches, i.e. if the passed text is not
; the complete moniker, the message will return the first moniker whose first
; characters match the text passed.
;
; Pass:		cx:dx -- null terminated text
;		bp    -- GenFindObjectWithMonikerFlags
; Return:	carry set if match found, with:
;			^lcx:dx -- optr of matching object
;		carry clear otherwise
;			^lcx:dx -- NullOptr
;		ax, bp - destroyed

protoreset

protominor NewForOmniGo200

MSG_GEN_ROTATE_DISPLAY				message
;
; Sent to an object when the screen has been rotated from landscape to
; portrait or vice-versa.  Currently sent to GenPrimaries by the
; GenApplication when the screen rotates.
;
; Pass:		nothing
; Return:	nothing
; Destroyed:	nothing
;

protoreset


protominor UINewForFloatingKbd

MSG_GEN_TOGGLE_FLOATING_KBD			message
;
; May be sent to a windowed object to change the state of the floating
; keyboard.  If the floating keyboard is currently displayed for the
; windowed object, the floating keyboard will close.  If the floating
; keyboard is not currently displayed, it will open.  This can be sent from
; a "toggle keyboard" button like so:
;
; KbdButton = GenTrigger {
;	moniker = "KBD";
;	action = MSG_GEN_TOGGLE_FLOATING_KBD, "TO_APP_FOCUS";
; }
;
; Note that the windowed object must be associated with the floating keyboard
; by containing an editable object, or with ATTR_GEN_WINDOW_KBD_OVERRIDE.
; This also works for keyboards embedded with KO_KEYBOARD_EMBEDDED.
;
; Pass:		nothing
; Return:	nothing
;

protoreset

;------------------------------------------------------------------------------	
;				Hints
;------------------------------------------------------------------------------	

;	Hints for a GenClass object

HINT_DUMMY			vardata
			; Just what it says.  This hint will never do anything,
			; but could be useful for reserving space in a hints
			; chunk, to make it easier for apps to change a hint
			; (only possible while NOT_USABLE, mind you...)

;	Descriptive Hints:
HINT_FREQUENTLY_USED		vardata
HINT_INFREQUENTLY_USED		vardata
HINT_AN_ADVANCED_FEATURE	vardata
HINT_DEFAULT_DEFAULT_ACTION	vardata
			;this marks the button as being the default button
			;for this window. Pressing ENTER will trigger the
			;default button, even if the selection cursor is on
			;another trigger in the window. In OpenLook, also
			;used on settings.
			;NOTE:  This may be used for GenTriggers or dialog
			;GenInteractions activated by a specific-UI provided
			;trigger.
HINT_ENSURE_TEMPORARY_DEFAULT	vardata
			;this allows a gadget (such as a GenTrigger) to get
			;the temporary default exclusive when it has the FOCUS,
			;even in situations where the specific UI thinks not.
			;(Example: in Motif, a trigger that is in a summons
			;but not in the reply bar, would normally never get
			;the temporary default exclusive. This hint will ensure
			;that it will get the default exclusive.)
			;NOTE:  This is only supported by GenTriggers.

;	Command Hints:

HINT_SAME_CATEGORY_AS_PARENT	vardata	;use with GIV_POPUP GenInteraction to
					;prevent drawing of separators

HINT_SYS_MENU			vardata	;RESERVED for use by apps which
						;create fields, and want to
						;add Workspace and App menus.

HINT_USE_TEXT_MONIKER		vardata
HINT_USE_ICONIC_MONIKER		vardata

;	Command Hints for GenTextDisplay, GenText, GenView, GenDisplay,
;	GenPrimary, GenDisplayGroup classes:
HINT_DEFAULT_FOCUS		vardata

HINT_DEFAULT_TARGET		vardata

HINT_DEFAULT_MODEL		vardata


;	Command Hints for GenDisplay, GenPrimary, GenDisplayGroup classes:
HINT_PREVENT_DEFAULT_OVERRIDES	vardata	;prevents non-default triggers
						;from getting temp default excl.

HINT_PRESERVE_FOCUS		vardata	;when a window opens/gains focus
						;2nd time, ensures that focus
						;object in window is same as
						;before.

HINT_DO_NOT_PRESERVE_FOCUS	vardata	;when a window opens/gains focus
						;2nd time, forces focus to obj
						;which has HINT_DEFAULT_FOCUS
						;or to 1st object in navigation

HINT_GENERAL_CONSUMER_MODE	vardata	;Forces objects into GCM mode

	;If used to force a GenPrimary into General Consumer Mode,
	; supply the following byte value (GeneralComsumerModeFlags) as an
	; argument:

GCMIcon		etype	byte, 0
    GCMI_NONE		enum	GCMIcon
    GCMI_EXIT		enum	GCMIcon
    GCMI_HELP		enum	GCMIcon

GeneralConsumerModeFlags	record
    :2
    GCMF_LEFT_ICON GCMIcon:3	;indicates which icon to show on the left
				;side of the title bar.
    GCMF_RIGHT_ICON GCMIcon:3	;indicates which icon to show on the right
				;side of the title bar.
GeneralConsumerModeFlags	end
	

;	Command Hints for GenDisplay only:
HINT_NEVER_ADOPT_MENUS		vardata	;default is menus are adopted
HINT_ALWAYS_ADOPT_MENUS		vardata	;to GenPrimary as TARGET changes

;------------------------------------------------------------------------------

;
; Structures for HINT_FIXED_SIZE, HINT_MINIMUM_SIZE, HINT_MAXIMUM_SIZE and
; HINT_INITIAL_SIZE:
;
;
CompSizeHintArgs	struct
    CSHA_width		SpecWidth <>		;Width of the composite
    CSHA_height		SpecHeight <>		;Height of each child
    CSHA_count		sword			;# children of a composite
CompSizeHintArgs	ends
		
GadgetSizeHintArgs	struct
    GSHA_width		SpecWidth <>		;Width of the composite
    GSHA_height		SpecHeight <>		;Height of each child
GadgetSizeHintArgs	ends
		

;
; 	Geometry and moniker hints.
;
HINT_ALLOW_CHILDREN_TO_WRAP		vardata
	;Let children wrap if the generic composite is too long to fit its
	;children inside its generic parent, typically as a result of a user
	;resize, desired size specification by the programmer, or an effort
	;by the UI to keep a window fully onscreen.
	
HINT_BOTTOM_JUSTIFY_CHILDREN		vardata
	;Bottom justifies an object's children.  In a horizontal composite,
	;causes an objects children to line up their bottom edges.  In a 
	;vertical composite, this positions the children at the bottom of the
	;composite, usually in conjunction with HINT_EXPAND_HEIGHT_TO_FIT_
	;PARENT.
	
HINT_CENTER_CHILDREN_HORIZONTALLY	vardata
	;Centers a composite's children between the composite's left and right 
	;edges. Works for both vertical and horizontal composites.  In a 
	;horizontal composite, usually used in conjunction with HINT_EXPAND_
	;WIDTH_TO_FIT_PARENT.
	
HINT_CENTER_CHILDREN_ON_MONIKERS	vardata
	;A special centering hint for a vertical composite that contains two
	;or more GenLists or other groups of settings that have their monikers
	;placed on the left side.  Centers children so that right edges of its
	;children's monikers and left edges of its children's first children
	;line up vertically, i.e.:
	;
	;		Fonts:  Mono  Roman  Sans
	;	   Dimensions:  Small  Medium  Large
	;    Save on Shutdown:	Yes  No
	;
	
HINT_CENTER_CHILDREN_VERTICALLY		vardata
	;Centers a composite's children between the composite's top and bottom
	;edges. Works for both vertical and horizontal composites.  In a 
	;vertical composite, usually used in conjunction with HINT_EXPAND_
	;HEIGHT_TO_FIT_PARENT.
					
HINT_CENTER_MONIKER			vardata
	;Directs the UI to center the object's moniker, if applicable.  Often
	;used with GenInteractions in conjunction with HINT_PLACE_MONIKER_
	;ABOVE.  Also can be used in GenTriggers, GenItems, GenBooleans, and
	;GenGlyphs in conjunction with HINT_EXPAND_WIDTH_TO_FIT_PARENT.
	
HINT_CUSTOM_CHILD_SPACING		vardata	SpecSizeSpec
	;For composites, suggest a custom amount of spacing between children.
	;Takes one argument of type SpecSizeSpec.  For example, to have 1 pixel 
	;spacing between children:
	;
	;	HINT_CUSTOM_CHILD_SPACING {
	;		SST_PIXELS | 1
	;	}
	;	
	;To have zero length spacing:	
	;
	;	HINT_CUSTOM_CHILD_SPACING {
	;		SST_PIXELS | 0
	;	}
	;	
	;As with most hints, the specific UI reserves the right to ignore the
	;suggested spacing.
	;
	
HINT_DONT_ALLOW_CHILDREN_TO_WRAP	vardata
	;For objects that might wrap as default behavior, turns off the 
	;behavior so that composites must fit all their children on a single
	;line whether there is room or not.
					
HINT_DONT_FULL_JUSTIFY_CHILDREN		vardata
	;Turns off any full justification that may exist as default behavior
	;for this object.
					
HINT_DONT_INCLUDE_ENDS_IN_CHILD_SPACING	vardata
	;Turns off the use of ends in full justification that may exist as
	;default behavior.
	
HINT_DO_NOT_USE_MONIKER			vardata
	;Suggests that the object's moniker not be displayed, even if it exists.
	;May or may not be supported by a particular UI object, though is 
	;guaranteed to be supported for GenInteraction & GenText classes.
	
HINT_DRAW_IN_BOX			vardata
	;Suggests that the given composite have a border drawn around it, as
	;determined by the specific UI.
	
HINT_EXPAND_HEIGHT_TO_FIT_PARENT	vardata
	;Directs an object to, if possible, expand its height to fill up any	
	;vertical space available in its parent.  Most often used by vertical
	;composites when it is desirable to center, bottom justify, or full
	;justify its children in the available space.  Can also be used in
	;GenTextDisplays or GenTextEdits to expand the object to fill the 
	;available vertical space.
					
HINT_EXPAND_WIDTH_TO_FIT_PARENT		vardata
	;Directs an object to, if possible, expand its width to fill up any	
	;horizontal space available in its parent.  Often used by horizontal
	;composites when it is desirable to center, right justify, or full
	;justify its children in the available space.  Also can be used in
	;GenTriggers, GenListEntries, scrolling GenLists, GenTextDisplays,
	;GenTextEdits, or GenFileSelectors to expand the object to fill the
	;available horizontal space.
	
HINT_FIXED_SIZE				vardata	; XXX
	;Sets a fixed size for a composite or non-composite object.
	;This is most often used to allocate a pre-determined size for an
	;object or group of objects that would otherwise change size often 
	;while onscreen due to moniker changes, children removed or added, etc.
	;The advantage of keeping an object's size fixed is it prevents 
	;the recalculation and redrawing of windows that is required when 
	;various objects change size in the window
	;
	;For non-composites, requires a width argument of type SpecWidth,
	;and an optional height argument of type SpecHeight.  If either 
	;argument is zero, it is ignored. Composite objects require that a third
	;argument of type word also be included for the number of children to 
	;be included in in the composite's size calculations.   The SpecWidth
	;and SpecHeight attributes are either specified in terms of the size
	;of the objects moniker (or the sum of the children's monikers), or
	;a percentage of the size of the screen.
	;
	;For example, to force a GenTrigger to keep a width of 12 average 
	;width characters, you could specify:
	;
	;	HINT_FIXED_SIZE {
	;		SpecWidth <SST_AVG_CHAR_WIDTHS, 12>
	;		SpecHeight <>
	;	}
	;
	;To direct a horizontal GenInteraction to be sized so that the sum
	;of its 5 children's widths can be up to 55 maximum width characters
	;and still fit, you could specify:
	;
	;	HINT_FIXED_SIZE {
	;		SpecWidth <SST_WIDE_CHAR_WIDTHS, 55>
	;		SpecHeight <>
	;		word	5
	;	}
	;
	;Similarly, for a vertical composite to reserve room for 4 GenTriggers:
	;
	;	HINT_FIXED_SIZE {
	;		SpecWidth <>
	;		SpecHeight <SST_LINES_OF_TEXT, 4>
	;		word	4
	;	}
					
HINT_FULL_JUSTIFY_CHILDREN_HORIZONTALLY	vardata
	;Allows a horizontal composite to full justify its children.  Does
	;nothing in a vertical composite.  Nearly always used in conjunction
	;with HINT_EXPAND_WIDTH_TO_FIT_PARENT.
	
HINT_FULL_JUSTIFY_CHILDREN_VERTICALLY	vardata
	;Allows a vertical composite to full justify its children.  Does
	;nothing in a horizontal composite.  Nearly always used in conjunction
	;with HINT_EXPAND_HEIGHT_TO_FIT_PARENT.
	
HINT_INCLUDE_ENDS_IN_CHILD_SPACING	vardata
	;Always used in conjunction with one of the full justify hints.
	;Usually in full justification the available space is divided up and
	;put between the children only.  Adding this hint allows for space
	;to be added before the first child and after the last child as well.
	;Works for both horizontal and vertical composites.
					
HINT_INITIAL_SIZE			vardata	; XXX
	;Specifies an initial size for an object, usually only for when the
	;object appears for the first time, and then only if its possible
	;given other geometry requirements of the object's window.
	;This size will only keep in effect until the window is resized or
	;something else causes the object to be resized.  Arguments are the 
	;same as for HINT_FIXED_SIZE.
					
HINT_LEFT_JUSTIFY_CHILDREN		vardata
	;Left justifies an object's children.  In a vertical composite,
	;causes an objects children to line up their left edges.  In a 
	;horizontal composite, this positions the children towards the left 
	;edge of the composite.  This is typically the default justification of
	;a composite anyway.
					
HINT_LEFT_JUSTIFY_MONIKERS		vardata
	;Used in conjunction with HINT_CENTER_CHILDREN_ON_MONIKERS, allows
	;the children's left monikers to be left justified rather than the
	;default right justification.  An example:
	;
	;Center-on-monikers only:		With both hints:
	;	
	;         Spacing: 1 2 3 4		Spacing:          1 2 3 4
	;Forced Expanding: Yes No		Forced Expanding: Yes No
	;          Center: Vertically		Center:		  Vertically
	;	           Horizontally				  Horizontally
	;
	
HINT_MAKE_REPLY_BAR			vardata
	;Instructs the specific UI to use the appropriate geometry for a
	;reply bar.  Typically for GenInteractions at the bottom of dialog
	;boxes that have buttons like OK, Cancel, etc.
	;
	;NOTE: Normally, reply bars are created automatically by using
	;HINT_SEEK_REPLY_BAR on the object to be placed in the reply bar.
	;If your own reply bar is supplied with HINT_MAKE_REPLY_BAR, all
	;reply bar gadgets must be children of that reply bar.  You cannot
	;have children of the GenInteraction that use HINT_SEEK_REPLY_BAR to
	;place themselves in the reply bar and expect things to work completely
	;correctly (specifically there will be problems with setting your reply
	;bar not usable and usable).
	
HINT_MAXIMUM_SIZE			vardata	; XXX
	;Specifies a desired maximum size for an object.  Most useful for 
	;objects like GenView, GenTextDisplay, and GenText objects,
	;where it can be useful to assign a range of sizes for the 
	;object.  Arguments are the same as for HINT_FIXED_SIZE.
	
HINT_MINIMUM_SIZE			vardata	; XXX
	;Specifies a desired minimum size for an object.  Most useful for 
	;objects like GenView, GenTextDisplay, and GenText objects,
	;where it can be useful to assign a range of sizes for the 
	;object.  Arguments are the same as for HINT_FIXED_SIZE.
	
HINT_NO_TALLER_THAN_CHILDREN_REQUIRE	vardata
	;Designed to turn off any expand-height-to-fit-parent default behavior
	;in an object, if there is any.    The object will only be as high as
	;needed to hold the children, plus the margins.
					
HINT_NO_WIDER_THAN_CHILDREN_REQUIRE	vardata
	;Designed to turn off any expand-width-to-fit-parent default behavior
	;in an object, if there is any.  The object will only be as wide as 
	;needed to hold the children, plus the margins.
					
HINT_ORIENT_CHILDREN_HORIZONTALLY	vardata
	;Orients a composite's children horizontally.  Children are placed from
	;left to right.
	
HINT_ORIENT_CHILDREN_VERTICALLY		vardata
	;Orients a composite's children vertically.  Children are placed from
	;top to bottom.
	
HINT_PLACE_MONIKER_ABOVE		vardata
	;Directs the specific UI to place this object's moniker above the 
	;object's contents, if possible.  Used primarily with plain
	;GenInteractions.  
	
HINT_ALIGN_LEFT_MONIKER_EDGE_WITH_CHILD	vardata		
	;Can be used in tandem with HINT_PLACE_MONIKER_ABOVE to align the
	;the moniker's left edge with that of the first generic child of the
	;object.  This is default behavior in motif, and can be circumvented
	;with any of HINT_PLACE_MONIKER_TO_LEFT, HINT_PLACE_MONIKER_TO_RIGHT,
	;and HINT_CENTER_MONIKER.
	
HINT_PLACE_MONIKER_TO_LEFT		vardata
	;Directs the specific UI to place this object's moniker to the left of
	;the object's contents, if possible.  
	
HINT_PLACE_MONIKER_TO_RIGHT		vardata
	;Directs the specific UI to place this object's moniker to the right of
	;the object's contents, if possible.  
	
HINT_RIGHT_JUSTIFY_CHILDREN		vardata
	;Right justifies a composite's children.  Works for both vertical and 
	;horizontal composites.  In a horizontal composite, will position the 
	;children as close to the composite's right edge as possible, and is
	;almost always used in conjunction with HINT_EXPAND_WIDTH_TO_FIT_PARENT.
	;In a vertical composite, aligns the children's right edges.
	
HINT_TOP_JUSTIFY_CHILDREN		vardata
	;Top justifies an object's children.  In a horizontal composite,
	;causes an objects children to line up their top edges.  In a 
	;vertical composite, this positions the children towards the top
	;edge of the composite.  This is typically the default justification
	;of a composite, anyway.
	
HINT_WRAP_AFTER_CHILD_COUNT		vardata		word
	;When used with HINT_ALLOW_CHILDREN_TO_WRAP, directs a certain number
	;of initial children to go through before forcing the composite to wrap.
	;
	; An example:
	;	HINT_WRAP_AFTER_CHILD_COUNT {
	;		word	3
	;	}
	;	

HINT_DIVIDE_WIDTH_EQUALLY		vardata
	;Instructs a composite object to divide any space it gets for the width
	;equally among the usable children.  Can only suggest the size to the
	;children -- they will decide whether they can expand to fill the
	;suggested space.  Typical children that do well under this hint are
	;GenViews and generic objects that have HINT_EXPAND_WIDTH_TO_FIT_PARENT
	;set.    Has no effect if the composite is vertically oriented.

HINT_DIVIDE_HEIGHT_EQUALLY		vardata
	;Instructs a composite object to divide any space it gets for the height
	;equally among the usable children.  Can only suggest the size to the
	;children -- they will decide whether they can expand to fill the
	;suggested space.  Typical children that do well under this hint are
	;GenViews and generic objects that have HINT_EXPAND_HEIGHT_TO_FIT_PARENT
	;set.  Has no effect if the composite is horizontally oriented.


HINT_NO_BORDERS_ON_MONIKERS		vardata		
	;If available, borders will not be drawn around monikers.    This may
	;or may not be supported by the UI.  Typical use might be triggers with
	;non-rectangular bordered monikers in a custom application area, where
	;a trigger border might not be desired.   In general, this should be
	;used with care, even if the specific UI supports it.
	
TextColors	struc
	TC_unselectedColor	byte		
	TC_selectedColor	byte		
TextColors	ends

HINT_GADGET_TEXT_COLOR			vardata		TextColors
	;Color to be used for a text moniker in this object, if any
	;This is may or may not be supported by the specific UI.
	;It is most commonly used in toolboxes to have the
	;text color match the primary moniker color of other tools.
	;Though the selected color is usually the same as the unselected color,
	;they can be different, and both must be specified.

HINT_POPS_UP_TO_RIGHT			vardata
	;If this turns into some kind of object that pops up under its
	;activating gadget, have the object pop up to the right instead.

HINT_POPS_UP_BELOW				vardata
	;Like HINT_POPS_UP_TO_RIGHT, but directs the specific UI to have the
	;object pop up below its activation gadget, if possible.

;------------------------------------------------------------------------------

ATTR_GEN_PROPERTY			vardata
	;In a GenObject such as a GenItemGroup, GenValue or GenText, the object
	;will behave like it was in a properties dialog box even if it isn't.
	;It will not automatically apply itself and clear its modified state
	;when the user interacts with the object.   The application can
	;send a MSG_APPLY to it when needed, or query for information and
	;clear its modified state manually.  Note that this is uncommon usage,
	;and shouldn't usually be necessary for well behaved applications.

ATTR_GEN_NOT_PROPERTY			vardata
	;In a GenObject such as a GenItemGroup, GenValue or GenText, the object
	;will behave like it is not in a properties dialog box even if it is.
	;It will automatically apply itself and clear its modified state
	;when the user interacts with the object.   Note that this is uncommon 
	;usage, and shouldn't usually be necessary for well behaved 
	;applications.
					
;------------------------------------------------------------------------------
	
;	Command hints for GenTriggers - must be defined at this level
;	to prevent overlaps in the hint numbers.

HINT_SEEK_MENU_BAR		vardata
			;When finding the visible parent for a GenTrigger,
			;this forces the BUILD_INFO query to place the trigger
			;inside a menu bar, even if that is ugly in this UI.

HINT_AVOID_MENU_BAR		vardata
			;When finding the visible parent for a GenTrigger,
			;this prevents the BUILD_INFO query from placing the
			;trigger inside a menu bar, even if that is expected
			;in this specific UI.  It will typically go into some
			;kind of trigger bar instead.


;------------------------------------------------------------------------------
;		Keyboard Navigation Hints
;------------------------------------------------------------------------------

;These two hints allow the field navigation path within a window to make jumps
;between visible objects. You can also supply use these hints on GenInteractions
;which are used to group items within a window, in cases where the children
;can be traversed in visible order, but the parent is out-of-order with
;respect to the rest of the objects in the window. Also note that when
;creating a menu, summons, or command window for which a button will
;be created by the UI, place these hints on the window object. The hints
;given for a windowed object will only be used when navigating in a window
;which contains the button.

HINT_NAVIGATION_ID		vardata	word

	;Use this to specify a word ID value for an object. Example:
	;
	;	HINT_NAVIGATION_ID {
	;	    DefineNavID	MY_OBJECT_ID
	;	}
	;
	;"MY_OBJECT_ID" will be defined to a specific value, and placed inside
	;a define-word directive. This macro is smart enough to avoid conflicts
	;between specific UI and application ID numbers.

HINT_NAVIGATION_NEXT_ID		vardata	word

	;Use this to cause the navigation path to jump to the specified object.
	;Example:
	;
	;	HINT_NAVIGATION_NEXT_ID {
	;	    NavToID	SOME_OBJECT_ID
	;	}
	;
	;A fatal error will be generated if no object with such an ID exists
	;in the window. This is dangerous, because sometimes objects are
	;removed from windows. You can also use:
	;
	;	HINT_NAVIGATION_NEXT_ID {
	;	    NavToNearID SOME_OBJECT_ID
	;	}
	;
	;Which will cause navigation to proceed to the object in the window
	;which has the CLOSEST ID number that is equal or greater than the
	;specified value. If no such ID exists, the visible tree will be used.

;Application note: if you are defining a series of UI objects for a window,
;and want them to be in order in navigation, and each object might be
;arbitrarily removed and replaced, try to keep them as children of the same
;generic parent. This will (hopefully) make them children of the same visible
;parent, and you will not need to use these hints to set up the navigation path.
;The visible tree will be used, and object removals/add won't hurt anything.
;
;If your window is constructed such that these objects are out of order
;in a typical "depth-first" traversal of the visible tree, then you will
;have to use these hints to set up the navigation path to ensure that they
;are reached in order. If you make these links using "NavToID" in the
;hints, and an object is removed from the visible tree, you will get a fatal
;error since that ID cannot be found. The best thing you can do is to define
;these objects in the correct order, and in the same resource in the UI file.
;This will ensure that their ID numbers are increasing in value, and you can
;use the "NavToNearID" in each hints.. That way, if one object is removed,
;the next object take its place in the navigation path.
;
;If you are wierd and must define this objects is random order in the UI
;file, or they are in different resources,  you can still give them
;increasing ID numbers. Place this in your application's constants file:
;	AllocNavID	MY_FIRST_FLAKEY_OBJECT
;	AllocNavID	MY_SECOND_FLAKEY_OBJECT
;	AllocNavID	MY_THIRD_FLAKEY_OBJECT
;
;	And then just use these constants in the HINT_NAVIGATION_ID as follows:
;
;	HINT_NAVIGATION_ID {
;		dw MY_FIRST_FLAKEY_OBJECT
;	}
;Voila!

;These constants specify the valid ranges for ID numbers

NAVIGATION_ID_UI_START	= 0x0001
NAVIGATION_ID_APP_START	= 0x1000
NAVIGATION_ID_APP_END	= 0x7fff

;Define the enumerated types for navigation IDs:

SpecUINavigationID	etype	word, NAVIGATION_ID_UI_START
AppNavigationID	etype	word, NAVIGATION_ID_APP_START

;This mask is OR-ed in to an ID number which is given in HINT_NAVIGATION_ID
;to specify that the ID number serves as the start of a range.

NAVIGATION_ID_START_OF_RANGE	equ	0x8000

HINT_DISMISS_WHEN_DISABLED	vardata
;
; If set, dismisses the object when it ain't fully enabled no more.  A good
; idea for any independently displayable GenInteraction, unless it's the kind
; of thing that the user want to leave pinned in a certain place and not go
; away.
;
	
	
;
; Hints for children of views.  See genView.asm for more details on how to
; have non-scrollbar objects around your view window.
;
HINT_SEEK_X_SCROLLER_AREA	vardata
		;Generic object will try to get itself placed next to  the 
		;vertical scrollbar of its parent GenView.
HINT_SEEK_Y_SCROLLER_AREA	vardata
		;Generic object will try to get itself placed next to  the 
		;horizontal scrollbar of its parent GenView.
HINT_SEEK_LEFT_OF_VIEW		vardata
		;Generic object will try to get itself placed to the left of
		;its parent GenView.    This only works in post-2.1 systems,
		;though subclassing the view's MSG_VIS_POSITION_BRANCH
		;and positioning the view's children manually is a workaround
		;for pre-2.1 systems.
HINT_SEEK_TOP_OF_VIEW		vardata
		;Generic object will try to get itself placed over its
		;its parent GenView.    This only works in post-2.1 systems,
		;though subclassing the view's MSG_VIS_POSITION_BRANCH
		;and positioning the view's children manually is a workaround
		;for pre-2.1 systems.
HINT_SEEK_RIGHT_OF_VIEW		vardata
		;Generic object will try to get itself placed next to the right
		;of its parent GenView.  Note that this does not guarantee 
		;its placement with the vertical scrollbar, as the scrollbar
		;may be placed on either side by the specific UI.  To guarantee
		;placement with the vertical scrollbar, use HINT_SEEK_Y_SCROLLER
		;_AREA.
HINT_SEEK_BOTTOM_OF_VIEW	vardata
		;Generic object will try to get itself placed at the bottom
		;of its parent GenView.  Note that this does not guarantee 
		;its placement with the horizontal scrollbar, as the scrollbar
		;may be placed anywhere by the specific UI.  To guarantee
		;placement with the horizontal scrollbar, use HINT_SEEK_X_
		;SCROLLBAR_AREA.


HINT_GEN_UNUSED			vardata
;
; A placeholder. Not currently used.
;
  
;
; Various positioning and sizing hints for objects that become windows only
;  (things like independently-displayable GenInteractions, GenPrimarys, and
;   GenDisplays.)
;
HINT_USE_INITIAL_BOUNDS_WHEN_RESTORED		vardata
		;Window's bounds will be reset to their original values for 
		;when the window originally came up, rather than saving the
		;window's state and restoring it, as is usual.
	
HINT_KEEP_INITIALLY_ONSCREEN	vardata
		;The window's initial bounds will be adjusted, as necessary, to
		;fit entirely in its parent window.  Most windows should know 
		;how to come up entirely onscreen; however, this is not default
		;behavior in Motif for optimization reasons.
						
HINT_DONT_KEEP_INITIALLY_ONSCREEN	vardata
		;The window's initial size will not be adjusted to make it
		;fit entirely in its parent window.
						
HINT_KEEP_PARTIALLY_ONSCREEN			vardata
		;Window will be kept partially visible when the user moves it.
		;In motif this means part of the title bar will be kept
		;onscreen.
		
HINT_KEEP_ENTIRELY_ONSCREEN			vardata
		;Window will be kept entirely visible when the user moves it.
		
HINT_KEEP_ENTIRELY_ONSCREEN_WITH_MARGIN		vardata
		;Window will be kept entirely visible when the user moves it,
		;with some specific-UI designated margin around it as well.
		
HINT_DONT_KEEP_PARTIALLY_ONSCREEN		vardata
		;User can move the window anywhere onscreen, even if the window
		;becomes completely obscured under its parent.
		
HINT_POSITION_WINDOW_AT_RATIO_OF_PARENT		vardata	SpecWinSizePair
		;Window will be position relative to the origin of its parent
		;window, as a ratio of the parent's size.  For instance,
		;positioning the window at SS_PERCENT0 will cause it be in
		;the upper left corner of the parent window area.  
		;SS_PERCENT100 will position it at the bottom right corner.
		;(The parent window of most windowed objects is the screen.)
		;
		;Example, for putting window origin at center of parent window:
		;
		; HINT_POSITION_WINDOW_AT_RATIO_OF_PARENT {
	     	;      SpecWinSizePair < mask SWSS_RATIO or PCT_50, \
		;			 mask SWSS_RATIO or PCT_50>
		;
		;The first value is the x position, and the second is the y
		;position.
		
HINT_STAGGER_WINDOW				vardata
		;Stagger the window's position to the right and below the
		;last staggered window.
		
HINT_CENTER_WINDOW				vardata
		;Center the window in its parent window.
		
HINT_TILE_WINDOW				vardata
		;Tile the window.  In motif, this is not currently supported.
		
HINT_POSITION_WINDOW_AT_MOUSE			vardata
		;Position the window's origin at the current position of the 
		;mouse.
		
HINT_EXTEND_WINDOW_TO_BOTTOM_RIGHT		vardata
		;Extend the window's bounds so its lower right corner extends
		;to the bottom right corner of its parent window.
		
HINT_EXTEND_WINDOW_NEAR_BOTTOM_RIGHT		vardata
		;Extend the window's bounds so its lower right corner extends
		;near the bottom right corner of its parent window, leaving
		;room for any icon area that might be present.  Most major
		;application's primary's will utilize this.
		
HINT_SIZE_WINDOW_AS_DESIRED			vardata
		;Let the window size itself according to the sizes of its
		;children.
		
HINT_SIZE_WINDOW_AS_RATIO_OF_PARENT		vardata	SpecWinSizePair
		;Let the window size itself to be a certain percentage of
		;its parent's window's size. (The parent window for most dialogs
		;is the field.)
		;
		;Example, for making the window half the size of its parent
		;window:
		;
		; HINT_SIZE_WINDOW_AS_RATIO_OF_PARENT {
	     	;      SpecWinSizePair < mask SWSS_RATIO or PCT_50, \
		;			 mask SWSS_RATIO or PCT_50>
		;
		;The first value is the height, second is the width.
		;
		
HINT_SIZE_WINDOW_AS_RATIO_OF_FIELD		vardata	SpecWinSizePair
		;Let the window size itself to be a certain percentage of
		;the field's size.
		;
		;Example, for making the window half the size of the field:
		;
		; HINT_SIZE_WINDOW_AS_RATIO_OF_FIELD {
	     	;      SpecWinSizePair < mask SWSS_RATIO or PCT_50, \
		;			 mask SWSS_RATIO or PCT_50>
		;
		;The first value is the height, second is the width.
		;

	
	
HINT_POSITION_ICON_AS_RATIO_OF_FIELD		vardata
		;Not currently used.
					

DestinationClassArgs	struct
	DCA_class	fptr.ClassStruct
DestinationClassArgs	ends

ATTR_GEN_DESTINATION_CLASS				vardata	DestinationClassArgs
		; Used to declare the object class required to handle messages
		; sent out by this object.  Used in conjunction with output
		; specification by object reference, to ensure that messages
		; are never delivered to a class that can't handle them.
		;
		; Sample Code/Programming Tips
		; ----------------------------
		; An "18 point" GenTrigger could be set up in the following
		; declaration, which when activated, would set any target
		; text object selection to 18 point:
		;
		;	action = MSG_VIS_TEXT_SET_POINT_SIZE, "TO_APP_TARGET";
		;	hints = {
		;		ATTR_GEN_TRIGGER_ACTION_DATA {
		;			word	VIS_TEXT_CHANGE_SELECTION
		;			word	0
		;			word	18
		;			word	0
		;		},
		;		ATTR_GEN_DESTINATION_CLASS {
		;			UN_DD	VisTextClass
		;		}
		;	}
		;
		; IMPORTANT!
		; If you have an ATTR_GEN_DESTINATION_CLASS as part of an object
		; definition in a .UI file, you MUST use vardataReloc after
        	; defining the class of the object. For example:
;
; MyPageSetupControl = PageSetupControl vardataReloc {
;        PAGE_SETUP_CONTROL_VALUES
;        output = "TO_APP_MODEL";
;        hints = {
;                ATTR_GEN_DESTINATION_CLASS { UN_DD MyDocumentClass },
;                HINT_PRINT_MENU,
;                HINT_SAME_CATEGORY_AS_PARENT
;        }
;}
		; Failure to do so will cause the expected message reporting
		; changes to never arrive at the object with the desired
		; destination class. Let's be careful out there :)


HINT_INITIATED					vardata
; Internal!   Used by specific UI to note whether a window was on-screen or
; not at the time of detach, so that it knows whether or not it should be
; put up on re-attach.  Will likely be extended to include window location
; information (i.e. take the place of current info being stored on active list)

;
;	Attributes used in geos.ini file stuff
;
ATTR_GEN_INIT_FILE_KEY		vardata	char
;
; Key to use for this object
;
ATTR_GEN_INIT_FILE_CATEGORY	vardata	char
;
; Category to use for saving the options for this & all objects down the generic
; tree before a new category is specified.  UserGetInitFileCategory, as long
; as AOF_MULTIPLE_INIT_FILE_CATEGORIES=TRUE (in the app obj), or if 
; ATTR_GEN_USES_HIERARCHICAL_INIT_FILE_CATEGORY is set on the starting
; object, will call MSG_META_GET_INI_FILE_CATEGORY on the object itelf to get
; the category to use.  MSG_META_GET_INI_FILE_CATEGORY has a default
; handler that recurses up the generic tree looking for the first
; ATTR_GEN_INIT_FILE_CATEGORY.  If neither of the previous mentioned tests
; are met, then the application object is called directly to get the
; category to use.
; See also ATTR_GEN_USES_HIERARCHICAL_INIT_FILE_CATEGORY,
;
ATTR_GEN_INIT_FILE_PROPAGATE_TO_CHILDREN	vardata
;
; Attribute that tells a generic object to pass the MSG_GEN_LOAD_OPTIONS &
; MSG_GEN_SAVE_OPTIONS onto its children
;

ATTR_GEN_FEATURE_LINK		vardata lptr
;
; This attribute is used with the GenControl mechanism to allow controllers
; to have "features" that map to multiple objects.  The data is the next
; object that is part of the same feature.


HINT_TOOLBOX				vardata
; For GenInteractions, GenPrimaries, GenLists, or GenDisplays.
; Suggests that the object and all objects in the visual hierarchy below it 
; are part of a "toolbox," and should draw themselves appropriately.  
; In Motif, windowed objects with HINT_TOOLBOX will act like pinned menus in
; that when clicked upon, they won't steal the focus away from the window that 
; has it.
  
; These should be moved into geometry section...
  
HINT_SAME_ORIENTATION_AS_PARENT		vardata
; For objects with generic children, directs it to initially take the same 
; orientation of its children that its visual parent has, if possible.


; new Hints (move before installing)

HINT_SEEK_REPLY_BAR			vardata
	; This indicates that this object (usually GenTrigger) is a reply bar
	; trigger.
	;
	; Motif will place the trigger in the reply bar of the first
	; non-GIT_ORGANIZATIONAL GenInteraction that is a window (either a
	; GIV_DIALOG or a GIV_CONTROL_GROUP that becomes a dialog).
	;
	; When finding the visible parent for a GenTrigger or group,
	; this forces the BUILD_INFO query to place the trigger
	; in the parent interaction's reply bar

ATTR_GEN_WINDOW_CUSTOM_LAYER_ID		vardata	hptr
; This allows windowed objects to set their LayerID to something other than
; the LayerID of the rest of the application.  NULL may be stored here to
; indicate that the handle of the blcok that the object lies in should be
; used as the LayerID.  LayerID's are used by the window system to uniquely
; identify different layers.   Though their actual value has no meaning, the
; convention is to handles owned by the application, to avoid collisions with
; LayerID's being used by other apps.  To use this attribute in UIC, you'll
; need code that looks like:
;
; MyObj = GenInteraction vardataReloc {
;        <<< other stuff here >>>
;        hints = {
;                ATTR_GEN_WINDOW_CUSTOM_LAYER_ID { UN_HPTR MyResource }
;        }
; }


HINT_SHOW_SHORTCUT			vardata
; This indicates that the keyboard accelerator, if any, for this generic object
; should be drawn if it otherwise wouldn't be drawn (i.e. not in a menu).
; Note that if running in keyboard-only mode, shortcuts will always be drawn
; and if running in no-keyboard mode, shortcuts will never be drawn.  This
; hint is overridden by those modes.  Specifically, HINT_SHOW_SHORTCUT in
; no-keyboard mode will *not* draw the shortcut.

HINT_DRAW_SHORTCUT_BELOW		vardata
; This indicates that the keyboard accelerator, if any is drawn, should be
; drawn below the normal moniker, instead of to the right.  This does not
; override the menu item behavior of drawing any keyboard accelerator to the
; right.
  
HINT_CAN_CLIP_MONIKER_WIDTH		vardata
HINT_CAN_CLIP_MONIKER_HEIGHT		vardata
; Allows objects to clip their monikers if not enough space is provided for
; them.  When used with HINT_EXPAND_WIDTH/HEIGHT_TO_FIT, allows solid color or
; repeating glyphs to be used as resizable separators, etc.  Currently 
; implemented for the GenGlyph, GenTrigger, GenItem, and GenBoolean.

 
HINT_SHOW_ENTIRE_MONIKER		vardata
; Forces an object to leave enough space to show all its moniker, in case by
; by default an object allows this.



;  
; Advanced hints that will cause a generic object to override its geometry
; manager-chosen position and be positioned elsewhere.  These are should
; generally not be used, especially if you're not clear about what you are
; doing.   It is illegal for children's bounds to be outside their parent's,
; so be certain that you know who your object's visual parent will be in all
; specific UI's, and that the parent will always be large enough (via HINT_-
; MINIMUM_SIZE) to fit the children.
;
ATTR_GEN_POSITION				vardata		Point
ATTR_GEN_POSITION_X				vardata		sword
ATTR_GEN_POSITION_Y				vardata		sword
;
; Positions an object at a certain offset from the visual parent's upper
; left corner.
;
; Examples:
;	ATTR_GEN_POSITION {
;		word 	10, 20
;	}
;	ATTR_GEN_POSITION_X {
;		word	10
;	}
;
HINT_ALIGN_LEFT_EDGE_WITH_OBJECT	vardata		optr
HINT_ALIGN_TOP_EDGE_WITH_OBJECT		vardata		optr
HINT_ALIGN_RIGHT_EDGE_WITH_OBJECT	vardata		optr
HINT_ALIGN_BOTTOM_EDGE_WITH_OBJECT	vardata		optr
;
; Allows an object to line up its bounds to match another object.  The
; other object does not have to be a direct sibling, but the result must
; not cause the object to stray outside its parent's bounds.

;	ATTR_ALIGN_LEFT_EDGE_WITH_OBJECT {
;		word	handle MyObject
;		word	offset MyObject
;	}
;

HINT_DONT_SHOW_SHORTCUT		vardata
; This indicates that the keyboard accelerator, if any, for this generic object
; should not be drawn if it otherwise would be.  This *will* override the
; forced drawing of shortcuts in keyboard-only mode.


ATTR_GEN_SEND_APPLY_MSG_ON_APPLY_EVEN_IF_NOT_MODIFIED	vardata
;
;	For GenBooleanGroups, GenItemGroups, GenRanges, and possibly GenTexts.
;	If set, apply message will be sent out on MSG_APPLY regardless of
;	whether the gadget had been modified.   Usually gadgets will only send
; 	out notification of an apply if their value had been modified.
;

ATTR_GEN_SEND_APPLY_MSG_ON_APPLY_EVEN_IF_NOT_ENABLED	vardata
;
;	For GenBooleanGroups, GenItemGroups, GenRanges, and possibly GenTexts.
;	If set, apply message will be sent out on MSG_APPLY regardless of
;	whether the gadget is GS_ENABLED.  Normally disabled gadgets will
;	not send out an apply message.  (Needed?)


;	Attributes for Gen visibility mechanism

; The Gen visibility mechanism provides a way of knowing when an object
; becomes visible and not visible.  An object takes advanyage of this
; mechanism by setting the GA_NOTIFY_VISIBILITY attribute.
;
; By default the obejct sends out MSG_GEN_APPLICATION_VISIBILITY_NOTIFICATION to
; the application object, passing the optr of the object.  This can be
; overridden by using the attr's below.  The message sent out is sent with:
;	cx:dx - data (default is object's optr)
;	bp - non-zero if open, zero if close
;
; This mechanism supports the following classes:
;	GenText, GenItemGroup, GenBooleanGroup, GenTrigger, GenRange,
;	GenGlyphDisplay

ATTR_GEN_VISIBILITY_DATA	vardata	dword
;
; Specifies the data to be sent out (in cx:dx) with the message described above

ATTR_GEN_VISIBILITY_MESSAGE	vardata	word
;
; Specifies the message to be sent out in the visibility notification
; described above

ATTR_GEN_VISIBILITY_DESTINATION	vardata	optr
;
; Specifies the destination to be sent to in the visibility notification
; described above

HINT_IS_POPUP_LIST	vardata
;
; A (currently) internal hint which allows triggers that activate popups
; to be placed visually under their generic parent, rather than in a menu bar
; or trigger bar as most specific UI's will do.  See: HINT_SEEK_MENU_BAR,
; HINT_AVOID_MENU_BAR.
;

HINT_MINIMIZE_CHILD_SPACING	vardata
;
; Ensures a minimal amount of spacing.  Usually objects will be set with their
; outer lines touching.  In some black-and-white systems, the outer lines may
; be made to overlap.

BackgroundColors	struc
	BC_unselectedColor1	Color	;the two colors to use when unselected
	BC_unselectedColor2	Color
	BC_selectedColor1	Color	;the two colors to use when selected
	BC_selectedColor2	Color
BackgroundColors	ends

HINT_GADGET_BACKGROUND_COLORS			vardata	BackgroundColors
	; For GenInteractions, GenItemGroups, or GenBooleanGroups in toolboxes,
	; causes all gadgets below the interaction to draw a custom background 
	; color.  Only effective in objects with HINT_TOOLBOX set or underneath
	; an object with HINT_TOOLBOX set.  Two colors can be chosen for both
	; the unselected color and selected color -- they will be blended 
	; together.  To get a solid color, set both colors the same.
	;
	; Multiple BackgroundColors structures can be stored with this hint
	; to specify the extra background colors for gadgets that
	; support independent background colors for multiple elements
	; of the gadget. Odie is the first spui to support multiple
	; BackgroundColors structures for certain gadgets.
	;

ATTR_GEN_WINDOW_CUSTOM_WINDOW_PRIORITY		vardata	WinPriority
;
; This allows windowed objects to set a custom window priority.
;

ATTR_GEN_WINDOW_CUSTOM_LAYER_PRIORITY		vardata	LayerPriority
;
; This allows windowed objects to set a custom layer priority.  Note that
; ALL windows within a given layer MUST have the same layer priority, so
; this function must be used with care.  Is safest to use with 
; ATTR_GEN_WINDOW_CUSTOM_LAYER_ID.
;

ATTR_GEN_WINDOW_CUSTOM_PARENT			vardata hptr.Window
; 
; This allows windowed objects to set a custom parent window.  NULL may be
; passed to indicate that the system screen window should be the parent, which
; if combined with a layer priority above standard will cause the window to
; appear on top of all apps, & in fact, all field windows.
;

GenSaveWindowInfo	struct
	GSWI_winPosition	SpecWinSizePair
	GSWI_winSize		SpecWinSizePair
	GSWI_winPosSizeState	word
GenSaveWindowInfo	ends

TEMP_GEN_SAVE_WINDOW_INFO	vardata	GenSaveWindowInfo
TEMP_GEN_SAVE_ICON_INFO		vardata	GenSaveWindowInfo
;
; Internal data type to save size and position information for windows and
; iconified windows across shutdown.
;
; This must be declared here in GenClass to ensure that it doesn't get freed
; on detach.

ATTR_GEN_WINDOW_CUSTOM_WINDOW			vardata
;
; This allow creation of customs windows - removes all standard window
; gadetry, including: Title bar, window menu, resize gadgetry.
;

HINT_ORIENT_CHILDREN_ALONG_LARGER_DIMENSION	vardata
;
; This is used to allow the specific UI to orient the children of this object
; along the larger screen dimension -- horizontally if the screen is wider than
; tall or vertically if the screen is taller than wide.
;

HINT_PLACE_MONIKER_ALONG_LARGER_DIMENSION	vardata
;
; This is used to allow the specific UI to place the moniker of this object
; along the larger screen dimension -- to the left if the screen is wider than
; tall or above if the screen is taller than wide.
;

HINT_WRAP_AFTER_CHILD_COUNT_IF_VERTICAL_SCREEN	vardata
;
; This is used like HINT_WRAP_AFTER_CHILD_COUNT, but only takes effect on
; screens that are taller than wide.
;

HINT_NOT_MOVABLE				vardata
;
; This is used to make a window non-movable.
;

HINT_SEEK_TITLE_BAR_LEFT			vardata
HINT_SEEK_TITLE_BAR_RIGHT			vardata
;
; This indicates that this object (usually GenTrigger or GenInteraction
; containing other gadgets) is a title bar gadget and should be placed in the
; left or right part of the title bar.  An object having this hint should be
; able to fit in the title bar area.  Normally this would be 'tool' icons
; whose monikers are 15 pixels or 10 pixels high, depending on video mode.
; An attempt is made to vertically center smaller monikers, so they may be
; used as well.  For each window, only one child GenTrigger or GenInteraction
; may have this hint.  The object with this hint must be a direct generic child
; of the window object.  Objects may be removed or added dynamically by setting
; then usable or not usable.
;

GenDefaultMonikerType	etype	word
GDMT_LEVEL_0		enum	GenDefaultMonikerType
GDMT_LEVEL_1		enum	GenDefaultMonikerType
GDMT_LEVEL_2		enum	GenDefaultMonikerType
GDMT_LEVEL_3		enum	GenDefaultMonikerType
;
; monikers used for various levels in the Set User Level dialog box.
;
GDMT_HELP		enum	GenDefaultMonikerType
;
; moniker used for Help triggers in dialog boxes, etc.
;
GDMT_HELP_PRIMARY	enum	GenDefaultMonikerType
;
; moniker used for Help triggers in the title bar of the primary.
;

ATTR_GEN_DEFAULT_MONIKER			vardata GenDefaultMonikerType
;
; This attributes indicates that the object has a default moniker.  This
; is generally used for gstring monikers that occur several places in the
; system.

ATTR_GEN_HELP_FILE				vardata	char
;
; Help file for this object.  If this is not present then GenClass
; queries up the tree.
; eg:
;	ATTR_GEN_HELP_FILE {
;		char "GeoCalc Help", 0
;	}
;

ATTR_GEN_HELP_TYPE				vardata byte
;
; Help type for this object.  If this is not present then GenClass
; queries up the tree.
;

ATTR_GEN_HELP_FILE_FROM_INIT_FILE		vardata
;
; If present, the help file for this object is obtained by getting the
; category for this object (ATTR_GEN_INIT_FILE_CATEGORY) with the key
; "helpfile".
;

ATTR_GEN_FOCUS_HELP				vardata optr
;
; Focus help for this object.  If present, this object will send a help
; notification with the supplied text when it gains the focus.
; NOTE: You do not need to set vardataReloc for the object (unless other
; vardata requires it) -- it is done automatically.
; NOTE: This is for use in applications.  Libraries exporting objects
; such as controllers should use ATTR_GEN_FOCUS_HELP_LIB.
;

ATTR_GEN_FOCUS_HELP_LIB				vardata optr
;
; Similar to ATTR_GEN_FOCUS_HELP, but for objects exported from a library
; such as a controller.
; NOTE: You must set vardataReloc on the object this is defined for.
; NOTE: This is for use in libraries.  Apps should use ATTR_GEN_FOCUS_HELP.
;

HINT_UNUSED_G					vardata

ATTR_GEN_HELP_CONTEXT				vardata	char
;
; Specifies the help context for this object.
; eg:
;	ATTR_GEN_HELP_CONTEXT {
;		char "fonts", 0
;	}
; Usually placed on a windowed GenInteraction, although it doesn't have to be.
;

HINT_WINDOW_NO_CONSTRAINTS			vardata
;
; Remove all constraints upon the positioning of a window. Use this
; as your "last gasp" hint in trying to position the window where
; you want it.
;

ATTR_GEN_OUTPUT_TRAVEL_START			vardata optr
;
; Specifies the object to which MSG_META_SEND_CLASSED_EVENT should be sent by
; MSG_GEN_OUTPUT_ACTION if the output optr is actually a TravelOption. The
; default is to send MSG_META_SEND_CLASSED_EVENT to the object itself.
;
; NOTE: You must set vardataReloc on the object for which this is defined, and
; use the UN_OPTR (or I_OPTR) macro to initialize this vardata, if you
; define it in UIC.
;

HINT_CUSTOM_CHILD_SPACING_IF_LIMITED_SPACE	vardata	SpecSizeSpec
;
; A directive to adjust child spacing if there is limited space in that
; direction.    This may or may not be helpful, as often the specific UI
; will have minimum spacing already in effect.   It takes one word of
; type SpecSizeSpec.
;

HINT_WINDOW_NO_TITLE_BAR			vardata
;
; This is used on a window (GIV_DIALOG GenInteraction, GenPrimary, GenDisplay)
; to remove its title bar.  This must be used with care, as much of specific
; UIs window functionality will not be accessible if there is no title bar.
;

HINT_WINDOW_NO_SYS_MENU				vardata
;
; This is used on a window (GIV_DIALOG GenInteraction, GenPrimary, GenDisplay)
; to remove its system menu (or close button).
;


ATTR_GEN_USES_HIERARCHICAL_INIT_FILE_CATEGORY	vardata
;
; If present, forces ues of recursive INIT_FILE_CATEGORY search for this
; object, regardless of the state of AOF_MULTIPLE_INIT_FILE_CATEGORIES. 
; Used to deal with problem of ATTR_GEN_INIT_FILE_CATEGORY usage in object
; branches created by controllers, i.e. in cases where the application itself
; is not using hierarchical init file categories, & so from its perspective
; has only a single category.
;
; If you are writing a controller intended to be used in many
; applications, for instance, & you use ATTR_GEN_INIT_FILE_CATEGORY
; internally in your created tree, you should set 
; ATTR_GEN_USES_HIERARCHICAL_INIT_FILE_CATEGORY on each object having
; options, so that UserGetInitFileCategory will return the correct,
; recursively generated category.


ATTR_GEN_WINDOW_ACCEPT_INK_EVEN_IF_NOT_FOCUSED	vardata
;
; If this vardata is present, this means that the object (if built out to a
; window) should accept ink even if it doesn't have the focus.
;


SystemAttrs	record
	SA_NOT:1		;Any following set bits must be OFF for hints
				;to be included, rather than on.
	SA_TINY:1		;If set, screen must be either horizontally or
				;vertically tiny for hints to be included.
	SA_HORIZONTALLY_TINY:1	;If set, screen must be horizontally tiny for
				;hints to be included.
	SA_VERTICALLY_TINY:1	;If set, screen must be vertically tiny for
				;hints to be included.
	SA_COLOR:1		;If set, must be a color screen for hints to
				;be included.
	SA_PEN_BASED:1		;If set, system must be pen based for hints
				;to be included.
	SA_KEYBOARD_ONLY:1	;If set, system must be set keyboard-only for
				;hints to be included.
	SA_NO_KEYBOARD:1	;If set, system must be set no-keyboard for
				;hints to be included.
	SA_PORTRAIT:1		;If set, system screen must have a portrait
				;orientation (width <= height) for
				;hints to be included.
	:7
SystemAttrs	end



HINT_IF_SYSTEM_ATTRS 	vardata		SystemAttrs
;
; Can be used to conditionally add hint(s) to an object based on certain system
; criteria.  If the flags set in the hint's data are true for the current system
; being run, then the hint or hints that follow are included; otherwise they 
; are deleted for space reasons.   In the absence of a HINT_ENDIF, only the
; succeeding hint is affected.   See HINT_ENDIF for having groups of hints
; included based on system conditions, and HINT_ELSE for alternative hints
; to be included when the conditions are not met.  An example:
;
;	HINT_IF_SYSTEM_ATTRS = SA_NOT | SA_PEN_BASED;
;		HINT_EXPAND_HEIGHT_TO_FIT_PARENT;
;
; Expands an object's height if the system is NOT pen based.
;

HINT_ENDIF		vardata
;
; Can be used with HINT_IF_SYSTEM_ATTRS to group any number of hints to be
; included if the HINT_IF_SYSTEM_ATTRS' condition is satisfied, or deleted
; otherwise.  An example:
;
;	HINT_IF_SYSTEM_ATTRS = SA_TINY;
;		HINT_MINIMIZE_SIZE;
;		HINT_DISPLAY_CURRENT_SELECTION;
;	HINT_ENDIF;
;
; The two hints between HINT_IF_SYSTEM_ATTRS and HINT_ENDIF will both be 
; removed if the screen is not horizontally or vertically tiny.
;

HINT_ELSE		vardata
;	
; Can be used between HINT_IF_SYSTEM_ATTRS and HINT_ENDIF to allow hints
; that can be included when system conditions are satisfied, and a separate set
; of hints to be included when the system conditions are not satisfied.  For
; example:
;
;	HINT_IF_SYSTEM_ATTRS = SA_HORIZONTALLY_TINY;
;		HINT_ORIENT_CHILDREN_VERTICALLY;
;		HINT_WRAP_AFTER_CHILD_COUNT = 3;
;	HINT_ELSE;
;		HINT_ORIENT_CHILDREN_HORIZONTALLY;
;	HINT_ENDIF;
;
; Which will cause an object to orient vertically and wrap every three 
; children if the screen is horizontally tiny, and orient children horizontally
; otherwise.
;

TEMP_GEN_EMC_PANEL_ITEM_PRIORITY	vardata	word
;
; Internal hint used on items added to the ControlPanel and UtilitiesPanel
; portions of an ExpressMenuControl object.
;

ATTR_GEN_WINDOW_KBD_OVERRIDE		vardata	KeyboardOverride
;
; This attribute is used when the application wants to override the default
; behavior w.r.t. whether or not to provide a floating keyboard for a given
; window. Can also be set via MSG_GEN_SET_KBD_OVERRIDE.
;
; NOTE: If you will have GenDisplays in your app, here are descriptions of how
;	to force various commonly desired effects:
;
;	1) I want a keyboard to be visible only when there is an open
;      	   GenDisplay (this is usually what apps that use the displays to
;	   hold open documents will want).
;
;	   If this is the case, set KO_KEYBOARD_REQUIRED on all GenDisplays
;	   (or KO_KEYBOARD_EMBEDDED on any displays that have embedded
;	   keyboards). 
;
;
;	2) I want a keyboard visible only on certain displays.
;	   (America Online-type app)
;	   
;	   Set the KeyboardOverride enumerated type appropriate to each
;	   display on the display itself. When the last display has closed,
;	   the floating keyboard will come off-screen.
;	   
;	3) I always want a keyboard visible, even if there are no GenDisplays
;	   open.
;
;	   Set KO_KEYBOARD_REQUIRED on the GenPrimary, and add KO_NO_KEYBOARD
;	   on all the GenDisplays before they come on screen
;
;	4) I want to embed a keyboard on my primary, and never allow a floating
;	   keyboard.
;
;	   Set KO_KEYBOARD_EMBEDDED on the GenPrimary, and add KO_NO_KEYBOARD
;	   on all the GenDisplays
;

ATTR_GEN_WINDOW_KBD_POSITION		vardata	Point
;
; Hint used by applications to specify the default position of the floating
; keyboard. When the user moves the keyboard, this data is updated to reflect
; its current position, and the keyboard is moved to that position when the
; window gets the focus.
;

HINT_WINDOW_MINIMIZE_TITLE_BAR			vardata
;
; This is used on a window (GIV_DIALOG GenInteraction, GenPrimary, GenDisplay)
; to minimize its title bar if possible.  If supported, this will remove the
; specific UI functionality usually in the title bar, as well as not display
; the window's moniker.  Should not have children that seek the title bar.
;
;			*** NOTE ***
; Because this gets rid of the system menu, the window will need to have some
; other means of dismissing itself.
; Also, when a dialog that has no system menu gets disabled the UI will dismiss
; it, so be aware that if this hint is on a dialog disabling it will take it
; off the screen.
;

HINT_WINDOW_ALWAYS_DRAW_WITH_FOCUS		vardata
;
; If supported, this hint will make the window draw the title bar as if the
; window always has the focus.  This should be used sparingly and with care
; as it may confuse the user as to which window has the focus.
;

protoreset

protominor UINewForResponder

HINT_DRAW_SHADOW				vardata
; Not generally available in current specific UIs, directs an object
; (including a GenInteraction with HINT_DRAW_IN_BOX) to draw the object shadowed
; if possible.
;

; Hmm, what about trunk Jedi for the next one?   It seems like all of the
; new-for-Jedi things should have a "protominor" for Jedi.

HINT_SEEK_SLOT					vardata word
;
; If supported, this hint will cause an object to be placed in the
; requested "slot" in its parent.  For example, the menu bar might
; be divided into slots that the children can ask to be in, and some
; slots might be left blank, resulting in "holes" in the menu bar.
; Not generally available in current specific UIs.
;

HINT_INDENT_CHILDREN				vardata	word
;
; If supported, this hint will allow children to be indented under the
; interaction by some fixed amount designated by the specific UI, if
; no argument is given, or if zero is given.   If a non-zero word argument is 
; given, it will be used if possible, for example:
;
;		HINT_INDENT_CHILDREN {
;			SpecWidth <SST_PCT_OF_FIELD_WIDTH, PCT_10>
;		}
;	
; Negative SST_PIXEL arguments are not possible.		
; Currently only used in Rudy, could be used on other platforms.
;
;

protoreset


protominor PCVWindowHints
	;
	; PCV Window hints.  Make sure that these hints are contiguous
	; and remain in order, as Legos will map "looks" as offsets
	; from the first of these hints, HINT_WINDOW_PCV_TOOL_DIALOG_LOOK
	;
HINT_WINDOW_PCV_TOOL_DIALOG_LOOK	vardata
; Draw in the style of a PCV tool dialog window.  This is similar to
; the Stylus round thick dialog, but not quite so round or thick.
;
HINT_WINDOW_PCV_FIT_NOTE_PAD_LOOK	vardata
; Draw in the style of a PCV Fit Note pad window.  This has a corner
; folded up on the bottom right and looks as if it is sittin on top
; of a few other windows because of the border on the bottom right.
;
HINT_WINDOW_PCV_FIT_NOTE_LOOK		vardata
; Draw in the style of a PCV Fit Note window.  This has the bottom
; right corner folded up.
;
HINT_WINDOW_PCV_ROLODEX_CARD_LOOK	vardata
; Draw in the style of a PCV rolodex card window.
;
protoreset


protominor UINewForResponder_4

HINT_CUSTOM_CHILD_WRAP_SPACING		vardata	SpecSizeSpec
;
; When placed in a wrapping composite, this controls the spacing
; between children that are wrapped (in the direction opposite the
; orientation of the composite).  (HINT_CUSTOM_CHILD_SPACING controls
; the spacing in the orientation direction.)
;

HINT_ALIGN_WITH_CENTERED_MONIKERS	vardata
;
; When placed on a text object or grouping interaction containing a text
; object that sits under a grouping interaction with
; HINT_CENTER_CHILDREN_ON_MONIKERS, causes the text object entry area to
; line up with the other children in the grouping interaction.
; Currently only in used in Rudy settings dialogs.
;

HINT_DONT_INDENT_BOX			vardata
;
; When used on window object with HINT_DRAW_IN_BOX children, will override
; specific UI preference to indent the HINT_DRAW_IN_BOX children.
;

protoreset

protominor PCVLooks_2

HINT_BLANK_WINDOW_STYLE			vardata
; Draw the window as a blank white square, no UI.
;

HINT_BLANK_GREY_WINDOW_STYLE		vardata
; Draw the window as a blank grey square, no UI.
;

HINT_BLANK_BLACK_GROUP_STYLE		vardata
; Used with grouping objects.  Fill with black.
;

HINT_BORDERED_GROUP_STYLE		vardata
; Draw with a rounded corner shadowed border (white filled).
;
protoreset


protominor UINewForPenelope

HINT_LEFT_JUSTIFY_Y_SCROLLER		vardata
; Used for any scrollable object (list, view, GenText, etc.).  Positions
; Y scroller on left side of the associated view.
;
HINT_TOP_JUSTIFY_X_SCROLLER		vardata
; Used for any scrollable object (list, view, GenText, etc.).  Positions
; X scroller at the top of the associated view.
;

HINT_DRAW_STYLE_3D_RAISED		vardata
HINT_DRAW_STYLE_3D_LOWERED		vardata
HINT_DRAW_STYLE_FLAT			vardata
;
; Generic hints to specify a three-dimensional look or not.  First
; used in Odie Spui.
;

protoreset


protominor PCVLooks_3

HINT_USE_COMPRESSED_INSETS_FOR_MONIKER	vardata
;  Many looks for pcv have an alternate set of looks
; with a smaller inset between the border and the moniker.
; Normally, this is used with graphic monikers.
; This is only affects some components, not all objects in PCV.
;

protoreset


HINT_SEEK_NOTEBOOK_LEFT			vardata
HINT_SEEK_NOTEBOOK_RIGHT		vardata
; Used to place children of subgroup GenInteraction on the left or right side
; of notebook binder.  The subgroup GenInteraction must have the hint
; HINT_INTERACTION_NOTEBOOK_STYLE for these hints to have any affect.
;

HINT_WINDOW_WASH_COLOR			vardata	Color
; Used to specify the wash color of windows.
;

protominor UINewForPenelope_2
; This protominor is here to match the protominor in genC.goh around the 
; HINT_GADGET_TWO_BACKGROUND_COLORS and HINT_GADGET_THREE_BACKGROUND_COLORS
; vardata aliases.

HINT_CUSTOM_EXTRA_MARGINS		vardata Rectangle
; Suggests additional margins for composites.

protoreset

protominor UINewForFloatingKbd

KeyboardTypeParams	struct
	KTP_displayType		word
				; Specifies the keyboard type to display.

	KTP_disallowType	word
				; Specifies keyboard types to disallow
				;  switching to.

	KTP_entryMode		word
				; Specifies the keyboard entry mode.
KeyboardTypeParams	ends

HINT_KEYBOARD_TYPE		vardata KeyboardTypeParams
; This specifies the keyboard type and entry mode to use in the floating
; keyboard associated with the windowed object containing the object
; with this hint.  Note that ATTR_GEN_WINDOW_KBD_OVERRIDE is placed on
; the windowed object, while HINT_KEYBOARD_TYPE can be placed on any
; object.  The KeyboardTypeParams has three fields as follows:

HINT_PREVIOUS_KBD_OVERRIDE	vardata	KeyboardOverride
; This is used internally to store the keyboard mode when
; MSG_GEN_TOGGLE_FLOATING_KBD closes the keyboard.  It can also be used to
; set the floating keyboard initially closed.  MSG_GEN_TOGGLE_FLOATING_KBD
; will then open it.

protoreset

protominor UINewForShortLongTouch

ShortLongTouchParams	struct
	SLTP_shortMessage	word	; message to send out on "short" touch
	SLTP_shortDestination	optr	; destination of short touch message
	SLTP_longMessage	word	; message to send out on "long" touch
	SLTP_longDestination	optr	; destination of long touch messages
ShortLongTouchParams	ends

HINT_SHORT_LONG_TOUCH		vardata ShortLongTouchParams
; This hint specifies the messages to be sent out for "short" and "long" touch.

protoreset

protominor UIFocusDisabledHelp
; Don't want this protominor'd, as apps will still work fine if it's not
; supported
protoreset

ATTR_GEN_FOCUS_DISABLED_HELP				vardata optr
;
; Focus help for this object when disabled.  Similar to ATTR_GEN_FOCUS_HELP.
;

protominor UIIconTextMoniker

IconTextMonikerFlags	record
	ITMF_POSITION_ICON_ABOVE_TEXT:1	; place icon above the text (instead
					;  of icon left of text)
	:2
	ITMF_SWAP_ICON_TEXT:1		; swap icon text locations
	:12
IconTextMonikerFlags	end

IconTextMonikerParams	struct
	ITMP_flags	IconTextMonikerFlags
	ITMP_spacing	word
IconTextMonikerParams	ends

HINT_USE_ICON_TEXT_COMBINATION_MONIKER	vardata	IconTextMonikerParams
;
; This hint specifies that if possible, the icon and text monikers of the
; object should be combined and used as the object's moniker.  The
; IconTextMonikerParams specifies how the icon and text monikers should be
; combined.
;
protoreset


protominor UINoHelpButton

HINT_NO_HELP_BUTTON		vardata
;
; Set to specify that a help button should not be automatically added to
; the window (normally done if ATTR_GEN_HELP_CONTEXT is placed on a dialog
; GenInteraction or GenDisplay object).  This can be used if the application
; is adding its own objects to the title bar with HINT_SEEK_TITLE_BAR_LEFT/
; RIGHT, which would conflict with the help button.  UIHO_HIDE_HELP_BUTTONS
; is also checked, and will prevent the help button from being added to the
; window.
;

protoreset

protominor UIExtraKbdAccelerators
; Don't want this protominor'd, as apps will still work fine if it's not
; supported.
protoreset

ATTR_GEN_EXTRA_KBD_ACCELERATORS	vardata KeyboardShortcut
;
; Array of 1 or more KeyboardShortcut to additional support for this
; object.
;

HINT_NO_TV_BORDER		vardata
;
; Set to prevent adding TV border to window.
;

GenRaisedFrameInfo	record
	GRFI_TOP:1
	GRFI_BOTTOM:1
	GRFI_LEFT:1
	GRFI_RIGHT:1
	:12
GenRaisedFrameInfo	end

HINT_RAISED_FRAME		vardata	GenRaisedFrameInfo
;
; Intended for GenInteractions next to GenItemGroups with
; HINT_ITEM_GROUP_TAB_STYLE.
;

;------------------------------------------------------------------------------
;			Constants & Structures
;------------------------------------------------------------------------------

;
; Parameters passed to MSG_GEN_REPLACE_VIS_MONIKER
;
ReplaceVisMonikerFrame	struct
	RVMF_source	dword
			; an optr, hptr, or fptr, depending on RVMF_sourceType

	RVMF_sourceType	VisMonikerSourceType
			;RVMF_source is optr, hptr, or fptr

	even		; word align for C

	RVMF_dataType	VisMonikerDataType
			; source is VisMoniker, text string, graphics string,
			; or GeodeToken

	even		; word align for C

	RVMF_length	word
			; byte-size of source; not used for VMST_OPTR; if
			; VMDT_TEXT and RVMF_length is 0, text is
			; assumed to be null-terminated; if VMDT_GSTRING
			; and RVMF_length is 0, length of gstring is computed
			; by scanning gstring

	RVMF_width	word
			; for VMDT_GSTRING, width of graphics string; if 0,
			; width of gstring is computed by scanning gstring

	RVMF_height	word
			; for VMDT_GSTRING, height of graphics string; if 0,
			; height of gstring is computed by scanning gstring

	RVMF_updateMode	VisUpdateMode
			; update mode for showing new moniker

	even		; word align for C
ReplaceVisMonikerFrame	ends

;
; Passing parameters for MSG_GEN_DRAW_MONIKER, MSG_GEN_GET_MONIKER_POS
;
GenMonikerMessageFrame	struct
	GMMF_xInset		word
	; The x inset to the start of where to draw the moniker, if top or
	; bottom justifying.

	GMMF_yInset		word
	; The y inset to the start of where to draw the moniker, if left or
	; right justifying.

	GMMF_xMaximum		word
	GMMF_yMaximum		word
	; The maximum size of the moniker, if VMF_CLIP_TO_MAXIMUM_WIDTH
	; is set in the GMFP_monikerFlags.  Moniker will be clipped to that
	; width.

	GMMF_gState		hptr.GState
	; GState to use to draw the moniker.

	GMMF_textHeight		word
	; If we happen to know the height of the system text, we should pass
	; it here for speed, or else pass 0.

	GMMF_monikerFlags	DrawMonikerFlags
	; Various justification and miscellaneous flags for drawing the moniker.

GenMonikerMessageFrame	ends



; Structure of a help chunk (not quite defined yet)

HelpEntry	struct
    HE_string		byte
HelpEntry	ends

		
;
; Structure of Generic Attributes
;
GenAttrs	record	
	GA_SIGNAL_INTERACTION_COMPLETE:1
	; Set to indicate that this GenTrigger completes user interaction
	; with the associated GenInteraction when activated.  This causes a
	; MSG_GEN_GUP_INTERACTION_COMMAND with IC_INTERACTION_COMPLETE to be
	; sent to the GenTrigger itself (eventually making its way up to the
	; associated GenInteraction) after the trigger's action message is
	; sent out.  The specific UI (in MSG_GEN_GUP_INTERACTION_COMMAND
	; handler) will then determine whether this dialog should be dismissed
	; or not.
	;
	; This should be set for any ATTR_GEN_TRIGGER_INTERACTION_COMMAND
	; trigger with IC_APPLY, IC_OK, IC_YES, IC_NO, or IC_STOP (this should
	; not be set for IC_RESET triggers, as their usefullness depends on the
	; dialog staying on-screen after their activation), and for any other
	; HINT_SEEK_REPLY_BAR triggers that should dismiss the dialog after
	; usage.
	;
	; This should not be used for GIA_INITIATED_VIA_USER_DO_DIALOG
	; GenInteractions as the command triggers in those dialogs, by
	; definition, signal interaction completion.
	;
	GA_INITIATES_BUSY_STATE:1
	; Set for gadgets whose invocation starts a long enough operation
	; that we'd like to change the cursor to show busy.
	; Results in a MSG_GEN_APPLICATION_MARK_BUSY being sent to the app object,
	; followed by a MSG_GEN_APPLICATION_MARK_NOT_BUSY being sent to the same
	; object but via the app's queue.
	;
	GA_INITIATES_INPUT_HOLD_UP:1
	; Set for gadgets whose invocation results in the application thread
	; modifying the UI gadgtry slightly (typically enabling & disabling
	; options).  This cause input to be held up until the application
	; has completed whatever its response is, so that the user can't
	; click twice on something that the app will disable after processing
	; the first click.
	;
	; NOTE:  This functions stops input from being processed for ALL
	; applications, so when using this bit, be sure that the gadget's
	; application method handler is quick, or at least does not go off
	; doing any prolonged operation (this would prevent the user from
	; using any other apps until your app finishes its task)
	;
	; Results in a MSG_GEN_APPLICATION_HOLD_UP_INPUT being sent to the app object,
	; followed by a MSG_GEN_APPLICATION_RESUME_INPUT being sent to the same object
	; but via the app's queue.
	;
	GA_INITIATES_INPUT_IGNORE:1
	; Set for gadgets whose invocation starts a long enough operation
	; that we want to change the cursor to show that the app is busy &
	; can't take input.  Enters the application modal state even if there
	; isn't an app-modal box up (i.e. an button activity is eaten with
	; a beep)
	; Results in a MSG_GEN_APPLICATION_IGNORE_INPUT being sent to the app object,
	; followed by a MSG_GEN_APPLICATION_ACCEPT_INPUT being sent to the same object
	; but via the app's queue.
	;

	GA_READ_ONLY:1
	; If set, the generic object is presumed to be a read-only version
	; of the gadget (i.e. a text object that is not editable, a scrolling
	; list whose items cannot be selected, a non-editable GenRange, without
	; up/down arrows, etc.  

	GA_KBD_SEARCH_PATH:1
	; set if there is reason to look for keyboard accelerators along
	; this section of the generic tree.
	;
	GA_TARGETABLE:1
	; set if this object is a target of some sort, & can receive the
	; "Target" exclusive within its target level.  If set, most specific
	; UI's will automatically grab the Target for the object whenever the
	; user interacts with it in some way, such as clicking on.

	GA_NOTIFY_VISIBILITY:1
	; Set if this object should send notification when it becomes
	; visible and not visible.  See the documentation with
	; ATTR_GEN_VISIBILITY_DATA for more details

GenAttrs	end

			
;	Warning: GenStateChanged depends on the order of these bits

GenStates	record	

	GS_USABLE:1				; usable
	; This flag is setable by the application & indicates whether the
	; entire generic branch starting with this object should be
	; considered part of the application's user interface at this
	; time.  If this bit is clear, then the object nor any of its
	; children will appear or may be interacted with.  The specific
	; & visual state of any object which is made NOT_USABLE will
	; be destroyed, & the object treated as if it were in generic
	; form only.

	GS_ENABLED:1				; enabled
	; Indicates if object will allow user to
	; interact with it or not. Used in gadgets
	; to show options as not available, which
	; is typically represented by "greying out"
	; the gadget.

	:6

GenStates	end
		

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

;
; All instance data are private until we decide otherwise...
;
    GI_link		LinkPart <>				; 4
    GI_comp		CompPart <>				; 4
    ; Linkage, so that this object may be placed in a generic
    ; tree & have generic children.

    GI_visMoniker	lptr					; 2
    ; Contains the VisMoniker to use, or the VisMonikerList
    ; structure which contains several VisMonikers to use.
    ; During SPEC_BUILD, this list chunk will be replaced with the actual
    ; moniker to use (handle # will not change).

    GI_kbdAccelerator	KeyboardShortcut <>			; 2
    ; Shortcut for object

    GI_attrs		GenAttrs			; 1
    GI_states		GenStates (mask GS_USABLE or \
					mask GS_ENABLED)	; 1

GenClass	endc

EndLibrary	ui
