/*
** Textinput.mcc
** -------------
**
** General textual input MUI class
**
** (C) 1997-98 Oliver Wagner <owagner@vapor.com>
** All Rights Reserved
**
*/

#ifndef TEXTINPUT_MCC_H
#define TEXTINPUT_MCC_H

#ifndef LIBRARIES_MUI_H
#include "libraries/mui.h"
#endif

/*
** Class name, object macros
*/

#define MUIC_Textinput "Textinput.mcc"
#define TextinputObject MUI_NewObject(MUIC_Textinput

#define MUIC_Textinputscroll "Textinputscroll.mcc"
#define TextinputscrollObject MUI_NewObject(MUIC_Textinputscroll


#define MCC_TI_TAGBASE (TAG_USER|(1307<<16)+0x712)
#define MCC_TI_ID(x) (MCC_TI_TAGBASE+x)

#define MCC_Textinput_Version 13
#define MCC_Textinput_Revision 44


/*
** Methods
*/

#define MUIM_Textinput_ExternalEdit MCC_TI_ID(1) 		/* V1 */
#define MUIM_Textinputscroll_Inform MCC_TI_ID(2) 		/* V1 (private) */
#define MUIM_Textinputmcp_GrabCols MCC_TI_ID(3) 		/* V1 (private) */
#define MUIM_Textinput_Blink MCC_TI_ID(4) 				/* V1 (private) */
#define MUIM_Textinput_SaveToFile MCC_TI_ID(5) 			/* V1 */
#define MUIM_Textinput_LoadFromFile MCC_TI_ID(6) 		/* V1 */
#define MUIM_Textinput_ExternalEditDone MCC_TI_ID(7) 	/* V1 (private) */
#define MUIM_Textinput_DoRevert MCC_TI_ID(8) 			/* V1 */
#define MUIM_Textinput_DoCutLine MCC_TI_ID(9) 			/* V1 */
#define MUIM_Textinput_DoMarkStart MCC_TI_ID(10) 		/* V1 */
#define MUIM_Textinput_DoMarkAll MCC_TI_ID(11) 			/* V1 */
#define MUIM_Textinput_DoCut MCC_TI_ID(12) 				/* V1 */
#define MUIM_Textinput_DoCopy MCC_TI_ID(13)				/* V1 */
#define MUIM_Textinput_DoPaste MCC_TI_ID(14) 			/* V1 */
#define MUIM_Textinput_AppendText MCC_TI_ID(15) 		/* V1 */
#define MUIM_Textinputmcp_LAct MCC_TI_ID(16) 			/* V1 (private) */
#define MUIM_Textinputmcp_LCopy MCC_TI_ID(17) 			/* V1 (private) */
#define MUIM_Textinputmcp_LAdd MCC_TI_ID(18) 			/* V1 (private) */
#define MUIM_Textinput_DoToggleWordwrap MCC_TI_ID(19)	/* V1 */
#define MUIM_Textinput_Acknowledge MCC_TI_ID(20)		/* V1 */
#define MUIM_Textinput_TranslateEvent MCC_TI_ID(21)		/* V1 */
#define MUIM_Textinput_InsertText MCC_TI_ID(22) 		/* V1 */
#define MUIM_Textinput_DoLeft MCC_TI_ID(23) 			/* V1 */
#define MUIM_Textinput_DoRight MCC_TI_ID(24) 			/* V1 */
#define MUIM_Textinput_DoUp MCC_TI_ID(25) 				/* V1 */
#define MUIM_Textinput_DoDown MCC_TI_ID(26) 			/* V1 */
#define MUIM_Textinput_DoLineStart MCC_TI_ID(27) 		/* V1 */
#define MUIM_Textinput_DoLineEnd MCC_TI_ID(28)	 		/* V1 */
#define MUIM_Textinput_DoTop MCC_TI_ID(29)				/* V1 */
#define MUIM_Textinput_DoBottom MCC_TI_ID(30)			/* V1 */
#define MUIM_Textinput_DoPageUp MCC_TI_ID(31)			/* V1 */
#define MUIM_Textinput_DoPageDown MCC_TI_ID(32)			/* V1 */
#define MUIM_Textinput_DoPopup MCC_TI_ID(33)			/* V1 */
#define MUIM_Textinput_DoPrevWord MCC_TI_ID(34)			/* V1 */
#define MUIM_Textinput_DoNextWord MCC_TI_ID(35)			/* V1 */
#define MUIM_Textinput_DoDel MCC_TI_ID(36)				/* V1 */
#define MUIM_Textinput_DoDelEOL MCC_TI_ID(37)			/* V1 */
#define MUIM_Textinput_DoBS	MCC_TI_ID(38)				/* V1 */
#define MUIM_Textinput_DoBSSOL MCC_TI_ID(39)			/* V1 */
#define MUIM_Textinput_DoubleClick MCC_TI_ID(42)		/* V1 */
#define MUIM_Textinput_DoBSWord	MCC_TI_ID(43)			/* V1 */
#define MUIM_Textinput_DoDelWord MCC_TI_ID(44)			/* V1 */
#define MUIM_Textinput_DoInsertFile MCC_TI_ID(45)		/* V1 */
#define MUIM_Textinput_InsertFromFile MCC_TI_ID(46)		/* V1 */
#define MUIM_Textinput_HandleChar MCC_TI_ID(47)			/* V14 */

/*
** Messages
*/

struct MUIP_Textinput_ExternalEdit { ULONG MethodID; };
struct MUIP_Textinputscroll_Inform { ULONG MethodID; ULONG xo; ULONG yo; ULONG xs; ULONG ys; ULONG xv; ULONG yv; ULONG noedit; };
struct MUIP_Textinputmcp_GrabCols  { ULONG MethodID; ULONG notall; };
struct MUIP_Textinput_Blink { ULONG MethodID; };
struct MUIP_Textinput_SaveToFile { ULONG MethodID; STRPTR filename; };
struct MUIP_Textinput_LoadFromFile { ULONG MethodID; STRPTR filename; };
struct MUIP_Textinput_ExternalEditDone { ULONG MethodID; ULONG changed; };
struct MUIP_Textinput_DoRevert { ULONG MethodID; };
struct MUIP_Textinput_DoCutLine { ULONG MethodID; };
struct MUIP_Textinput_DoMarkStart { ULONG MethodID; };
struct MUIP_Textinput_DoMarkAll { ULONG MethodID; };
struct MUIP_Textinput_DoCut { ULONG MethodID; };
struct MUIP_Textinput_DoCopy { ULONG MethodID; };
struct MUIP_Textinput_DoPaste { ULONG MethodID; };
struct MUIP_Textinput_AppendText { ULONG MethodID; STRPTR text; LONG len; };
struct MUIP_Textinputmcp_LAct { ULONG MethodID; ULONG which; };
struct MUIP_Textinputmcp_LCopy { ULONG MethodID; };
struct MUIP_Textinputmcp_LAdd { ULONG MethodID; };
struct MUIP_Textinputmcp_DoToggleWordwrap { ULONG MethodID; };
struct MUIP_Textinput_Acknowledge { ULONG MethodID; STRPTR contents; };
struct MUIP_Textinput_TranslateEvent { ULONG MethodID; struct InputEvent *ie; STRPTR mappedstring; ULONG *mappedlen; };
struct MUIP_Textinput_InsertText { ULONG MethodID; STRPTR text; LONG len; };
struct MUIP_Textinput_DoLeft { ULONG MethodID; };
struct MUIP_Textinput_DoRight { ULONG MethodID; };
struct MUIP_Textinput_DoUp { ULONG MethodID; };
struct MUIP_Textinput_DoDown { ULONG MethodID; };
struct MUIP_Textinput_DoLineStart { ULONG MethodID; };
struct MUIP_Textinput_DoLineEnd { ULONG MethodID; };
struct MUIP_Textinput_DoTop { ULONG MethodID; };
struct MUIP_Textinput_DoBottom { ULONG MethodID; };
struct MUIP_Textinput_DoPageUp { ULONG MethodID; };
struct MUIP_Textinput_DoPageDown { ULONG MethodID; };
struct MUIP_Textinput_DoPopup { ULONG MethodID; };
struct MUIP_Textinput_DoPrevWord { ULONG MethodID; };
struct MUIP_Textinput_DoNextWord { ULONG MethodID; };
struct MUIP_Textinput_DoDel { ULONG MethodID; };
struct MUIP_Textinput_DoDelEOL { ULONG MethodID; };
struct MUIP_Textinput_DoBS { ULONG MethodID; };
struct MUIP_Textinput_DoBSSOL { ULONG MethodID; };
struct MUIP_Textinput_DoubleClick { ULONG MethodID; ULONG xp; ULONG yp; ULONG cnt; };
struct MUIP_Textinput_DoDelWord { ULONG MethodID; };
struct MUIP_Textinput_DoBSWord { ULONG MethodID; };
struct MUIP_Textinput_DoInsertFile { ULONG MethodID; };
struct MUIP_Textinput_InsertFromFile { ULONG MethodID; STRPTR filename; };
struct MUIP_Textinput_HandleChar { ULONG MethodID; ULONG ch; ULONG quiet; };

/*
** Attributes
*/

#define MUIA_Textinput_Multiline MCC_TI_ID(100)   	/* V1 i.g BOOL */
#define MUIA_Textinput_MaxLen MCC_TI_ID(101)  		/* V1 i.g ULONG */
#define MUIA_Textinput_MaxLines MCC_TI_ID(102)    	/* V1 i.g ULONG */
#define MUIA_Textinput_AutoExpand MCC_TI_ID(103)	/* V1 isg BOOL */
#define MUIA_Textinput_Contents MCC_TI_ID(104)    	/* V1 isg STRPTR */
#define MUIA_Textinput_LeftOffset MCC_TI_ID(105)    /* V1 .sg ULONG (private) */
#define MUIA_Textinput_TopOffset MCC_TI_ID(106)    	/* V1 .sg ULONG (private) */
#define MUIA_Textinput_TSCO MCC_TI_ID(107)  	   	/* V1 .sg Object (private) */
#define MUIA_Textinput_Blinkrate MCC_TI_ID(108) 	/* V1 isg ULONG */
#define MUIA_Textinput_Cursorstyle MCC_TI_ID(109) 	/* V1 isg ULONG */
#define MUIA_Textinput_AdvanceOnCR MCC_TI_ID(110) 	/* V1 isg BOOL */
#define MUIA_Textinput_TmpExtension MCC_TI_ID(111) 	/* V1 isg STRPTR */
#define MUIA_Textinput_Quiet MCC_TI_ID(112)		 	/* V1 .s. BOOL */
#define MUIA_Textinput_Acknowledge MCC_TI_ID(113)	/* V1 ..g STRPTR */
#define MUIA_Textinput_Integer MCC_TI_ID(114)		/* V1 ..g ULONG */
#define MUIA_Textinput_MinVersion MCC_TI_ID(115)	/* V1 i.. ULONG */
#define MUIA_Textinput_DefKeys MCC_TI_ID(116)		/* V1 ..g APTR (private) */
#define MUIA_Textinput_DefaultPopup MCC_TI_ID(117)	/* V1 i.. BOOL */
#define MUIA_Textinput_WordWrap MCC_TI_ID(118)		/* V1 isg ULONG */
#define MUIA_Textinput_IsNumeric MCC_TI_ID(119)		/* V1 i.. BOOL */
#define MUIA_Textinput_MinVal MCC_TI_ID(120)		/* V1 isg ULONG */
#define MUIA_Textinput_MaxVal MCC_TI_ID(121)		/* V1 isg ULONG */
#define MUIA_Textinput_AcceptChars MCC_TI_ID(122)	/* V1 isg STRPTR */
#define MUIA_Textinput_RejectChars MCC_TI_ID(123)	/* V1 isg STRPTR */
#define MUIA_Textinput_Changed MCC_TI_ID(124)		/* V1 ..g BOOL */
#define MUIA_Textinput_AttachedList MCC_TI_ID(125)	/* V1 is. Object */
#define MUIA_Textinput_RemainActive MCC_TI_ID(126)	/* V1 isg BOOL */
#define MUIA_Textinput_CursorPos MCC_TI_ID(127)		/* V1 ..g ULONG */
#define MUIA_Textinput_Secret MCC_TI_ID(128)		/* V1 isg BOOL */
#define MUIA_Textinput_Lines MCC_TI_ID(129)			/* V1 ..g ULONG */
#define MUIA_Textinput_Editable MCC_TI_ID(130)		/* V1 isg BOOL */
#define MUIA_Textinputscroll_UseWinBorder MCC_TI_ID(131) /* V1 i.. BOOL */
#define MUIA_Textinput_IsOld MCC_TI_ID(132)			/* V1 isg BOOL */
#define MUIA_Textinput_MarkStart MCC_TI_ID(133)		/* V13 isg ULONG */
#define MUIA_Textinput_MarkEnd MCC_TI_ID(134)		/* V13 isg ULONG */

/*
** Special values
*/

#define MUIV_Textinput_NoMark ((ULONG*)~0)

#endif
