COMMENT @----------------------------------------------------------------------
 
	Copyright (c) GeoWorks 1994 -- All Rights Reserved

PROJECT:	PC GEOS
FILE:		contact.def

AUTHOR:		Chris Hawley-Ruppel

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	cbh	7/13/94		Initial version

DESCRIPTION:
	This file contains the definitions for the library.  It is included
both by the library and by users of the library.  When included by the library,
the symbol "_DECLARER_" must be true.

	$Id: contact.def,v 1.1 97/04/04 14:22:25 newdeal Exp $

------------------------------------------------------------------------------@
SetDef __CONTACT

StartLibrary	contact


DEFAULT_COMPONENT_WIDTH		equ	350

FoamDBActionType	etype	word
	FDBAT_ENTRY_ADDED		enum	FoamDBActionType
	FDBAT_ENTRY_CHANGED		enum	FoamDBActionType
	FDBAT_ENTRY_DELETED		enum	FoamDBActionType
FoamDBChangeNotification	struct
;
; A duplicate of the entry in foamdb.def for the demo only
;
	FDBCN_action		FoamDBActionType

	FDBCN_entry		dword

FoamDBChangeNotification	ends

; Document types.   Not yet used for anything. 

KDocumentType etype	word
	KDT_SM		enum	KDocumentType
	KDT_FAX		enum	KDocumentType
	KDT_TEXT	enum	KDocumentType


; Action types.   These are currently only used when getting phone numbers. 

KActionType etype word
	KAT_SM		enum	KActionType
	KAT_FAX		enum	KActionType
	KAT_PHONE	enum	KActionType
	KAT_TERMINAL	enum	KActionType
	KAT_TELNET	enum	KActionType
	KAT_GOPHER	enum	KActionType



;
; We'll need some kind of access into the speed dial numbers, which will also 
; be global and editable.   Maybe we'll keep them in the .ini file.   But still
; it would be nice to have central entry points for getting/setting.
;

ContactClass	class	GenControlClass

; Content Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

CFeatures	record
    CF_SEARCH:1
    CF_CHOOSE_CARD_PHONE:1
CFeatures	end

C_DEFAULT_FEATURES		equ	mask CF_SEARCH

; Temporary card structure!   Will do something more radical later, on the 
; order of: 
; 	number of fields
;	pointers to fields (perhaps each field will have to be an lmem chunk)
;	for each field:
;		type/null-termed field name/null-termed field data
;	secret flag
;	

MAX_NUM_NAME_RECORD_CHARS		equ	39
MAX_NUM_ADDR_RECORD_CHARS		equ	59
MAX_NUM_PHONE_RECORD_CHARS		equ	19
MAX_NUM_NOTES_RECORD_CHARS		equ	200
MAX_NUM_SMS_RECORD_CHARS		equ	39
MAX_NUM_EMAIL_RECORD_CHARS		equ	39
MAX_NUM_DTMF_RECORD_CHARS		equ	39

ContactNameString	type	MAX_NUM_NAME_RECORD_CHARS+1 dup (char)
ContactAddrString	type	MAX_NUM_ADDR_RECORD_CHARS+1 dup (char)
ContactPhoneString	type	MAX_NUM_PHONE_RECORD_CHARS+1 dup (char)
ContactNotesString	type	MAX_NUM_NOTES_RECORD_CHARS+1 dup (char)

NamePhoneParams	struc
	NPP_name	ContactNameString
	NPP_company	ContactNameString
	NPP_phone	ContactPhoneString
NamePhoneParams	ends

FileNameInfo	struct
	FNI_fname	FileLongName
	; the file name
	FNI_path	GenFilePath
	; the path to the filename
FileNameInfo	ends


CardEntry	struc
	CE_name		ContactNameString
	CE_company	ContactNameString
CardEntry	ends



SendType	etype	word
	ST_FAX		enum	SendType
	ST_SMS		enum	SendType
	ST_EMAIL	enum	SendType
	ST_CALL		enum	SendType
	ST_FILE		enum	SendType
	ST_PRINT	enum	SendType

MSG_CONTACT_GET_CUR_CARD	message
;
;	Returns info for the current entry.
;
;	Pass:	cx:dx -- buffer of size ContactRecord
;	Return:	carry clear if no selection, else:
;			cx:dx -- buffer, filled in with ContactRecord

MSG_CONTACT_FIND_CARD	message
;
;	Finds an entry, given a name.
;
;	Pass:	cx:dx -- ContactRecord
;	Return:	carry clear if card not found, else:
;			cx:dx -- buffer, filled in with ContactRecord

MSG_CONTACT_CHOOSE_CARD_PHONE	message
;
;	Given the currently selected entry, lets the user choose a phone number
; 	of the given type and return the phone and person info to be used by an
;	application.
;
;	Pass:	cx - message to send to contact manager output
;		bp -- SendType
;	Return:	nothing
;	Destroyed: ax, cx, dx, bp
;
;	If the user selects an item and clicks "Send", the passed-in message
;	is sent to the output of the Contact controller with the following
;	params:
;
;	Pass:	BP - handle of NamePhoneParams
;			(0 if the user selected "cancel")

MSG_CONTACT_CARD_PHONE_SELECTED	message
;
; 	Internal message sent to the Contact object when the user clicks
;	"send" or "close" in the "Choose card phone" dialog
;
;	Pass: cx - index of item selected in the list
;	Return: nothing
;	Destroyed: ax, cx, dx, bp
;



MSG_CONTACT_DIAL_BY_HAND		message
;
;	Utility to dial by hand, which prompts the user for such things.
;
;	Pass:	cx - message to send to contact manager output
;		bp -- SendType
;	Return:	nothing
;	Destroyed: ax, cx, dx, bp
;
;	If the user selects an item and clicks "Send", the passed-in message
;	is sent to the output of the Contact controller with the following
;	params:
;
;	Pass:	BP - handle of NamePhoneParams
;			(0 if the user selected "cancel")

MSG_CONTACT_DIAL_BY_HAND_CANCEL	message
MSG_CONTACT_DIAL_BY_HAND_CALL		message
;
; 	Messages sent by the "Dial by hand" dialog box when the user clicks
;	"call" or "cancel".
;
;	Pass: nothing
;	Return: nothing
;	Destroyed: nothing
;

MSG_CONTACT_GET_RECENT_CALL		message
;
;	Utility to get a call from the log, which prompts the user for such 
;	things.
;
;	Pass:	cx - message to send to contact manager output
;		bp -- SendType
;	Return:	nothing
;	Destroyed: ax, cx, dx, bp
;
;	If the user selects an item and clicks "Send", the passed-in message
;	is sent to the output of the Contact controller with the following
;	params:
;
;	Pass:	BP - handle of NamePhoneParams
;			(0 if the user selected "cancel")
;

MSG_CONTACT_RECENT_CALL_SELECTED	message
;
;	Internal message sent to the Contact object when the user clicks
;	"send" or "close" in the recent calls dialog.
;
;	Pass: cx - index of item selected in the list
;	Return: nothing
;	Destroyed: ax, cx, dx, bp
;

MSG_CONTACT_RECENT_CALL_CLEAR_ALL_LISTS	message
;
;	Internal message sent to the Contact object when the user clicks
;	"clear all call lists" in the recent calls dialog.
;
;	Pass: nothing
;	Return: nothing
;	Destroyed: ax, cx, dx, bp
;

MSG_CONTACT_RECENT_CALL_CLEAR_THIS_LIST	message
;
;	Internal message sent to the Contact object when the user clicks
;	"clear this call list" in the recent calls dialog.
;
;	Pass: nothing
;	Return: nothing
;	Destroyed: ax, cx, dx, bp
;

MSG_CONTACT_GET_VOICE_MAIL_NUMBER		message
;
;	Utility to get the voicemail number, to be consistent with the other 
;	messages and make the phone app cleaner?
;
;	Pass:	cx:dx -- NamePhoneParams to fill in
;		bp -- ContactActionType (not used)
;	Return:	carry clear if user cancelled, else:
;		cx:dx filled in with name = "Voice Mail Box"? and phone
;		   # to use


MSG_CONTACT_QUERY_NAME				message
;	
;	Internal, queries the database for a moniker to use.
;
;	Pass:	^lcx:dx -- list
;		bp -- position
;	Return:	nothing
;		ax, cx, dx, bp -- destroyed
;

MSG_CONTACT_SEARCH_TEXT_TIMEOUT_MSG		message
;
; Internal, search text edit has timed out.  Re-initialize the name list.
;
; Pass:		nothing
; Return:	nothing
; Destroy:	ax, cx, dx, bp
;

MSG_CONTACT_GET_CUR_SELECTION			message
;
; Gets the index number of the currently selected item
;
; Pass:		nothing
; Return:	ax - item selected (or GIGS_NONE)
; Destroy:	nothing
;

MSG_CONTACT_STATUS_MSG	message
;
; Internal, respond to name list status msg
;
; Pass:		cx = current selection, or first selection in item 
;		     group, if more than one selection, or GIGS_NONE 
;		     of no selection
;		bp = number of selections
;		dl = GenItemGroupStateFlags
; Return:	nothing
; Destroyed:	ax, cx, dx, bp
;

MSG_CONTACT_CHOOSE_CARD_PHONE_QUERY_NUMBER	message
;
; Internal, respond to msg for providing a fax/phone number
;
; Pass:		^lcx:dx -- list
;		bp -- position
; Return: 	nothing
; Destroyed:	ax, cx, dx, bp
;

MSG_CONTACT_SEARCH_TEXT_LOST_FOCUS			message
;
; Notification when the search text object has lost the focus - in most
; cases, we want to reset the search text.  
;
; Pass:		nothing
; Return:	nothing
; Destroyed:	ax, cx, dx, bp
;

CallDialogInfo	struct
	CDI_dialog		optr
	; The OD of the "RecentCall" dialog box

	CDI_type		SendType
	; The type of the calls being displayed

	CDI_msg			word
	; The message we should send out

	CDI_record		word
	; The index of the record being displayed (for ChooseCardPhone dialog)

	CDI_origSelection	word
	; The index of the selected item in the list

CallDialogInfo	ends

	TEMP_RECENT_CALL_DIALOG_INFO		vardata	CallDialogInfo
	TEMP_CHOOSE_CARD_PHONE_DIALOG_INFO	vardata	CallDialogInfo
	TEMP_DIAL_BY_HAND_DIALOG_INFO		vardata	CallDialogInfo

	ATTR_CONTACT_LIST_MONIKER		vardata	lptr.VisMoniker
	; A chunk handle of the moniker for the contact list

	ATTR_CONTACT_LIST_STATUS_MSG		vardata	word
	; This field contains the message that is sent out whenever the
	; contact list selection changes

	ATTR_CONTACT_LIST_CALL_TYPE		vardata	SendType
	; The type of phone numbers to list in the "choose phone" dialog

	ATTR_CONTACT_LIST_CALL_MSG		vardata word
	; This field contains the message that is sent out whenever the
	; user selects a phone number

; Contact Class Instance data

CI_searchResult		lptr
	;A chunkarray of the results of the most recent search, or 0 if no
	; search.
CI_timerID		word
CI_timerHandle		hptr
CI_curItem		word
	;Internal, keeps track of currently selected item, if any.


ContactClass	endc

ContactRecordManagerClass	class	GenControlClass

	MSG_CONTACT_RECORD_MANAGER_CREATE_NEW_RECORD	message
	;
	; Start creating new record
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_DELETE_SELECTED_RECORD	message
	;
	; Start creating new record
	;
	; Pass: nothing
	; Return: nothing
	; Destroy: ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_EDIT_SELECTED_RECORD	message
	;
	; Edits the currently selected card
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_OPEN_RECORD		message
	;
	; Opens the passed record
	;
	; Pass:		cx - record # to open
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_CLOSE_FORM		message
	;
	; Close record form
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_INITIATE_ADD_FIELD	message
	;
	; Bring up popup with list of fields which can be added.
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_DELETE_FIELD	message
	;
	; Deletes the selected field
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_UPDATE_FIELDS		message
	;
	; Update the {usable}/{not usable} state of the fields
	;
	; Pass:		cx = ContactRecordManagerState fields to change
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_UPDATE_CONTACT_FILE		message
	;
	; Write the cached data out to the file, and send out an
	; update message
	;
	; Pass: cx - item number that was deleted/edited/created
	;	dx - MSG_CONTACT_LIST_ITEM_ADDED/EDITED/DELETED
	;		(depending on what action just occurred)
	; Return: nothing
	; Destroy: ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_ENTER_EDIT_FIELD_MODE message
	;
	; Puts the controller in "edit field" mode
	;
	; Pass: 	nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_EXIT_EDIT_FIELD_MODE message
	;
	; Gets out of "edit fields" mode, by changing the available triggers.
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_ENTER_CONTACT_INFO_MODE message
	;
	; Puts the controller in "get contact info" mode
	;
	; Pass: 	nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_EXIT_CONTACT_INFO_MODE message
	;
	; Gets out of "get contact info" mode, by changing the available
	; triggers.
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_CLOSE_RECORD		message
	;
	; Close record saving all changes
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_LIST_ITEM_SELECTED	message
	;
	; Message sent out when the selection changes in the contact list
	;
	; Pass: same as data sent out with GenItemGroup's status/apply message
	;		cx - current selection
	;		bp - # selections
	;		dl - GenItemGroupStateFlags
	;
	; Return: nothing
	; Destroy: ax, cx, dx, bp
	;

ContactSecretStatus	etype	word
	CSS_NOT_SECRET		enum	ContactSecretStatus
	CSS_SECRET		enum	ContactSecretStatus

	MSG_CONTACT_RECORD_MANAGER_SET_SECRET_STATUS	message
	;
	; Sets the secret status of the record
	;
	; Pass:		cx = ContactSecretStatus
	; Return: 	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_SET_SPEED_DIAL_LOCATION 	message
	;
	; Sets the speed dial position of the current record
	; 
	; Pass: 	cx = speed dial location
	; Return:	nothing
	; Destroy: 	ax, cx, dx,bp
	;

	MSG_CONTACT_RECORD_MANAGER_OPEN_SELECTED_RECORD_CONTACTS	message
	;
	; Displays contacts for the selected person
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

	MSG_CONTACT_RECORD_MANAGER_OPEN_GENERAL_LOG	message
	;
	; Displays all contacts
	;
	; Pass:		nothing
	; Return:	nothing
	; Destroy:	ax, cx, dx, bp
	;

ContactRecordManagerState	record
    CRMS_COMPANY:1
    CRMS_NAME:1
    CRMS_ADDRESS:1
    CRMS_CITYSTATE:1
    CRMS_PHONE:1
    CRMS_FAX:1
    CRMS_CELLPHONE:1
    CRMS_SMS:1
    CRMS_EMAIL:1
    CRMS_DTMF:1
    CRMS_SECRET:1
    :3
    CRMS_CREATING_RECORD:1
    CRMS_DELETING_FIELD:1
ContactRecordManagerState	end

ContactRecordManagerFeatures	record
	CRMF_EDIT:1
	CRMF_DELETE:1
	CRMF_CREATE_NEW:1
	CRMF_CONTACT_INFO:1
ContactRecordManagerFeatures	end

	CRMI_state		ContactRecordManagerState
	;
	; bitfield record indicating which fields are usable
	;

	CRMI_recordNum		word
	;
	; record number
	;

ContactRecordManagerClass	endc

;Need entry points for log stuff



KFileSelectorClass	class	GenFileSelectorClass

KDocumentDir	etype word
	KDD_NONE			enum	KDocumentDir
	KDD_CREATED_TEXTS		enum	KDocumentDir
	KDD_RECEIVED_FAXES		enum	KDocumentDir
	KDD_RECEIVED_SM			enum	KDocumentDir
	KDD_FETCHED_INTERNET_FILES	enum	KDocumentDir


MSG_KFS_SET_PATH		message
;
; Set the open directory.
;
; Pass:		cx -- KDocumentDir
; Return:	nothing
;		ax, dx, bp -- destroyed
;

MSG_KFS_GET_PATH		message
;
; Get the current path.
;
; Pass:		nothing
; Return:	cx -- KDocumentDir
;		ax, dx, bp -- destroyed
;

MSG_KFS_OPEN_CUR_FILE		message
;
; Use this to open the currently selected file or directory.   If it's a
; file, fname is filled in with its name, and the file handle of the opened
; file is returned.   
;
; Pass:		cx:dx -- FileLongName, to fill in
; Return:	ax -- FileHandle if file opened, else zero
;		cx:dx -- FileLongName, filled in
;		dx, bp -- destroyed
;

MSG_KFS_DELETE_FILE		message
;
; Use this to delete a file, given its handle.  Must already have been closed.
;
; Pass:		cx -- file handle
; Return:	carry set if error deleting the file
;

ATTR_KFS_DOCUMENT_DIR		vardata	KDocumentDir
; Default document directory for the file selector.

KFileSelectorClass	endc


;----------------------------------------------------------------------------
;  SMS Edit Control
;----------------------------------------------------------------------------
SMSEditClass	class	GenControlClass

SMSEditFeatures	record
	SEF_SEND_AS:1
	SEF_SEND:1
	SEF_DELETE:1
	SEF_SAVE:1
SMSEditFeatures	end

SEC_DEFAULT_FEATURES equ mask SEF_SEND or mask SEF_DELETE or mask SEF_SAVE

MAX_SMS_TEXT_SIZE	equ	160

	MSG_SMS_EDIT_CREATE_NEW		message
	;
	; Creates a new SMS message to edit
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_SMS_EDIT_OPEN		message
	;
	; Displays an SMS message.
	;
	; Pass: cx:dx - FileNameInfo
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_SMS_EDIT_CLOSE		message
	;
	; Close the currently opened file.
	;
	; Pass:		nothing
	; Return:	carry set if problem closing the file
	;

	MSG_SMS_EDIT_SEND_OPTIONS	message
	;
	; Displays the box with sending options (sent when the user
	; clicks "Send").
	;
	; Pass:	cx - SendType
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_SMS_EDIT_SAVE		message
	;
	; Saves the SMS message text in a file.
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_SMS_EDIT_DELETE		message
	;
	; Displays the "Delete" confirmation box
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: nothing
	;

	MSG_SMS_EDIT_GET_FILE_HANDLE	message
	;
	; Return file handle of the currently open file.
	;
	; Pass:		nothing
	; Return:	ax -- file handle (zero if none)
	;

	MSG_SMS_EDIT_GET_TEXT	message
	;
	; Get the SMS text.
	; 
	; Pass:		dx:bp -- text buffer to fill, len MAX_SMS_TEXT_SIZE+1
	; Return:	cx -- number of chars copied, not including null
	;		dx:bp -- buffer filled in
	;		ax -- destroyed
	;		

	MSG_SMS_EDIT_SET_TEXT	message
	;
	; Sets the SMS text.
	; 
	; Pass:		cx:bp -- text to use
	;		dx -- length, not including null
	; Return:	any return params (event is freed)
	;		ax, cx, dx, bp -- destroyed
	;		

	MSG_SMS_EDIT_SET_ADDRESS	message
	;
	; Set the address for display on the right side of the envelope.
	; 
	; Pass:		cx:dx -- NamePhoneParams
	; Return:	any return params (event is freed)
	;		

	MSG_SMS_EDIT_GET_ADDRESS	message
	;
	; Get the current address stuff.
	; 
	; Pass:		cx:dx -- NamePhoneParams buffer
	; Return:	cx:dx -- NamePhoneParams buffer, with address filled in
	;		ax, bp -- destroyed
	;		

	MSG_SMS_EDIT_SET_FLAGS		message
	;
	; Set SMSEdit flags.
	;
	; Pass:		cl -- SMSEditFlags to set
	; 		ch -- SMSEditFlags to clear
	; Return:	nothing
	;

	MSG_SMS_EDIT_SET_TITLE_TEXT	message
	;
	; Set title text of the editor without affecting the filename.
	;
	; Pass:		dx:bp	- ptr null-terminated buffer holding title text
	; Return:	nothing
	;

	SMSEditFlags	record
		SMSEF_READ_ONLY:1	;sms edit is read only
		SMSEF_STAMP:1		;stamp on message
		SMSEF_POSTMARK:1	;postmark on message
		SMSEF_SENT:1		;message is sent
		SMSEF_RECEIVED:1	;this message was received, not sent
		:3			; address is "From" not "To".
	SMSEditFlags	end

	ATTR_SMS_EDIT_FILE_NAME		vardata	FileLongName
	; The filename of the currently displayed file

	ATTR_SMS_EDIT_PATH		vardata	GenFilePath
	; The path of the currently displayed file

	SMSEI_flags	SMSEditFlags	;flags
	SMSEI_address	NamePhoneParams	;address, for display
	SMSEI_fhan	word		;file handle of edited file
	SMSEI_text	lptr		;text body, so we can preserve state

SMSEditClass	endc

;----------------------------------------------------------------------------
;  Notes Edit Control
;----------------------------------------------------------------------------
NotesEditClass	class		GenControlClass

NotesEditFeatures	record
	NEF_EDITING_TOOLS:1
	NEF_SEND_AS:1
	NEF_SEND:1
	NEF_DELETE:1
	NEF_SAVE:1
NotesEditFeatures	end

NEC_DEFAULT_FEATURES	equ mask NEF_EDITING_TOOLS or mask NEF_SEND or mask NEF_DELETE or mask NEF_SAVE

	MSG_NOTES_EDIT_CREATE_NEW	message
	;
	; Creates a new file to edit
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_NOTES_EDIT_OPEN		message
	;
	; Displays an existing file
	;
	; Pass: cx:dx - FileNameInfo
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_NOTES_EDIT_SET_FONT		message
	;
	; Sets the font for the current selection
	;
	; Pass: cx - FontID
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_NOTES_EDIT_SET_SIZE		message
	;
	; Sets the points size for the current selection
	;
	; Pass: cx - text size (in points)
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	
	MSG_NOTES_EDIT_SEND_OPTIONS		message
	;
	; Displays the box with sending options (sent when the user
	; clicks "Send", or OK from the "Send As" dialog).
	;
	; Pass:	cx - SendType
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_NOTES_EDIT_SAVE			message
	;
	; Saves the current text in a file.
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_NOTES_EDIT_SET_TEXT_STYLE		message
	;
	; Sets the style of the current font
	;
	; Pass: cl - TextStyle
	;	ch - BooleanByte:
	;		BB_TRUE - turn the text style on
	;		BB_FALSE - turn the text style off
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_NOTES_EDIT_DELETE			message
	;
	; Displays the "Delete" confirmation box
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: nothing
	;
	ATTR_NOTES_EDIT_FILE_NAME		vardata	FileLongName
	; The filename of the currently displayed file

	ATTR_NOTES_EDIT_PATH			vardata	GenFilePath
	; The path of the currently displayed file

	ATTR_NOTES_EDIT_NOTE_TITLE		vardata	lptr.char
	; The chunk handle of a text string to prepend to the filename
	; when creating new notes

NotesEditClass	endc


FaxViewerClass	class		GenControlClass
FaxViewerFeatures	record
	FVF_SEND_AS:1
	FVF_SEND:1
	FVF_DELETE:1
	FVF_ZOOM:1
	FVF_ROTATE:1
	FVF_MARGINS:1
FaxViewerFeatures	end
FVC_DEFAULT_FEATURES	equ	mask FVF_ZOOM or mask FVF_SEND or mask FVF_ROTATE or mask FVF_MARGINS or mask FVF_DELETE

	MSG_FAX_VIEWER_OPEN			message
	;
	; Displays an existing file
	;
	; Pass: cx:dx - FileNameInfo
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_FAX_VIEWER_SEND_OPTIONS		message
	;
	; Displays the box with sending options (sent when the user
	; clicks "Send", or OK from the "Send As" dialog).
	;
	; Pass:	cx - SendType
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_FAX_VIEWER_DELETE			message
	;
	; Displays the "Delete" confirmation box
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: nothing
	;

	MSG_FAX_VIEWER_CHANGE_TRIGGER_SET	message
	;
	; Sets a new group of FaxViewerTriggers usable
	;
	; Pass: cx - chunk handle of interaction to set usable
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;


FaxViewerClass	endc


;GreyFrameClass	class	GenInteractionClass
;GreyFrameClass	endc

;
; Classes for creating tab stuff.
;
TabCompClass		class	GenGadgetClass

MSG_TAB_COMP_ITEM_SELECTED		message
;
;	Pass:	cx -- currently open tab
;		dx -- number of items under the tab
;		bp -- current item
;	Return:	nothing
;		ax, cx, dx, bp -- destroyed
;


SECTION_HEADER		equ	-1


; These are all internal variables.

TCI_numTabs		word	0	;number of tabs
TCI_curItem		word	-1	;current item
TCI_curOpenSection	word	-1	;current open section
TCI_curNumFiles		word	-1	;current number of files

TEMP_TAB_COMP_NEEDS_FULL_REDRAW		vardata



TabCompClass	endc

TabClass	class	GenGlyphClass
TabClass	endc

TabCompParentClass	class	GenInteractionClass
TabCompParentClass	endc

ResponderFileOpenClass	class	GenControlClass

ResponderFileOpenFeatures	record
	RFOF_OPEN:1
	RFOF_CREATE_NEW:1
	RFOF_DELETE:1
	RFOF_RENAME:1
ResponderFileOpenFeatures	end
	RFOF_DEFAULT_FEATURES	equ	mask RFOF_OPEN or mask RFOF_CREATE_NEW

	RFOI_type		KDocumentType
	; The type of document we will create (by default)

	MSG_FILE_OPEN_CONTROL_OPEN	method
	;
	; Opens/displays the currently selected file
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_FILE_OPEN_CONTROL_CREATE_NEW	method
	;
	; Creates a new file
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_FILE_OPEN_CONTROL_DELETE	method
	;
	; Deletes the currently selected file
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_FILE_OPEN_CONTROL_RENAME	method
	;
	; Renames the currently selected file
	;
	; Pass: nothing
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	MSG_FILE_OPEN_CONTROL_ITEM_SELECTED	method
	;
	; Message sent out when an item is selected in the file selector
	;
	; Pass: cx - entry # of selection
	;	bp - GenFileSelectorEntryFlags
	;
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;
	
	MSG_FILE_OPEN_CONTROL_SET_DIRECTORY	method
	;
	; Sets the current directory for the file selector
	;
	; Pass: cx - KDocumentDir
	; Return: nothing
	; Destroyed: ax, cx, dx, bp
	;

	ATTR_FILE_OPEN_DEFAULT_DIRECTORY	vardata	KDocumentDir
	; The directory to start off in

ResponderFileOpenClass	endc

EndLibrary	contact




