From 7f0a88dddb948404b2a29f5fd5ffe3e243c1ca26 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Thu, 31 Aug 2000 12:10:04 +0000 Subject: *** empty log message *** --- doc/refman.tex | 607 +++++++++++++++++++++++++++++++++++++----------- sandbox/testbitmaps.tcl | 60 +++++ sandbox/testzinc.pl | 4 +- sandbox/xpenguin.png | Bin 0 -> 10148 bytes 4 files changed, 533 insertions(+), 138 deletions(-) create mode 100644 sandbox/testbitmaps.tcl create mode 100644 sandbox/xpenguin.png diff --git a/doc/refman.tex b/doc/refman.tex index 6a44b30..bba14d3 100644 --- a/doc/refman.tex +++ b/doc/refman.tex @@ -2,11 +2,15 @@ \usepackage{a4wide} \usepackage{html} \usepackage{makeidx} +\usepackage{graphicx} \newcommand{\cident}[1] {% {\tt #1}} +\newcommand{\code}[1] {% + {\tt #1}} + \newcommand{\ident}[1] {% {\tt\large #1}} @@ -66,7 +70,7 @@ } \newcommand{\objectref}[1]{% - \hyperref[page]{\ident{#1}}{\ident{#1} (}{)}{cmd:#1} + \hyperref[page]{\ident{#1}}{\ident{#1} (}{)}{obj:#1} } \newcommand{\conceptref}[2]{% @@ -104,9 +108,10 @@ \begin{blockindent} Specifies the width of the 3d border that should be displayed around the widget window. This border does not overlap the active zinc display area. The area - requested from the geometry manager (or the window manager if applicable) is the - overall area, display area plus borders. This value can be given in any of - the forms valid for coordinates (See \cident{TkGet\_Pixels}). The default value is 2 pixels. + requested from the geometry manager (or the window manager if applicable) + is the overall area, display area plus borders. This value can be given + in any of the forms valid for coordinates (See \cident{TkGet\_Pixels}). + The default value is 2. \end{blockindent} \option{backcolor}{backColor}{BackColor} @@ -139,6 +144,15 @@ default value is black. \end{blockindent} + \option{fullreshape}{fullReshape}{FullReshape} + \begin{blockindent} + If this option is True, the shape applied to the zinc window will + propagate up the window hierarchy to the top level window. The + result will be a shaped top level. See also the \optref{reshape} option, + it controls whether a shape is applied to the zinc window or not. + The default is True. + \end{blockindent} + \option{height}{height}{Height} \begin{blockindent} Specifies the height of the actual zinc area (i.e, this dimension @@ -147,6 +161,58 @@ 100 pixels. \end{blockindent} + \option{highlightbackground}{highlightBackground}{HighlightBackground} + \begin{blockindent} + Specifies the color to display in the traversal highlight region when the + widget does not have the input focus. The default value is \#c3c3c3. + \end{blockindent} + + \option{highlightcolor}{highlightColor}{HighlightColor} + \begin{blockindent} + Specifies the color to use for the traversal highlight rectangle that is + drawn around the widget when it has the input focus. The default value + is Black. + \end{blockindent} + + \option{highlightthickness}{highlightThickness}{HighlightThickness} + \begin{blockindent} + Specifies a non-negative value indicating the width of the highlight + rectangle drawn around the outside of the widget when it has the input + focus. The value may have any of the forms acceptable to \cident{Tk\_GetPixels}. + If the value is zero, no focus highlight is drawn around the widget. + The default value is 2. + \end{blockindent} + + \option{insertbackground}{insertBackground}{InsertBackground} + \begin{blockindent} + Specifies the color to use as background in the area covered by the + insertion cursor. This color will normally override either the normal + background for the widget (or the selection background if the insertion + cursor happens to fall in the selection). The default value is Black. + \end{blockindent} + + \option{insertofftime}{insertOffTime}{InsertOffTime} + \begin{blockindent} + Specifies a non-negative integer value indicating the number of + milliseconds the insertion cursor should remain off in each blink cycle. + If this option is zero then the cursor is on all the time. The + default value is 300. + \end{blockindent} + + \option{insertontime}{insertOnTime}{InsertOnTime} + \begin{blockindent} + Specifies a non-negative integer value indicating the number of + milliseconds the insertion cursor should remain on in each blink cycle. + The default value is 600. + \end{blockindent} + + \option{insertwidth}{insertWidth}{InsertWidth} + \begin{blockindent} + Specifies a value indicating the width of the insertion cursor. + The value may have any of the forms acceptable to \cident{Tk\_GetPixels}. + The default value is 2. + \end{blockindent} + \option{mapdistancesymbol}{mapDistanceSymbol}{MapDistanceSymbol} \begin{blockindent} This option specifies the symbol to be used as a milestone @@ -177,13 +243,25 @@ integer. It defaults to 1. \end{blockindent} - \option{relief}{relief}{Relief} \begin{blockindent} Specifies the border relief. This option can be given any legal value for a relief (See \cident{Tk\_GetRelief} for a description of possible values). \end{blockindent} + \option{reshape}{reshape}{Reshape} + \begin{blockindent} + Specifies if the clipping shape that can be set in the top group item + should clip the top group children or be used to reshape the zinc + window. This option can be used with the fullreshape option to reshape + the toplevel window as well. The default value is True. + \end{blockindent} + + \option{selectbackground}{selectBackground}{SelectBackground} + \begin{blockindent} + Specifies the background color to use for displaying the selection + in text items. The default value is \#a0a0a0. + \end{blockindent} \option{speedvectorlength}{speedVectorLength}{SpeedVectorLength} \begin{blockindent} @@ -193,6 +271,35 @@ (often nautic mile / minutes). The default value is 3. \end{blockindent} + \option{takefocus}{takeFocus}{TakeFocus} + \begin{blockindent} + (From the Tk options manpage). + + Determines whether the window accepts the focus during keyboard traversal + (e.g., Tab and Shift-Tab). Before setting the focus to a window, the + traversal scripts consult the value of the takeFocus option. A value of 0 + means that the window should be skipped entirely during keyboard traversal. + 1 means that the window should receive the input focus as long as it is + viewable (it and all of its ancestors are mapped). An empty value for the + option means that the traversal scripts make the decision about whether or + not to focus on the window: the current algorithm is to skip the window if + it is disabled, if it has no key bindings, or if it is not viewable. If the + value has any other form, then the traversal scripts take the value, append + the name of the window to it (with a separator space), and evaluate the + resulting string as a Tcl script. The script must return 0, 1, or an empty + string: a 0 or 1 value specifies whether the window will receive the input + focus, and an empty string results in the default decision described above. + Note: this interpretation of the option is defined entirely by the Tcl scripts + that implement traversal: the widget implementations ignore the option + entirely, so you can change its meaning if you redefine the keyboard traversal + scripts. The default value is empty. + \end{blockindent} + + \option{tile}{tile}{Tile} + \begin{blockindent} + Specifies an image name to be used as a tile for painting the zinc window + background. The default value is none (the empty string). + \end{blockindent} \option{trackmanagedhistorysize}{trackManagedHistorySize}{TrackManagedHistorySize} \begin{blockindent} @@ -215,7 +322,7 @@ room for the new one on a first in first out basis. The number of past positions actually displayed if specified for each track by the attribute \attrref{visiblehistorysize}. - The default value is to enable the history collection. + The default is to enable the history collection. \end{blockindent} @@ -251,11 +358,46 @@ Parler de current, all. \begin{blockindent} This command is used to create new items in a zinc widget. It can be called with no parameters to return the list of all item types currently known by - the zinc widget. It can also be called with a valid item type as first parameter - and a group item as second parameter to create a new item of this type in - the given group. The other arguments vary with the type of item. A detailed - description of these arguments is given in the sections on the individual item - types. Following the creation args the command accept any number of + the zinc widget. It can also be called with a valid item type as first + parameter and a group item as second parameter to create a new item of this + type in the given group. + + After these first two parameters come some item type specific arguments. + Here is detailed description of these arguments by type: + \begin{description} + \item{arc type} \\ + The arc type expects a list of four floating point numbers ``xo yo xc yc'', + giving the coordinates of the origin and the corner of the enclosing rectangle. + \item{bezier} \\ + The bezier type expects a list of floating point numbers ``x0 y0 x1 y1 ... xn yn'', + giving the coordinates of the bezier segment controls. The number of values + should be pair (or the last value will be discarded), and there should be at + least two control points. The segments are built as follow: if there is at + least four points, they are used as the four controls of a cubic Bezier. Then, + if more than four points are provided , the first three are discarded and + the process is restarted using as first control the last control of the previous + segment. The process is repeated until there is less than four points left. + If three points are left, a segment is drawn using the second point for the + two off-curve controls. If two points are left, a line segment is drawn + between the two. + \item{curve} \\ + The curve type expects a list of floating point numbers ``x0 y0 x1 y1 ... xn yn'', + giving the coordinates of the curve vertices. The number of values should be + pair (or the last value will be discarded) but the list can be empty building + an empty invisible curve to be used in geometric operations (see the + \cmdref{contour} command). As a side effect of the curve behavior a one vertex + curve is essentially the same as an empty curve, it only waste some more memory. + \item{rectangle type} \\ + The rectangle type expects a list of four floating point numbers ``xo yo xc yc'', + giving the coordinates of the origin and the corner of the rectangle. + \item{tabular, track, waypoint} \\ + These types expects the number of fields they will manage in the label or + tabular form. This number must be greater or equal to zero. + \item{group, icon, map, reticle, text, window} \\ + These types doesn't expect type specific arguments. + \end{description} + + Following the creation args the command accept any number of attributes\ -\ values pairs to configure the newly created item. All the configurable item type attributes are valid in this context. The command returns the item id. @@ -265,23 +407,46 @@ Parler de current, all. \begin{blockindent} This command add the given tag to all items matching the search specification. If the tag is already present on some item, - nothing is done for this item. The command has no effect if no - items satisfy the given criteria. The command returns en empty + nothing is done for that item. The command has no effect if no + item satisfy the given criteria. The command returns an empty string. The search specification an the associated arguments can take the following forms: \begin{description} - \item{\tt above tagOrId ?inGroup?} \\ + \item{\tt above tagOrId ?inGroup? ?recursive?} \\ Selects the item just above the one given by {\tt tagOrId}. If {\tt tagOrId} names more than one item, the topmost of these items in the display list will be used. If {\tt tagOrId} does - not refer to any item then nothing happen. - - \item{\tt all ?inGroup?} \\ - Selects all the items in the widget. - - \item{\tt atpoint x y ?halo? ?start?} \\ - Selects the item under or closest to the point {\tt x - y}. If more - than one item overlaps the point, the top-most is selected. If {\tt halo} + not refer to any item then nothing happen. The inGroup and + recursive optional parameters can be specified to restrict the + search with a tag matching several items. 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{\tt 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. + + \item{\tt 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{\tt 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 + items in the display list will be used. If {\tt tagOrId} does + not refer to any item then nothing happen. The inGroup and + recursive optional parameters can be specified to restrict the + search with a tag matching several items. 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{\tt closest x y ?halo? ?start?} \\ + 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} is given, it defines the size of the point {\tt x - y}. {\tt halo} must be a non negative integer. If {\tt start} is specified, it must be an item tag or id. If it names a valid item (for a tag, the lowest @@ -289,32 +454,29 @@ Parler de current, all. below {\tt start} instead of the first item in the display order. If {\tt start} does not name a valid item, it is ignored. - \item{\tt atpriority priority ?inGroup?} \\ - Selects all the items at the given priority. - - \item{\tt below tagOrId ?inGroup?} \\ - Selects the item just below the one given by {\tt tagOrId}. If - {\tt tagOrId} names more than one item, the lowest of these - items in the display list will be used. If {\tt tagOrId} does - not refer to any item then nothing happen. - - \item{\tt enclosed xo yo xc yc ?inGroup?} \\ + \item{\tt enclosed xo yo xc yc} \\ 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. - \item{\tt overlapping xo yo xc yc ?inGroup?} \\ + \item{\tt overlapping xo yo xc yc} \\ 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. - \item{\tt withtag tagOrId ?inGroup?} \\ - Selects all the items given by {\tt tagOrId}. - - \item{\tt withtype type ?inGroup?} \\ - Selects all the items of type {\tt type}. + \item{\tt 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{\tt withtype type ?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{blockindent} @@ -322,15 +484,10 @@ Parler de current, all. \begin{blockindent} Returns the (device) coordinate of an item anchor. If no item is named by {\tt tagOrId} or if the item doesn't support anchors, an - error is raised. If more than one item match {\tt tagOrId}, one of - those is used, the exact one is implementation specific. + error is raised. If more than one item match {\tt tagOrId}, the topmost + in display list order is used. \end{blockindent} -\zinccmd{becomes}{} - \begin{blockindent} - Not yet implemented. - \end{blockindent} - \zinccmd{bbox}{tagOrId ?tagOrId ...?} \begin{blockindent} Returns a list of 4 numbers describing the (device) coordinates of the origin @@ -339,6 +496,11 @@ Parler de current, all. have an empty bounding box, an empty string is returned. \end{blockindent} +\zinccmd{becomes}{} + \begin{blockindent} + Not yet implemented. + \end{blockindent} + \zinccmd{bind}{tagOrId ?sequence? ?command?} \begin{blockindent} This command associates {\tt command} with the item tag, item id, part tag @@ -377,7 +539,8 @@ Parler de current, all. When this occurs, all matching bindings are triggered. The order of invocation is as follow: the binding associated with the tag \ident{all} is invoked first, followed by the bindings associated with the item tags - in order, followed by the binding associated with the item id, followed + in order, followed by followed bindings associated with the part tags if + relevant, followed by the binding associated with the item id, followed by the binding associated with the item part if relevant. If there are more than one binding for a single tag, only the most specific is triggered. @@ -409,51 +572,57 @@ Parler de current, all. is given, returns a list describing all the supported options (see the chapter \conceptref{Widget options}{options}). If an {\tt option} is specified without any {\tt value}, the command returns a list - describing the named option (this list is identical to the corresponding - sublist of the value returned if no {\tt option} is given). If some + describing the named option. If some {\tt option - value} pairs are given, then the corresponding options are changed and the command return an empty string. \end{blockindent} +\zinccmd{contour}{tagOrId operator coordListOrTagOrId} + \begin{blockindent} + \end{blockindent} + \zinccmd{coords}{tagOrId ?add/remove? ?contour? ?index? ?coordList?} \begin{blockindent} This command understands the following forms: - .r coords tagOrId contour - Get all coordinates of contour. - - .r coords tagOrId contour coordList - Set all coordinates of contour. - - .r coords tagOrId contour index - Get coordinate at index in contour. - - .r coords tagOrId contour index coordList - Set coordinate at index in contour. - - .r coords tagOrId remove contour index - Remove coordinate at index in contour. - - .r coords tagOrId add contour coordList - Add coordinates at the end of contour. - - .r coords tagOrId add contour index coordList - Add coordinates at in index in contour. - + \begin{description} + \item{\code{.r coords tagOrId contour}}\\ + Get all coordinates of contour. + + \item{\code{.r coords tagOrId contour coordList}}\\ + Set all coordinates of contour. + + \item{\code{.r coords tagOrId contour index}}\\ + Get coordinate at index in contour. + + \item{\code{.r coords tagOrId contour index coordList}}\\ + Set coordinate at index in contour. + + \item{\code{.r coords tagOrId remove contour index}}\\ + Remove coordinate at index in contour. + + \item{\code{.r coords tagOrId add contour coordList}}\\ + Add coordinates at the end of contour. + + \item{\code{.r coords tagOrId add contour index coordList}}\\ + Add coordinates at in index in contour. + \end{description} + And the slightly abbreviated forms: - .r coords tagOrId - Get all coordinates of contour 0. - - .r coords tagOrId coordList - Set all coordinates of contour 0. - - .r coords tagOrId remove index - Remove coordinate at index in contour 0. - - .r coords tagOrId add coordList - Add coordinates at the end of contour 0. - + \begin{description} + \item{\code{.r coords tagOrId}}\\ + Get all coordinates of contour 0. + + \item{\code{.r coords tagOrId coordList}}\\ + Set all coordinates of contour 0. + + \item{\code{.r coords tagOrId remove index}}\\ + Remove coordinate at index in contour 0. + + \item{\code{.r coords tagOrId add coordList}}\\ + Add coordinates at the end of contour 0. + \end{description} \end{blockindent} \zinccmd{currentpart}{} @@ -463,6 +632,14 @@ Parler de current, all. an item (no item has the \ident{current} tag) the command return -1. \end{blockindent} +\zinccmd{cursor}{tagOrId index} + \begin{blockindent} + \end{blockindent} + +\zinccmd{dchars}{tagOrId first ?last?} + \begin{blockindent} + \end{blockindent} + \zinccmd{dtag}{tagOrId ?tagToDelete?} \begin{blockindent} Delete the tag {\tt tagToDelete} from the list of tags associated @@ -480,13 +657,21 @@ Parler de current, all. drawing order, topmost first. \end{blockindent} +\zinccmd{fit}{coordList error} + \begin{blockindent} + \end{blockindent} + +\zinccmd{focus}{focus ?tagOrId?} + \begin{blockindent} + \end{blockindent} + \zinccmd{gettags}{tagOrId} \begin{blockindent} This command returns the list of all the tags associated with - the item specified by {\tt tagOrdId}. If more than one item is - named by {\tt tagOrdId}, then one of these items (selection is - implementation specific) is used to return the result. If no - item is named by {\tt tagOrdId}, then the empty list is returned. + the item specified by {\tt tagOrId}. If more than one item is + named by {\tt tagOrId}, then the topmost in display list order + is used to return the result. If no item is named by {\tt tagOrId}, + then the empty list is returned. \end{blockindent} \zinccmd{group}{tagOrId} @@ -496,47 +681,66 @@ Parler de current, all. \zinccmd{hasanchors}{tagOrId} \begin{blockindent} This command returns a boolean telling if the item specified by - {\tt tagOrdId} supports anchors. If more than one item is named by - {\tt tagOrdId}, then one of these items (selection is implementation - specific) is used to return the result. If no items are named by - {\tt tagOrdId}, an error is raised. + {\tt tagOrId} supports anchors. If more than one item is named by + {\tt tagOrId}, then the topmost in display list order is used to + return the result. If no items are named by {\tt tagOrId}, an error + is raised. \end{blockindent} \zinccmd{hasfields}{tagOrId} \begin{blockindent} This command returns a boolean telling if the item specified by - {\tt tagOrdId} supports fields. If more than one item is named by - {\tt tagOrdId}, then one of these items (selection is implementation - specific) is used to return the result. If no items are named by - {\tt tagOrdId}, an error is raised. + {\tt tagOrId} supports fields. If more than one item is named by + {\tt tagOrId}, then the topmost in display list order is used to + return the result. If no items are named by {\tt tagOrId}, an error + is raised. \end{blockindent} -\zinccmd{hasparts}{tagOrId} +\zinccmd{hastag}{tagOrId tag} \begin{blockindent} This command returns a boolean telling if the item specified by - {\tt tagOrdId} has parts. If more than one item is named by - {\tt tagOrdId}, then one of these items (selection is implementation - specific) is used to return the result. If no items are named by - {\tt tagOrdId}, an error is raised. + {\tt tagOrId} has the specified tag. If more than one item is + named by {\tt tagOrId}, then the topmost in display list order + is used to return the result. If no items are named by {\tt tagOrId}, + an error is raised. \end{blockindent} -\zinccmd{hastag}{tagOrId tag} +\zinccmd{index}{tagOrId string} + \begin{blockindent} + \end{blockindent} + +\zinccmd{insert}{insert tagOrId before string} \begin{blockindent} - This command returns a boolean telling if the item specified by - {\tt tagOrdId} has the specified tag. If more than one item is - named by {\tt tagOrdId}, then one of these items (selection is - implementation specific) is used to return the result. If no items - are named by {\tt tagOrdId}, an error is raised. \end{blockindent} \zinccmd{itemcget}{tagOrId ?field? attr} \begin{blockindent} - To be written + Returns the current value of the attribute given by {\tt attr} for + the item named by {\tt tagOrId}. If {\tt tagOrId} name more than + one item, the topmost in display list order is used. If {\tt field} is + given, it must be a valid field index for the item or an error will be + reported. If a field index is given, the command will interpret {\tt attr} + as a field attribute (see \objectref{field}), otherwise it will be interpreted + as an item attribute (see the chapter \conceptref{Item types}{items}). + If the attribute is not available for the field or item type, an error is + reported. \end{blockindent} \zinccmd{itemconfigure}{tagOrId ?field? ?attr? ?value? ?attr value ...?} \begin{blockindent} - To be written + Query or modify the attributes of an item or field. If no attribute + is given, returns a list describing all the supported attributes. If + a single attribute is specified without a value, the command returns + a list describing the name attribute. For these two form of the command + the topmost item described by {\tt tagOrId} is used. + + If at least one attribute - value pair is given, then the corresponding + attributes are changed for all the items described by {\tt tagOrId} and + the command return an empty string. + If {\tt field} is given, it must be a valid field index for the item or + an error will be reported. If a field index is given, the command will + interpret the given attributes as field attributes, otherwise they will + be interpreted as item attributes. \end{blockindent} \zinccmd{lower}{tagOrId ?belowThis?} @@ -556,6 +760,25 @@ Parler de current, all. \zinccmd{monitor}{?onOff?} \begin{blockindent} + This command controls the gathering of performance data. The data + gathering is inited and turned on when the command is called with + a boolean true parameter. The gathering is stopped if the command + is called with a boolean false parameter. If the command is called + with no parameters or with a boolean false parameter, it returns a + string describing the currently collected data. The other form of + the command returns the empty string. + \end{blockindent} + +\zinccmd{numparts}{tagOrId} + \begin{blockindent} + This command tells how many private parts are available for event bindings + in the item specified by {\tt tagOrId}. If more than one item is named + by {\tt tagOrId}, the topmost in display list order is used to return the + result. If no items are named by {\tt tagOrId}, an error is raised. + \end{blockindent} + +\zinccmd{postscript}{} + \begin{blockindent} \end{blockindent} \zinccmd{raise}{tagOrId ?aboveThis?} @@ -564,9 +787,9 @@ Parler de current, all. above the item given by {\tt aboveThis}. If {\tt tagOrId} name more than one item, their relative order will be preserved. If {\tt tagOrId} doesn't name an item, an error is raised. If - {\tt aboveThis} name more than one item, the top most is used. - If {\tt aboveThis} doesn't name an item, an error is raised. If - {\tt aboveThis} is omitted the items are put at the top most + {\tt aboveThis} name more than one item, the topmost in display + list order is used. If {\tt aboveThis} doesn't name an item, an error + is raised. If {\tt aboveThis} is omitted the items are put at the top most position. The command returns an empty string. As a side affect of this command, the \attrref{priority} attribute of all the reordered items is ajusted to match the priority of the @@ -602,6 +825,14 @@ Parler de current, all. X and Y. \end{blockindent} +\zinccmd{select}{option ?tagOrId? ?arg?} + \begin{blockindent} + \end{blockindent} + +\zinccmd{smooth}{coordList} + \begin{blockindent} + \end{blockindent} + \zinccmd{tapply}{} \begin{blockindent} To be implemented. @@ -620,9 +851,9 @@ Parler de current, all. of the transform or item described by {\tt tagOrIdFrom} to the coordinate space of the transform or item described by {\tt tagOrIdTo}. If {\tt tagOrIdFrom} is omitted it defaults to the device coordinate - space. If either {\tt tagOrId} describe more than one item, one is - selected in a system specific way. If either {\tt tagOrId} describe - neither a transform nor an item, an error is raised. + space. If either {\tt tagOrId} describe more than one item, the topmost + in display list order is used. If {\tt tagOrId} doesn't describe + either a transform or an item, an error is raised. \end{blockindent} \zinccmd{translate}{tagOrId xAmount yAmount} @@ -655,8 +886,8 @@ Parler de current, all. \begin{blockindent} Create (or reset) a transform associated with the name {\tt tName} which has for initial value the transform associated with the item - {\tt tagOrId}. If {\tt tagOrId} describe more than one item, one is - selected in a system specific way. If {\tt tagOrId} doesn't describe + {\tt tagOrId}. If {\tt tagOrId} describe more than one item, the + topmost in display list order is used. If {\tt tagOrId} doesn't describe any item, an error is raised. If {\tt tName} already exists, the transform is set to the new value. This command is the only way to create a named transform. @@ -664,10 +895,14 @@ Parler de current, all. \zinccmd{type}{tagOrId} \begin{blockindent} - This command returns the type of the item specified by {\tt tagOrdId}. - If more than one item is named by {\tt tagOrdId}, then the type of - one of these items (selection is implementation specific) is returned. - If no items are named by {\tt tagOrdId}, an error is raised. + This command returns the type of the item specified by {\tt tagOrId}. + If more than one item is named by {\tt tagOrId}, then the type of + the topmost item in display list order is returned. + If no items are named by {\tt tagOrId}, an error is raised. + \end{blockindent} + +\zinccmd{verticeat}{tagOrId x y} + \begin{blockindent} \end{blockindent} @@ -725,6 +960,11 @@ Parler de current, all. To be written \end{blockindent} +\attribute{capstyle}{} +\begin{blockindent} + To be written +\end{blockindent} + \attribute{circlehistory}{boolean} \begin{blockindent} To be written @@ -830,11 +1070,26 @@ Parler de current, all. To be written \end{blockindent} +\attribute{gradient}{} +\begin{blockindent} + To be written +\end{blockindent} + \attribute{image}{imageName} \begin{blockindent} To be written \end{blockindent} +\attribute{joinstyle}{} +\begin{blockindent} + To be written +\end{blockindent} + +\attribute{height}{} +\begin{blockindent} + To be written +\end{blockindent} + \attribute{labelanchor}{anchor} \begin{blockindent} To be written @@ -926,6 +1181,16 @@ Parler de current, all. To be written \end{blockindent} +\attribute{leaderfirstend}{} +\begin{blockindent} + To be written +\end{blockindent} + +\attribute{leaderlastend}{} +\begin{blockindent} + To be written +\end{blockindent} + \attribute{leadersensitive}{boolean} \begin{blockindent} To be written @@ -1167,6 +1432,11 @@ Parler de current, all. To be written \end{blockindent} +\attribute{window}{windowId} +\begin{blockindent} + To be written +\end{blockindent} + \chapter{Labels, fields and label formats} @@ -1190,6 +1460,7 @@ Applicable attributes for fields: \attrref{reliefthickness} & Width of the relief \\ \attrref{sensitive} & Specifies if the field should react to input events \\ \attrref{text} & One line of text to be displayed in the field \\ + \attrref{tile} & \\ \attrref{visible} & Specifies if the field is dispalyed \\ \end{tabular} @@ -1198,7 +1469,7 @@ Applicable attributes for fields: \chapter{Item types} \object{items} -This chapter introduces the various items that can be used in \ident{zinc}. +This chapter introduces the item types that can be used in \ident{zinc}. \section{Group items} @@ -1289,6 +1560,8 @@ Applicable attributes for \ident{waypoint}: \attrref{labelformat} & \\ \attrref{leaderanchors} & The attachments of the leader on the label side \\ \attrref{leadercolor} & \\ + \attrref{leaderfirstend} & \\ + \attrref{leaderlastend} & \\ \attrref{leadersensitive} & \\ \attrref{leadershape} & \\ \attrref{leaderstyle} & \\ @@ -1351,8 +1624,8 @@ Applicable attributes for \ident{text}: \attrref{priority} & The absolute position in the stacking order \\ \attrref{sensitive} & Specifies if the item should react to events \\ \attrref{spacing} & \\ - \attrref{text} & \\ \attrref{tags} & The list of tags associated with the item \\ + \attrref{text} & \\ \attrref{underlined} & \\ \attrref{visible} & Specifies if the item is displayed \\ \attrref{width} & \\ @@ -1388,18 +1661,18 @@ Applicable attributes for \ident{reticle}: \begin{tabular}{ll} \attrref{brightlinecolor} & \\ + \attrref{brightlinestyle} & \\ \attrref{composerotation} & Specifies if the current rotation should be composed with the local transform \\ \attrref{composescale} & Specifies if the current scale should be composed with the local transform \\ - \attrref{linecolor} & \\ \attrref{firstradius} & \\ + \attrref{linecolor} & \\ + \attrref{linestyle} & \\ \attrref{numcircles} & \\ \attrref{period} & \\ \attrref{position} & \\ \attrref{priority} & The absolute position in the stacking order \\ \attrref{sensitive} & Specifies if the item should react to events \\ \attrref{stepsize} & \\ - \attrref{linestyle} & \\ - \attrref{brightlinestyle} & \\ \attrref{tags} & The list of tags associated with the item \\ \attrref{visible} & Specifies if the item is displayed \\ \end{tabular} @@ -1426,11 +1699,6 @@ Applicable attributes for \ident{map}: \end{tabular} -\section{Mosaic items} - -\object{mosaic} - - \section{Rectangle items} \object{rectangle} @@ -1442,6 +1710,7 @@ Applicable attributes for \ident{rectangle}: \attrref{fillcolor} & \\ \attrref{filled} & \\ \attrref{fillpattern} & \\ + \attrref{gradient} & \\ \attrref{linecolor} & \\ \attrref{linepattern} & \\ \attrref{linestyle} & \\ @@ -1469,6 +1738,7 @@ Applicable attributes for \ident{arc}: \attrref{filled} & \\ \attrref{fillpattern} & \\ \attrref{firstend} & \\ + \attrref{gradient} & \\ \attrref{lastend} & \\ \attrref{linecolor} & \\ \attrref{linepattern} & \\ @@ -1490,14 +1760,15 @@ Applicable attributes for \ident{arc}: Applicable attributes for \ident{curve}: \begin{tabular}{ll} - \attrref{bezier} & \\ \attrref{capstyle} & \\ + \attrref{closed} & \\ \attrref{composerotation} & Specifies if the current rotation should be composed with the local transform \\ \attrref{composescale} & Specifies if the current scale should be composed with the local transform \\ \attrref{fillcolor} & \\ \attrref{filled} & \\ \attrref{fillpattern} & \\ \attrref{firstend} & \\ + \attrref{gradient} & \\ \attrref{joinstyle} & \\ \attrref{lastend} & \\ \attrref{linecolor} & \\ @@ -1509,13 +1780,65 @@ Applicable attributes for \ident{curve}: \attrref{priority} & The absolute position in the stacking order \\ \attrref{relief} & \\ \attrref{sensitive} & Specifies if the item should react to events \\ - \attrref{smoothed} & \\ \attrref{tags} & The list of tags associated with the item \\ \attrref{tile} & \\ \attrref{visible} & Specifies if the item is displayed \\ \end{tabular} +\section{Bezier items} + +\object{bezier} +Applicable attributes for \ident{bezier}: + +\begin{tabular}{ll} + \attrref{capstyle} & \\ + \attrref{composerotation} & Specifies if the current rotation should be composed with the local transform \\ + \attrref{composescale} & Specifies if the current scale should be composed with the local transform \\ + \attrref{fillcolor} & \\ + \attrref{filled} & \\ + \attrref{fillpattern} & \\ + \attrref{firstend} & \\ + \attrref{gradient} & \\ + \attrref{lastend} & \\ + \attrref{linecolor} & \\ + \attrref{linepattern} & \\ + \attrref{linestyle} & \\ + \attrref{linewidth} & \\ + \attrref{priority} & The absolute position in the stacking order \\ + \attrref{relief} & \\ + \attrref{sensitive} & Specifies if the item should react to events \\ + \attrref{tags} & The list of tags associated with the item \\ + \attrref{tile} & \\ + \attrref{visible} & Specifies if the item is displayed \\ +\end{tabular} + + +\section{Window items} + +\object{window} +Applicable attributes for \ident{window}: + +\begin{tabular}{ll} + \attrref{anchor} & The anchor used in positionning the item \\ + \attrref{composerotation} & Specifies if the current rotation should be composed with the local transform \\ + \attrref{composescale} & Specifies if the current scale should be composed with the local transform \\ + \attrref{connecteditem} & Specifies the item relative to which this item is placed \\ + \attrref{connectionanchor} & Specifies the anchor on the connected item used for the placement \\ + \attrref{height} & \\ + \attrref{position} & The item's position relative to the anchor (if no connected item specified) \\ + \attrref{priority} & Constraints of the underlying window sytem dictate the stacking + order of window items. They can't be lowered under the other items. Additionally, + to manipulate their stacking order, you must use the raise and lower Tk commands on + the associated Tk window.\\ + \attrref{sensitive} & This option has no effect on window items \\ + \attrref{tags} & The list of tags associated with the item \\ + \attrref{visible} & Specifies if the item is displayed \\ + \attrref{width} & \\ + \attrref{window} & \\ +\end{tabular} + + \chapter{Bindings} @@ -1591,12 +1914,24 @@ Applicable attributes for \ident{curve}: \section{Bitmaps} - Zinc creates two sets of bitmaps. The first set contains - symbols for ATC tracks, maps and waypoints, these bitmaps - are named AtcSymbol0 to AtcSymbol21. The second set provides - stipples that can be used to implement transparency, they - are named AlphaStipple0 to AlphaStipple15, AlphaStipple0 - being the most transparent. + Zinc creates two sets of bitmaps. + + The first set contains symbols for ATC tracks, maps and + waypoints, these bitmaps are named AtcSymbol1 to AtcSymbol22. + +\latexhtml{% + \includegraphics{atcsymb.ps}}{% + \htmladdimg{atcsymb.png} + } + + The second set provides stipples that can be used to implement + transparency, they are named AlphaStipple0 to AlphaStipple15, + AlphaStipple0 being the most transparent. + +\latexhtml{% + \includegraphics{alphastip.ps}}{% + \htmladdimg{alphastip.png} + } \latex {\tolerance 2000 %allow somewhat looser lines. \hbadness 10000 } %don't complain about underfull lines. diff --git a/sandbox/testbitmaps.tcl b/sandbox/testbitmaps.tcl new file mode 100644 index 0000000..e2e48af --- /dev/null +++ b/sandbox/testbitmaps.tcl @@ -0,0 +1,60 @@ +#!/usr/bin/wish -f + +load tkzinc3.1.so + +set r [zinc .r -backcolor gray -relief sunken] +set top 1 +pack .r -expand t -fill both +.r configure -width 500 -height 800 + +.r add rectangle $top "30 50 80 100" -filled t -fillpattern AlphaStipple0 +.r add text $top -position "50 110" -text "0" +.r add rectangle $top "100 50 150 100" -filled t -fillpattern AlphaStipple1 +.r add text $top -position "120 110" -text "1" +.r add rectangle $top "170 50 220 100" -filled t -fillpattern AlphaStipple2 +.r add text $top -position "190 110" -text "2" +.r add rectangle $top "240 50 290 100" -filled t -fillpattern AlphaStipple3 +.r add text $top -position "260 110" -text "3" +.r add rectangle $top "310 50 360 100" -filled t -fillpattern AlphaStipple4 +.r add text $top -position "330 110" -text "4" +.r add rectangle $top "380 50 430 100" -filled t -fillpattern AlphaStipple5 +.r add text $top -position "400 110" -text "5" + +.r add rectangle $top "30 150 80 200" -filled t -fillpattern AlphaStipple6 +.r add text $top -position "50 210" -text "6" +.r add rectangle $top "100 150 150 200" -filled t -fillpattern AlphaStipple7 +.r add text $top -position "120 210" -text "7" +.r add rectangle $top "170 150 220 200" -filled t -fillpattern AlphaStipple8 +.r add text $top -position "190 210" -text "8" +.r add rectangle $top "240 150 290 200" -filled t -fillpattern AlphaStipple9 +.r add text $top -position "260 210" -text "9" +.r add rectangle $top "310 150 360 200" -filled t -fillpattern AlphaStipple10 +.r add text $top -position "330 210" -text "10" +.r add rectangle $top "380 150 430 200" -filled t -fillpattern AlphaStipple11 +.r add text $top -position "400 210" -text "11" + +.r add rectangle $top "100 250 150 300" -filled t -fillpattern AlphaStipple12 +.r add text $top -position "120 310" -text "12" +.r add rectangle $top "170 250 220 300" -filled t -fillpattern AlphaStipple13 +.r add text $top -position "190 310" -text "13" +.r add rectangle $top "240 250 290 300" -filled t -fillpattern AlphaStipple14 +.r add text $top -position "260 310" -text "14" +.r add rectangle $top "310 250 360 300" -filled t -fillpattern AlphaStipple15 +.r add text $top -position "330 310" -text "15" + +.r add text $top -position "180 360" -text "AlphaStipple" \ + -font "-*-lucida-bold-r-normal-*-14-*-*-*-*-*-*-*" + +for {set i 0} {$i < 22} {incr i} { + set num [expr $i + 1] + .r add waypoint $top 0 \ + -position "[expr 40 + ($i % 8)*60] [expr 420 + ($i / 8)*45]" \ + -symbol "AtcSymbol$num" + .r add text $top \ + -position "[expr 36 + ($i % 8)*60] [expr 430 + ($i / 8)*45]" \ + -text "$num" \ + -font "-*-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*" +} + +.r add text $top -position "180 560" -text "AtcSymbol" \ + -font "-*-lucida-bold-r-normal-*-14-*-*-*-*-*-*-*" diff --git a/sandbox/testzinc.pl b/sandbox/testzinc.pl index 8c318e3..fa031f3 100644 --- a/sandbox/testzinc.pl +++ b/sandbox/testzinc.pl @@ -94,9 +94,9 @@ $zinc->itemconfigure($track, 2, -image => $logo , -alignment => "center"); $zinc->itemconfigure($track, 0, -reliefthickness => 2, -relief => "sunken", -bordercolor => "red", -border => "noborder"); -$zinc->bind($track.":-3", "", +$zinc->bind($track.":speedvector", "", sub {$zinc->itemconfigure($track, -speedvectorcolor => 'red')}); -$zinc->bind($track.":-3", "", +$zinc->bind($track.":speedvector", "", sub {$zinc->itemconfigure($track, -speedvectorcolor => 'black')}); diff --git a/sandbox/xpenguin.png b/sandbox/xpenguin.png new file mode 100644 index 0000000..1b1d352 Binary files /dev/null and b/sandbox/xpenguin.png differ -- cgit v1.1