171 lines
5.6 KiB
Plaintext
171 lines
5.6 KiB
Plaintext
<!-- $XConsortium: Edit.sgm /main/8 1996/09/08 20:13:54 rws $ -->
|
|
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
|
|
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
|
|
<!-- (c) Copyright 1995 International Business Machines Corp. -->
|
|
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
|
|
<!-- (c) Copyright 1995 Novell, Inc. -->
|
|
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
|
|
<!-- (c) Copyright 1995 Hitachi. -->
|
|
|
|
<![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN284.rsml.1">]]>
|
|
<![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN284.rsml.1">]]>
|
|
<RefMeta>
|
|
<RefEntryTitle>Edit</RefEntryTitle>
|
|
<ManVolNum>special file</ManVolNum>
|
|
</RefMeta>
|
|
<RefNameDiv>
|
|
<RefName><Symbol Role="Message">Edit</Symbol></RefName>
|
|
<RefPurpose>compose or edit a document
|
|
</RefPurpose>
|
|
</RefNameDiv>
|
|
<!-- $XConsortium: Edit.sgm /main/8 1996/09/08 20:13:54 rws $-->
|
|
<!-- CDE Common Source Format, Version 1.0.0-->
|
|
<!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
|
|
<!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
|
|
<!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
|
|
<!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
|
|
<RefSynopsisDiv>
|
|
<Synopsis>[<Symbol Role="Variable">file</Symbol>] Edit([out|inout] <Emphasis>mediaType contents</Emphasis>
|
|
[in title <Emphasis>docName</Emphasis>]);
|
|
</Synopsis>
|
|
</RefSynopsisDiv>
|
|
<RefSect1>
|
|
<Title>DESCRIPTION</Title>
|
|
<Para>The
|
|
<Symbol Role="Message">Edit</Symbol> request causes the handler to edit a document
|
|
and reply with the new contents when the editing is completed.
|
|
</Para>
|
|
<Para>It is up to the handler to decide issues such as:
|
|
</Para>
|
|
<ItemizedList>
|
|
<ListItem>
|
|
<Para>When the editing operation can be deemed completed
|
|
</Para>
|
|
</ListItem>
|
|
<ListItem>
|
|
<Para>What user gesture signals the completion of the editing
|
|
</Para>
|
|
</ListItem>
|
|
<ListItem>
|
|
<Para>What the handling tool should do with itself after replying
|
|
</Para>
|
|
</ListItem>
|
|
</ItemizedList>
|
|
<Para>If the handling tool supports some form of intermediate save operation
|
|
during editing,
|
|
it must send a
|
|
<Symbol Role="Message">Deposit</Symbol> request back to the tool that requested the
|
|
<Symbol Role="Message">Edit</Symbol>.</Para>
|
|
<Para>The
|
|
<Emphasis>contents</Emphasis> argument
|
|
is the contents of the document.
|
|
If this argument is unset
|
|
(in other words, has a value of
|
|
<Literal>(char *)0</Literal>), then the contents of the document are in
|
|
the file named in the message's
|
|
<Symbol Role="Variable">file</Symbol> attribute.
|
|
The data type
|
|
(<Emphasis>mediaType</Emphasis>) of the
|
|
<Emphasis>contents</Emphasis> argument should be
|
|
<Literal>string</Literal>, unless nulls are valid in the given media type,
|
|
in which case the data type must be
|
|
<Literal>bytes</Literal>.</Para>
|
|
<Para>If the
|
|
<Emphasis>contents</Emphasis> argument is of mode
|
|
<Literal>out</Literal>, then a new document must be composed
|
|
and its contents returned in this argument.
|
|
</Para>
|
|
<Para>The
|
|
<Emphasis>docName</Emphasis> argument contains the name of the document.
|
|
If the
|
|
<Emphasis>docName</Emphasis> argument is absent and the
|
|
<Symbol Role="Variable">file</Symbol> attribute is set,
|
|
the file name is considered to be the title of the document.
|
|
This string would be suitable for display in a window title bar, for example.
|
|
</Para>
|
|
</RefSect1>
|
|
<RefSect1>
|
|
<Title>APPLICATION USAGE</Title>
|
|
<Para>The
|
|
&cdeman.ttmedia.ptype.declare; function can be used to register for,
|
|
and help process, this message.
|
|
</Para>
|
|
<Para>This message can be sent with the
|
|
&cdeman.ttmedia.load; function.
|
|
</Para>
|
|
</RefSect1>
|
|
<RefSect1>
|
|
<Title>EXAMPLES</Title>
|
|
<Para>To edit an X11 XBM bitmap, the application can send an
|
|
<Symbol Role="Message">Edit</Symbol> request with a first argument whose vtype is
|
|
<Symbol>XBM</Symbol>, and whose value is a string such as:
|
|
</Para>
|
|
<InformalExample Remap="indent">
|
|
<ProgramListing>#define foo_width 44\n#define foo_height 94\n
|
|
</ProgramListing>
|
|
</InformalExample>
|
|
<Para>The
|
|
<Literal>\n</Literal> in the example represents the newline character.
|
|
The notation is the same as in the &str-Z3;.
|
|
</Para>
|
|
<Para>To edit an X11 XBM bitmap contained in a file, the application can send an
|
|
<Symbol Role="Message">Edit</Symbol> request naming that file in its
|
|
<Symbol Role="Variable">file</Symbol> attribute,
|
|
with a first argument whose vtype is
|
|
<Symbol>XBM</Symbol>, and whose value is not set.
|
|
</Para>
|
|
</RefSect1>
|
|
<RefSect1>
|
|
<Title>ERRORS</Title>
|
|
<Para>The ToolTalk service may return one of the following errors
|
|
in processing the
|
|
<Symbol Role="Message">Edit</Symbol> request:
|
|
</Para>
|
|
<VariableList>
|
|
<VarListEntry>
|
|
<Term>TT_DESKTOP_ECANCELED</Term>
|
|
<ListItem>
|
|
<Para>The user overrode the
|
|
<Symbol Role="Message">Edit</Symbol> request.
|
|
When an
|
|
<Symbol Role="Message">Edit</Symbol> request is failed with
|
|
<SystemItem Class="Constant">TT_DESKTOP_ECANCELED</SystemItem>, the document should not be updated
|
|
as a result, but rather should remain as it was before
|
|
the failure reply was received.
|
|
</Para>
|
|
</ListItem>
|
|
</VarListEntry>
|
|
<VarListEntry>
|
|
<Term>TT_DESKTOP_ENOENT</Term>
|
|
<ListItem>
|
|
<Para>The file that was alleged to contain the document does not exist.
|
|
</Para>
|
|
</ListItem>
|
|
</VarListEntry>
|
|
<VarListEntry>
|
|
<Term>TT_DESKTOP_ENODATA</Term>
|
|
<ListItem>
|
|
<Para>The in-mode
|
|
<Emphasis>contents</Emphasis> argument had no value and the
|
|
<Symbol Role="Variable">file</Symbol> attribute
|
|
of the message was not set.
|
|
</Para>
|
|
</ListItem>
|
|
</VarListEntry>
|
|
<VarListEntry>
|
|
<Term>TT_MEDIA_ERR_FORMAT</Term>
|
|
<ListItem>
|
|
<Para>The document is not a valid instance of the media type.
|
|
</Para>
|
|
</ListItem>
|
|
</VarListEntry>
|
|
</VariableList>
|
|
</RefSect1>
|
|
<RefSect1>
|
|
<Title>SEE ALSO</Title>
|
|
<Para>&cdeman.ttmedia.ptype.declare;, &cdeman.ttmedia.load;; <Emphasis>Intro</Emphasis>, <Symbol Role="Message">Display</Symbol> requests.
|
|
</Para>
|
|
</RefSect1>
|
|
</RefEntry>
|
|
<!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->
|