Edit.sgm 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <!-- $XConsortium: Edit.sgm /main/8 1996/09/08 20:13:54 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN284.rsml.1">]]>
  10. <![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN284.rsml.1">]]>
  11. <RefMeta>
  12. <RefEntryTitle>Edit</RefEntryTitle>
  13. <ManVolNum>special file</ManVolNum>
  14. </RefMeta>
  15. <RefNameDiv>
  16. <RefName><Symbol Role="Message">Edit</Symbol></RefName>
  17. <RefPurpose>compose or edit a document
  18. </RefPurpose>
  19. </RefNameDiv>
  20. <!-- $XConsortium: Edit.sgm /main/8 1996/09/08 20:13:54 rws $-->
  21. <!-- CDE Common Source Format, Version 1.0.0-->
  22. <!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
  23. <!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
  24. <!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
  25. <!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
  26. <RefSynopsisDiv>
  27. <Synopsis>[<Symbol Role="Variable">file</Symbol>] Edit([out|inout] <Emphasis>mediaType contents</Emphasis>
  28. [in title <Emphasis>docName</Emphasis>]);
  29. </Synopsis>
  30. </RefSynopsisDiv>
  31. <RefSect1>
  32. <Title>DESCRIPTION</Title>
  33. <Para>The
  34. <Symbol Role="Message">Edit</Symbol> request causes the handler to edit a document
  35. and reply with the new contents when the editing is completed.
  36. </Para>
  37. <Para>It is up to the handler to decide issues such as:
  38. </Para>
  39. <ItemizedList>
  40. <ListItem>
  41. <Para>When the editing operation can be deemed completed
  42. </Para>
  43. </ListItem>
  44. <ListItem>
  45. <Para>What user gesture signals the completion of the editing
  46. </Para>
  47. </ListItem>
  48. <ListItem>
  49. <Para>What the handling tool should do with itself after replying
  50. </Para>
  51. </ListItem>
  52. </ItemizedList>
  53. <Para>If the handling tool supports some form of intermediate save operation
  54. during editing,
  55. it must send a
  56. <Symbol Role="Message">Deposit</Symbol> request back to the tool that requested the
  57. <Symbol Role="Message">Edit</Symbol>.</Para>
  58. <Para>The
  59. <Emphasis>contents</Emphasis> argument
  60. is the contents of the document.
  61. If this argument is unset
  62. (in other words, has a value of
  63. <Literal>(char *)0</Literal>), then the contents of the document are in
  64. the file named in the message's
  65. <Symbol Role="Variable">file</Symbol> attribute.
  66. The data type
  67. (<Emphasis>mediaType</Emphasis>) of the
  68. <Emphasis>contents</Emphasis> argument should be
  69. <Literal>string</Literal>, unless nulls are valid in the given media type,
  70. in which case the data type must be
  71. <Literal>bytes</Literal>.</Para>
  72. <Para>If the
  73. <Emphasis>contents</Emphasis> argument is of mode
  74. <Literal>out</Literal>, then a new document must be composed
  75. and its contents returned in this argument.
  76. </Para>
  77. <Para>The
  78. <Emphasis>docName</Emphasis> argument contains the name of the document.
  79. If the
  80. <Emphasis>docName</Emphasis> argument is absent and the
  81. <Symbol Role="Variable">file</Symbol> attribute is set,
  82. the file name is considered to be the title of the document.
  83. This string would be suitable for display in a window title bar, for example.
  84. </Para>
  85. </RefSect1>
  86. <RefSect1>
  87. <Title>APPLICATION USAGE</Title>
  88. <Para>The
  89. &cdeman.ttmedia.ptype.declare; function can be used to register for,
  90. and help process, this message.
  91. </Para>
  92. <Para>This message can be sent with the
  93. &cdeman.ttmedia.load; function.
  94. </Para>
  95. </RefSect1>
  96. <RefSect1>
  97. <Title>EXAMPLES</Title>
  98. <Para>To edit an X11 XBM bitmap, the application can send an
  99. <Symbol Role="Message">Edit</Symbol> request with a first argument whose vtype is
  100. <Symbol>XBM</Symbol>, and whose value is a string such as:
  101. </Para>
  102. <InformalExample Remap="indent">
  103. <ProgramListing>#define foo_width 44&bsol;n#define foo_height 94&bsol;n
  104. </ProgramListing>
  105. </InformalExample>
  106. <Para>The
  107. <Literal>&bsol;n</Literal> in the example represents the newline character.
  108. The notation is the same as in the &str-Z3;.
  109. </Para>
  110. <Para>To edit an X11 XBM bitmap contained in a file, the application can send an
  111. <Symbol Role="Message">Edit</Symbol> request naming that file in its
  112. <Symbol Role="Variable">file</Symbol> attribute,
  113. with a first argument whose vtype is
  114. <Symbol>XBM</Symbol>, and whose value is not set.
  115. </Para>
  116. </RefSect1>
  117. <RefSect1>
  118. <Title>ERRORS</Title>
  119. <Para>The ToolTalk service may return one of the following errors
  120. in processing the
  121. <Symbol Role="Message">Edit</Symbol> request:
  122. </Para>
  123. <VariableList>
  124. <VarListEntry>
  125. <Term>TT_DESKTOP_ECANCELED</Term>
  126. <ListItem>
  127. <Para>The user overrode the
  128. <Symbol Role="Message">Edit</Symbol> request.
  129. When an
  130. <Symbol Role="Message">Edit</Symbol> request is failed with
  131. <SystemItem Class="Constant">TT_DESKTOP_ECANCELED</SystemItem>, the document should not be updated
  132. as a result, but rather should remain as it was before
  133. the failure reply was received.
  134. </Para>
  135. </ListItem>
  136. </VarListEntry>
  137. <VarListEntry>
  138. <Term>TT_DESKTOP_ENOENT</Term>
  139. <ListItem>
  140. <Para>The file that was alleged to contain the document does not exist.
  141. </Para>
  142. </ListItem>
  143. </VarListEntry>
  144. <VarListEntry>
  145. <Term>TT_DESKTOP_ENODATA</Term>
  146. <ListItem>
  147. <Para>The in-mode
  148. <Emphasis>contents</Emphasis> argument had no value and the
  149. <Symbol Role="Variable">file</Symbol> attribute
  150. of the message was not set.
  151. </Para>
  152. </ListItem>
  153. </VarListEntry>
  154. <VarListEntry>
  155. <Term>TT_MEDIA_ERR_FORMAT</Term>
  156. <ListItem>
  157. <Para>The document is not a valid instance of the media type.
  158. </Para>
  159. </ListItem>
  160. </VarListEntry>
  161. </VariableList>
  162. </RefSect1>
  163. <RefSect1>
  164. <Title>SEE ALSO</Title>
  165. <Para>&cdeman.ttmedia.ptype.declare;, &cdeman.ttmedia.load;; <Emphasis>Intro</Emphasis>, <Symbol Role="Message">Display</Symbol> requests.
  166. </Para>
  167. </RefSect1>
  168. </RefEntry>
  169. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->