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

	Copyright (c) GeoWorks 1991 -- All Rights Reserved

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

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

DESCRIPTION:
	Object definitions for GenDisplayGroupClass.   

	$Id: gDCtrlC.def,v 1.1 97/04/04 14:18:54 newdeal Exp $

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

SetDef	__GDCTRLC

StartLibrary	ui
		
include ui.def


GenDisplayGroupClass	class	GenClass

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

; The GenClass methods GEN_ADD_GEN_CHILD and GEN_REMOVE_GEN_CHILD
; should be used to add and remove children GenDisplays.  The GenDisplay must
; be not usable when added or removed.

MSG_GEN_DISPLAY_GROUP_SET_FULL_SIZED	message
; Sending this method to a DisplayControl causes it to enter
; maximized mode. It will forward the method to each of the GenDisplays,
; but will keep the window layering and FOCUS/TARGET as is.
; This method will be ignored if the ATTR_GEN_DISPLAY_GROUP_NO_FULL_SIZED is set.
;
; Context:	Utility message sent to set GenDisplayGroup into full-sized
;		mode.
; Source:	Anyone.
; Destination:	Any GenDisplayGroup object.  Seperate API controls whether
;		a GenDisplayGroup can enter full-sized mode.
; Interception:	Generally not intercepted.  Use MSG_META_GEN_DISP_CONTROL_NOTIFY_STATE
;		or MSG_GEN_DISPLAY_GROUP_GET_FULL_SIZED to determine when the
;		GenDisplayGroup is set full-sized or set overlapping.
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_GROUP_SET_OVERLAPPING	message
; This method is sent to a DisplayControl to cause it to exit
; maximized mode. It will forward the method to each of the GenDisplays,
; but will keep the window layering and FOCUS/TARGET as is.
; This method will be ignored if the ATTR_GEN_DISPLAY_GROUP_NO_OVERLAPPING is set.
;
; Context:	Utility message sent to set GenDisplayGroup into overlapping
;		mode.
; Source:	Anyone.
; Destination:	Any GenDisplayGroup object.  Seperate API controls whether
;		a GenDisplayGroup can enter overlapping mode.
; Interception:	Generally not intercepted.  Use MSG_META_GEN_DISP_CONTROL_NOTIFY_STATE
;		or MSG_GEN_DISPLAY_GROUP_GET_FULL_SIZED to determine when the
;		GenDisplayGroup is set full-sized or set overlapping.
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_GROUP_GET_FULL_SIZED	message
; Check if GenDisplayGroup is in full-sized mode.  If not, GenDisplayGroup
; is in overlapping mode.
;
; Context:	Utility message sent to get GenDisplayGroup's full-size or
;		overlapping mode.
; Source:	Anyone.
; Destination:	Any GenDisplayGroup object.
; Interception:	Normally not intercepted.
;
; Pass:		nothing
; Return:	carry set if in full-sized mode
;		carry clear if in overlapping mode
;		ax, cx, dx, bp - destoryed

MSG_GEN_DISPLAY_GROUP_TILE_DISPLAYS	message
; This method is sent by the "tile" GenTrigger in the MDIWindowMenu
; which sits below the GenPrimary object. We should do cool things.
;
; Context:	Utility message sent to get GenDisplayGroup to tile child
;		GenDisplays.
; Source:	Anyone.
; Destination:	Any GenDisplayGroup.
; Interception:	Normally not intercepted.
;
; Pass:		nothing
; Return:	nothing
;		ax, cx, dx, bp - destroyed

MSG_GEN_DISPLAY_GROUP_SELECT_DISPLAY	message
;
; Select the given display (make it the top)
;
; Context:	Utility message
; Source:	Anyone.
; Destination:	Any GenDisplayGroup.
; Interception:	Normally not intercepted.
;
; Pass:		cx - display number to select
; Return:	nothing
;		ax, cx, dx, bp - destroyed

;------------------------------------------------------------------------------
;	Internal messages
;------------------------------------------------------------------------------

MSG_GEN_DISPLAY_GROUP_SET_NUM_ITEMS	message
;
; Set the number of items in a GenDynamicList
;
; Pass:
;	cx:dx - list
;	bp - selected item
; Return:
;	none

MSG_GEN_DISPLAY_GROUP_SET_MONIKER	message
;
; Set a moniker in a GenDynamicList
;
; Pass:
;	cx:dx - list
;	bp - item number
; Return:
;	none

protominor	UINewForNike

MSG_GEN_DISPLAY_GROUP_SWAP_DISPLAYS	message
;
; Swap display positions
;
; Pass:		cx - vis position of display #1
;		dx - vis position of display #2
; Return:	nothing
; Destroy:	ax, cx, dx, bp
;

MSG_GEN_DISPLAY_GROUP_RESIZE_DISPLAYS	message
;
; Resize displays
;
; Pass:		nothing
; Return:	nothing
; Destroy:	ax, cx, dx, bp
;

protoreset

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

;We have disabled this for now. If we want this type of behavior, we will
;have to rewrite a lot of code!
;
;HINT_DISPLAY_GROUP_DISPLAYS_ON_FIELD	vardata
;	; Put displays on the field group (and thus reserve no space for the
;	; GenDisplayGroup).  Not possible in some specific UI's

HINT_DISPLAY_GROUP_SEPARATE_MENUS 	vardata
	; Put each display's menu controls on the display instead of
	; combining them with the menu controls in the parent GenPrimary.  Not
	; possible in some specific UI's

HINT_DISPLAY_GROUP_ARRANGE_TILED 	vardata
	; Start with the displays tiled in the MDI area

HINT_DISPLAY_GROUP_FULL_SIZED_ON_STARTUP	vardata
HINT_DISPLAY_GROUP_OVERLAPPING_ON_STARTUP	vardata
	; Suggests initial full-sized/overlapping state of GenDisplayGroup.

HINT_DISPLAY_GROUP_FULL_SIZED_IF_TRANSPARENT_DOC_CTRL_MODE		vardata
	; Forces full-size state in GenDisplayGroup if the application is
	; operating in "transparent document control" mode, in which user
	; doesn't have to understand notion of an "open" document, but instead
	; can just switch between them.  (Overrides
	; HINT_DISP_CTRL_OVERLAPPING_ON_STARTUP)
	;
	; Applications displaying documents in diplay windows will generally
	; want to have this hint set.

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


ATTR_GEN_DISPLAY_GROUP_NO_FULL_SIZED		vardata
	; Set to indicate that the GenDisplayGroup cannot go into full-sized
	; mode.  MSG_GEN_DISPLAY_GROUP_SET_FULL_SIZED will be ignored and any
	; specific UI gadgets to set full-sized will be disabled.

ATTR_GEN_DISPLAY_GROUP_NO_OVERLAPPING		vardata
	; Set to indicate that the GenDisplayGroup cannot go into overlapping
	; mode.  MSG_GEN_DISPLAY_GROUP_SET_OVERLAPPING will be ignored and any
	; specific UI gadgets to set overlapping will be disabled.

ATTR_GEN_DISPLAY_GROUP_OVERLAPPING_STATE	vardata
	; For use by specific UI to store full-sized/overlapping mode
	; across shutdown.  If this attr exists, GenDisplayGroup is in
	; overlapping mode, if not GenDisplayGroup is in full-sized mode.

HINT_DISPLAY_GROUP_TILE_HORIZONTALLY	vardata
HINT_DISPLAY_GROUP_TILE_VERTICALLY	vardata
	; Specify tiling direction preference.

HINT_DISPLAY_GROUP_SIZE_INDEPENDENTLY_OF_DISPLAYS	vardata
	; The display group's size is calculated on what its parent
	; wants (along with size hints, if used), rather than anything
	; the top maximized display might want.  This may improve
	; geometry performance of a complex display/primary combination.


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

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

GenDisplayGroupClass	endc


;******************************************************************************
;		DisplayControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_DISPLAY_CHANGE: NotifyDisplayChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS
;	MGCNLT_ACTIVE_LIST

GenDisplayControlClass	class	GenControlClass

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

;-----------------------------------------------------------------------------
;		Internal methods
;-----------------------------------------------------------------------------

MSG_GDC_SET_OVERLAPPING	message
MSG_GDC_TILE message
MSG_GDC_LIST_APPLY message
MSG_GDC_LIST_QUERY message

protominor	UINewForNike

MSG_GDC_SWAP_DISPLAYS message
MSG_GDC_RESIZE_DISPLAYS message

protoreset

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

HINT_DISPLAY_CONTROL_NO_FEATURES_IF_TRANSPARENT_DOC_CTRL_MODE	vardata
	; Removes all features if the application is operating in "transparent
	; document control" mode.
	;
	; Applications displaying documents in displays will generally want
	; to have this hint set, unless the user always needs to be able to
	; get to the windows list for some reason other than switching 
	; between open documents.


;-----------------------------------------------------------------------------
;		Constants & Structures
;-----------------------------------------------------------------------------
GenDisplayControlAttributes	record
    GDCA_MAXIMIZED_NAME_ON_PRIMARY:1	
		;If set then the moniker of a maximized display is set as the 
		;long term message of the primary.
    :7
GenDisplayControlAttributes	end


MAX_DISPLAY_NAME_SIZE	= 64

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

GDICFeatures	record
    GDCF_OVERLAPPING_MAXIMIZED:1
    GDCF_TILE:1
    GDCF_DISPLAY_LIST:1
GDICFeatures	end

; Toolbox features flags (used with ATTR_GEN_CONTROL_REQUIRE_TOOLBOX_UI and
; ATTR_GEN_CONTROL_PROHIBIT_TOOLBOX_UI)

GDICToolboxFeatures	record
    GDCTF_OVERLAPPING_MAXIMIZED:1
    GDCTF_TILE:1
    GDCTF_DISPLAY_LIST:1
GDICToolboxFeatures	end



GDC_DEFAULT_FEATURES equ mask GDCF_OVERLAPPING_MAXIMIZED or mask GDCF_TILE or \
			 mask GDCF_DISPLAY_LIST
GDC_DEFAULT_TOOLBOX_FEATURES equ mask GDCF_DISPLAY_LIST

; Notification structure

NotifyDisplayChange	struct
    NDC_displayNum	word
if DBCS_PCGEOS
    NDC_name		wchar MAX_DISPLAY_NAME_SIZE dup (?)
else
    NDC_name		char MAX_DISPLAY_NAME_SIZE dup (?)
endif
    NDC_overlapping	BooleanByte
NotifyDisplayChange	ends

NotifyDisplayListChange	struct
    NDLC_counter	word
    NDLC_group		optr
NotifyDisplayListChange	ends


TEMP_GDC_CACHED_NAME		vardata
TEMP_GDC_CACHED_LIST_DATA	vardata	NotifyDisplayListChange
TEMP_GDC_CACHED_TOOL_LIST_DATA	vardata	NotifyDisplayListChange
TEMP_GDC_CACHED_SELECTED_DISPLAY vardata word

;-----------------------------------------------------------------------------
;		Instance Data
;-----------------------------------------------------------------------------

    GDCII_attrs	GenDisplayControlAttributes

GenDisplayControlClass	endc


EndLibrary 	ui
