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

	Copyright (c) GeoWorks 1990, 1991 -- All Rights Reserved

PROJECT:	PC GEOS
FILE:		tCtrlC.def

DECLARER:	Text Library

DESCRIPTION:
	This file contains the definition of text UI controller classes

	$Id: tCtrlC.def,v 1.2 98/04/24 00:37:32 gene Exp $

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

SetDef __TCTRLC

StartLibrary	text

include font.def
UseLib ruler.def
UseLib Objects/colorC.def
UseLib Objects/styles.def

;******************************************************************************
;		TextStyleControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_TEXT_STYLE (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_STYLE_CHANGE: NotifyTextStyleChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

TextStyleControlClass	class	GenControlClass

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

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

MSG_TSC_PLAIN_TEXT_CHANGE	message
;
; Sent from "Plain" list entry on any change
;
; Pass:
;	nothing

MSG_TSC_STYLE_CHANGE	message
;
; Sent from non-exclusive "Style" list on any change
;
; Pass:
;	cx - new state of style list
;	bp - changed bits in style list

MSG_TSC_EXTENDED_STYLE_CHANGE	message
;
; Sent from non-exclusive "Style" list on any change
;
; Pass:
;	cx - new state of style list
;	bp - changed bits in style list

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

TSCFeatures	record
    TSCF_PLAIN:1
    TSCF_BOLD:1
    TSCF_ITALIC:1
    TSCF_UNDERLINE:1
    TSCF_STRIKE_THRU:1
    TSCF_SUBSCRIPT:1
    TSCF_SUPERSCRIPT:1
    TSCF_BOXED:1
    TSCF_BUTTON:1
    TSCF_INDEX:1
    TSCF_ALL_CAP:1
    TSCF_SMALL_CAP:1
TSCFeatures	end

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

TSCToolboxFeatures	record
    TSCTF_PLAIN:1
    TSCTF_BOLD:1
    TSCTF_ITALIC:1
    TSCTF_UNDERLINE:1
    TSCTF_STRIKE_THRU:1
    TSCTF_SUBSCRIPT:1
    TSCTF_SUPERSCRIPT:1
    TSCTF_BOXED:1
    TSCTF_BUTTON:1
    TSCTF_INDEX:1
    TSCTF_ALL_CAP:1
    TSCTF_SMALL_CAP:1
TSCToolboxFeatures	end







TSC_DEFAULT_FEATURES equ mask TSCF_PLAIN or mask TSCF_BOLD \
			or mask TSCF_ITALIC or mask TSCF_UNDERLINE \
			or mask TSCF_SUBSCRIPT or mask TSCF_SUPERSCRIPT \
			or mask TSCF_STRIKE_THRU \
			or mask TSCF_BOXED or mask TSCF_BUTTON \
			or mask TSCF_INDEX or mask TSCF_ALL_CAP \
			or mask TSCF_SMALL_CAP

TSC_DEFAULT_TOOLBOX_FEATURES equ mask TSCTF_PLAIN or mask TSCTF_BOLD \
			or mask TSCTF_ITALIC or mask TSCTF_UNDERLINE

; Notification structure

NotifyTextStyleChange	struct
    NTSC_styles		TextStyle
    NTSC_indeterminates	TextStyle
NotifyTextStyleChange	ends

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

TextStyleControlClass	endc

;******************************************************************************
;		FontControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_FONT_ID (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_FONT_CHANGE: NotifyFontChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

FontControlClass	class	GenControlClass

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

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

MSG_FC_SET_FONT	message
;
; Handle a font set via the short list
;
; Pass:
;	cx - font ID

MSG_FC_SET_FONT_FROM_LIST	message
;
; Handle a font set via the long list
;
; Pass:
;	cx - font ID

MSG_FC_USER_CHANGED_FONT_FROM_LIST	message
;
; Handles user change of a font in the long list
;
; Pass:
;	cx - font ID

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

ATTR_FONT_CONTROL_SHORT_LIST_FONT_TYPE	vardata	FontEnumFlags
;
; This attribute sets the legal font types for the short font list

ATTR_FONT_CONTROL_LONG_LIST_FONT_TYPE	vardata	FontEnumFlags
;
; This attribute sets the legal font types for the long font list

protominor TextUIFont
ATTR_FONT_CONTROL_INCLUDE_UI_FONT   vardata
;
; Include the UI font ([ui]/fontID) in the font lists
protoreset

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

FCFeatures	record
    FCF_SHORT_LIST:1
    FCF_LONG_LIST:1
FCFeatures	end

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

FCToolboxFeatures	record
    FCTF_TOOL_LIST:1
FCToolboxFeatures	end



FC_DEFAULT_FEATURES equ mask FCF_SHORT_LIST or mask FCF_LONG_LIST
FC_DEFAULT_TOOLBOX_FEATURES equ mask FCTF_TOOL_LIST

; Notification structure

NotifyFontChange	struct
    NFC_fontID		FontID
    NFC_diffs		byte
NotifyFontChange	ends

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

FontControlClass	endc

;******************************************************************************
;		PointSizeControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_POINT_SIZE (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_POINT_SIZE_CHANGE: NotifyPointSizeChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

PointSizeControlClass	class	GenControlClass

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

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

MSG_PSC_SET_POINT_SIZE	message
;
; Pass:
;	dx.cx - size

MSG_PSC_SET_POINT_SIZE_FROM_LIST message
;
; Pass:	cx - size
;

MSG_PSC_SMALLER_POINT_SIZE	message

MSG_PSC_LARGER_POINT_SIZE	message


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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

PSCFeatures	record
    PSCF_9:1
    PSCF_10:1
    PSCF_12:1
    PSCF_14:1
    PSCF_18:1
    PSCF_24:1
    PSCF_36:1
    PSCF_54:1
    PSCF_72:1
    PSCF_SMALLER:1
    PSCF_LARGER:1
    PSCF_CUSTOM_SIZE:1
PSCFeatures	end

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

PSCToolboxFeatures	record
    PSCTF_9:1
    PSCTF_10:1
    PSCTF_12:1
    PSCTF_14:1
    PSCTF_18:1
    PSCTF_24:1
    PSCTF_36:1
    PSCTF_54:1
    PSCTF_72:1
    PSCTF_SMALLER:1
    PSCTF_LARGER:1
PSCToolboxFeatures	end







PSC_DEFAULT_FEATURES equ mask PSCF_9 or mask PSCF_10 or mask PSCF_12 or \
			  mask PSCF_14 or mask PSCF_18 or mask PSCF_24 or \
			  mask PSCF_36 or mask PSCF_54 or mask PSCF_72 or \
			  mask PSCF_CUSTOM_SIZE or \
			  mask PSCF_SMALLER or mask PSCF_LARGER

PSC_DEFAULT_TOOLBOX_FEATURES equ mask PSCTF_9 or mask PSCTF_10 or mask PSCTF_12 \
			or mask PSCTF_14 or mask PSCTF_18 or mask PSCTF_24 \
			or mask PSCTF_36 or mask PSCTF_54 or mask PSCTF_72 \
			or mask PSCTF_SMALLER or mask PSCTF_LARGER

; Notification structure

NotifyPointSizeChange	struct
    NPSC_pointSize	WWFixed
    NPSC_diffs		byte
NotifyPointSizeChange	ends

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

PointSizeControlClass	endc

;******************************************************************************
;		CharFGColorControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_CHAR_FG_COLOR (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_CHAR_FG_COLOR_CHANGE: NotifyColorChange

CharFGColorControlClass	class	ColorSelectorClass

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

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

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

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


; For now text patterns are not supported

CFGCC_DEFAULT_FEATURES equ mask CSF_INDEX or mask CSF_RGB or \
			   mask CSF_DRAW_MASK or mask CSF_PATTERN or \
			   mask CSF_OTHER

CFGCC_DEFAULT_TOOLBOX_FEATURES equ mask CSTF_INDEX or mask CSTF_DRAW_MASK or \
				   mask CSTF_PATTERN

NCCFlagsUnion	union
    NCCFU_char		VisTextCharAttrFlags
    NCCFU_paragraph	VisTextParaAttrFlags
    NCCFU_border	VisTextParaAttrBorderFlags
NCCFlagsUnion	ends

NotifyColorChange	struct
    NCC_color		ColorQuad
    NCC_grayScreen	SystemDrawMask
    NCC_pattern		GraphicPattern
    NCC_flags		NCCFlagsUnion
				;VTCAF_MULTIPLE_COLORS
				;VTCAF_MULTIPLE_GRAY_SCREENS
				;VTCAF_MULTIPLE_PATTERNS
				;	-or-
				;VTCAF_MULTIPLE_BG_COLORS
				;VTCAF_MULTIPLE_BG_GRAY_SCREENS
				;VTCAF_MULTIPLE_BG_PATTERNS
				;	-or-
				;VTPAF_MULTIPLE_BG_COLORS
				;VTPAF_MULTIPLE_BG_GRAY_SCREENS
				;VTPAF_MULTIPLE_BG_PATTERNS
				;	-or-
				;VTPABF_MULTIPLE_BORDER_COLORS
				;VTPABF_MULTIPLE_BORDER_GRAY_SCREENS
				;VTPABF_MULTIPLE_BORDER_PATTERNS
NotifyColorChange	ends

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

CharFGColorControlClass	endc

;******************************************************************************
;		CharBGColorControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_CHAR_BG_COLOR (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_CHAR_BG_COLOR_CHANGE: NotifyColorChange
;							-or-
;						VisTextNotifyCharAttrChange

CharBGColorControlClass	class	ColorSelectorClass

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

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

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

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



CBGCC_DEFAULT_FEATURES equ mask CSF_FILLED_LIST or mask CSF_INDEX or \
			   mask CSF_RGB or mask CSF_DRAW_MASK or \
			   mask CSF_PATTERN or mask CSF_OTHER

CBGCC_DEFAULT_TOOLBOX_FEATURES equ mask CSTF_INDEX or mask CSTF_DRAW_MASK or \
				   mask CSTF_PATTERN

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

CharBGColorControlClass	endc

;******************************************************************************
;		FontAttrControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_FONT_WEIGHT (a MetaTextMessage)
; MSG_VIS_TEXT_SET_FONT_WIDTH (a MetaTextMessage)
; MSG_VIS_TEXT_SET_TRACK_KERNING (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_FONT_ATTR_CHANGE: NotifyFontAttrChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

FontAttrControlClass	class	GenControlClass

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

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

MSG_FAC_SET_FONT_WEIGHT	message
;
; Handle a font weight setting
;
; Pass:
;	cx - font weight

MSG_FAC_SET_FONT_WIDTH	message
;
; Handle a font width setting
;
; Pass:
;	cx - font weight

MSG_FAC_SET_TRACK_KERNING	message
;
; Handle a track kerning setting
;
; Pass:
;	cx - font weight

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

FACFeatures	record
    FACF_FONT_WEIGHT:1
    FACF_FONT_WIDTH:1
    FACF_TRACK_KERNING:1
FACFeatures	end

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

FACToolboxFeatures	record
FACToolboxFeatures	end





FAC_DEFAULT_FEATURES equ mask FACF_FONT_WEIGHT or mask FACF_FONT_WIDTH \
						or mask FACF_TRACK_KERNING
FAC_DEFAULT_TOOLBOX_FEATURES equ 0

; Notification structure

NotifyFontAttrChange	struct
    NFAC_fontWeight		byte
    NFAC_fontWeightDiffs	byte
    NFAC_fontWidth		byte
    NFAC_fontWidthDiffs		byte
    NFAC_trackKerning		word
    NFAC_trackKerningDiffs	byte
NotifyFontAttrChange	ends

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

FontAttrControlClass	endc

;******************************************************************************
;		JustificationControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_PARA_ATTRIBUTES (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_JUSTIFICATION_CHANGE: NotifyJustificationChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

JustificationControlClass	class	GenControlClass

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

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

MSG_JC_SET_JUSTIFICATION	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

JCFeatures	record
    JCF_FULL_CHAR:1			;DBCS only
    JCF_LEFT:1
    JCF_RIGHT:1
    JCF_CENTER:1
    JCF_FULL:1
JCFeatures	end

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

JCToolboxFeatures	record
    JCTF_FULL_CHAR:1			;DBCS only
    JCTF_LEFT:1
    JCTF_RIGHT:1
    JCTF_CENTER:1
    JCTF_FULL:1
JCToolboxFeatures	end




if PZ_PCGEOS


JC_DEFAULT_FEATURES equ mask JCF_LEFT or mask JCF_RIGHT or mask JCF_CENTER \
			or mask JCF_FULL or mask JCF_FULL_CHAR

JC_DEFAULT_TOOLBOX_FEATURES equ mask JCTF_LEFT or mask JCTF_RIGHT \
			or mask JCTF_CENTER or mask JCTF_FULL \
			or mask JCTF_FULL_CHAR

else

JC_DEFAULT_FEATURES equ mask JCF_LEFT or mask JCF_RIGHT or mask JCF_CENTER \
			or mask JCF_FULL

JC_DEFAULT_TOOLBOX_FEATURES equ mask JCTF_LEFT or mask JCTF_RIGHT \
			or mask JCTF_CENTER or mask JCTF_FULL

endif

; Notification structure

NotifyJustificationChange	struct
    NJC_justification	Justification
    NJC_diffs		byte
    NJC_useGeneral	byte	;if non-zero then use "general" in place
				;of "full"
NotifyJustificationChange	ends

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

JustificationControlClass	endc

;******************************************************************************
;		ParaSpacingControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

ParaSpacingControlClass	class	GenControlClass

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

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

MSG_PASC_SET_SPACE_ON_TOP	message
MSG_PASC_SET_SPACE_ON_BOTTOM	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

PASCFeatures	record
    PASCF_SPACE_ON_TOP:1
    PASCF_SPACE_ON_BOTTOM:1
PASCFeatures	end

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

PASCToolboxFeatures	record
PASCToolboxFeatures	end

PASC_DEFAULT_FEATURES equ mask PASCF_SPACE_ON_TOP or mask PASCF_SPACE_ON_BOTTOM

PASC_DEFAULT_TOOLBOX_FEATURES equ 0

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

ParaSpacingControlClass	endc

;******************************************************************************
;		LineSpacingControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

LineSpacingControlClass	class	GenControlClass

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

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

MSG_LASC_SET_LINE_SPACING	message
MSG_LASC_SET_LINE_SPACING_WW_FIXED message
MSG_LASC_SET_LEADING_TYPE	message
MSG_LASC_USER_CHANGED_LEADING_TYPE message
MSG_LASC_SET_MANUAL_LEADING	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

LASCFeatures	record
    LASCF_SINGLE:1
    LASCF_ONE_AND_A_HALF:1
    LASCF_DOUBLE:1
    LASCF_TRIPLE:1
    LASCF_CUSTOM:1
LASCFeatures	end

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

LASCToolboxFeatures	record
    LASCTF_SINGLE:1
    LASCTF_ONE_AND_A_HALF:1
    LASCTF_DOUBLE:1
    LASCTF_TRIPLE:1
LASCToolboxFeatures	end

LASC_DEFAULT_FEATURES equ mask LASCF_SINGLE or mask LASCF_ONE_AND_A_HALF or \
			  mask LASCF_DOUBLE or mask LASCF_TRIPLE or \
			  mask LASCF_CUSTOM

LASC_DEFAULT_TOOLBOX_FEATURES equ mask LASCTF_SINGLE or \
				  mask LASCTF_ONE_AND_A_HALF or \
				  mask LASCTF_DOUBLE or \
				  mask LASCTF_TRIPLE

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

LineSpacingControlClass	endc

;******************************************************************************
;		DefaultTabsControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

DefaultTabsControlClass	class	GenControlClass

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

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

MSG_DTC_SET_DEFAULT_TABS	message
MSG_DTC_SET_DEFAULT_TABS_VIA_LIST message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

DTCFeatures	record
    DTCF_LIST:1
    DTCF_CUSTOM:1
DTCFeatures	end

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

DTCToolboxFeatures	record
DTCToolboxFeatures	end



DTC_DEFAULT_FEATURES equ mask DTCF_LIST or mask DTCF_CUSTOM
DTC_DEFAULT_TOOLBOX_FEATURES equ 0

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

DefaultTabsControlClass	endc

;******************************************************************************
;		ParaBGColorControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_PARA_BG_COLOR (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_PARA_BG_COLOR_CHANGE: NotifyColorChange

ParaBGColorControlClass	class	ColorSelectorClass

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

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

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

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



PBGCC_DEFAULT_FEATURES equ mask CSF_FILLED_LIST or mask CSF_INDEX or \
			   mask CSF_RGB or mask CSF_DRAW_MASK or \
			   mask CSF_PATTERN or mask CSF_OTHER

PBGCC_DEFAULT_TOOLBOX_FEATURES equ mask CSTF_INDEX or mask CSTF_DRAW_MASK or \
				   mask CSTF_PATTERN

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

ParaBGColorControlClass	endc

;******************************************************************************
;		ParaAttrControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

ParaAttrControlClass	class	GenControlClass

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

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

MSG_PAC_SET_PARA_ATTR	message
MSG_PAC_SET_KEEP	message
MSG_PAC_USER_CHANGED_KEEP message
MSG_PAC_SET_KEEP_FIRST	message
MSG_PAC_SET_KEEP_LAST	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

PACFeatures	record
    PACF_WORD_WRAP:1
    PACF_COLUMN_BREAK_BEFORE:1
    PACF_KEEP_PARA_WITH_NEXT:1
    PACF_KEEP_PARA_TOGETHER:1
    PACF_KEEP_LINES:1
PACFeatures	end

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

PACToolboxFeatures	record
PACToolboxFeatures	end



PAC_DEFAULT_FEATURES equ mask PACF_WORD_WRAP or \
			 mask PACF_COLUMN_BREAK_BEFORE or \
			 mask PACF_KEEP_PARA_WITH_NEXT or \
			 mask PACF_KEEP_PARA_TOGETHER or \
			 mask PACF_KEEP_LINES
PAC_DEFAULT_TOOLBOX_FEATURES equ 0

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

ParaAttrControlClass	endc

;******************************************************************************
;		BorderControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

BorderControlClass	class	GenControlClass

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

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

MSG_BC_SET_SIMPLE_BORDER	message
MSG_BC_SET_BORDER_BITS		message
MSG_BC_SET_BORDER_WIDTH		message
MSG_BC_SET_BORDER_SPACING	message
MSG_BC_SET_BORDER_TYPE		message
MSG_BC_BORDER_TYPE_STATUS	message
MSG_BC_SET_BORDER_ANCHOR	message
MSG_BC_SET_SHADOW_WIDTH		message
MSG_BC_BORDER_SIDES_STATUS	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

BCFeatures	record
    BCF_LIST:1
    BCF_CUSTOM:1
BCFeatures	end

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

BCToolboxFeatures	record
BCToolboxFeatures	end



BC_DEFAULT_FEATURES equ mask BCF_LIST or mask BCF_CUSTOM
BC_DEFAULT_TOOLBOX_FEATURES equ 0

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

BorderControlClass	endc

;******************************************************************************
;		DropCapControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

DropCapControlClass	class	GenControlClass

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

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

MSG_DCC_SET_DROP_CAP		message
MSG_DCC_USER_CHANGED_DROP_CAP	message
MSG_DCC_SET_DROP_CHARS		message
MSG_DCC_SET_DROP_LINES		message
MSG_DCC_SET_DROP_POSITION	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

DCCFeatures	record
    DCCF_DROP_CAP:1
DCCFeatures	end

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

DCCToolboxFeatures	record
DCCToolboxFeatures	end



DCC_DEFAULT_FEATURES equ mask DCCF_DROP_CAP
DCC_DEFAULT_TOOLBOX_FEATURES equ 0

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

DropCapControlClass	endc

;******************************************************************************
;		HyphenationControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

HyphenationControlClass	class	GenControlClass

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

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

MSG_HC_SET_HYPHENATION	message
MSG_HC_USER_CHANGED_HYPHENATION message
MSG_HC_SET_MAX_RANGE	message
MSG_HC_SET_MIN_WORD	message
MSG_HC_SET_MIN_PREFIX	message
MSG_HC_SET_MIN_SUFFIX	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

HCFeatures	record
    HCF_LIST:1
HCFeatures	end

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

HCToolboxFeatures	record
    HCTF_TOGGLE:1
HCToolboxFeatures	end



HC_DEFAULT_FEATURES equ mask HCF_LIST
HC_DEFAULT_TOOLBOX_FEATURES equ mask HCTF_TOGGLE

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

HyphenationControlClass	endc

;******************************************************************************
;		BorderColorControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_PARA_BG_COLOR (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
; MANUFACTURER_ID_GEOWORKS.GWNT_PARA_BG_COLOR_CHANGE: NotifyColorChange

BorderColorControlClass	class	ColorSelectorClass

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

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

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

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

BCCToolboxFeatures	record
BCCToolboxFeatures	end





BCC_DEFAULT_FEATURES equ mask CSF_INDEX or mask CSF_RGB \
				or mask CSF_DRAW_MASK or mask CSF_PATTERN \
				or mask CSF_OTHER

BCC_DEFAULT_TOOLBOX_FEATURES equ mask CSTF_INDEX or mask CSTF_DRAW_MASK or \
				 mask CSTF_PATTERN

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

BorderColorControlClass	endc

;******************************************************************************
;		MarginControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_LEFT_MARGIN
; MSG_VIS_TEXT_SET_PARA_MARGIN
; MSG_VIS_TEXT_SET_RIGHT_MARGIN
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

MarginControlClass	class	GenControlClass

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

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

MSG_MC_SET_LEFT_MARGIN	message
MSG_MC_SET_PARA_MARGIN	message
MSG_MC_SET_RIGHT_MARGIN	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

MCFeatures	record
    MCF_LEFT_MARGIN:1
    MCF_PARA_MARGIN:1
    MCF_RIGHT_MARGIN:1
MCFeatures	end

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

MCToolboxFeatures	record
MCToolboxFeatures	end



MC_DEFAULT_FEATURES equ mask MCF_LEFT_MARGIN or mask MCF_PARA_MARGIN or \
			 mask MCF_RIGHT_MARGIN
MC_DEFAULT_TOOLBOX_FEATURES equ 0

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

MarginControlClass	endc

;******************************************************************************
;		TabControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_LEFT_MARGIN
; MSG_VIS_TEXT_SET_PARA_MARGIN
; MSG_VIS_TEXT_SET_RIGHT_MARGIN
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_CHANGE: VisTextNotifyParaAttrChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

TabControlClass	class	GenControlClass

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

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

MSG_TC_SELECT_TAB		message
MSG_TC_QUERY_TAB		message
MSG_TC_SET_TAB_LINE		message
MSG_TC_CLEAR_TAB		message
MSG_TC_CLEAR_ALL_TABS		message
MSG_TC_SET_TAB_TYPE		message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

TCFeatures	record
    TCF_LIST:1
    TCF_POSITION:1
    TCF_GRAY_SCREEN:1
    TCF_TYPE:1
    TCF_LEADER:1
    TCF_LINE:1
    TCF_CLEAR:1
    TCF_CLEAR_ALL:1
TCFeatures	end

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

TCToolboxFeatures	record
TCToolboxFeatures	end



TC_DEFAULT_FEATURES equ mask TCF_LIST or mask TCF_POSITION \
			 or mask TCF_GRAY_SCREEN or mask TCF_TYPE \
			 or mask TCF_LEADER or mask TCF_LINE \
			 or mask TCF_CLEAR or mask TCF_CLEAR_ALL
TC_DEFAULT_TOOLBOX_FEATURES equ 0

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

    TCI_numberOfTabs	word
    TCI_tabList		Tab VIS_TEXT_MAX_TABS dup (<>)
    TCI_selectedTab	word

TabControlClass	endc

;******************************************************************************
;		TextStyleSheetControlClass
;******************************************************************************
;
TextStyleSheetControlClass	class	StyleSheetControlClass

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

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

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

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

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

TextStyleSheetControlClass	endc


;******************************************************************************
;		SearchReplaceControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_SEARCH (a MetaTextMessage)
; MSG_REPLACE_CURRENT (a MetaTextMessage)
; MSG_REPLACE_ALL_OCCURRENCES (a MetaTextMessage)
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_SEARCH_SPELL_ENABLE_CHANGE
; MANUFACTURER_ID_GEOWORKS.GWNT_SELECT_STATE_CHANGE
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

SearchReplaceControlClass	class	GenControlClass

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

;-----------------------------------------------------------------------------
;		Internal methods
;-----------------------------------------------------------------------------
MSG_SRC_SEND_EVENT_TO_SEARCH_TEXT		message
MSG_SRC_SEND_EVENT_TO_REPLACE_TEXT		message
;
;	These messages send the passed events to the search/replace text objs
;
;	Pass: bp - Event handle
;	Return: from message
;	Destroyed: ax, cx, dx, bp
;

MSG_SRC_REPLACE_ALL_OCCURRENCES_QUERY_RESPONSE	message
;
;	This method is sent out by the standard dialog box put up when we are
;	confirming a global delete.
;

MSG_SRC_REPLACE_ALL_OCCURRENCES_NO_QUERY		message
;
;	Same as MSG_REPLACE_ALL_OCCURRENCES, but doesn't query the user if the
;	replace string is empty.
;

MSG_SRC_FIND_NEXT		message
MSG_SRC_FIND_PREV		message
;
;	Initiates a forward or backward search.
;


MSG_SRC_ADD_SPECIAL_CHAR_TO_FOCUS_TEXT	message
;
;	Adds a graphic representing the associated char to the search text.
;
;	Pass: cl - SpecialChar
;
SpecialChar	etype	word, 0, 2
	SC_WILDCARD	enum	SpecialChar
	SC_WILDCHAR	enum	SpecialChar
	SC_GRAPHIC	enum	SpecialChar
	SC_CR		enum	SpecialChar
	SC_PAGE_BREAK	enum	SpecialChar
	SC_TAB		enum	SpecialChar

MSG_SRC_UPDATE_SPECIAL_CHARS_BY_FOCUS_INFO	message
;
;	Updates various UI elements via the queue.
;
;	This is useful if we have found out that an object has lost the
;	focus or target, and we want to wait to see what the new focus/target
;	object is before updating the UI.
;
;	Pass: nothing
;

MSG_SRC_SEARCH_ABORTED			message	private
;
;	Method sent out if the search is aborted by a user action.
;
;	Pass: nothing
;

MSG_SRC_SEARCH_STRING_NOT_FOUND_FOR_SEARCH			message
MSG_SRC_SEARCH_STRING_NOT_FOUND_FOR_REPLACE_ALL			message
MSG_SRC_SEARCH_STRING_NOT_FOUND_FOR_REPLACE_ALL_IN_SELECTION	message
;
;	These method is sent to the SearchReplaceController if the search
;	string is not found in the document.
;
;	Pass: nothing
;	Destroyed: ax, cx, dx, bp
;

protominor TextNewForJedi
MSG_SRC_FIND_FROM_TOP		message
;
;	Just like MSG_SRC_FIND_NEXT/PREV, but it searches from the beginning
;	of the document.
;	added on 11/7/94.
;
;	Pass: nothing
;	Destroyed: ax, cx, dx, bp
;

MSG_SRC_GET_NOTE_SEARCH_STATE	message
;
;	Find out what choice the user choose (ie include/exclude notes or
;	note only).
;	added on 11/7/94.
;
;	Pass: nothing
;	Return: cl = SearchNoteOptionType
;	Destroyed: ax, ch
;
protoreset

ATTR_SEARCH_CONTROL_SET_FIND_NEXT_MONIKER			vardata	lptr
ATTR_SEARCH_CONTROL_SET_FIND_PREV_MONIKER			vardata	lptr
ATTR_SEARCH_CONTROL_SET_REPLACE_CURRENT_MONIKER			vardata	lptr
ATTR_SEARCH_CONTROL_SET_REPLACE_ALL_MONIKER			vardata	lptr
ATTR_SEARCH_CONTROL_SET_REPLACE_ALL_IN_SELECTION_MONIKER	vardata	lptr
;
;	Vardata types that allow the app to change the name of these default
;	triggers.
;

ATTR_SEARCH_CONTROL_INTERACT_ONLY_WITH_TARGETED_TEXT_OBJECTS	vardata
;
;	When this is present, the search controller will update its UI
;	depending on whether or not there is a targeted text object.
;

ATTR_SEARCH_CONTROL_SELECTION_TYPE			vardata SelectionDataType
;
;	When this is present, the search controller will use this type to
;	enable and disable the "Replace All in Selection" trigger whenever
;	a targeted object of the type has a selection.
;

protominor TextNewForJedi
ATTR_SEARCH_CONTROL_SET_FIND_FROM_TOP_MONIKER			vardata	lptr
ATTR_SEARCH_CONTROL_SET_INCLUDE_NOTE_MONIKER			vardata	lptr
ATTR_SEARCH_CONTROL_SET_EXCLUDE_NOTE_MONIKER			vardata	lptr
ATTR_SEARCH_CONTROL_SET_NOTE_ONLY_MONIKER			vardata	lptr
;
;	Vardata types that allow the app to change the name of these default
;	triggers and other options. Added in 11/7/94.
;
protoreset

protominor TemplateWizard

ATTR_SEARCH_CONTROL_SET_REPLACE_WITH_MONIKER			vardata lptr
;
;	Vardata type that allow the app to change the name of the default
;	moniker on the "Replace With" text object.
;

ATTR_SEARCH_CONTROL_DEFAULT_SEARCH_OPTIONS		vardata SearchOptions
;
;	Vardata to set the default SearchOptions.  Useful when there is no
;	ui for setting SearchOptions (SRCF_IGNORE_CASE/SRCF_PARTIAL_WORDS)
;
protoreset

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

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

SEARCH_REPLACE_MAX_WORD_LENGTH	equ	65 	;64 chars + 1 null

;	Record sent out with GWNT_SEARCH_REPLACE_ENABLE_CHANGE

SearchReplaceEnableFlags	record
	SREF_SEARCH:1
	; Set if the object can handle searches

	SREF_REPLACE:1
	; Set if the object can handle replaces
SearchReplaceEnableFlags	end

NotifySearchReplaceEnableChange	struct
	NSREC_flags	SearchReplaceEnableFlags
NotifySearchReplaceEnableChange	ends

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

SRCFeatures	record
    SRCF_NOTES_OPTIONS:1
    SRCF_FIND_FROM_TOP:1
    SRCF_CLOSE:1
    SRCF_FIND_NEXT:1
    SRCF_FIND_PREV:1
    SRCF_REPLACE_CURRENT:1
    SRCF_REPLACE_ALL_IN_SELECTION:1
    SRCF_REPLACE_ALL:1
    SRCF_PARTIAL_WORDS:1
    SRCF_IGNORE_CASE:1
    SRCF_WILDCARDS:1
    SRCF_SPECIAL_CHARS:1
SRCFeatures	end

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

SRCToolboxFeatures	record
	SRCTF_SEARCH_REPLACE:1
SRCToolboxFeatures	end



SRC_DEFAULT_FEATURES equ  mask SRCF_FIND_NEXT or mask SRCF_FIND_PREV or mask SRCF_REPLACE_CURRENT or mask SRCF_REPLACE_ALL or mask SRCF_PARTIAL_WORDS or mask SRCF_IGNORE_CASE or mask SRCF_WILDCARDS or mask SRCF_SPECIAL_CHARS or mask SRCF_REPLACE_ALL_IN_SELECTION or mask SRCF_CLOSE

SRC_SUGGESTED_BEGINNING_FEATURES equ mask SRCF_FIND_NEXT or mask SRCF_REPLACE_CURRENT or mask SRCF_REPLACE_ALL or mask SRCF_CLOSE

SRC_DEFAULT_TOOLBOX_FEATURES equ mask SRCTF_SEARCH_REPLACE

;-----------------------------------------------------------------------------
;		Instance Data
;-----------------------------------------------------------------------------
SearchReplaceFocusInfo	etype	byte
	SRFI_SEARCH_TEXT	enum	SearchReplaceFocusInfo
	SRFI_REPLACE_TEXT	enum	SearchReplaceFocusInfo

	SRCI_focusInfo		SearchReplaceFocusInfo
	;	Which object most recently had the focus

	SRCI_enableFlags	SearchReplaceEnableFlags
	;	Which options the current target handles.

	SRCI_haveSelection	byte	;0 if no selection

SearchReplaceControlClass	endc





;******************************************************************************
;		TextRulerClass
;******************************************************************************

TextRulerClass	class VisRulerClass

;------------------------------------------------------------------------------
;	Constants and Structures
;------------------------------------------------------------------------------

TEXT_RULER_HEIGHT	equ	VIS_RULER_HEIGHT + 12

TEXT_POS_INVALID	equ	0x80000000

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

MSG_TEXT_RULER_SET_GCN_CONTENT		message
;
; Set the content to attach to GCN lists for
;
; Pass:
;	cx:dx - content
; Return:
;	none

MSG_TEXT_RULER_SET_CONTROLLED_ATTRS	message
;
; Set the controlled bits
;
; Pass:
;	cx - TextRulerControlAttributes
; Return:
;	none

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

TextRulerFlags	record
    :3
    TRF_ALWAYS_MOVE_BOTH_MARGINS:1
    TRF_ROUND_COORDINATES:1
    TRF_OBJECT_SELECTED:1
    TRF_SELECTING:1
    TRF_DRAGGING:1
TextRulerFlags	end

TextRulerAction	etype	byte
TRA_NULL		enum	TextRulerAction
TRA_MOVE_TAB		enum	TextRulerAction
TRA_COPY_TAB		enum	TextRulerAction
TRA_MOVE_MARGIN		enum	TextRulerAction

    TRI_tabControl	optr
	noreloc TRI_tabControl
    TRI_valid		BooleanByte
    TRI_flags		TextRulerFlags
    TRI_action		TextRulerAction
    TRI_regionWidth	word
    TRI_gcnContent	optr			;content to attach GCN list
						;0 to go up the visual tree
						;1 to use the application list
	noreloc TRI_gcnContent
    TRI_selectedTab	word			;position of selected tab
    TRI_selectedObject	word			;structure offset
    TRI_selectX		sword			;x position of start select
    TRI_diffs		VisTextParaAttrDiffs
    TRI_paraAttr	VisTextMaxParaAttr	;current attributes

TextRulerClass	endc

;******************************************************************************
;		TextHelpControlClass
;******************************************************************************
;
; Message(s) sent out:
; MSG_VIS_TEXT_SET_CONTEXT
; MSG_VIS_TEXT_DEFINE_CONTEXT
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.NSNT_TEXT_TYPE_CHANGE: VisTextNotifyTypeChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

TextHelpControlClass	class	GenControlClass

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

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


MSG_THC_ADD_CONTEXT		message
;
; Add a new context name
;
MSG_THC_DELETE_CONTEXT		message
;
; Delete a context name
;
MSG_THC_RENAME_CONTEXT		message
;
; Rename a context
;
MSG_THC_SET_CONTEXT		message
;
; User did a "Set Context"
;
MSG_THC_DC_GET_MONIKER		message
;
; Get a moniker for the Define Context list
;
MSG_THC_SC_GET_MONIKER		message
;
; Get a moniker for the Set Context list
;
MSG_THC_ADD_FILE		message
;
; Add a new file name
;
MSG_THC_DELETE_FILE		message
;
; Delete a file name
;
MSG_THC_RENAME_FILE		message
;
; rename a file name
;
MSG_THC_DF_GET_MONIKER		message
;
; Get a moniker for the Define File list
;
MSG_THC_DF_FILE_CHANGED		message
;
; The user changed the file in the define file box
;
MSG_THC_SH_FILE_CHANGED		message
;
; The user changed the file in the set hyperlink box
;
MSG_THC_SET_HYPERLINK		message
;
; User did a "Set Hyperlink"
;
MSG_THC_FOLLOW_HYPERLINK	message
;
; User did a "Follow Hyperlink"
;
MSG_THC_SH_GET_MONIKER		message
;
; Get a moniker for the context list in the Set Hyperlink DB
;
MSG_THC_DC_CONTEXT_CHANGED	message
;
; The user change the context in the define context box
;
protominor TextNewForHelpEditor
MSG_THC_DELETE_ALL_HYPERLINKS	message
;
; The user pressed the "Delete All Hyperlinks" trigger.
;
MSG_THC_UNSET_ALL_CONTEXTS	message
;
; The user pressed the "Unset All Contexts" trigger.
;
protoreset



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

TEMP_CURRENT_CONTEXT_INDEX				vardata word
;
; Internal only: if context list has no selection, last selection it had.
;

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

THCFeatures	record
    THCF_CLEAR_ALL_HYPERLINKS:1
    THCF_CLEAR_ALL_CONTEXTS:1
    THCF_FOLLOW_HYPERLINK:1
    THCF_SET_HYPERLINK:1
    THCF_SET_CONTEXT:1
    THCF_DEFINE_FILE:1
    THCF_DEFINE_CONTEXT:1
THCFeatures	end

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

THCToolboxFeatures	record
THCToolboxFeatures	end

THC_DEFAULT_FEATURES equ	mask THCF_DEFINE_CONTEXT or \
				mask THCF_DEFINE_FILE or \
				mask THCF_SET_HYPERLINK or \
				mask THCF_SET_CONTEXT or \
				mask THCF_FOLLOW_HYPERLINK or \
				mask THCF_CLEAR_ALL_CONTEXTS or \
				mask THCF_CLEAR_ALL_HYPERLINKS

THC_DEFAULT_TOOLBOX_FEATURES equ 0

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

    THCI_file		word		;token of current file for contexts

TextHelpControlClass	endc

;******************************************************************************
;		TextRulerControlClass
;******************************************************************************
;
; This controller *does not* get notifications from the text rulers.  The
; controller maintains the state.
;
; Message(s) sent out:
; MSG_TEXT_RULER_SET_CONTROLLED_ATTRS
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS
;	MGCNLT_ACTIVE_LIST

TextRulerControlClass	class	GenControlClass

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

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

MSG_TRCC_CHANGE_STATE	message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

TRCCFeatures	record
    TRCCF_ROUND:1
    TRCCF_IGNORE_ORIGIN:1
TRCCFeatures	end

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

TRCCToolboxFeatures	record
TRCCToolboxFeatures	end



TRCC_DEFAULT_FEATURES equ mask TRCCF_ROUND or mask TRCCF_IGNORE_ORIGIN
TRCC_DEFAULT_TOOLBOX_FEATURES equ 0

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

TextRulerControlAttributes	record
    TRCA_ROUND:1
    TRCA_IGNORE_ORIGIN:1
    :14
TextRulerControlAttributes	end

    TRCI_attrs		TextRulerControlAttributes

TextRulerControlClass	endc

;******************************************************************************
;		TextCountControlClass
;******************************************************************************
;
; Notification type(s) responded to:
; MANUFACTURER_ID_GEOWORKS.GWNT_TEXT_COUNT_CHANGE: NotifyTextChange
;
; GenApplication GCN lists to be placed on:
;	GAGCNLT_SELF_LOAD_OPTIONS

TextCountControlClass	class	GenControlClass

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

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

MSG_TCC_RECALC			message

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

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

; Features flags (used with ATTR_GEN_CONTROL_REQUIRE_UI and
; ATTR_GEN_CONTROL_PROHIBIT_UI)

TCCFeatures	record
    TCCF_CHARACTER:1
    TCCF_WORD:1
    TCCF_LINE:1
    TCCF_PARAGRAPH:1
    TCCF_RECALC:1
TCCFeatures	end

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

TCCToolboxFeatures	record
TCCToolboxFeatures	end


TCC_DEFAULT_FEATURES equ mask TCCF_CHARACTER or mask TCCF_WORD or \
			 mask TCCF_LINE or mask TCCF_PARAGRAPH or \
			 mask TCCF_RECALC

TCC_DEFAULT_TOOLBOX_FEATURES equ 0

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

TextCountControlClass	endc

EndLibrary	text
