tom.bmx 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. Strict
  2. ' tom.bmx
  3. Import pub.win32
  4. Import "tom.cpp"
  5. Const TOMTRUE = -1
  6. Const TOMFALSE = 0
  7. Const TOMNONE = 0
  8. Const TOMSINGLE = 1
  9. Const TOMWORDS = 2
  10. Const TOMDOUBLE = 3
  11. Const TOMDOTTED = 4
  12. Extern "win32"
  13. Interface IRichEditOLE_ Extends IUnknown_
  14. Method GetClientSite()
  15. Method GetObjectCount()
  16. Method GetLinkCount()
  17. Method GetObject()
  18. Method InsertObject()
  19. Method ConvertObject()
  20. Method ActivateAs()
  21. Method SetHostNames()
  22. Method SetLinkAvailable()
  23. Method SetDvaspect()
  24. Method HandsOffStorage()
  25. Method SaveCompleted()
  26. Method InPlaceDeactivate()
  27. Method ContextSensitiveHelp()
  28. Method GetClipboardData()
  29. Method ImportDataObject()
  30. End Interface
  31. End Extern
  32. Extern
  33. Function bmx_tom_ITextDocument_Range:Int(handle:Byte Ptr, p0:Int, p1:Int, irangePtr:Byte Ptr Ptr)
  34. Function bmx_tom_ITextDocument_SetDefaultTabStop:Int(handle:Byte Ptr, Value:Float)
  35. Function bmx_tom_ITextDocument_Freeze:Int(handle:Byte Ptr, count:Int Ptr)
  36. Function bmx_tom_ITextDocument_Unfreeze:Int(handle:Byte Ptr, count:Int Ptr)
  37. End Extern
  38. Extern "win32"
  39. Interface ITextDocument_ Extends IDispatch_
  40. Method GetName()
  41. 'End Method
  42. Method GetSlection()
  43. 'End Method
  44. Method GetStoryCount( storycount:Int Var)
  45. 'End Method
  46. Method GetStoryRanges()
  47. 'End Method
  48. Method GetSaved()
  49. 'End Method
  50. Method SetSaved()
  51. 'End Method
  52. Method GetDefaultTabStop(Value# Var)
  53. 'End Method
  54. Method SetDefaultTabStop(Value:Float)
  55. ' Return bmx_tom_ITextDocument_SetDefaultTabStop(unknownPtr, Value)
  56. 'End Method
  57. Method NewDocument()
  58. 'End Method
  59. Method Open()
  60. 'End Method
  61. Method Save()
  62. 'End Method
  63. Method Freeze(count Var)
  64. ' Return bmx_tom_ITextDocument_Freeze(unknownPtr, Varptr count)
  65. 'End Method
  66. Method Unfreeze(count Var)
  67. ' Return bmx_tom_ITextDocument_Unfreeze(unknownPtr, Varptr count)
  68. 'End Method
  69. Method BeginEditCollection()
  70. 'End Method
  71. Method EndEditCollection()
  72. 'End Method
  73. Method Undo()
  74. 'End Method
  75. Method Redo()
  76. 'End Method
  77. Method Range(p0,p1,irange:ITextRange_ Var)
  78. ' If Not irange Then
  79. ' irange = New ITextRange
  80. ' End If
  81. ' Return bmx_tom_ITextDocument_Range(unknownPtr, p0, p1, Varptr irange.unknownPtr)
  82. 'End Method
  83. Method RangeFromPoint(x,y,irange:ITextRange_ Var)
  84. 'End Method
  85. End Interface
  86. End Extern
  87. Extern
  88. Function bmx_tom_ITextRange_GetFont:Int(handle:Byte Ptr, ifontPtr:Byte Ptr Ptr)
  89. Function bmx_tom_ITextRange_SetText:Int(handle:Byte Ptr, bstr:Short Ptr)
  90. Function bmx_tom_ITextRange_GetText:Int(handle:Byte Ptr, bstr:Short Ptr Ptr)
  91. End Extern
  92. Extern "win32"
  93. Interface ITextRange_ Extends IDispatch_
  94. Method GetText(bstr:Short Ptr Ptr)
  95. ' Return bmx_tom_ITextRange_GetText(unknownPtr, bstr)
  96. 'End Method
  97. Method SetText(bstr:Short Ptr)
  98. ' Return bmx_tom_ITextRange_SetText(unknownPtr, bstr)
  99. 'End Method
  100. Method GetChar()
  101. 'End Method
  102. Method SetChar()
  103. 'End Method
  104. Method GetDuplicate(irange:ITextRange_ Var)
  105. 'End Method
  106. Method GetFormattedText()
  107. 'End Method
  108. Method SetFormattedText()
  109. 'End Method
  110. Method GetStart()
  111. 'End Method
  112. Method SetStart()
  113. 'End Method
  114. Method GetEnd()
  115. 'End Method
  116. Method SetEnd()
  117. 'End Method
  118. Method GetFont(ifont:ITextFont_ Var)
  119. ' If Not ifont Then
  120. ' ifont = New ITextFont
  121. ' End If
  122. ' Return bmx_tom_ITextRange_GetFont(unknownPtr, Varptr ifont.unknownPtr)
  123. 'End Method
  124. Method SetFont(ifont:ITextFont_)
  125. 'End Method
  126. ' Method GetPara(para:ITextPara Var)
  127. ' 'End Method
  128. ' Method SetPara(para:ITextPara)
  129. ' 'End Method
  130. Method GetStoryLength( length:Int Var )
  131. 'End Method
  132. Method GetStoryType( storytype:Int Var)
  133. 'End Method
  134. Method Collapse()
  135. 'End Method
  136. Method Expand()
  137. 'End Method
  138. Method GetIndex()
  139. 'End Method
  140. Method SetIndex()
  141. 'End Method
  142. Method SetRange(cp1,cp2)
  143. 'End Method
  144. Method InRange()
  145. 'End Method
  146. Method InStory()
  147. 'End Method
  148. Method IsEqual()
  149. 'End Method
  150. Method Select_()
  151. 'End Method
  152. Method StartOf()
  153. 'End Method
  154. Method EndOf()
  155. 'End Method
  156. Method Move()
  157. 'End Method
  158. Method MoveStart()
  159. 'End Method
  160. Method MoveEnd()
  161. 'End Method
  162. Method MoveWhile()
  163. 'End Method
  164. Method MoveStartWhile()
  165. 'End Method
  166. Method MoveEndWhile()
  167. 'End Method
  168. Method MoveUntil()
  169. 'End Method
  170. Method MoveStartUntil()
  171. 'End Method
  172. Method MoveEndUntil()
  173. 'End Method
  174. Method FindText()
  175. 'End Method
  176. Method FindTextStart()
  177. 'End Method
  178. Method FindTextEnd()
  179. 'End Method
  180. Method Delete_()
  181. 'End Method
  182. Method Cut()
  183. 'End Method
  184. Method Copy()
  185. 'End Method
  186. Method Paste()
  187. 'End Method
  188. Method CanPaste()
  189. 'End Method
  190. Method CanEdit(bool Var)
  191. 'End Method
  192. Method ChangeCase()
  193. 'End Method
  194. Method GetPoint()
  195. 'End Method
  196. Method SetPoint()
  197. 'End Method
  198. Method ScrollIntoView()
  199. 'End Method
  200. Method GetEmbeddedObject()
  201. 'End Method
  202. End Interface
  203. End Extern
  204. Extern
  205. Function bmx_tom_ITextFont_SetForeColor:Int(handle:Byte Ptr, Value:Int)
  206. Function bmx_tom_ITextFont_SetBold:Int(handle:Byte Ptr, Value:Int)
  207. Function bmx_tom_ITextFont_SetItalic:Int(handle:Byte Ptr, Value:Int)
  208. Function bmx_tom_ITextFont_SetStrikeThrough:Int(handle:Byte Ptr, Value:Int)
  209. Function bmx_tom_ITextFont_SetUnderline:Int(handle:Byte Ptr, Value:Int)
  210. End Extern
  211. Extern "win32"
  212. Interface ITextFont_ Extends IDispatch_
  213. Method GetDuplicate(ifont:ITextFont_ Var)
  214. 'End Method
  215. Method SetDuplicate()
  216. 'End Method
  217. Method CanChange()
  218. 'End Method
  219. Method IsEqual()
  220. 'End Method
  221. Method Reset()
  222. 'End Method
  223. Method GetStyle(Value:Int Ptr)
  224. 'End Method
  225. Method SetStyle(Value)
  226. 'End Method
  227. Method GetAllCaps(Value:Int Ptr)
  228. 'End Method
  229. Method SetAllCaps(Value)
  230. 'End Method
  231. Method GetAnimation(Value:Int Ptr)
  232. 'End Method
  233. Method SetAnimation(Value)
  234. 'End Method
  235. Method GetBackColor(Value:Int Ptr)
  236. 'End Method
  237. Method SetBackColor(Value)
  238. 'End Method
  239. Method GetBold(Value:Int Ptr)
  240. 'End Method
  241. Method SetBold(Value)
  242. ' Return bmx_tom_ITextFont_SetBold(unknownPtr, Value)
  243. 'End Method
  244. Method GetEmboss(Value:Int Ptr)
  245. 'End Method
  246. Method SetEmboss(Value)
  247. 'End Method
  248. Method GetForeColor(Value:Int Ptr)
  249. 'End Method
  250. Method SetForeColor(Value)
  251. ' Return bmx_tom_ITextFont_SetForeColor(unknownPtr, Value)
  252. 'End Method
  253. Method GetHidden(Value:Int Ptr)
  254. 'End Method
  255. Method SetHidden(Value)
  256. 'End Method
  257. Method GetEngrave(Value:Int Ptr)
  258. 'End Method
  259. Method SetEngrave(Value)
  260. 'End Method
  261. Method GetItalic(Value:Int Ptr)
  262. 'End Method
  263. Method SetItalic(Value)
  264. ' Return bmx_tom_ITextFont_SetItalic(unknownPtr, Value)
  265. 'End Method
  266. Method GetKerning(Value:Int Ptr)
  267. 'End Method
  268. Method SetKerning(Value)
  269. 'End Method
  270. Method GetLanguageID()
  271. 'End Method
  272. Method SetLanguageID()
  273. 'End Method
  274. Method GetName()
  275. 'End Method
  276. Method SetName()
  277. 'End Method
  278. Method GetOutline(Value:Int Ptr)
  279. 'End Method
  280. Method SetOutline(Value)
  281. 'End Method
  282. Method GetPosition(Value:Int Ptr)
  283. 'End Method
  284. Method SetPosition(Value)
  285. 'End Method
  286. Method GetProtected(Value:Int Ptr)
  287. 'End Method
  288. Method SetProtected(Value)
  289. 'End Method
  290. Method GetShadow(Value:Int Ptr)
  291. 'End Method
  292. Method SetShadow(Value)
  293. 'End Method
  294. Method GetSize(Value:Int Ptr)
  295. 'End Method
  296. Method SetSize(Value)
  297. 'End Method
  298. Method GetSmallCaps(Value:Int Ptr)
  299. 'End Method
  300. Method SetSmallCaps(Value)
  301. 'End Method
  302. Method GetSpacing(Value:Int Ptr)
  303. 'End Method
  304. Method SetSpacing(Value)
  305. 'End Method
  306. Method GetStrikeThrough(Value:Int Ptr)
  307. 'End Method
  308. Method SetStrikeThrough(Value)
  309. ' Return bmx_tom_ITextFont_SetStrikeThrough(unknownPtr, Value)
  310. 'End Method
  311. Method GetSubscript(Value:Int Ptr)
  312. 'End Method
  313. Method SetSubscript(Value)
  314. 'End Method
  315. Method GetSuperscript(Value:Int Ptr)
  316. 'End Method
  317. Method SetSuperscript(Value)
  318. 'End Method
  319. Method GetUnderline(Value:Int Ptr)
  320. 'End Method
  321. Method SetUnderline(Value)
  322. ' Return bmx_tom_ITextFont_SetUnderline(unknownPtr, Value)
  323. 'End Method
  324. Method GetWeight(Value:Int Ptr)
  325. 'End Method
  326. Method SetWeight(Value)
  327. 'End Method
  328. End Interface
  329. End Extern
  330. Const ITextDocument_UUID$="{8CC497C0-A1DF-11ce-8098-00AA0047BE5D}"
  331. Rem
  332. Type ITextFont Extends IDispatch
  333. Method GetDuplicate(ifont:ITextFont Var)
  334. Method SetDuplicate()
  335. Method CanChange()
  336. Method IsEqual()
  337. Method Reset()
  338. Method GetStyle(Value:Int Ptr)
  339. Method SetStyle(Value)
  340. Method GetAllCaps(Value:Int Ptr)
  341. Method SetAllCaps(Value)
  342. Method GetAnimation(Value:Int Ptr)
  343. Method SetAnimation(Value)
  344. Method GetBackColor(Value:Int Ptr)
  345. Method SetBackColor(Value)
  346. Method GetBold(Value:Int Ptr)
  347. Method SetBold(Value)
  348. Method GetEmboss(Value:Int Ptr)
  349. Method SetEmboss(Value)
  350. Method GetForeColor(Value:Int Ptr)
  351. Method SetForeColor(Value)
  352. Method GetHidden(Value:Int Ptr)
  353. Method SetHidden(Value)
  354. Method GetEngrave(Value:Int Ptr)
  355. Method SetEngrave(Value)
  356. Method GetItalic(Value:Int Ptr)
  357. Method SetItalic(Value)
  358. Method GetKerning(Value:Int Ptr)
  359. Method SetKerning(Value)
  360. Method GetLanguageID()
  361. Method SetLanguageID()
  362. Method GetName()
  363. Method SetName()
  364. Method GetOutline(Value:Int Ptr)
  365. Method SetOutline(Value)
  366. Method GetPosition(Value:Int Ptr)
  367. Method SetPosition(Value)
  368. Method GetProtected(Value:Int Ptr)
  369. Method SetProtected(Value)
  370. Method GetShadow(Value:Int Ptr)
  371. Method SetShadow(Value)
  372. Method GetSize(Value:Int Ptr)
  373. Method SetSize(Value)
  374. Method GetSmallCaps(Value:Int Ptr)
  375. Method SetSmallCaps(Value)
  376. Method GetSpacing(Value:Int Ptr)
  377. Method SetSpacing(Value)
  378. Method GetStrikeThrough(Value:Int Ptr)
  379. Method SetStrikeThrough(Value)
  380. Method GetSubscript(Value:Int Ptr)
  381. Method SetSubscript(Value)
  382. Method GetSuperscript(Value:Int Ptr)
  383. Method SetSuperscript(Value)
  384. Method GetUnderline(Value:Int Ptr)
  385. Method SetUnderline(Value)
  386. Method GetWeight(Value:Int Ptr)
  387. Method SetWeight(Value)
  388. End Type
  389. Const ITextPara_UUID$="{8CC497C4-A1DF-11ce-8098-00AA0047BE5D}"
  390. Type ITextPara Extends IDispatch
  391. Method GetDuplicate(ipara:ITextPara Var)
  392. Method SetDuplicate()
  393. Method CanChange()
  394. Method IsEqual(para)
  395. Method Reset(value)
  396. Method GetStyle()
  397. Method SetStyle(value)
  398. Method GetAlignment()
  399. Method SetAlignment(value)
  400. Method GetHyphenation()
  401. Method SetHyphenation(value)
  402. Method GetFirstLineIndent()
  403. Method GetKeepTogether()
  404. Method SetKeepTogether(value)
  405. Method GetKeepWithNext()
  406. Method SetKeepWithNext(value)
  407. Method GetLeftIndent#()
  408. Method GetLineSpacing#()
  409. Method GetLineSpacingRule()
  410. Method GetListAlignment()
  411. Method SetListAlignment( value)
  412. Method GetListLevelIndex()
  413. Method SetListLevelIndex(value)
  414. Method GetListStart()
  415. Method SetListStart(value)
  416. Method GetListTab#()
  417. Method SetListTab(value#)
  418. Method GetListType()
  419. Method SetListType(value)
  420. Method GetNoLineNumber()
  421. Method SetNoLineNumber(value)
  422. Method GetPageBreakBefore()
  423. Method SetPageBreakBefore(value)
  424. Method GetRightIndent#()
  425. Method SetRightIndent(value#)
  426. Method SetIndents(startindent#,leftindent#,rightindent#)
  427. Method SetLineSpacing( rule,spacing# )
  428. Method GetSpaceAfter()
  429. Method SetSpaceAfter(value#)
  430. Method GetSpaceBefore#()
  431. Method SetSpaceBefore(value#)
  432. Method GetWidowControl()
  433. Method SetWidowControl(value)
  434. Method GetTabCount( )
  435. Method AddTab( pos#,align,leader )
  436. Method ClearAllTabs()
  437. Method DeleteTab(pos#)
  438. Method GetTab(tab,pos,align,leader)
  439. End Type
  440. End Rem