home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / Document.subproj / eTDoc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-18  |  4.2 KB  |  303 lines

  1. {\rtf0\ansi{\fonttbl\f0\fmodern Courier;\f2\ftech Symbol;\f1\fmodern Ohlfs;}
  2. \margl40
  3. \margr40
  4. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 //—————————————————————————————————————————————————————————————————————————————\
  5. //
  6. \i     
  7. \b FILENAME
  8. \b0 :    
  9. \b\i0 eTDoc.h \
  10.  
  11. \b0 //
  12. \i     
  13. \b SUMMARY
  14. \b0 :    
  15. \b\i0 Interface for the abstract document controller.
  16. \b0 \
  17. //    
  18. \b\i SUPERCLASS
  19. \b0 :
  20. \i0     
  21. \b Object:eTDoc
  22. \b0 \
  23. //    
  24. \b\i PROTOCOLS
  25. \b0 :
  26. \i0     
  27. \b Uses <DocNotification>
  28. \b0 \
  29. //    
  30. \b\i INTERFACE
  31. \b0 :
  32. \i0     
  33. \b None
  34. \b0 \
  35. //    
  36. \b\i AUTHOR
  37. \b0 :        
  38. \b\i0 Rohit Khare
  39. \b0 \
  40. //    
  41. \b\i COPYRIGHT
  42. \b0 :    
  43. \f2\i0 ½
  44. \f0\b 1993,94 California Institure of Technology, eText Project\
  45.  
  46. \b0 //—————————————————————————————————————————————————————————————————————————————\
  47. //    
  48. \b\i Description
  49. \b0\i0 \
  50. //        This is the document-model, and thus encapsulates the true state and\
  51. //    fundamental behaviors of an etf document. It coordinates with 
  52. \i etDocUI
  53. \i0  to\
  54. //    actually offer user access to these features.\
  55. //        If someone will explain how, 
  56. \i etDoc
  57. \i0  should have an 
  58. \i NXDataLinkManager
  59. \i0 \
  60. //—————————————————————————————————————————————————————————————————————————————\
  61. //    
  62. \b\i HISTORY
  63. \b0\i0 \
  64. //    10/06/94:    
  65. \b Revamped for eText5.
  66. \i \
  67.  
  68. \b0\i0 //    08/05/94:    
  69. \b Added undoManager. RK
  70. \b0 \
  71. //    01/14/94:    
  72. \b Revised extensively for eText4
  73. \b0 \
  74. //    09/11/93:    
  75. \b Created (un)registerForDocNotification. <DocNotification>
  76. \b0 \
  77. //    09/09/93:    
  78. \b Added support for the docID member.
  79. \b0 \
  80. //    08/22/93:    
  81. \b Moved "Accessor Methods" to eTDoc
  82. \b0 \
  83. //    08/20/93:    
  84. \b Created.
  85. \b0 \
  86. //—————————————————————————————————————————————————————————————————————————————\
  87. //    
  88. \b Imported Interfaces
  89. \b0 \
  90. //\
  91.     #import    "
  92. \b eTextKernel.h
  93. \b0 "\
  94.     #import    "
  95. \b UndoManager.h
  96. \b0 "\
  97.     @class 
  98. \b eTDocUI, eTDocInfo
  99. \b0 ;\
  100. \
  101. //—————————————————————————————————————————————————————————————————————————————\
  102. //    
  103. \b Garbage Collection (C code)
  104. \b0 \
  105. //\
  106.     extern int 
  107. \b removeFile
  108. \b0 (const char *
  109. \b file
  110. \b0 );\
  111. \
  112.  
  113. \i @interface eTDoc:Object
  114. \i0  \{\
  115. //—————————————————————————————————————————————————————————————————————————————\
  116. //    
  117. \b Instance Variables
  118. \b0 \
  119. //\
  120.     
  121. \b eTDocInfo
  122. \b0     *
  123. \b theDocInfo
  124. \b0 ;\
  125.     
  126. \b eTDocUI
  127. \b0         *
  128. \b docUI
  129. \b0 ;\
  130.     
  131. \b List
  132. \b0         *
  133. \b notificationList
  134. \b0 ;\
  135.     
  136. \b HashTable
  137. \b0     *
  138. \b componentTable
  139. \b0 ;\
  140.     
  141. \b UndoManager
  142. \b0     *
  143. \b undoManager
  144. \b0 ;\
  145.     
  146. \b id
  147. \b0             
  148. \b selectedObj
  149. \b0 ;\
  150.     
  151. \b id
  152. \b0             
  153. \b theAgent
  154. \b0 ;\
  155.     \}\
  156. \
  157. //—————————————————————————————————————————————————————————————————————————————\
  158. //     
  159. \b Class Management
  160. \b0 \
  161. //\
  162.     - 
  163. \b initForDocInfo
  164. \b0 :(
  165. \b eTDocInfo
  166. \b0  *) newDocInfo;\
  167.     - 
  168. \b free
  169. \b0 ;\
  170. \
  171. //—————————————————————————————————————————————————————————————————————————————\
  172. //     
  173. \b Document Management (by path)
  174. \b0 \
  175. //\
  176.     - 
  177. \b openFrom
  178. \b0 :(const char *)thePath;\
  179.     - 
  180. \b saveTo
  181. \b0 :(const char*)thePath 
  182. \b inFormat
  183. \b0 :(
  184. \b int
  185. \b0 )fmt 
  186. \b changePath
  187. \b0 :(
  188. \b BOOL
  189. \b0 ) changeIt;\
  190.     - 
  191. \b close
  192. \b0 :sender 
  193. \b allowCancel
  194. \b0 :(
  195. \b BOOL
  196. \b0 )cancellable;\
  197.     - 
  198. \b save
  199. \b0 :sender;\
  200.     \
  201.     - 
  202. \b saveASCII
  203. \b0 :(const char *)thePath;\
  204.     - 
  205. \b saveC
  206. \b0 :(const char *)thePath;\
  207.     - 
  208. \b saveRTF
  209. \b0 :(const char *)thePath;\
  210.     - 
  211. \b saveLaTeX
  212. \b0 :(const char *)thePath;\
  213.     - 
  214. \b saveHTMD
  215. \b0 :(const char *)thePath;\
  216.     - 
  217. \b saveETFD
  218. \b0 :(const char *)thePath 
  219. \b changePath
  220. \b0 :(
  221. \b BOOL
  222. \b0 ) changeIt;\
  223. \
  224. //—————————————————————————————————————————————————————————————————————————————\
  225. //     
  226. \b <DocNotification> Registration & Callbacks
  227. \b0 \
  228. //\
  229.     - 
  230. \b registerNotification
  231. \b0 :theListener;\
  232.     - 
  233. \b unregisterNotification
  234. \b0 :theListener;\
  235.     - 
  236. \b registerComponent
  237. \b0 :(
  238. \b NXAtom
  239. \b0 )component;\
  240. \
  241. //—————————————————————————————————————————————————————————————————————————————\
  242. //     
  243. \b Accessors & API
  244. \b0 \
  245. //\
  246.     - (UndoManager *)
  247. \b undoManager
  248. \b0 ;\
  249.     - (eTDocInfo *)
  250. \b docInfo
  251. \b0 ;\
  252.     - (eTDocUI *)
  253. \b docUI
  254. \b0 ; // 
  255. \i Private
  256. \i0 \
  257.     \
  258.     - 
  259. \b touch
  260. \b0 ;\
  261.     - (
  262. \b BOOL
  263. \b0 ) 
  264. \b needsSaving
  265. \b0 ;\
  266.     \
  267.     - (
  268. \b BOOL
  269. \b0 ) 
  270. \b acceptsAnnotation
  271. \b0 ;\
  272.     - 
  273. \b insertAnnotation
  274. \b0 :theAnnotation;\
  275.     \
  276.     - (
  277. \b BOOL
  278. \b0 ) 
  279. \b acceptsAgent
  280. \b0 ;\
  281.     - 
  282. \b attachAgent
  283. \b0 :newAgent;\
  284.     - 
  285. \b detachAgent
  286. \b0 ;\
  287. \
  288.     - 
  289. \b selectedObj
  290. \b0 ;\
  291.     - 
  292. \b setSelectedObj
  293. \b0 :it;\
  294.     - 
  295. \b makeVisible
  296. \b0 ;\
  297.     - 
  298. \b inspect
  299. \b0 ;\
  300. \
  301. @end
  302. }
  303.