cdesktopenv/cde/doc/C/help/CreatAct/Tasks.sgm

628 lines
21 KiB
Plaintext

<!-- $XConsortium: Tasks.sgm /main/9 1996/09/08 22:49:58 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. -->
<Chapter Id="Tasks">
<Title>Create Action Tasks</Title>
<Procedure>
<Title>Creating and Editing Actions</Title>
<Step>
<ItemizedList Mark="&bull;" Role="tight">
<ListItem Id="HCRA.TSKS.item.1">
<Para><XRef Linkend="ToCreateAction"></Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.2">
<Para><XRef Linkend="ToEditAction"></Para>
</ListItem>
</ItemizedList>
</Step>
</Procedure>
<Procedure>
<Title>Creating and Editing Data Types</Title>
<Step>
<ItemizedList Mark="&bull;" Role="tight">
<ListItem Id="HCRA.TSKS.item.3">
<Para><XRef Linkend="ToCreateAction"></Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.4">
<Para><XRef Linkend="ToEditDatatype"></Para>
</ListItem>
</ItemizedList>
</Step>
</Procedure>
<Procedure>
<Title>Icons for Actions and Data Types</Title>
<Step>
<ItemizedList Mark="&bull;" Role="tight">
<ListItem Id="HCRA.TSKS.item.5">
<Para><XRef Linkend="ToSpecifyIcon"></Para>
</ListItem>
</ItemizedList>
</Step>
</Procedure>
<Sect1 Id="ToCreateAction">
<Title>To Create an Action With Create Action</Title>
<IndexTerm>
<Primary>action:creating</Primary>
</IndexTerm>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.6">
<Para>Open the Desktop_Apps application group in Application Manager and
double-click Create Action.</Para>
<Para>This displays the Create Action main window.</Para>
<Graphic Entityref="CAMainWindow" Id="HCRA.TSKS.fig.1"></Graphic>
</ListItem>
<ListItem Id="HCRA.TSKS.item.7">
<Para>In the Action Name text field, type the name that will label the action's icon.</Para>
<Para>The action name can include any characters except spaces.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.8">
<Para>Use the Action Icons controls to specify the icon for the application. Initially,
the default icon is shown.</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.9">
<Para>To use a different existing icon, click Find Set to open the Find Set
dialog box. For more information, see <XRef Linkend="ToSpecifyIcon">.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.10">
<Para>To create new icons, click Edit Icon to run the Icon Editor.
See <XRef Linkend="CreatingNewIcon">.
</Para>
</ListItem>
</ItemizedList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.11">
<Para>In the Command When Action Icon is Opened text field, type the
command to start the application.</Para>
<Para>Use the syntax <ComputerOutput>$<Symbol Role="Variable">n</Symbol></ComputerOutput> for a file
argument. For example:</Para>
<ProgramListing>emacs
bitmap $1
diff $1 $2
lp -oraw $1
</ProgramListing>
<Para>If the command line includes a file argument (<ComputerOutput>$<Symbol Role="Variable">n</Symbol></ComputerOutput>), then the action
icon will be a drop zone for files.</Para>
<Para>The command lines are not passed to a shell unless you explicitly specify
the use of a shell. For example, these lines use shell processing:</Para>
<ProgramListing>/bin/sh -c `ps | lp'
/bin/sh -c `spell $1 | more'
</ProgramListing>
</ListItem>
<ListItem Id="HCRA.TSKS.item.12">
<Para>In the Help Text for Action Icon text field, type the help information to be
displayed when the user gets on-item help on the <GlossTerm>action icon</GlossTerm>.</Para>
<Para>The text will automatically wrap in the text field. However, these line
breaks are not preserved online. If you want to specify a "hard" line break,
use <ComputerOutput>&bsol;n</ComputerOutput>.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.13">
<Para>Use the Window Type button menu to select the kind of windowing support
required</Para>
<VariableList>
<VarListEntry>
<Term>Graphical (X-Window)</Term>
<ListItem>
<Para>The application creates its own window.</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>Terminal (Auto-Close)</Term>
<ListItem>
<Para>The application will be run in a terminal window that
closes automatically when the user exits the
application.</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>Terminal (Manual Close)</Term>
<ListItem>
<Para>The application will be run in a terminal window that
remains open until the user explicitly closes it.</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>No Output</Term>
<ListItem>
<Para>The application does not produce output to the display.</Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.14">
<Para>Proceed as follows:</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.15">
<Para>If your application has data files and you want to create one or more
data types for them, see <XRef Linkend="ToCreateDatatype">.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.16">
<Para>If you do not need to create a data type:</Para>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.17">
<Para>Save the action by choosing Save from the File menu.
</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.18">
<Para>Test the new action by double-clicking its icon in your home directory.
</Para>
</ListItem>
</OrderedList>
</ListItem>
</ItemizedList>
</ListItem>
</OrderedList>
</Sect1>
<Sect1 Id="ToCreateDatatype">
<Title>To Create a Data Type with Create Action</Title>
<IndexTerm>
<Primary>data type:creating</Primary>
</IndexTerm>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.19">
<Para>Define the action for the application. See steps 1 through 6 of the
topic <XRef Linkend="ToCreateAction">.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.20">
<Para>Click the Advanced button to expand the Create Action window.</Para>
<Graphic Entityref="CAAdvancedMainWIndow" Id="HCRA.TSKS.fig.2"></Graphic>
</ListItem>
<ListItem Id="HCRA.TSKS.item.21">
<Para>If you want the <GlossTerm>action icon</GlossTerm> to prompt for a file argument when the icon
is double-clicked, type the text of the prompt into the "When Action Opens,
Ask Users for" text field.</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.22">
<Para>You must use this field if the application's command line has a required file
argument.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.23">
<Para>You must leave this field blank if the application's command line does not have a
file argument.
</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.24">
<Para>If the file argument in the application's command line is optional, you have
a choice.
If you supply the prompt text, the action icon will
prompt for the file
when double-clicked.
If you do not supply the prompt text, the action will be executed with a
null string as the file argument.
</Para>
</ListItem>
</ItemizedList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.25">
<Para>Specify the types of files that the action will accept as arguments:
</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.26">
<Para>If the action can accept any data type, click All Datatypes.
</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.27">
<Para>If the action can accept only the data type(s) you create for the
application, click Only Above List.
</Para>
</ListItem>
</ItemizedList>
<Para>Initially, the Datatypes That use This Action list is empty. As you create
data types for the
application, they are added to the list.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.28">
<Para>Click Add to display the Add Datatype dialog box.</Para>
<Graphic Entityref="CAAddDataTypesWindow" Id="HCRA.TSKS.fig.3"></Graphic>
</ListItem>
<ListItem Id="HCRA.TSKS.item.29">
<Para>Optional: If you don't want to use the default data type name, type a new
name for the new data type into the Name of Datatype text field. The name
cannot include spaces.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.30">
<Para>Click the Edit button beside the Identifying Characteristics box to display
the Identifying Characteristics dialog box.</Para>
<Graphic Entityref="CAIdentifyingCharWindow" Id="HCRA.TSKS.fig.4"></Graphic>
<Para>Use this dialog box to set the
characteristics used to differentiate the data type
from others. You can choose one criterion (for example, Name Pattern) or
combine criteria (for example, both Name and Permission Patterns).</Para>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.31">
<Para>Click either the File or Folder toggle button to specify whether the
data type presents a file or a folder.</Para>
<Graphic Entityref="CAIdenCharFileFolder" Id="HCRA.TSKS.fig.5"></Graphic>
</ListItem>
<ListItem Id="HCRA.TSKS.item.32">
<Para>If the data type depends on the name, click the Name Pattern check box
and type the name pattern. You can use <ComputerOutput>*</ComputerOutput> and <ComputerOutput>?</ComputerOutput> as wildcards.</Para>
<Graphic Entityref="CAIdenCharName" Id="HCRA.TSKS.fig.6"></Graphic>
<VariableList>
<VarListEntry>
<Term>*</Term>
<ListItem>
<Para>Matches any sequence of characters.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>?</Term>
<ListItem>
<Para>Matches any single character.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.33">
<Para>If the data type depends on the permissions, click the
Permission Pattern check box and click the permissions required for
the data type.</Para>
<Graphic Entityref="CAIdenCharPermissionPattern" Id="HCRA.TSKS.fig.7"></Graphic>
<VariableList>
<VarListEntry>
<Term>On</Term>
<ListItem>
<Para>The file must have the specified permission.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>Off</Term>
<ListItem>
<Para>The file must lack the specified permission.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>Either</Term>
<ListItem>
<Para>(Default) The permission does not matter.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.34">
<Para>If the data type depends on the contents, click the Contents check box
and supply the requested information-Pattern to search
for and Type of contents. Optionally, you can supply the byte location where
the search should start.</Para>
</ListItem>
</OrderedList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.35">
<Para>Click OK to close the File Characteristics dialog box.</Para>
<Para>The characteristics
will be displayed in the Identifying Characteristics box in the
Add Datatype dialog box.</Para>
<Para>The Permissions information in the Identifying Characteristics box uses this
coding:</Para>
<VariableList>
<VarListEntry>
<Term>d</Term>
<ListItem>
<Para>Directory
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>r</Term>
<ListItem>
<Para>Read permission
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>w</Term>
<ListItem>
<Para>Write permission
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>x</Term>
<ListItem>
<Para>Executable
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>!</Term>
<ListItem>
<Para>NOT
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>&amp;</Term>
<ListItem>
<Para>AND
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.36">
<Para>Type the help text for the data type into the Help Text text field</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.37">
<Para>Use the Datatype Icons controls to specify the icon for the application.</Para>
<Para>Initially, the default icons are shown.</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.38">
<Para>To use a different existing icon, click Find Set to open the Find Set
dialog box. For more information, see <XRef Linkend="ToSpecifyIcon">.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.39">
<Para>To create new icons, click Edit Icon to run the Icon Editor.
See <XRef Linkend="CreatingNewIcon">.
</Para>
</ListItem>
</ItemizedList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.40">
<Para>Optional: If the application supplies a print command for printing data
files from the
command line, type the command into the Print Command text field, using
the syntax <ComputerOutput>$<Symbol Role="Variable">n</Symbol></ComputerOutput> for a file argument.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.41">
<Para>Click OK to close the Add Datatype dialog box and add the data type
to the data types list in the Create Action window.</Para>
</ListItem>
</OrderedList>
</Sect1>
<Sect1 Id="CreateActionIconImage">
<Title>To Specify Icons for Actions and Data Types</Title>
<Para>The Create Action Main window and Add Datatype dialog box contain buttons
for specifying the icon to be used by actions and data types.
</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.42">
<Para>To use an existing icon, click Find Set. See <XRef Linkend="ToSpecifyIcon">.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.43">
<Para>To create a new icon using Icon Editor, click Edit Icon. See
<XRef Linkend="CreatingNewIcon">.
</Para>
</ListItem>
</ItemizedList>
<Sect2 Id="ToSpecifyIcon">
<Title>To Use the Find Set Dialog Box</Title>
<Para>The Find Set dialog box is displayed when you click Find Set in the Create
Action main window or in the Create Datatype dialog box.
</Para>
<Graphic Entityref="CAFindSetWindow" Id="HCRA.TSKS.fig.8"></Graphic>
<Para>The Find Set dialog box lets you specify:</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.44">
<Para>An icon located in a folder in the Icons Folders list.
The Icon Folders list includes all the folders on the icon search path.
</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.45">
<Para>An icon that is part of a registration package that will be integrated
with the desktop using <ComputerOutput>dtappintegrate</ComputerOutput>.</Para>
</ListItem>
</ItemizedList>
<Procedure>
<Title>To Specify an Icon in an Icon Folder</Title>
<Step>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.46">
<Para>In the Icon Folders list, double-click the folder path containing
the icon.</Para>
<Para>The Icon Files list will show all the icon files in that folder.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.47">
<Para>In the Icon Files list, click the icon you want to use.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.48">
<Para>Click OK.
</Para>
</ListItem>
</OrderedList>
</Step>
</Procedure>
<Procedure>
<Title>To Specify an Icon in a Registration Package</Title>
<Step>
<Para>If you are a system administrator or programmer creating a registration
package, the icon image files are initially located in a directory in the
registration package:
</Para>
<ProgramListing><Symbol Role="Variable">app_root</Symbol>/dt/appconfig/icons/<Symbol Role="Variable">language</Symbol>
</ProgramListing>
<Para>After registration, the icon files will be in an <GlossTerm>icon folder</GlossTerm>.
Therefore, the action and data type definitions
should use the base file name.</Para>
<Para>Use this procedure to specify a base name for an icon that is not currently
in an icon folder:</Para>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.49">
<Para>In the Enter Icon Filename text box, type the <GlossTerm>base name</GlossTerm>
of the icon file.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.50">
<Para>Click OK.</Para>
<Para>An error dialog box is displayed, informing you that the icon file wasn't found
in an icon folder.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.51">
<Para>In the error dialog box, click Name OK. This closes the dialog box and
the Find Set dialog box.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.52">
<Para>Ignore the absence of an icon image in the Action Icons or Datatype icons
field. The icon image will be found when the application has been registered.</Para>
</ListItem>
</OrderedList>
</Step>
</Procedure>
</Sect2>
<Sect2 Id="CreatingNewIcon">
<Title>Creating a New Icon Image</Title>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.53">
<Para>Click Edit Icon in the Create Action or Edit Datatype window.
This runs Icon Editor.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.54">
<Para>Use Icon Editor to draw a new icon. See:</Para>
<ItemizedList Mark="&bull;" Role="tight">
<ListItem Id="HCRA.TSKS.item.55">
<Para><OLink Type="Jump" LocalInfo="Iconed Tasks">Icon Editor Tasks</OLink>.
</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.56">
<Para><XRef Linkend="IconSizesandNames"></Para>
</ListItem>
</ItemizedList>
</ListItem>
<ListItem Id="HCRA.TSKS.item.57">
<Para>Choose Save from the File menu to save the icon file.</Para>
<Para>Save the icon file into the <ComputerOutput><Symbol Role="Variable">HomeFolder</Symbol>/.dt/icons</ComputerOutput> folder.
See <XRef Linkend="IconSizesandNames">.</Para>
</ListItem>
</OrderedList>
<Note>
<Para>If you are a system administrator or applications programmer creating a
registration package, the icon file should be saved to
the <ComputerOutput><Symbol Role="Variable">approot</Symbol>/dt/appconfig/icons/<Symbol Role="Variable">language</Symbol></ComputerOutput> directory.
</Para>
</Note>
</Sect2>
<Sect2 Id="IconSizesandNames">
<Title>Icon Sizes and Names</Title>
<Para>Desktop icons use this naming convention:
</Para>
<VariableList>
<VarListEntry>
<Term><Emphasis Role="heading">Size (Pixels)</Emphasis></Term>
<ListItem>
<Para><Emphasis Role="heading">Name</Emphasis></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>32 by 32</Term>
<ListItem>
<Para><ComputerOutput><Symbol Role="Variable">basename</Symbol>.m.pm</ComputerOutput> or <ComputerOutput><Symbol Role="Variable">basename</Symbol>.m.bm</ComputerOutput>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term>16 by 16</Term>
<ListItem>
<Para><ComputerOutput><Symbol Role="Variable">basename</Symbol>.s.pm</ComputerOutput> or <ComputerOutput><Symbol Role="Variable">basename</Symbol>.s.bm</ComputerOutput>
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.58">
<Para>For action icons, use the action name as the basename.
</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.59">
<Para>For data type icons, use the data type name as the base name.
</Para>
</ListItem>
</ItemizedList>
</Sect2>
</Sect1>
<Sect1 Id="ToEditAction">
<Title>To Edit an Existing Action</Title>
<IndexTerm>
<Primary>actions:editing</Primary>
</IndexTerm>
<Para>You can use Create Action to edit an existing action if:
</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.60">
<Para>The action was created with Create Action.
</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.61">
<Para><Emphasis>And</Emphasis>, the the file containing the action definition has not been
edited manually (using a text editor).
</Para>
</ListItem>
</ItemizedList>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.62">
<Para>Open the Desktop_Apps application group in Application Manager and
double-click Create Action.</Para>
<Para>This displays the main Create Action window.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.63">
<Para>Choose Open from the File menu. This displays the Open dialog box.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.64">
<Para>In the Files list, select the file containing the action definition.
It has the name <ComputerOutput><Symbol Role="Variable">action_name</Symbol>.dt</ComputerOutput>.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.65">
<Para>Choose OK.</Para>
</ListItem>
</OrderedList>
</Sect1>
<Sect1 Id="ToEditDatatype">
<Title>To Edit an Existing Data Type</Title>
<IndexTerm>
<Primary>data type:editing</Primary>
</IndexTerm>
<Para>You can use Create Action to edit an existing data type if:
</Para>
<ItemizedList Mark="&bull;">
<ListItem Id="HCRA.TSKS.item.66">
<Para>The data type was created with Create Action.
</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.67">
<Para><Emphasis>And</Emphasis>, the file containin the data type
has not been edited manually (using a text editor).
</Para>
</ListItem>
</ItemizedList>
<OrderedList>
<ListItem Id="HCRA.TSKS.item.68">
<Para>Open the Desktop_Apps application group in Application Manager and
double-click Create Action.</Para>
<Para>This displays the main Create Action window.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.69">
<Para>Choose Open from the File menu. This displays the Open dialog box.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.70">
<Para>In the Files list, double-click the file containing the data type definition.</Para>
<Para>The name of the file is <ComputerOutput><Symbol Role="Variable">action_name</Symbol>.dt</ComputerOutput>, where <Emphasis>action_name</Emphasis> is
the name of the action that was created at the same time you created
the data type.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.71">
<Para>Click Advanced.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.72">
<Para>In the Data Types That Use This Action list, select the data type to be
edited.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.73">
<Para>Click Edit to open the Edit Datatype dialog box.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.74">
<Para>Make changes in the Edit Datatype dialog box. When you are done, click OK.</Para>
</ListItem>
<ListItem Id="HCRA.TSKS.item.75">
<Para>To save the edited definition, choose Save from the File menu.</Para>
</ListItem>
</OrderedList>
</Sect1>
</Chapter>
<!--fickle 1.15 help-to-docbook 1.4 01/17/96 16:30:32-->