EdSetCFF.sgm 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <!-- $XConsortium: EdSetCFF.sgm /main/5 1996/08/30 13:02:03 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.XCSA.MAN41.rsml.1">]]>
  10. <![ %CDE.C.XO; [<RefEntry Id="XCSA.MAN41.rsml.1">]]>
  11. <RefMeta>
  12. <RefEntryTitle>DtEditorSetContentsFromFile</RefEntryTitle>
  13. <ManVolNum>library call</ManVolNum>
  14. </RefMeta>
  15. <RefNameDiv>
  16. <RefName><Function>DtEditorSetContentsFromFile</Function></RefName>
  17. <RefPurpose>load data from a file into a DtEditor widget
  18. </RefPurpose>
  19. </RefNameDiv>
  20. <!-- CDE Common Source Format, Version 1.0.0-->
  21. <!-- *************************************************************************-->
  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. <!-- *************************************************************************-->
  27. <RefSynopsisDiv>
  28. <FuncSynopsis Remap="ANSI">
  29. <FuncSynopsisInfo>#include &lt;Dt/Editor.h>
  30. </FuncSynopsisInfo>
  31. <FuncDef>DtEditorErrorCode <Function>DtEditorSetContentsFromFile</Function></FuncDef>
  32. <ParamDef>Widget <Parameter>widget</Parameter></ParamDef>
  33. <ParamDef>char *<Parameter>fileName</Parameter></ParamDef>
  34. </FuncSynopsis>
  35. </RefSynopsisDiv>
  36. <RefSect1>
  37. <Title>DESCRIPTION</Title>
  38. <Para>The
  39. <Function>DtEditorSetContentsFromFile</Function> function loads the contents of a file into a
  40. DtEditor widget.
  41. Any data currently in the DtEditor widget is lost.
  42. After the data is loaded, the insertion cursor is positioned at the
  43. first character.
  44. </Para>
  45. <Para>The
  46. <Symbol Role="Variable">widget</Symbol> argument specifies the DtEditor widget ID.
  47. </Para>
  48. <Para>The
  49. <Emphasis>fileName</Emphasis> argument is the pathname of the file
  50. relative to the local system.
  51. <![ %CDE.C.CDE; [</Para>
  52. <Para>For a complete definition of the DtEditor widget
  53. and its associated resources, see
  54. &cdeman.DtEditor;. ]]></Para>
  55. </RefSect1>
  56. <RefSect1>
  57. <Title>RETURN VALUE</Title>
  58. <Para>Upon successful completion, the
  59. <Function>DtEditorSetContentsFromFile</Function> function returns one of the following values
  60. when it successfully loads the data into the DtEditor widget:
  61. </Para>
  62. <VariableList>
  63. <VarListEntry>
  64. <Term>DtEDITOR_NO_ERRORS</Term>
  65. <ListItem>
  66. <Para>The file is readable and writable.
  67. </Para>
  68. </ListItem>
  69. </VarListEntry>
  70. <VarListEntry>
  71. <Term>DtEDITOR_READ_ONLY_FILE</Term>
  72. <ListItem>
  73. <Para>The file is read only.
  74. <![ %CDE.C.CDE; [</Para>
  75. </ListItem>
  76. </VarListEntry>
  77. <VarListEntry>
  78. <Term>DtEDITOR_NULLS_REMOVED</Term>
  79. <ListItem>
  80. <Para>The file contained embedded
  81. <SystemItem Class="Constant">NULL</SystemItem> characters, which were removed.
  82. ]]></Para>
  83. </ListItem>
  84. </VarListEntry>
  85. </VariableList>
  86. <Para>Otherwise, if it cannot load the data into the DtEditor widget,
  87. the function
  88. returns one of the following values:
  89. </Para>
  90. <VariableList>
  91. <VarListEntry>
  92. <Term>DtEDITOR_NONEXISTENT_FILE</Term>
  93. <ListItem>
  94. <Para>The file does not exist.
  95. </Para>
  96. </ListItem>
  97. </VarListEntry>
  98. <VarListEntry>
  99. <Term>DtEDITOR_DIRECTORY</Term>
  100. <ListItem>
  101. <Para>The file is a directory.
  102. </Para>
  103. </ListItem>
  104. </VarListEntry>
  105. <VarListEntry>
  106. <Term>DtEDITOR_CHAR_SPECIAL_FILE</Term>
  107. <ListItem>
  108. <Para>The file is a character-special device.
  109. </Para>
  110. </ListItem>
  111. </VarListEntry>
  112. <VarListEntry>
  113. <Term>DtEDITOR_BLOCK_MODE_FILE</Term>
  114. <ListItem>
  115. <Para>The file is a block-mode device.
  116. </Para>
  117. </ListItem>
  118. </VarListEntry>
  119. <VarListEntry>
  120. <Term>DtEDITOR_NO_FILE_ACCESS</Term>
  121. <ListItem>
  122. <Para>The file cannot be accessed.
  123. <![ %CDE.C.CDE; [</Para>
  124. </ListItem>
  125. </VarListEntry>
  126. <VarListEntry>
  127. <Term>DtEDITOR_INSUFFICIENT_MEMORY</Term>
  128. <ListItem>
  129. <Para>Not enough system memory is available to load the file.
  130. ]]></Para>
  131. </ListItem>
  132. </VarListEntry>
  133. <VarListEntry>
  134. <Term>DtEDITOR_UNREADABLE_FILE</Term>
  135. <ListItem>
  136. <Para>The file is unreadable for an unspecified reason.
  137. </Para>
  138. </ListItem>
  139. </VarListEntry>
  140. </VariableList>
  141. </RefSect1>
  142. <RefSect1>
  143. <Title>APPLICATION USAGE</Title>
  144. <Para>If the data is in memory, rather than a disk file, the application should
  145. use
  146. &cdeman.DtEditorSetContents;.</Para>
  147. </RefSect1>
  148. <RefSect1>
  149. <Title>SEE ALSO</Title>
  150. <Para>&cdeman.Dt.Editor.h;, &cdeman.DtEditor;, &cdeman.DtEditorAppend;, &cdeman.DtEditorAppendFromFile;, &cdeman.DtEditorGetContents;, &cdeman.DtEditorInsert;, &cdeman.DtEditorInsertFromFile;, &cdeman.DtEditorReplace;, &cdeman.DtEditorReplaceFromFile;, &cdeman.DtEditorSaveContentsToFile;, &cdeman.DtEditorSetContents;.</Para>
  151. </RefSect1>
  152. </RefEntry>
  153. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:40:24-->