aboutsummaryrefslogtreecommitdiff
path: root/doc/refman.tex
diff options
context:
space:
mode:
Diffstat (limited to 'doc/refman.tex')
-rw-r--r--doc/refman.tex256
1 files changed, 135 insertions, 121 deletions
diff --git a/doc/refman.tex b/doc/refman.tex
index bc48e2b..76bae40 100644
--- a/doc/refman.tex
+++ b/doc/refman.tex
@@ -1111,6 +1111,47 @@ item. Indices are accepted as parameters by commands managing text: \cmdref{curs
\chapter{Widget commands}
\concept{commands}
+In this chapter, we first list all commands by categories, then we details each command, by alphabetical order.
+
+\section{Categories of commands}
+\concept{commandsCategories}
+
+\begin{itemize}
+
+\item{Items creation and deletion} : \cmdref{add} \cmdref{becomes} \cmdref{clone} \cmdref{remove}
+
+\item{Accessing options and attributes} : \cmdref{configure} \cmdref{gettags} \cmdref{itemcget}
+\cmdref{itemconfigure} \cmdref{group} \cmdref{chggroup} \cmdref{coords}
+
+\item{Accessing field attributes of track, waypoint and tabular} : \cmdref{currentpart}
+\cmdref{hasfields} \cmdref{itemcget} \cmdref{itemconfigure} \cmdref{numparts}
+
+\item{Transformations} : \cmdref{rotate} \cmdref{scale} \cmdref{tapply} \cmdref{tdelete}
+\cmdref{transform} \cmdref{translate} \cmdref{treset} \cmdref{tsave}
+
+\item{Display list or priorities} : \cmdref{chggroup} \cmdref{group} \cmdref{lower}
+\cmdref{raise}
+
+\item{Tag management} : \cmdref{addtag} \cmdref{dtag} \cmdref{find} \cmdref{gettags} \cmdref{hastag}
+
+\item{Text management (text item and text fields} : \cmdref{cursor} \cmdref{dchars} \cmdref{focus}
+\cmdref{index} \cmdref{insert} \cmdref{select}
+
+\item{Bindings} : \cmdref{bind} \cmdref{focus}
+
+\item{Coordinates} : \cmdref{anchorxy} \cmdref{bbox} \cmdref{coords} \cmdref{contour}
+\cmdref{fit} \cmdref{smooth} \cmdref{vertexat}
+
+\item{Named resources} : \cmdref{gname} \cmdref{gdelete} \cmdref{tsave}
+
+\item{Micellanous} : \cmdref{monitor} \cmdref{postscript} \cmdref{type}
+
+\end{itemize}
+
+
+\section{Commands by alphabetical order}
+\concept{commandsAlphabetically}
+
The available commands are listed in alphabetical order.
The command set for the Zinc widget is much inspired by the Canvas command set. Someone
@@ -1211,11 +1252,10 @@ reference) and all list parameters are given as array references.
The search specification and the associated arguments can
take the following forms:
- \begin{description}
- \item{\medskip\parbox{14cm}{\tt\large
- pathname {\bf addtag} tag above tagOrId ?inGroup? ?recursive?\smallskip
-
- \$zinc->{\bf addtag}(tag, 'above', tagOrId, ?inGroup?, ?recursive?);}}
+ \begin{itemize}
+ \item{\tt\large
+ pathname {\bf addtag} tag above tagOrId ?inGroup? ?recursive?\\
+ \$zinc->{\bf addtag}(tag, 'above', tagOrId, ?inGroup?, ?recursive? test1);}
Selects the item just above the one given by {\tt tagOrId}. If
{\tt tagOrId} names more than one item, the topmost of these
@@ -1226,30 +1266,25 @@ reference) and all list parameters are given as array references.
group to start with instead of the top group and recursive
tells if the search should descend in the item tree or not.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf addtag} tag all ?inGroup? ?recursive?\smallskip
-
- \$zinc->{\bf addtag}(tag, 'all', ?inGroup?, ?recursive?);}}
+ \item{\tt\large
+ pathname {\bf addtag} tag all ?inGroup? ?recursive?\\
+ \$zinc->{\bf addtag}(tag, 'all', ?inGroup?, ?recursive?);}
- Selects all the items in the widget. The inGroup and
- recursive can be specified to restrict the search. inGroup specifies
- a group to start with instead of the top group and recursive tells
- if the search should descend in the item tree or not.
+ This form is no more allowed since version 3.2.6 of Zinc.
+ Please use a form ``'withtag', 'all''' as documented below.
- \item{\bigskip\parbox{14.7cm}{\tt\large
- pathname {\bf addtag} tag atpriority priority ?inGroup? ?recursive?\smallskip
-
- \$zinc->{\bf addtag}(tag, 'atpriority', priority, ?inGroup?, ?recursive?);}}
+ \item{\tt\large
+ pathname {\bf addtag} tag atpriority priority ?inGroup? ?recursive?\\
+ \$zinc->{\bf addtag}(tag, 'atpriority', priority, ?inGroup?, ?recursive?);}
Selects all the items at the given priority. The inGroup and
recursive can be specified to restrict the search. inGroup specifies
a group to start with instead of the top group and recursive tells
if the search should descend in the item tree or not.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf addtag} tag below tagOrId ?inGroup? ?recursive?\smallskip
-
- \$zinc->{\bf addtag}(tag, 'below', tagOrId, ?inGroup?, ?recursive?);}}
+ \item{\tt\large
+ pathname {\bf addtag} tag below tagOrId ?inGroup? ?recursive?\\
+ \$zinc->{\bf addtag}(tag, 'below', tagOrId, ?inGroup?, ?recursive?);}
Selects the item just below the one given by {\tt tagOrId}. If
{\tt tagOrId} names more than one item, the lowest of these
@@ -1260,10 +1295,9 @@ reference) and all list parameters are given as array references.
group to start with instead of the top group and recursive
tells if the search should descend in the item tree or not.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf addtag} tag closest x y ?halo? ?startItem?\smallskip
-
- \$zinc->{\bf addtag}(tag, 'closest', x, y, ?halo?, ?startItem?);}}
+ \item{\tt\large
+ pathname {\bf addtag} tag closest x y ?halo? ?startItem?\\
+ \$zinc->{\bf addtag}(tag, 'closest', x, y, ?halo?, ?startItem?);}
Selects the item closest to the point {\tt x - y}. Any item overlapping
the point is considered as closest and the topmost is selected. If {\tt halo}
@@ -1274,52 +1308,53 @@ reference) and all list parameters are given as array references.
below {\tt start} instead of the first item in the display
order. If {\tt startItem} does not name a valid item, it is ignored.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf addtag} tag enclosed xo yo xc yc\smallskip
-
- \$zinc->{\bf addtag}(tag, 'enclosed', xo, yo, xc, yc);}}
+ \item{\tt\large
+ pathname {\bf addtag} tag enclosed xo yo xc yc ?inGroup? ?recursive?\\
+ \$zinc->{\bf addtag}(tag, 'enclosed', xo, yo, xc, yc, ?inGroup?, ?recursive?);}
Selects all the items completely enclosed in the rectangle whose
origin is at {\tt xo - yo} and corner at {\tt xc - yc}. {\tt xc}
must be no greater than {\tt xo} and {\tt yo} must be no greater
- than {\tt yc}. All coordinates must be integers.
+ than {\tt yc}. All coordinates must be integers. inGroup specifies
+ a group to start with instead of the top group and recursive tells
+ if the search should descend in the item tree or not.
It may be necessary to update the Zinc internal geometry with a call
to {\tt update} if the current state is not stable (i.e before calling
the main loop or in a callback after modifying the transform or doing
something else affecting the geometry of items).
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf addtag} tag overlapping xo yo xc yc\smallskip
-
- \$zinc->{\bf addtag}(tag, 'overlapping', xo, yo, xc, yc);}}
+ \item{\tt\large
+ pathname {\bf addtag} tag overlapping xo yo xc yc ?inGroup? ?recursive?\\
+ \$zinc->{\bf addtag}(tag, 'overlapping', xo, yo, xc, yc, ?inGroup?, ?recursive?);}
Selects all the items that overlaps or are enclosed in the rectangle
whose origin is at {\tt xo - yo} and corner at {\tt xc - yc}. {\tt xc}
must be no greater than {\tt xo} and {\tt yo} must be no greater than
- {\tt yc}. All coordinates must be integers. See also the {\tt enclosed}
- variant above for a discussion on updating the geometry.
+ {\tt yc}. All coordinates must be integers. inGroup specifies
+ a group to start with instead of the top group and recursive tells
+ if the search should descend in the item tree or not.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf addtag} tag withtag tagOrId ?inGroup? ?recursive?\smallskip
-
- \$zinc->{\bf addtag}(tag, 'withtag', tagOrId, ?inGroup?, ?recursive?);}}
+ See also the {\tt enclosed} variant above for a discussion on updating the geometry.
+
+ \item{\tt\large
+ pathname {\bf addtag} tag withtag tagOrId ?inGroup? ?recursive?\\
+ \$zinc->{\bf addtag}(tag, 'withtag', tagOrId, ?inGroup?, ?recursive?);}
Selects all the items given by {\tt tagOrId}. The inGroup and
recursive can be specified to restrict the search. inGroup specifies
a group to start with instead of the top group and recursive tells
if the search should descend in the item tree or not.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf addtag} tag withtype type ?inGroup? ?recursive?\smallskip
-
- \$zinc->{\bf addtag}(tag, 'withtype', tagOrId, ?inGroup?, ?recursive?);}}
+ \item{\tt\large
+ pathname {\bf addtag} tag withtype type ?inGroup? ?recursive?\\
+ \$zinc->{\bf addtag}(tag, 'withtype', tagOrId, ?inGroup?, ?recursive?);}
Selects all the items of type {\tt type}. The inGroup and
recursive can be specified to restrict the search. inGroup specifies
a group to start with instead of the top group and recursive tells
if the search should descend in the item tree or not.
- \end{description}
+ \end{itemize}
\end{blockindent}
@@ -1537,19 +1572,17 @@ false.
The optional parameters must be combined to produce a given behavior. Here are the
various form recognized by the command:
- \begin{description}
- \item{\medskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId contourIndex\smallskip
-
- @coords = \$zinc->{\bf coords}(tagOrId, contourIndex);}}\smallskip
-
+ \begin{itemize}
+ \item{\tt\large
+ pathname {\bf coords} tagOrId contourIndex\\
+ @coords = \$zinc->{\bf coords}(tagOrId, contourIndex);}
+
Get all coordinates of contour at contourIndex. All items can answer if contourIndex
is zero. Curves can handle other contours.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId contourIndex coordList\smallskip
-
- \$zinc->{\bf coords}(tagOrId, contourIndex, coordList);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId contourIndex coordList\\
+ \$zinc->{\bf coords}(tagOrId, contourIndex, coordList);}
Set all coordinates of contour at contourIndex. All items can do it if contourIndex is
zero. Curves can handle other contours. For groups, icons, texts, windows, tabulars,
@@ -1557,82 +1590,73 @@ false.
arcs, only the first two vertices will be used. Beziers and curves can handle any
number of vertices.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId contourIndex coordIndex\smallskip
-
- (\$x, \$y) = \$zinc->{\bf coords}(tagOrId, contourIndex, coordIndex);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId contourIndex coordIndex\\
+ (\$x, \$y) = \$zinc->{\bf coords}(tagOrId, contourIndex, coordIndex);}
Get coordinate at coordIndex in contour at contourIndex. All items can answer if
contourIndex is zero. Curves can handle other contours. For groups, icons, texts,
windows, tabulars, reticles, tracks, waypoints, coordIndex must be zero. For
rectangles and arcs, index must zero or one.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId contourIndex coordIndex coordList\smallskip
-
- \$zinc->{\bf coords}(tagOrId, contourIndex, coordIndex, coordList);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId contourIndex coordIndex coordList\\
+ \$zinc->{\bf coords}(tagOrId, contourIndex, coordIndex, coordList);}
Set coordinate at coordIndex in contour at contourIndex. All items can do it if
contourIndex is zero. Curves can handle other contours. For groups, icons, texts,
windows, tabulars, reticles, tracks, waypoints, coordIndex must be zero. For
rectangles and arcs, coordIndex must zero or one.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId remove contourIndex coordIndex\smallskip
-
- \$zinc->{\bf coords}(tagOrId, 'remove', contourIndex, coordIndex);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId remove contourIndex coordIndex\\
+ \$zinc->{\bf coords}(tagOrId, 'remove', contourIndex, coordIndex);}
Remove coordinate at coordIndex in contour at contourIndex. Can only be handled by
beziers and curves. Only curves can handle contourIndex other than zero.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId add contourIndex coordList\smallskip
-
- \$zinc->{\bf coords}(tagOrId, 'add', contourIndex, coordList);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId add contourIndex coordList\\
+ \$zinc->{\bf coords}(tagOrId, 'add', contourIndex, coordList);}
Add coordinates at the end of contour at contourIndex. Can only be handled by beziers
and curves. Only curves can handle contourIndex other than zero.
- \item{\bigskip\parbox{14.7cm}{\tt\large
- pathname {\bf coords} tagOrId add contourIndex coordIndex coordList\smallskip
-
- \$zinc->{\bf coords}(tagOrId, 'add', contourIndex, coordIndex, coordList);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId add contourIndex coordIndex coordList\\
+ \$zinc->{\bf coords}(tagOrId, 'add', contourIndex, coordIndex, coordList);}
Add coordinates at coordIndex in contour at contourIndex. Can only be handled by
beziers and curves. Only curves can handle contourIndex other than zero.
- \end{description}
+ \end{itemize}
And the slightly abbreviated forms:
- \begin{description}
- \item{\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId\smallskip
-
- @coords = \$zinc->{\bf coords}(tagOrId);}}\smallskip
+ \begin{itemize}
+ \item{\tt\large
+ pathname {\bf coords} tagOrId\\
+ @coords = \$zinc->{\bf coords}(tagOrId);}
Get all coordinates of contour 0. See first form.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId coordList\smallskip
-
- \$zinc->{\bf coords}(tagOrId, coordList);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId coordList\\
+ \$zinc->{\bf coords}(tagOrId, coordList);}
Set all coordinates of contour 0. See second form.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId remove coordIndex\smallskip
-
- \$zinc->{\bf coords}(tagOrId, 'remove', coordIndex);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId remove coordIndex\\
+ \$zinc->{\bf coords}(tagOrId, 'remove', coordIndex);}
Remove coordinate at coordIndex in contour 0. See fifth form.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf coords} tagOrId add coordList\smallskip
-
- \$zinc->{\bf coords}(tagOrId, 'add', coordList);}}\smallskip
+ \item{\tt\large
+ pathname {\bf coords} tagOrId add coordList\\
+ \$zinc->{\bf coords}(tagOrId, 'add', coordList);}
Add coordinates at the end of contour 0. See sixth form.
- \end{description}
+ \end{itemize}
\end{blockindent}
@@ -2030,11 +2054,10 @@ false.
valid index as described in \conceptref{Text indices}{indices}. The valid forms of the
command are :
- \begin{description}
- \item{\medskip\parbox{14cm}{\tt\large
- pathname {\bf select} adjust tagOrId index\smallskip
-
- \$zinc->{\bf select}('adjust', tagOrdId, index);}}\smallskip
+ \begin{itemize}
+ \item{\tt\large
+ pathname {\bf select} adjust tagOrId index\\
+ \$zinc->{\bf select}('adjust', tagOrdId, index);}
Adjust the end of the selection in {\tt tagOrId} that is nearest to the character
given by {\tt index} so that it is at {\tt index}. The other end of the selection is
@@ -2042,36 +2065,32 @@ false.
{\tt tagOrId}, this command behaves as the select to command. The command returns an
empty string.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf select} clear\smallskip
-
- \$zinc->{\bf select}('clear');}}\smallskip
+ \item{\tt\large
+ pathname {\bf select} clear\\
+ \$zinc->{\bf select}('clear');}
Clear the selection if it is in the widget. If the selection is not in the widget, the
command has no effect. Return an empty string.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf select} from tagOrId index\smallskip
-
- \$zinc->{\bf select}('from', tagOrdId, index);}}\smallskip
+ \item{\tt\large
+ pathname {\bf select} from tagOrId index\\
+ \$zinc->{\bf select}('from', tagOrdId, index);}
Set the selection anchor point for the widget to be just before the character given by
{\tt index} in the item described by {\tt tagOrId}. The command has no effect on the
selection, it sets one end of the selection so that future select to can actually set
the selection. The command returns an empty string.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf select} item\smallskip
-
- \$item = \$zinc->{\bf select}('item');}}\smallskip
+ \item{\tt\large
+ pathname {\bf select} item\\
+ \$item = \$zinc->{\bf select}('item');}
Returns the id of the selected item, if the selection is in an item on this
widget. Otherwise the command returns an empty string.
- \item{\bigskip\parbox{14cm}{\tt\large
- pathname {\bf select} to tagOrId index\smallskip
-
- \$zinc->{\bf select}('to', tagOrdId, index);}}\smallskip
+ \item{\tt\large
+ pathname {\bf select} to tagOrId index\\
+ \$zinc->{\bf select}('to', tagOrdId, index);}
Set the selection to be the characters that lies between the selection anchor and {\tt
index} in the item described by {\tt tagOrId}. The selection includes the character
@@ -2080,7 +2099,7 @@ false.
recent select adjust or select from command issued for this widget. If the selection
anchor point for the widget is not currently in {\tt tagOrId}, it is set to the
character given by index. The command returns an empty string.
- \end{description}
+ \end{itemize}
\end{blockindent}
@@ -3776,11 +3795,6 @@ by any new user of Zinc: \attrtyperef{gradient} and \attrtyperef{labelformat}.}
others popular formats are added including JPEG, XPM and PNG.
\end{blockindent}
-\attrtype{priority}
-\begin{blockindent}
- A strictly positive integer value for the display priority.
-\end{blockindent}
-
\attrtype{item}
\begin{blockindent}
Describes an item id or a tag. If a tag is provided an item will be searched for the tag