home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / internet / stricq / textinput_mcc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-06  |  8.4 KB  |  180 lines

  1. /*
  2. ** Textinput.mcc
  3. ** -------------
  4. **
  5. ** General textual input MUI class
  6. **
  7. ** (C) 1997 Oliver Wagner <owagner@vapor.com>
  8. ** All Rights Reserved
  9. **
  10. */
  11.  
  12. #ifndef TEXTINPUT_MCC_H
  13. #define TEXTINPUT_MCC_H
  14.  
  15. #ifndef LIBRARIES_MUI_H
  16. #include "libraries/mui.h"
  17. #endif
  18.  
  19. /*
  20. ** Class name, object macros
  21. */
  22.  
  23. #define MUIC_Textinput "Textinput.mcc"
  24. #define TextinputObject MUI_NewObject(MUIC_Textinput
  25.  
  26. #define MUIC_Textinputscroll "Textinputscroll.mcc"
  27. #define TextinputscrollObject MUI_NewObject(MUIC_Textinputscroll
  28.  
  29.  
  30. #define MCC_TI_TAGBASE (TAG_USER|(1307<<16)+0x712)
  31. #define MCC_TI_ID(x) (MCC_TI_TAGBASE+x)
  32.  
  33. /*
  34. ** Methods
  35. */
  36.  
  37. #define MUIM_Textinput_ExternalEdit MCC_TI_ID(1)         /* V1 */
  38. #define MUIM_Textinputscroll_Inform MCC_TI_ID(2)         /* V1 (private) */
  39. #define MUIM_Textinputmcp_GrabCols MCC_TI_ID(3)         /* V1 (private) */
  40. #define MUIM_Textinput_Blink MCC_TI_ID(4)                 /* V1 (private) */
  41. #define MUIM_Textinput_SaveToFile MCC_TI_ID(5)             /* V1 */
  42. #define MUIM_Textinput_LoadFromFile MCC_TI_ID(6)         /* V1 */
  43. #define MUIM_Textinput_ExternalEditDone MCC_TI_ID(7)     /* V1 (private) */
  44. #define MUIM_Textinput_DoRevert MCC_TI_ID(8)             /* V1 */
  45. #define MUIM_Textinput_DoCutLine MCC_TI_ID(9)             /* V1 */
  46. #define MUIM_Textinput_DoMarkStart MCC_TI_ID(10)         /* V1 */
  47. #define MUIM_Textinput_DoMarkAll MCC_TI_ID(11)             /* V1 */
  48. #define MUIM_Textinput_DoCut MCC_TI_ID(12)                 /* V1 */
  49. #define MUIM_Textinput_DoCopy MCC_TI_ID(13)                /* V1 */
  50. #define MUIM_Textinput_DoPaste MCC_TI_ID(14)             /* V1 */
  51. #define MUIM_Textinput_AppendText MCC_TI_ID(15)         /* V1 */
  52. #define MUIM_Textinputmcp_LAct MCC_TI_ID(16)             /* V1 (private) */
  53. #define MUIM_Textinputmcp_LCopy MCC_TI_ID(17)             /* V1 (private) */
  54. #define MUIM_Textinputmcp_LAdd MCC_TI_ID(18)             /* V1 (private) */
  55. #define MUIM_Textinput_DoToggleWordwrap MCC_TI_ID(19)    /* V1 */
  56. #define MUIM_Textinput_Acknowledge MCC_TI_ID(20)        /* V1 */
  57. #define MUIM_Textinput_TranslateEvent MCC_TI_ID(21)        /* V1 */
  58. #define MUIM_Textinput_InsertText MCC_TI_ID(22)         /* V1 */
  59. #define MUIM_Textinput_DoLeft MCC_TI_ID(23)             /* V1 */
  60. #define MUIM_Textinput_DoRight MCC_TI_ID(24)             /* V1 */
  61. #define MUIM_Textinput_DoUp MCC_TI_ID(25)                 /* V1 */
  62. #define MUIM_Textinput_DoDown MCC_TI_ID(26)             /* V1 */
  63. #define MUIM_Textinput_DoLineStart MCC_TI_ID(27)         /* V1 */
  64. #define MUIM_Textinput_DoLineEnd MCC_TI_ID(28)             /* V1 */
  65. #define MUIM_Textinput_DoTop MCC_TI_ID(29)                /* V1 */
  66. #define MUIM_Textinput_DoBottom MCC_TI_ID(30)            /* V1 */
  67. #define MUIM_Textinput_DoPageUp MCC_TI_ID(31)            /* V1 */
  68. #define MUIM_Textinput_DoPageDown MCC_TI_ID(32)            /* V1 */
  69. #define MUIM_Textinput_DoPopup MCC_TI_ID(33)            /* V1 */
  70. #define MUIM_Textinput_DoPrevWord MCC_TI_ID(34)            /* V1 */
  71. #define MUIM_Textinput_DoNextWord MCC_TI_ID(35)            /* V1 */
  72. #define MUIM_Textinput_DoDel MCC_TI_ID(36)                /* V1 */
  73. #define MUIM_Textinput_DoDelEOL MCC_TI_ID(37)            /* V1 */
  74. #define MUIM_Textinput_DoBS    MCC_TI_ID(38)                /* V1 */
  75. #define MUIM_Textinput_DoBSSOL MCC_TI_ID(39)            /* V1 */
  76. #define MUIM_Textinput_DoubleClick MCC_TI_ID(42)        /* V1 */
  77. #define MUIM_Textinput_DoBSWord    MCC_TI_ID(43)            /* V1 */
  78. #define MUIM_Textinput_DoDelWord MCC_TI_ID(44)            /* V1 */
  79. #define MUIM_Textinput_DoInsertFile MCC_TI_ID(45)        /* V1 */
  80. #define MUIM_Textinput_InsertFromFile MCC_TI_ID(46)        /* V1 */
  81. #define MUIM_Textinput_HandleChar MCC_TI_ID(47)            /* V14 */
  82.  
  83. /*
  84. ** Messages
  85. */
  86.  
  87. struct MUIP_Textinput_ExternalEdit { ULONG MethodID; };
  88. struct MUIP_Textinputscroll_Inform { ULONG MethodID; ULONG xo; ULONG yo; ULONG xs; ULONG ys; ULONG xv; ULONG yv; ULONG noedit; };
  89. struct MUIP_Textinputmcp_GrabCols  { ULONG MethodID; ULONG notall; };
  90. struct MUIP_Textinput_Blink { ULONG MethodID; };
  91. struct MUIP_Textinput_SaveToFile { ULONG MethodID; STRPTR filename; };
  92. struct MUIP_Textinput_LoadFromFile { ULONG MethodID; STRPTR filename; };
  93. struct MUIP_Textinput_ExternalEditDone { ULONG MethodID; ULONG changed; };
  94. struct MUIP_Textinput_DoRevert { ULONG MethodID; };
  95. struct MUIP_Textinput_DoCutLine { ULONG MethodID; };
  96. struct MUIP_Textinput_DoMarkStart { ULONG MethodID; };
  97. struct MUIP_Textinput_DoMarkAll { ULONG MethodID; };
  98. struct MUIP_Textinput_DoCut { ULONG MethodID; };
  99. struct MUIP_Textinput_DoCopy { ULONG MethodID; };
  100. struct MUIP_Textinput_DoPaste { ULONG MethodID; };
  101. struct MUIP_Textinput_AppendText { ULONG MethodID; STRPTR text; LONG len; };
  102. struct MUIP_Textinputmcp_LAct { ULONG MethodID; ULONG which; };
  103. struct MUIP_Textinputmcp_LCopy { ULONG MethodID; };
  104. struct MUIP_Textinputmcp_LAdd { ULONG MethodID; };
  105. struct MUIP_Textinputmcp_DoToggleWordwrap { ULONG MethodID; };
  106. struct MUIP_Textinput_Acknowledge { ULONG MethodID; STRPTR contents; };
  107. struct MUIP_Textinput_TranslateEvent { ULONG MethodID; struct InputEvent *ie; STRPTR mappedstring; ULONG *mappedlen; };
  108. struct MUIP_Textinput_InsertText { ULONG MethodID; STRPTR text; LONG len; };
  109. struct MUIP_Textinput_DoLeft { ULONG MethodID; };
  110. struct MUIP_Textinput_DoRight { ULONG MethodID; };
  111. struct MUIP_Textinput_DoUp { ULONG MethodID; };
  112. struct MUIP_Textinput_DoDown { ULONG MethodID; };
  113. struct MUIP_Textinput_DoLineStart { ULONG MethodID; };
  114. struct MUIP_Textinput_DoLineEnd { ULONG MethodID; };
  115. struct MUIP_Textinput_DoTop { ULONG MethodID; };
  116. struct MUIP_Textinput_DoBottom { ULONG MethodID; };
  117. struct MUIP_Textinput_DoPageUp { ULONG MethodID; };
  118. struct MUIP_Textinput_DoPageDown { ULONG MethodID; };
  119. struct MUIP_Textinput_DoPopup { ULONG MethodID; };
  120. struct MUIP_Textinput_DoPrevWord { ULONG MethodID; };
  121. struct MUIP_Textinput_DoNextWord { ULONG MethodID; };
  122. struct MUIP_Textinput_DoDel { ULONG MethodID; };
  123. struct MUIP_Textinput_DoDelEOL { ULONG MethodID; };
  124. struct MUIP_Textinput_DoBS { ULONG MethodID; };
  125. struct MUIP_Textinput_DoBSSOL { ULONG MethodID; };
  126. struct MUIP_Textinput_DoubleClick { ULONG MethodID; ULONG xp; ULONG yp; ULONG cnt; };
  127. struct MUIP_Textinput_DoDelWord { ULONG MethodID; };
  128. struct MUIP_Textinput_DoBSWord { ULONG MethodID; };
  129. struct MUIP_Textinput_DoInsertFile { ULONG MethodID; };
  130. struct MUIP_Textinput_InsertFromFile { ULONG MethodID; STRPTR filename; };
  131. struct MUIP_Textinput_HandleChar { ULONG MethodID; ULONG ch; ULONG quiet; };
  132.  
  133. /*
  134. ** Attributes
  135. */
  136.  
  137. #define MUIA_Textinput_Multiline MCC_TI_ID(100)       /* V1 i.g BOOL */
  138. #define MUIA_Textinput_MaxLen MCC_TI_ID(101)          /* V1 i.g ULONG */
  139. #define MUIA_Textinput_MaxLines MCC_TI_ID(102)        /* V1 i.g ULONG */
  140. #define MUIA_Textinput_AutoExpand MCC_TI_ID(103)    /* V1 isg BOOL */
  141. #define MUIA_Textinput_Contents MCC_TI_ID(104)        /* V1 isg STRPTR */
  142. #define MUIA_Textinput_LeftOffset MCC_TI_ID(105)    /* V1 .sg ULONG (private) */
  143. #define MUIA_Textinput_TopOffset MCC_TI_ID(106)        /* V1 .sg ULONG (private) */
  144. #define MUIA_Textinput_TSCO MCC_TI_ID(107)             /* V1 .sg Object (private) */
  145. #define MUIA_Textinput_Blinkrate MCC_TI_ID(108)     /* V1 isg ULONG */
  146. #define MUIA_Textinput_Cursorstyle MCC_TI_ID(109)     /* V1 isg ULONG */
  147. #define MUIA_Textinput_AdvanceOnCR MCC_TI_ID(110)     /* V1 isg BOOL */
  148. #define MUIA_Textinput_TmpExtension MCC_TI_ID(111)     /* V1 isg STRPTR */
  149. #define MUIA_Textinput_Quiet MCC_TI_ID(112)             /* V1 .s. BOOL */
  150. #define MUIA_Textinput_Acknowledge MCC_TI_ID(113)    /* V1 ..g STRPTR */
  151. #define MUIA_Textinput_Integer MCC_TI_ID(114)        /* V1 ..g ULONG */
  152. #define MUIA_Textinput_MinVersion MCC_TI_ID(115)    /* V1 i.. ULONG */
  153. #define MUIA_Textinput_DefKeys MCC_TI_ID(116)        /* V1 ..g APTR (private) */
  154. #define MUIA_Textinput_DefaultPopup MCC_TI_ID(117)    /* V1 i.. BOOL */
  155. #define MUIA_Textinput_WordWrap MCC_TI_ID(118)        /* V1 isg ULONG */
  156. #define MUIA_Textinput_IsNumeric MCC_TI_ID(119)        /* V1 i.. BOOL */
  157. #define MUIA_Textinput_MinVal MCC_TI_ID(120)        /* V1 isg ULONG */
  158. #define MUIA_Textinput_MaxVal MCC_TI_ID(121)        /* V1 isg ULONG */
  159. #define MUIA_Textinput_AcceptChars MCC_TI_ID(122)    /* V1 isg STRPTR */
  160. #define MUIA_Textinput_RejectChars MCC_TI_ID(123)    /* V1 isg STRPTR */
  161. #define MUIA_Textinput_Changed MCC_TI_ID(124)        /* V1 ..g BOOL */
  162. #define MUIA_Textinput_AttachedList MCC_TI_ID(125)    /* V1 is. Object */
  163. #define MUIA_Textinput_RemainActive MCC_TI_ID(126)    /* V1 isg BOOL */
  164. #define MUIA_Textinput_CursorPos MCC_TI_ID(127)        /* V1 ..g ULONG */
  165. #define MUIA_Textinput_Secret MCC_TI_ID(128)        /* V1 isg BOOL */
  166. #define MUIA_Textinput_Lines MCC_TI_ID(129)            /* V1 ..g ULONG */
  167. #define MUIA_Textinput_Editable MCC_TI_ID(130)        /* V1 isg BOOL */
  168. #define MUIA_Textinputscroll_UseWinBorder MCC_TI_ID(131) /* V1 i.. BOOL */
  169. #define MUIA_Textinput_IsOld MCC_TI_ID(132)            /* V1 isg BOOL */
  170. #define MUIA_Textinput_MarkStart MCC_TI_ID(133)        /* V13 isg ULONG */
  171. #define MUIA_Textinput_MarkEnd MCC_TI_ID(134)        /* V13 isg ULONG */
  172.  
  173. /*
  174. ** Special values
  175. */
  176.  
  177. #define MUIV_Textinput_NoMark ((ULONG*)~0)
  178.  
  179. #endif
  180.