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

	Copyright (c) Geoworks 1994 -- All Rights Reserved

PROJECT:	GEOS
MODULE:		Include - Hyperlink Library Definitions
FILE:		hyperlnk.def

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	jenny	5/24/94   	Initial revision

DESCRIPTION:
	This file contains the definition of the hyperlink control class

	$Id: hyprlnk.def,v 1.1 97/04/04 14:25:53 newdeal Exp $

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

SetDef __HYPERLNK

StartLibrary	hyprlnk

;******************************************************************************
;		HyperlinkControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_DEFINE_NAME
; MSG_VIS_TEXT_DELETE_NAME
; MSG_VIS_TEXT_RENAME_NAME
; MSG_VIS_TEXT_UPDATE_NAME_LIST
; MSG_VIS_TEXT_GET_NAME_LIST_MONIKER
; MSG_META_TEXT_SET_HYPERLINK
; MSG_VIS_TEXT_SET_HYPERLINK_TEXT_STYLE
; MSG_VIS_TEXT_DELETE_ALL_HYPERLINKS
; MSG_VIS_TEXT_DO_KEY_FUNCTION
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_NAME_CHANGE
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_TYPE_CHANGE
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

HyperlinkControlClass	class	GenControlClass

;-----------------------------------------------------------------------------
;		Messages
;-----------------------------------------------------------------------------

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

;	General

MSG_HYPERLINK_CONTROL_FILE_LIST_GET_MONIKER			message
;
; Get a moniker for the file list in either the Set Destination or the
; Manage Files box
;

;	Set Destination

MSG_HYPERLINK_CONTROL_SETDEST_FILE_CHANGED			message
;
; The user changed the file in the Set Destination box
;
MSG_HYPERLINK_CONTROL_SETDEST_ADD_FILE_NAME			message
;
; Add a new file name from the Set Destination box
;
MSG_HYPERLINK_CONTROL_SETDEST_PAGE_LIST_GET_MONIKER		message
;
; Get a moniker for the page list in the Set Destination box
;
MSG_HYPERLINK_CONTROL_SETDEST_PAGE_CHANGED			message
;
; The user changed the page in the Set Destination box
;
MSG_HYPERLINK_CONTROL_SETDEST_ADD_PAGE_NAME			message
;
; Add a new page name from the Set Destination box
;
MSG_HYPERLINK_CONTROL_SET_HYPERLINK				message
;
; Set the selected hyperlink
;
MSG_HYPERLINK_CONTROL_CLEAR_HYPERLINK				message
;
; Clear the selected hyperlink
;

;	Manage Destinations

MSG_HYPERLINK_CONTROL_MANAGEDEST_FILE_CHANGED			message
;
; The user changed the file in the Manage Destinations box
;
MSG_HYPERLINK_CONTROL_MANAGEDEST_PAGE_LIST_GET_MONIKER		message
;
; Get a moniker for the page list in the Manage Destinations box
;
MSG_HYPERLINK_CONTROL_MANAGEDEST_PAGE_CHANGED			message
;
; The user changed the page in the Manage Destinations box
;
MSG_HYPERLINK_CONTROL_MANAGEDEST_ADD_PAGE_NAME			message
;
; Add a new page name from the Manage Destinations box
;
MSG_HYPERLINK_CONTROL_DELETE_PAGE_NAME				message
;
; Delete a page name
;
MSG_HYPERLINK_CONTROL_CHANGE_PAGE_NAME				message
;
; Rename a page
;
MSG_HYPERLINK_CONTROL_SET_RENAME_PAGE_TEXT			message
;
; Set the text in the Rename Page box.
;

;	Manage Files (child box of Manage Destinations box)

MSG_HYPERLINK_CONTROL_MANAGEFILES_FILE_CHANGED			message
;
; The user selected a different file in the Manage Files box
;
MSG_HYPERLINK_CONTROL_MANAGEFILES_ADD_FILE_NAME			message
;
; Add a new file name from the Manage Files box
;
MSG_HYPERLINK_CONTROL_DELETE_FILE_NAME				message
;
; Delete a file name
;
MSG_HYPERLINK_CONTROL_CHANGE_FILE_NAME				message
;
; Rename a file
;
MSG_HYPERLINK_CONTROL_SET_RENAME_FILE_TEXT			message
;
; Set the text in the Rename Page box.
;


; Other hyperlink menu items

MSG_HYPERLINK_CONTROL_CLEAR_ALL_HYPERLINKS			message
;
; The user pressed the "Clear All Hyperlinks" trigger.
;
MSG_HYPERLINK_CONTROL_FOLLOW_HYPERLINK				message
;
; User did a "Follow Hyperlink"
;
MSG_HYPERLINK_CONTROL_OPTIONS_CHANGED				message
;
; The user change the booleans selected in the HyperlinkOptionsList. 
;

;-----------------------------------------------------------------------------
;		External messages
;-----------------------------------------------------------------------------

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

; Type of hyperlink status change.
;
HyperlinkStatusChangeType	etype	word
	HSCT_SHOW_HYPERLINKS_OFF	enum	HyperlinkStatusChangeType
	HSCT_SHOW_HYPERLINKS_ON		enum	HyperlinkStatusChangeType

; Structure of data block sent by Studio when a new document gets the 
; target.
;
NotifyHyperlinkStatusChange	struct
    NHSC_changeType	HyperlinkStatusChangeType
NotifyHyperlinkStatusChange	ends

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

HyperlinkControlFeatures	record
    HCF_HYPERLINK_OPTIONS:1
    HCF_FOLLOW_HYPERLINK:1
    HCF_CLEAR_ALL_HYPERLINKS:1
    HCF_SET_DESTINATION:1
    HCF_MANAGE_DESTINATIONS:1
HyperlinkControlFeatures	end

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

HyperlinkControlToolboxFeatures	record
HyperlinkControlToolboxFeatures	end

HYPERLINK_CONTROL_DEFAULT_FEATURES equ	\
				mask HCF_MANAGE_DESTINATIONS or \
				mask HCF_SET_DESTINATION or \
				mask HCF_CLEAR_ALL_HYPERLINKS or \
				mask HCF_FOLLOW_HYPERLINK or \
				mask HCF_HYPERLINK_OPTIONS

HYPERLINK_CONTROL_DEFAULT_TOOLBOX_FEATURES equ 0

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

	HCI_hyperlinkable	BooleanWord	BW_FALSE
							; BW_TRUE if current
							;  selection is
							;  hyperlinkable 
	HCI_currentDoc		word	0		; handle of current
							;  file
HyperlinkControlClass	endc



;******************************************************************************
;		PageNameControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_DEFINE_NAME
; MSG_VIS_TEXT_DELETE_NAME
; MSG_VIS_TEXT_RENAME_NAME
; MSG_VIS_TEXT_UPDATE_NAME_LIST
; MSG_VIS_TEXT_GET_NAME_LIST_MONIKER
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_NAME_CHANGE
; MANUFACTURER_ID_GEOWORKS.GWNT_PAGE_STATE_CHANGE
; MANUFACTURER_ID_GEOWORKS.GWNT_DISPLAY_CHANGE
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

PageNameControlClass	class	GenControlClass

;-----------------------------------------------------------------------------
;		Messages
;-----------------------------------------------------------------------------

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

MSG_PNC_PAGE_LIST_GET_MONIKER			message
;
;  Get the moniker for an entry in the page list
;
;	Pass:	^lcx:dx	= file list 
;		bp	= position of item whose moniker is requested
;	Return:	nothing

MSG_PNC_APPLY_PAGE_NAME				message
;
;  Apply the page name to a page (set the context for the page)
;
;	Pass:	nothing
;	Return:	nothing

MSG_PNC_CLEAR_PAGE_NAME				message
;
;  Clear the page name from a page (remove the context for the page)
;
;	Pass:	nothing
;	Return:	nothing

MSG_PNC_CLEAR_ALL_PAGES				message
;
;  Clear the page name from a page (remove the context for the page)
;
;	Pass:	nothing
;	Return:	nothing

MSG_PNC_PAGE_LIST_PAGE_CHANGED			message
;
;  User has selected a different page from the page list.  This is the
;  status message sent by the PageNameList.
;
;  	Pass: 	cx - current selection
;		bp - number of selections
;		dl - GenItemGroupStateFlags
;	Return:	nothing

MSG_PNC_SET_PAGE_NAME_TEXT			message
;
;  Called by MSG_VIS_TEXT_GET_NAME_LIST_MONIKER_FRAME after it has
;  found the requested name. Sets the text in PageNameText.
;
;	Pass:	cx:dx - null-terminated name
;	Return: nothing

MSG_PNC_SET_PAGE_STATUS_BAR_TEXT			message
;
;  Called by MSG_VIS_TEXT_GET_NAME_LIST_MONIKER_FRAME after it has
;  found the requested name. Sets the text in PageStatusBarText.
;
;	Pass:	cx:dx - null-terminated name
;	Return: nothing

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

;
; Type of page name change. Used to ensure that a page name change
; notification referring to the same page and name as the preceding
; notification will be delivered when it is sent for a different reason.
; Otherwise the GCN apparatus would weed it out as identical to the last
; notification and not send it.
;
PageNameChangeType	etype	byte
	PNCT_SET_CONTEXT		enum	PageNameChangeType
	PNCT_CHANGE_PAGE		enum	PageNameChangeType
	PNCT_DELETE_VARIABLE_GRAPHIC	enum	PageNameChangeType
	PNCT_CLEAR_MULTIPLE_CONTEXTS	enum	PageNameChangeType
	

; Structure of data block sent by Studio when the user moves the cursor
; to a new page.
;
NotifyPageNameChange	struct
    NPNC_index		word		; index of new page name
    NPNC_length		word		; length of page name
    NPNC_changeType	PageNameChangeType	; type of change (see above)
    NPNC_name		label char	; name of new page
NotifyPageNameChange	ends


; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

PageNameControlFeatures	record
    PNCF_CLEAR_ALL:1
    PNCF_CLEAR:1
    PNCF_PAGE_DIALOG:1
PageNameControlFeatures	end

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

PageNameControlToolboxFeatures	record
    PNCTF_STATUS_BAR:1
PageNameControlToolboxFeatures	end

PNC_DEFAULT_FEATURES equ	mask PNCF_PAGE_DIALOG or \
				mask PNCF_CLEAR or mask PNCF_CLEAR_ALL

PNC_DEFAULT_TOOLBOX_FEATURES equ 	mask PNCTF_STATUS_BAR

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

    PNCI_currentPage	word	GIGS_NONE	; index of current page
					
    PNCI_currentDoc	word	0		; handle of current
						;  file

    PNCI_nameUserModified	word	FALSE	; user has modified the
						;  PageNameText field

PageNameControlClass	endc

EndLibrary	hyprlnk
