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

	Copyright (c) GeoWorks 1991 -- All Rights Reserved

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

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	brianc	2/92		Initial version

DESCRIPTION:
	Object definitions for GenDisplayClass.   

	$Id: gDispC.def,v 1.1 97/04/04 14:18:52 newdeal Exp $

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

SetDef	__GDISPC

StartLibrary	ui
		
include ui.def


GenDisplayClass	class	GenClass

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

MSG_GEN_DISPLAY_SET_MINIMIZED	message
;
; Causes displays to minimize.  Different specific UIs will implement this
; differently.  In some, the GenDisplay will be removed visually from the
; GenDisplayGroup.  In others, the GenDisplay will be iconified.  In all
; cases, an entry for the GenDisplay remains on the GenDisplayGroup's Window
; menu.
;
; This method guaranteed to not force the specific building of the object.
;
; Context:	Utility message to minimize GenDisplay.
; Source:	Anyone.
; Destination:	Any GenDisplay object.
; Interception:	Generally not intercepted.  May be intercepted to determine
;		when GenDisplay is being minimized.
;
; Pass:	 	nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_SET_NOT_MINIMIZED	message
;
; Undoes MSG_GEN_DISPLAY_SET_MINIMIZED.  GenDisplays will come onscreen
; at their previous location and size.
;
; This method guaranteed to not force the specific building of the object.
;
; Context:	Utility message to unminimize GenDisplay.
; Source:	Anyone.
; Destination:	Any GenDisplay object.
; Interception:	Generally not intercepted.  May be intercepted to determine
;		when GenDisplay is being unminimized.
;
; Pass:	 	nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_GET_MINIMIZED	message
;
; Check if GenDisplay is minimized.
;
; This method guaranteed to not force the specific building of the object.
;
; Context:	Utility message to get minimized state of GenDisplay.
; Source:	Anyone.
; Destination:	Any GenDisplay object.
; Interception:	Normally not intercepted.
;
; Pass:	 	nothing
; Return:	carry set if minimized
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_SET_MAXIMIZED	message
;
; Causes displays to maximize.  Different specific UIs will implement this
; differently.  In most, the parent GenDisplayGroup will be put into
; full-sized mode.
;
; This method guaranteed to not force the specific building of the object.
;
; Context:	Utility message to maximize GenDisplay.
; Source:	Anyone.
; Destination:	Any GenDisplay object.
; Interception:	Generally not intercepted.  May be intercepted to determine
;		when GenDisplay is being maximized.
;
; Pass:	 	nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_SET_NOT_MAXIMIZED	message
;
; Undoes MSG_GEN_DISPLAY_SET_MAXIMIZED.  The parent GenDisplayGroup will
; be put into overlapping mode.
;
; This method guaranteed to not force the specific building of the object.
;
; Context:	Utility message to unmaximize GenDisplay.
; Source:	Anyone.
; Destination:	Any GenDisplay object.
; Interception:	Generally not intercepted.  May be intercepted to determine
;		when GenDisplay is being unmaximized.
;
; Pass:	 	nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_GET_MAXIMIZED	message
;
; Check if GenDisplay is maximized.
;
; This method guaranteed to not force the specific building of the object.
;
; Context:	Utility message to get maximized state of GenDisplay.
; Source:	Anyone.
; Destination:	Any GenDisplay object.
; Interception:	Normally not intercepted.
;
; Pass:	 	nothing
; Return:	carry set if minimized
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_SET_ATTRS		message
; Set GenDisplayAttrs.
; 
; Context:	Used to dynamically set GenDisplay attributes.  These
; 		are normally set in .ui/.goc file.
; Source:	Anyone.
; Destination:	Any GenDisplay.
; Interception:	Normally not intercepted.
;
; Pass:		cl - GenDisplayAttrs
; Return:	nothing
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_GET_ATTRS		message
; Get GenDisplayAttrs.
;
; Context:	Used to retreive GenDisplay attributes.
; Source:	Anyone.
; Destination:	Any GenDisplay.
; Interception:	Normally not intercepted.
;
; Pass:		nothing
; Return:	cl - GenDisplayAttrs
;		ax, ch, dx, bp - destroyed

MSG_GEN_DISPLAY_UPDATE_FROM_DOCUMENT	message
;
; Update the GenDisplay based on attributes of the associated GenDocument.
;
; Context:	Low-level message to set information about associated
;		GenDocument.
; Source:	Anyone, though only normally used by Document Control.
; Destination:	Any GenDisplay object.
; Interception:	Normally not intercepted.
;
; Pass: 	ss:bp - DocumentUpdateParams
; Return: 	bp - unchanged
;		ax, cx, dx - destroyed

MSG_GEN_DISPLAY_GET_DOCUMENT	message
;
; Get the associated GenDocument
;
; Context:	Low-level message to get optr of associated GenDocument.
; Source:	Anyone, though only normally used by Document Control.
; Destination:	Any GenDisplay object.
; Interception:	Normally not intercepted.
;
; Pass: 	none
; Return: 	^lcx:dx - asociated GenDocument object
;		ax, bp - destroyed

MSG_GEN_DISPLAY_CLOSE		message
;
; Sent to close the GenDisplay.  Default handler sends MSG_GEN_DOCUMENT_CLOSE
; to the associated GenDocument, if any.  Other usages require subclassing to
; add functionality.  See GenPrimary for its interpretation.
;
; Context:	High-level message to close GenDisplay.
; Source:	Anyone.  Also sent when "Close" item in system menu is
;		activated.
; Destination:	Any GenDisplay object.
; Interception:	Must be intercepted to add close functionality if associated
;		GenDocument doesn't provide appropriate behavior in its
;		MSG_GEN_DOCUMENT_CLOSE handler.
;
; Pass: 	none
; Return: 	none
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_INTERNAL_SET_OVERLAPPING	message
MSG_GEN_DISPLAY_INTERNAL_SET_FULL_SIZED		message
;
; Internal message sent from DisplayControl to implement full-sized/overlapping
; modes.
;
; This method guaranteed to not force the specific building of the object.
;
; Context:	Internal message.
; Source:	Internal message, should not be sent by applications.
; Destination:	GenDisplays sitting under a GenDisplayGroup.
; Interception:	Internal message, do not intercept.
;
; Pass:	 	dl - VisUpdateMode
; Return:	nothing
;		ax, cx, dx, bp - destroyed

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

HINT_DISPLAY_MINIMIZED_ON_STARTUP	vardata
;
; Set to indicate that this display should be minimized on startup.

HINT_DISPLAY_NOT_MINIMIZED_ON_STARTUP	vardata
;
; Set to indicate that this display should not be minimized on startup.

HINT_DISPLAY_MAXIMIZED_ON_STARTUP	vardata
;
; Set to indicate that this display should be maximized on startup.  In
; specific UIs that handle MSG_GEN_DISPLAY_SET_MAXIMIZED by putting the
; parent GenDisplayGroup into full-sized mode, this hint is ignored.

HINT_DISPLAY_NOT_MAXIMIZED_ON_STARTUP	vardata
;
; Set to indicate that this display should not be maximized on startup.  In
; specific UIs that handle MSG_GEN_DISPLAY_SET_NOT_MAXIMIZED by putting the
; parent GenDisplayGroup into overlapping mode, this hint is ignored.

;------------------------------------------------------------------------------
;	Attributes stored in hints area
;------------------------------------------------------------------------------

; See ATTR_GEN_DISPLAY_TRAVELING_OBJECTS for usage description
;
TravelingObjectReference	struct
	TIR_travelingObject	optr
	; Object which we'd like to keep moving to the top GenDisplay.
	; Should be stored in unrelocated form e.g. in assembly:
	;	UN_OPTR  TUIToolbox3

	TIR_parent		lptr
	; Object within the GenDisplay under which the traveling object
	; should be added

	TIR_compChildFlags	CompChildFlags
	; CompChildFlags to use when adding the Traveling object below
	; the parent
TravelingObjectReference	ends

ATTR_GEN_DISPLAY_TRAVELING_OBJECTS	vardata	lptr.TravelingObjectReference
;
; Set to specify "Traveling objects" associated with this display.  The
; word stored here must be the chunk handle of a list of 
; TravelingObjectReferences.  "Traveling objects" are typically toolbox
; GenInteractions, but may be any generic object which you'd like to have
; appear on the top GenDisplay only, & have automatically moved should a new
; GenDisplay come to the top.  Works like this:  whenever the GenDisplay
; is brought to the top, all listed traveling objects are set NOT_USABLE,
; removed from their current parent, if any, added below the specified
; parent object, & set USABLE again.  The traveling object will additionally
; be removed if the GenDisplay itself is being destroyed.   NOTE that
; the object will NOT be removed for you if some object below the GenDisplay,
; but above the traveling object, is being destroyed -- if this is a
; possibility within in your application, you will need to remove the
; traveling object yourself before it is accidentally destroyed.

ATTR_GEN_DISPLAY_NOT_MINIMIZABLE	vardata
;
; Set to indicate that this GenDisplay is not minimizable.
; MSG_GEN_DISPLAY_SET_MINIMIZED will be ignored and the specific UI will
; provide no UI gadgetry to minimize the GenDisplay.

ATTR_GEN_DISPLAY_NOT_MAXIMIZABLE	vardata
;
; Set to indicate that this GenDisplay is not maximizable.
; MSG_GEN_DISPLAY_SET_MAXIMIZED will be ignore and the specific UI will
; provide no UI gadgetry to maximize the GenDisplay.

ATTR_GEN_DISPLAY_NOT_RESTORABLE		vardata
;
; Set to indicate that this GenDisplay is not restorable.  Normally only used
; for GenDisplay with HINT_DISPLAY_MAXIMIZED_ON_STARTUP.  The specific UI
; will provide no UI gadgetry to restore the GenDisplay.

ATTR_GEN_DISPLAY_MINIMIZED_STATE	vardata
;
; Used by specific UI to store minimized state of GenDisplay across shutdown.
; Should not be used by applications.

ATTR_GEN_DISPLAY_MAXIMIZED_STATE	vardata
;
; Used by specific UI to store maximized state of GenDisplay across shutdown.
; Should not be used by applications.

HINT_DISPLAY_NOT_RESIZABLE		vardata
;
; Used to request that this GenDisplay not be resizable by the user.

ATTR_GEN_DISPLAY_MENU_BAR_POPPED_OUT	vardata
;
; This indicates that the menu bar for this GenDisplay (or GenPrimary) is in
; its 'popped out' state.

TEMP_GEN_DISPLAY_SAVE_POPOUT_MENU_BAR_INFO	vardata GenSaveWindowInfo
;
; This is used internally to save the size and position of the dialog portion
; of a popout menu bar across shutdown and restore.

HINT_DISPLAY_DEFAULT_ACTION_IS_NAVIGATE_TO_NEXT_FIELD	vardata
;
; Used to specify default action for GenDisplay.
;

HINT_DISPLAY_USE_APPLICATION_MONIKER_WHEN_MINIMIZED	vardata
;
; Normally, the GenDisplay's own moniker is used for it's minimized
; representation.  If the GenDisplay has none, then the moniker of the
; GenApplication is used.  This allows overridding this and always using the
; moniker of the GenApplication.
;

HINT_DISPLAY_MENU_BAR_HIDDEN_ON_STARTUP		vardata
;
; Used to specify that, if possible, the GenDisplay's menu bar should be
; hidden ('popped out' and dismissed) on startup.  Must be used with
; ATTR_GEN_DISPLAY_MENU_BAR_POPPED_OUT.  Only works if specific UI allows
; 'popped out' menu bars.
;

TEMP_GEN_DISPLAY_MENU_BAR_HIDDEN		vardata
;
; Used internally to indicate that the menu bar for this GenDisplay (or
; GenPrimary) is hidden, across shutdown/restore.
;

HINT_DISPLAY_USE_APPLICATION_MONIKER_WHEN_MENU_BAR_POPPED_OUT	vardata
;
; Normally, the GenDisplay's own moniker is used for the moniker of it's
; popped out menu bar.  If the GenDisplay has none, then the moniker of the
; GenApplication is used.  This allows overridding this and always using the
; moniker of the GenApplication.
;

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

;
; Attributes for GenDisplayInstance variable GDI_attrs:
; (UIC default:  attributes = { userDismissable } )
;
GenDisplayAttrs	record	
	GDA_USER_DISMISSABLE:1		;(userDismissable)
; 			  set if user may dismiss this window (Dismiss
; 			  (meaning to go away or close.  This has no bearing
;			  on iconification/hiding type of operations.  Is
; 			  implement in Open Look by providing a pushpin which
;			  may be unpinned.  Is provided in CUA by providing
;			  a "CLOSE" option in the system menu.
;
	:7
GenDisplayAttrs	end

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

    ;IMPORTANT: if you add instance data, update GenDisplayGenCopyTree

    GDI_attributes	GenDisplayAttrs (mask GDA_USER_DISMISSABLE)
				; Note that the name GDI_attrs is already taken
    GDI_document	optr		;associated GenDocument, if any

GenDisplayClass	endc


EndLibrary 	ui
