The following paragraphs describe menu commands. Each submenu in TrEd has as its first item a tear-off line ( ) which can be used to tear the menu off and place it as a separate window anywhere on your desktop.
Opens an existing file that the user chooses in the Open dialog box.
Displays a dialog window with an entry into which the
user can enter a URL or a
filename. TrEd can
downloading and open files at least using http
, ftp
, and file
protocols. Network
protocols (http
and
ftp
) are read-only. On UNIX systems,
TrEd also supports the SSH
protocol with URLs of the form
ssh://[
.
user@
]host
/remote-filename
Since the current implementation of SSH remote file transfer requires several subsequent login sessions each time a remote file is accessed, it is highly recommended that a password-less access (e.g. using Kerberos or SSH keys) is set up before remote files are opened in TrEd using the SSH protocol.
Additionally to the
protocols already mentioned, TrEd supports a special
protocol indicated by the URL prefix ntred://
used for
communication with BTrEd servers. This protocol allows
to inspect and change trees stored in memory of BTrEd
servers.
Creates a new empty file with the same set of attributes as the file that the user chooses in the Open dialog box.
Creates a new empty file with the same set of attributes as the current open file. The command does nothing if no file is open.
Closes current file. If the file is modified but not saved, the user is allowed to save it.
Closes the view on the file in the current window. All other views on the file remain untouched. If no other view on the file exists, the file is closed. If the file is modified but not saved, the user is allowed to save it.
Closes the current file and removes it from the current file-list. If the file is modified but not saved, the user is allowed to save it.
Opens a Filelist dialog window which allows the user to manage lists of files used for easy file-to-file navigation. See more detail in Section 11, “Using File-Lists”.
Saves the active file to the disk. The previous version of the file on the disk is renamed by appending `~' to the filename (according to the well-known UNIX convention for naming of backup files).
This command first asks the user to choose a desired output format, then opens the standard file dialog where new name and location of the file can be specified, and finally runs the
command.This submenu displays 10 most recently opened files. User may quickly reopen any of them by clicking on the corresponding item.
Opens the previous file of the current filelist in the current view, if any (see Section 11, “Using File-Lists”). Unless displayed in some other view, the active file is closed (the user may be asked to save possible changes).
Opens the next file of the current filelist in the current view, if any (see Section 11, “Using File-Lists”). Unless displayed in some other view, the active file is closed (the user may be asked to save possible changes).
Opens the Print Dialog. See Section 10, “Printing Trees” for a detailed information.
Opens the configuration file in a simple text editor (see Section 12, “Configuration and customization” for the details about configuration options). To apply the new configuration, save the configuration file to disk and leave the editor press the button. To apply changes without saving them, press . The button closes the editor without making any changes to the present configuration. A search entry on the bottom of the dialog window can be used for fast case-insensitive searches. When editing the configuration file, make sure you only define each configuration option once, since TrEd doesn't give you any warning about duplicated configuration entries. If an option occurs in the configuration file more than once, the latter occurrence has precedence.
Some configuration options even if applied take effect only after restarting TrEd.
Use this command to reload the configuration file from disk and apply the new options. This command is useful if you have changed the configuration file in a text editor or in an another running instance of TrEd. As above, note that some configuration changes still take effect only after restarting TrEd.
Reloads display stylesheets from the file
~/.tred-stylesheets
.
This command is useful
if you have changed the stylesheets in a text
editor or in an another running instance of
TrEd.
For more information about stylesheets,
see Section 9, “Customizing Tree Appearance: Stylesheets”.
Quit TrEd. The the user is allowed to save all open files containing unsaved changes.
View the previous tree in the current file.
View the next tree in the current file.
If this item is checked, inactive views are covered with a semi-transparent stipple pattern. This may improve orientation if working with more than one view, but also slightly reduces the clarity of trees displayed in the inactive views. (See also StippleInactiveWindows configuration option).
If this item is checked, square boxes are drawn around groups of node labels.
If this item is checked, square boxes are drawn around groups of edge attributes.
Toggle visibility the ``hidden'' subtrees of the tree. If this item is checked, subtrees of nodes makred as hidden using a special FS-attribute (see FS-format description for details) and displayed. By default subtrees of hidden nodes including the nodes themselves are not displayed.
Toggle highlighting certain attributes with user-definable set of colors. See Section 12, “Configuration and customization” for details on customizing colors and FS-format description to learn about how to specify which attributes are highlighted. In general, it is better to avoid this approach of changing tree appearance in favor of stylesheets (see Section 9, “Customizing Tree Appearance: Stylesheets”).
Toggle sorting attributes by name in all dialog windows
displaying any form of a list of attributes or attribute
values. By default, sorting is turned on. If turned off,
depending on the format, attributes may be displayed in
order of their declaration in the file. When this option
is on, sorting of attributes may be further altered by
the sort_attrs_hook
.
Closes the focused view if more than one views are present.
Create and focus a new view by splitting the current
view horizontally. Sizes of the new and old view may be
adjusted by dragging the bar between them. The user may
focus a view by clicking into it. Most keyboard
shorcuts as well as menu and button commands only apply
to the focused view. The focused view is distinguished
from other views by black border drawn around it (both
color and width of this border may be customized, see
HighlightWindowColor
and HighlightWindowWidth
configuration options described below). Inactive views
may be further distiguished using a stipple pattern (see
StippleInactiveWindows
configuration option).
Create and focus a new view by splitting the current view vertically. Sizes of the new and old view may be adjusted by dragging the bar between them. See also little more detailed description of
above.
Display a window containing a list of
“sentences” of all trees in a current
file. These “sentences” are computed in the
same way as the content of the text line above the tree,
e.g. using a get_value_line_hook
or the text:
stylesheet pattern (see
Section 9, “Customizing Tree Appearance: Stylesheets”), or as a concatenation of
special attribute values (i.e. attributes declared
as @V
in the FS
format).
In the list, buttons
display the corresponding sentence in the current TrEd view.
Buttons
are used to select sentences. Selected sentences may be later inserted to tree
selection fields, e.g. in the Print dialog and
in the Copy trees
dialog, by pressing the button
.
Open a dialog window where the user can select a binding context. Binding contexts are groups of user defined macro-bindings, usually identified with macro packages. See also Section 14, “User Macros”. The current context can also be selected from the first list in the top right corner of the main window, but this makes changing contexts fully keyboard accessible.
Open a dialog window where the user can select a display stylesheet. See Section 9, “Customizing Tree Appearance: Stylesheets”. A stylesheet can also be selected from the second list in the top right corner of the main window, but this menu makes changing stylesheets fully keyboard accessible.
Open a dialog box with a stylesheet editor for the currently selected stylesheet. A styleseet defines which attributes should be displayed and defines the tree's overall appearance. See Section 9, “Customizing Tree Appearance: Stylesheets” for more detail.
Display a window listing all user-defined menus and keyboard shortcuts (macros) in a selected context. User may run a macro by double-clicking on a corresponding item in the list, or by pressing the Include anonymous macros, controls whether macros available only via keyboard shortcut are displayed, the second button, See Perl names, toggles displaying of a column containing raw Perl name of macros, and another two buttons (Sort by name and Sort by keyboard shortcuts) control the order in which macros are listed. Finally, the button creates a handy reference from the listing in form of a a HTML document.
button. In the latter case, the window is closed. There are several other buttons in the window. The first button,Creates a new node and connects it as a child of the active node. Initially, all attributes of the new node are empty.
Passes all children of the active node to its parent and deletes the active node. This command is ignored if the active node is the root of the tree.
Inserts a new tree before the current tree. The new tree consists of a root-node only. Initially, attributes of this node are empty.
Inserts a new tree after the current tree. The new tree consists of a root-node only. Initially, attributes of this node are empty.
Removes the current tree from the file and displays the following tree (or the preceding tree, in case the current tree was the last one in the file). The memory representation of the removed tree is destroyed.
Displays a dialog allowing user to copy trees from the current file into another file currently opened in TrEd. The trees are selected by a comma separated list of ranges. The format of the list is the same as in the Print dialog.
Displays the dialog box Edit Node, which is in detail described in Section 8, “Editing node attributes”.
This command displays a dialog box in which the user may
specify a search criterion for a node search. The
criterion is based on regular expressions, wild-card
patterns or literal strings matches for attribute
values. In the dialog, every permittable node attribute
has an editable entry where the user specifies search
criterion for the particular attribute. The user may
choose the type of the search criterions to be a regular expressions,
exhaustive regular expressions (when the whole value
must match), wild-card pattern (where ?
matches any character and
*
matches any number
of any characters) or a literal string. The type of the
criterion is selected in the Search method option-menu and
applies to all entries.
In the Search file-list option-menu, the user may choose a file-list to search through. By default, this menu displays entry [Current file only], which is a virtual file-list containing just the current file.
When user presses TrEd searches for the first matching node in the selected file-list. A node matches the criterion if and only if every attribute of the node matches the criterion in the corresponding entry (empty criterions always match). If a matching node is found, the search stops and the matching node is displayed and made active.
button,Finds a next node matching criteria specified in the previous use of the
command.Finds a preceding node matching the criterion specified in a previous use of the
command.This menu lets user switch between currently open files, change current file-list and toggle some file-related options.
Do not close current file when opening a new one.
If this option is on, all opened files are added to
the file-list Default
so that the user
could easily go back and forth using
-> and
-> .
If this option is checked, current attribute pattern setting is not
replaced with the one from the file when current file
is reloaded with by pressing the
(see also the
ReloadPreservesPatterns
configuration option).
This CSTS-backend specific option allows to choose which of the two tree structures stored in a CSTS file should be presented as trees (the other is encoded in node attributes as child-to-parent node references).
TrEd allows having multiple files open simultaneously. If the user tries to open a file while another file is already open, modified, and yet not saved (and the Don't close on open option is not checked) TrEd offers the user to save changes in the current file and close it, close it withought saving or to keep the file open. In the latter case, the file is not closed nor any changes are discarded. The file remains open even if not displayed by any view. Kept files can be viewed instantly in the active view by selecting the corresponding item in the menu under the label. Any number of files can be simultaneously open in this way.
The bottom part of the TrEd are listed. User may switch to another file-list by choosing the corresponding item. If the file-list was not accessed during the session, the first file on the list is opened and displayed. Otherwise, the file last accessed on that list is re-opened and displayed. See detailed information about file-lists in Section 11, “Using File-Lists”.
menu contains a section labeled , where file-list currently known to
This menu contains user's bookmarks. Bookmarks are filenames
with tree-number and node position attached. The list
of user's bookmarks is maintained in a special file-list named Bookmarks
.
menu command adds bookmark for the current node.
The
menu command automatically opens and shows the file tree and node where the user made a last change to the tree structure or a node attribute. This is extra position is stored in TrEd's configuration file and does not appear among bookmarks.The rest of the
menu lists all defined bookmarks. User may follow a bookmark by choosing the corresponding menu item.
This menu contains user-defined commands in separate sub-menus
for every binding context. New commands may be defined as macros
(see Section 14, “User Macros”). Beside each menu entry is
shown the default keyboard short-cut for the corresponding
macro in the particular context. Here we give only a brief
description of the few macros defined by default in the
TredMacro context
in the base macro file tred.mac
.
Note that, only a few of non-macro commands in TrEd are associated with a keyboard shortcut (other than the standard menu navigation using Alt and the underlined letter). The aim is to give the user maximum freedom of choice of available shortcuts for his or her own macro commands.
Provides a keyboard shortcut for the Save command.
Save the current file and open the previous file on the current file-list.
Save the current file and open the next file on the current file-list.
Close the current file and open the previous file on the current file-list. If the current file contains unsaved changes, the user is allowed to save them.
Close the current file and open the next file on the current file-list. If the current file contains unsaved changes, the user is allowed to save them.
Invoke
-> .Invoke
-> .Copies all values of the active node to an internal clipboard. These values may be pasted to any other node using the
command.Assignes the active nodes attribute values stored in an internal clipboard during the last call of the
command.Cuts off a subtree of the active node and stores it in an iternal clipboard. The cut subtree may be attached later to another node using the
command.Ataches a previously cut subtree to the active node.
Deletes active node. The node must be a leaf and must not be the root of the tree, otherwise this command is ignored.
Displays the first tree in the file.
Like
is pressed.
Displays the last tree in the file.
Like
is pressed.
Promts the user to enter an ordinal number of a tree in the file and displays that tree.
Promts the user to enter an ordinal number of a tree in
the file and displays that tree (depending
on the status of the button
either in the current view only or in all views).
Creates a new node as a right sibling of the active node (this command is ignored if the active node is the root-node).
Creates a new child-node of the active node.
When invoked, a dialog with an editor for a Perl code snippet is displayed. The Perl code entered by user is then evaluated for every node of the tree in their natural ordering starting from the current node. The evaluation stops at first node for which the Perl code returns true (i.e. a defined non-zero value) and this node is activated.
The Perl code conforms to the very same rules as a
macro, i.e. in brief, the variables $this
and $root
refer to the active node
and root of the tree respectively. If $n
refers to some node, then
$n->{attr}
is
value of attr
attribute for the node $n
. The parent-node of
$n
is accessed via $n->parent
, child-nodes of
$n
as $n->childnodes
(returns a
list), etc. Macros from the current context may be
called as Perl subroutines. See Section 14, “User Macros”
for details.
Searches the next node satisfying the Perl-expression specified in a previous usage of the command
.Makes the active node exchange its attributes with its parent-node which effectively swaps the two nodes.
Activate the previous node in the horizontal linear ordering of the tree (i.e. usually the node corresponding to the previous token or word in a sentence).
Activate the next node in the horizontal linear ordering of the tree (i.e. usually the node corresponding to the next token or word in a sentence).
Displayes the previous tree in the current file.
Note that this shorcuts operates on the focused
view only, even if button
is pressed and all views are tied
(and this is a feature).
Displayes the next tree in the current file.
Note that this shorcuts operates on the focused
view only, even if button
is pressed and all views are tied
(and this is a feature).
Displayes the previous tree in the
current view (or all views, if button
is pressed).
Displayes the next tree in the
current view (or all views, if button
is pressed).
Displays the
dialog where the information about version, current file name and format, number of trees, and more is given.Displays a window where the user may safely test keyboard bindings. Every time a keyboard short-cut is pressed in the dialog, TrEd looks up if some macro is associated with the short-cut and displayes the result. No macros acrually executed.
Removes all macro code and variables from memory and reloads all macros. This command is useful when the user modifies the macros in a text editor and wants to check the result without having to restart TrEd.
In this submenu the user may turn on and off various sets of debugging messages printed by TrEd on the standard or error output (e.g. in a terminal window). The following sets of debugging messages are defined: tred (messages produced by TrEd's GUI), macro (messages issued by TrEd when a macro is evaluated), hooks (messages issued by TrEd when a hook is evaluated), keyboard (messages produced by TrEd when a keyboard short-cut is pressed), backend (messages produced by I/O backends), view (messages produced by the displaying engine and errors raised during style-sheet evaluation).