From 18de5889cf1226f0f3be27fad2f9f9114df8472a Mon Sep 17 00:00:00 2001 From: treectrl Date: Tue, 31 Oct 2006 23:30:13 +0000 Subject: Added -underline option to text element. [ Patch 1580928 ] Added "depth" qualifier to item descriptions. Added "!tail" qualifier to column descriptions. --- doc/treectrl.html | 70 ++++++++++++++++++++++++++++++++----------------------- doc/treectrl.man | 61 +++++++++++++++++++++++++++--------------------- doc/treectrl.n | 61 +++++++++++++++++++++++++++--------------------- 3 files changed, 111 insertions(+), 81 deletions(-) diff --git a/doc/treectrl.html b/doc/treectrl.html index 32655e9..ea0a3d8 100644 --- a/doc/treectrl.html +++ b/doc/treectrl.html @@ -1,10 +1,10 @@ - treectrl - Tk Commands - @@ -3146,6 +3146,11 @@ the return value of a prior call of the column create widget See also the -columnprefix option.

+
QUALIFIERS
+Specifies a list of qualifiers. This gives the same result as all followed +by QUALIFIERS; i.e., every column is tested for a match. + +

tagExpr QUALIFIERS
TagExpr is a tag expression (see ITEM AND COLUMN TAGS) against which every column's tags are tested for a match. @@ -3153,11 +3158,12 @@ This keyword cannot be followed by any modifiers unless a single column is matched. You may run into trouble if tagExpr looks like a column id or other keyword; also, tagExpr must look like a single list element since column descriptions are properly-formed lists. To be safe you may want to -use the tag keyword. +use the tag keyword followed by tagExpr.

all QUALIFIERS
-Indicates every column, including the tail column, which match QUALIFIERS. +Indicates every column, including the tail column if the command allows it, +which match QUALIFIERS.

first QUALIFIERS
@@ -3173,7 +3179,7 @@ which matches QUALIFIERS.
list columnDescs
ColumnDescs is a list (a single argument, i.e. "list {a b c}" not "list a b c") of other column descriptions. -This keyword cannot be followed by any modifiers unless a single column is specified. +This keyword cannot be followed by any modifiers unless a single column is matched.

order n QUALIFIERS
@@ -3190,13 +3196,6 @@ This keyword cannot be followed by any modifiers unless a single column is speci Indicates the ever-present tail column of the treectrl.

-
tag tagExpr QUALIFIERS
-TagExpr is a tag expression (see ITEM AND COLUMN TAGS) against which -every column's tags are tested for a match. -This keyword cannot be followed by any modifiers unless a single column is -matched. - -

tree
Indicates the column specified by the -treecolumn option of the treectrl. @@ -3231,7 +3230,11 @@ are considered.

tag tagExpr
TagExpr is a tag expression (see ITEM AND COLUMN TAGS) against which -every column's tags are tested for a match. +a column's tags are tested for a match. + +

+
!tail
+When this qualifier is given, the tail column is not matched.

visible
@@ -3608,6 +3611,13 @@ If this option is specified, the -data, -datatype-format options are ignored.

+
-underline charIndex
+Specifies the integer index of a character to underline. +0 corresponds to the first character. +If charIndex is unspecified (the default), less than zero or greater +than the index of the last displayed character, the underline is not drawn. + +

-width size
Specifies the maximum line length in any of the forms acceptable to Tk_GetPixels. For text to wrap lines the value of the -width @@ -3683,6 +3693,11 @@ or 0 to specify the ever-present root item. See also the -itemprefix option.

+
QUALIFIERS
+Specifies a list of qualifiers. This gives the same result as all followed +by QUALIFIERS; i.e., every item is tested for a match. + +

tagExpr QUALIFIERS
TagExpr is a tag expression (see ITEM AND COLUMN TAGS) against which every item's tags are tested for a match. @@ -3690,7 +3705,7 @@ This keyword cannot be followed by any modifiers unless a single item is matched. You may run into trouble if tagExpr looks like an item id or other keyword; also, tagExpr must look like a single list element since item descriptions are properly-formed lists. To be safe you may want to -use the tag keyword. +use the tag keyword followed by tagExpr.

active
@@ -3706,9 +3721,8 @@ widget command, or the root item if no such call happened yet.

all QUALIFIERS
-Indicates every item of the treectrl including orphans, -or the items matching QUALIFIERS. -This keyword cannot be followed by any modifiers. +Indicates every item including orphans which match QUALIFIERS. +This keyword cannot be followed by any modifiers unless a single item is matched.

first QUALIFIERS
@@ -3718,14 +3732,13 @@ or the first item matching QUALIFIERS.

end QUALIFIERS
last QUALIFIERS
-Indicates the last item of the treectrl, -or the last item matching QUALIFIERS. +Indicates the last item which matches QUALIFIERS.

list itemDescs
ItemDescs is a list (a single argument, i.e. "list {a b c}" not "list a b c") of other item descriptions. -This keyword cannot be followed by any modifiers. +This keyword cannot be followed by any modifiers unless a single item is matched.

nearest x y
@@ -3742,19 +3755,12 @@ You can memorize rnc as an abbreviation of "row 'n' column

range first last QUALIFIERS
First and last specify a range of items. -This keyword cannot be followed by any modifiers. +This keyword cannot be followed by any modifiers unless a single item is matched.

root
Indicates the root item of the treectrl. -

-
tag tagExpr QUALIFIERS
-TagExpr is a tag expression (see ITEM AND COLUMN TAGS) against which -every item's tags are tested for a match. -This keyword cannot be followed by any modifiers unless a single item is -matched. -

@@ -3858,6 +3864,11 @@ The word QUALIFIERS above represents a series of zero or more following terms that changes which item is chosen:

+
depth depth
+Matches items whose depth (as returned by the depth command) is equal to +depth. + +

state stateList
StateList is a list of item state names (static and dynamic, see STATES). Only items that have the given states set (or unset if the '!' prefix is used) @@ -3866,7 +3877,7 @@ are considered.

tag tagExpr
TagExpr is a tag expression (see ITEM AND COLUMN TAGS) against which -every item's tags are tested for a match. +an item's tags are tested for a match.

visible
@@ -3895,6 +3906,7 @@ $T item id "root descendants visible" To get the every hidden item with tag "a" or "b":

 
 $T item id "all !visible tag a||b"
+$T item id "!visible tag a||b"
 $T item id "tag a||b !visible"
 $T item id "a||b !visible"
 

diff --git a/doc/treectrl.man b/doc/treectrl.man index 71efb7e..854c2e5 100644 --- a/doc/treectrl.man +++ b/doc/treectrl.man @@ -3,7 +3,7 @@ See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - $Id: treectrl.man,v 1.39 2006/10/27 04:37:11 treectrl Exp $} + $Id: treectrl.man,v 1.40 2006/10/31 23:30:13 treectrl Exp $} ][manpage_begin treectrl n 2.1.1] [moddesc {Tk Commands}] [titledesc {Create and manipulate hierarchical multicolumn widgets}] @@ -2429,6 +2429,10 @@ Specifies the unique column identifier, where [arg id] should be the return value of a prior call of the [cmd {column create}] widget command. See also the [option -columnprefix] option. +[lst_item [arg QUALIFIERS]] +Specifies a list of qualifiers. This gives the same result as [const all] followed +by [arg QUALIFIERS]; i.e., every column is tested for a match. + [lst_item "[arg tagExpr] [arg QUALIFIERS]"] [arg TagExpr] is a tag expression (see [sectref {ITEM AND COLUMN TAGS}]) against which every column's tags are tested for a match. @@ -2436,10 +2440,11 @@ This keyword cannot be followed by any modifiers unless a single column is matched. You may run into trouble if [arg tagExpr] looks like a column id or other keyword; also, [arg tagExpr] must look like a single list element since column descriptions are properly-formed lists. To be safe you may want to -use the [const tag] keyword. +use the [const tag] keyword followed by [arg tagExpr]. [lst_item "[const all] [arg QUALIFIERS]"] -Indicates every column, including the tail column, which match [arg QUALIFIERS]. +Indicates every column, including the tail column if the command allows it, +which match [arg QUALIFIERS]. [lst_item "[const first] [arg QUALIFIERS]"] Indicates the leftmost column of the treectrl which matches [arg QUALIFIERS]. @@ -2452,7 +2457,7 @@ which matches [arg QUALIFIERS]. [lst_item "[const list] [arg columnDescs]"] [arg ColumnDescs] is a list (a single argument, i.e. "list {a b c}" not "list a b c") of other column descriptions. -This keyword cannot be followed by any modifiers unless a single column is specified. +This keyword cannot be followed by any modifiers unless a single column is matched. [lst_item "[const order] [arg n] [arg QUALIFIERS]"] Indicates the [arg n]th column in the list of columns as returned by the @@ -2465,12 +2470,6 @@ This keyword cannot be followed by any modifiers unless a single column is speci [lst_item [const tail]] Indicates the ever-present tail column of the treectrl. -[lst_item "[const tag] [arg tagExpr] [arg QUALIFIERS]"] -[arg TagExpr] is a tag expression (see [sectref {ITEM AND COLUMN TAGS}]) against which -every column's tags are tested for a match. -This keyword cannot be followed by any modifiers unless a single column is -matched. - [lst_item [const tree]] Indicates the column specified by the -treecolumn option of the treectrl. [list_end] @@ -2503,7 +2502,10 @@ are considered. [lst_item "[const tag] [arg tagExpr]"] [arg TagExpr] is a tag expression (see [sectref {ITEM AND COLUMN TAGS}]) against which -every column's tags are tested for a match. +a column's tags are tested for a match. + +[lst_item [const !tail]] +When this qualifier is given, the tail column is not matched. [lst_item [const visible]] When this qualifier is given, only columns whose [option -visible] option is @@ -2837,6 +2839,12 @@ will automatically update itself to display the new value. If this option is specified, the [option -data], [option -datatype], and [option -format] options are ignored. +[opt_def [option -underline] [arg charIndex]] +Specifies the integer index of a character to underline. +0 corresponds to the first character. +If [arg charIndex] is unspecified (the default), less than zero or greater +than the index of the last displayed character, the underline is not drawn. + [opt_def [option -width] [arg size]] Specifies the maximum line length in any of the forms acceptable to [fun Tk_GetPixels]. For text to wrap lines the value of the [option -width] @@ -2905,6 +2913,10 @@ the return value of a prior call of the [cmd {item create}] widget command, or [const 0] to specify the ever-present root item. See also the [option -itemprefix] option. +[lst_item [arg QUALIFIERS]] +Specifies a list of qualifiers. This gives the same result as [const all] followed +by [arg QUALIFIERS]; i.e., every item is tested for a match. + [lst_item "[arg tagExpr] [arg QUALIFIERS]"] [arg TagExpr] is a tag expression (see [sectref {ITEM AND COLUMN TAGS}]) against which every item's tags are tested for a match. @@ -2912,7 +2924,7 @@ This keyword cannot be followed by any modifiers unless a single item is matched. You may run into trouble if [arg tagExpr] looks like an item id or other keyword; also, [arg tagExpr] must look like a single list element since item descriptions are properly-formed lists. To be safe you may want to -use the [const tag] keyword. +use the [const tag] keyword followed by [arg tagExpr]. [lst_item [const active]] Indicates the item that is currently active, i.e. normally @@ -2925,9 +2937,8 @@ the item specified as argument of the last successful [cmd {selection anchor}] widget command, or the root item if no such call happened yet. [lst_item "[const all] [arg QUALIFIERS]"] -Indicates every item of the treectrl including orphans, -or the items matching [arg QUALIFIERS]. -This keyword cannot be followed by any modifiers. +Indicates every item including orphans which match [arg QUALIFIERS]. +This keyword cannot be followed by any modifiers unless a single item is matched. [lst_item "[const first] [arg QUALIFIERS]"] Indicates the first item of the treectrl (the root item), @@ -2935,13 +2946,12 @@ or the first item matching [arg QUALIFIERS]. [lst_item "[const end] [arg QUALIFIERS]"] [lst_item "[const last] [arg QUALIFIERS]"] -Indicates the last item of the treectrl, -or the last item matching [arg QUALIFIERS]. +Indicates the last item which matches [arg QUALIFIERS]. [lst_item "[const list] [arg itemDescs]"] [arg ItemDescs] is a list (a single argument, i.e. "list {a b c}" not "list a b c") of other item descriptions. -This keyword cannot be followed by any modifiers. +This keyword cannot be followed by any modifiers unless a single item is matched. [lst_item "[const nearest] [arg {x y}]"] Indicates the item nearest to the point given by [arg x] and [arg y]. @@ -2955,17 +2965,11 @@ You can memorize [const rnc] as an abbreviation of "row 'n' column". [lst_item "[const range] [arg {first last}] [arg QUALIFIERS]"] [arg First] and [arg last] specify a range of items. -This keyword cannot be followed by any modifiers. +This keyword cannot be followed by any modifiers unless a single item is matched. [lst_item [const root]] Indicates the root item of the treectrl. -[lst_item "[const tag] [arg tagExpr] [arg QUALIFIERS]"] -[arg TagExpr] is a tag expression (see [sectref {ITEM AND COLUMN TAGS}]) against which -every item's tags are tested for a match. -This keyword cannot be followed by any modifiers unless a single item is -matched. - [list_end] [para] @@ -3050,6 +3054,10 @@ The word [arg QUALIFIERS] above represents a series of zero or more of the following terms that changes which item is chosen: [list_begin definitions] +[lst_item "[const depth] [arg depth]"] +Matches items whose depth (as returned by the [cmd depth] command) is equal to +[arg depth]. + [lst_item "[const state] [arg stateList]"] [arg StateList] is a list of item state names (static and dynamic, see [sectref STATES]). Only items that have the given states set (or unset if the '!' prefix is used) @@ -3057,7 +3065,7 @@ are considered. [lst_item "[const tag] [arg tagExpr]"] [arg TagExpr] is a tag expression (see [sectref {ITEM AND COLUMN TAGS}]) against which -every item's tags are tested for a match. +an item's tags are tested for a match. [lst_item [const visible]] When this qualifier is given, only items that are displayed are considered. @@ -3084,6 +3092,7 @@ $T item id "root descendants visible" To get the every hidden item with tag "a" or "b": [example_begin] $T item id "all !visible tag a||b" +$T item id "!visible tag a||b" $T item id "tag a||b !visible" $T item id "a||b !visible" [example_end] diff --git a/doc/treectrl.n b/doc/treectrl.n index a918323..e7a3fe3 100644 --- a/doc/treectrl.n +++ b/doc/treectrl.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" $Id: treectrl.n,v 1.55 2006/10/27 04:37:11 treectrl Exp $ +'\" $Id: treectrl.n,v 1.56 2006/10/31 23:30:13 treectrl Exp $ .so man.macros .TH "treectrl" n 2.1.1 treectrl "Tk Commands" .BS @@ -2965,6 +2965,10 @@ Specifies the unique column identifier, where \fIid\fR should be the return value of a prior call of the \fBcolumn create\fR widget command. See also the \fB-columnprefix\fR option. .TP +\fIQUALIFIERS\fR +Specifies a list of qualifiers. This gives the same result as \fBall\fR followed +by \fIQUALIFIERS\fR; i.e., every column is tested for a match. +.TP \fItagExpr\fR \fIQUALIFIERS\fR \fITagExpr\fR is a tag expression (see \fBITEM AND COLUMN TAGS\fR) against which every column's tags are tested for a match. @@ -2972,10 +2976,11 @@ This keyword cannot be followed by any modifiers unless a single column is matched. You may run into trouble if \fItagExpr\fR looks like a column id or other keyword; also, \fItagExpr\fR must look like a single list element since column descriptions are properly-formed lists. To be safe you may want to -use the \fBtag\fR keyword. +use the \fBtag\fR keyword followed by \fItagExpr\fR. .TP \fBall\fR \fIQUALIFIERS\fR -Indicates every column, including the tail column, which match \fIQUALIFIERS\fR. +Indicates every column, including the tail column if the command allows it, +which match \fIQUALIFIERS\fR. .TP \fBfirst\fR \fIQUALIFIERS\fR Indicates the leftmost column of the treectrl which matches \fIQUALIFIERS\fR. @@ -2989,7 +2994,7 @@ which matches \fIQUALIFIERS\fR. \fBlist\fR \fIcolumnDescs\fR \fIColumnDescs\fR is a list (a single argument, i.e. "list {a b c}" not "list a b c") of other column descriptions. -This keyword cannot be followed by any modifiers unless a single column is specified. +This keyword cannot be followed by any modifiers unless a single column is matched. .TP \fBorder\fR \fIn\fR \fIQUALIFIERS\fR Indicates the \fIn\fRth column in the list of columns as returned by the @@ -3002,12 +3007,6 @@ This keyword cannot be followed by any modifiers unless a single column is speci \fBtail\fR Indicates the ever-present tail column of the treectrl. .TP -\fBtag\fR \fItagExpr\fR \fIQUALIFIERS\fR -\fITagExpr\fR is a tag expression (see \fBITEM AND COLUMN TAGS\fR) against which -every column's tags are tested for a match. -This keyword cannot be followed by any modifiers unless a single column is -matched. -.TP \fBtree\fR Indicates the column specified by the -treecolumn option of the treectrl. .PP @@ -3032,7 +3031,10 @@ are considered. .TP \fBtag\fR \fItagExpr\fR \fITagExpr\fR is a tag expression (see \fBITEM AND COLUMN TAGS\fR) against which -every column's tags are tested for a match. +a column's tags are tested for a match. +.TP +\fB!tail\fR +When this qualifier is given, the tail column is not matched. .TP \fBvisible\fR When this qualifier is given, only columns whose \fB-visible\fR option is @@ -3344,6 +3346,12 @@ will automatically update itself to display the new value. If this option is specified, the \fB-data\fR, \fB-datatype\fR, and \fB-format\fR options are ignored. .TP +\fB\fB-underline\fR\fR \fIcharIndex\fR +Specifies the integer index of a character to underline. +0 corresponds to the first character. +If \fIcharIndex\fR is unspecified (the default), less than zero or greater +than the index of the last displayed character, the underline is not drawn. +.TP \fB\fB-width\fR\fR \fIsize\fR Specifies the maximum line length in any of the forms acceptable to \fBTk_GetPixels\fR. For text to wrap lines the value of the \fB-width\fR @@ -3405,6 +3413,10 @@ the return value of a prior call of the \fBitem create\fR widget command, or \fB0\fR to specify the ever-present root item. See also the \fB-itemprefix\fR option. .TP +\fIQUALIFIERS\fR +Specifies a list of qualifiers. This gives the same result as \fBall\fR followed +by \fIQUALIFIERS\fR; i.e., every item is tested for a match. +.TP \fItagExpr\fR \fIQUALIFIERS\fR \fITagExpr\fR is a tag expression (see \fBITEM AND COLUMN TAGS\fR) against which every item's tags are tested for a match. @@ -3412,7 +3424,7 @@ This keyword cannot be followed by any modifiers unless a single item is matched. You may run into trouble if \fItagExpr\fR looks like an item id or other keyword; also, \fItagExpr\fR must look like a single list element since item descriptions are properly-formed lists. To be safe you may want to -use the \fBtag\fR keyword. +use the \fBtag\fR keyword followed by \fItagExpr\fR. .TP \fBactive\fR Indicates the item that is currently active, i.e. normally @@ -3425,9 +3437,8 @@ the item specified as argument of the last successful \fBselection anchor\fR widget command, or the root item if no such call happened yet. .TP \fBall\fR \fIQUALIFIERS\fR -Indicates every item of the treectrl including orphans, -or the items matching \fIQUALIFIERS\fR. -This keyword cannot be followed by any modifiers. +Indicates every item including orphans which match \fIQUALIFIERS\fR. +This keyword cannot be followed by any modifiers unless a single item is matched. .TP \fBfirst\fR \fIQUALIFIERS\fR Indicates the first item of the treectrl (the root item), @@ -3436,13 +3447,12 @@ or the first item matching \fIQUALIFIERS\fR. \fBend\fR \fIQUALIFIERS\fR .TP \fBlast\fR \fIQUALIFIERS\fR -Indicates the last item of the treectrl, -or the last item matching \fIQUALIFIERS\fR. +Indicates the last item which matches \fIQUALIFIERS\fR. .TP \fBlist\fR \fIitemDescs\fR \fIItemDescs\fR is a list (a single argument, i.e. "list {a b c}" not "list a b c") of other item descriptions. -This keyword cannot be followed by any modifiers. +This keyword cannot be followed by any modifiers unless a single item is matched. .TP \fBnearest\fR \fIx y\fR Indicates the item nearest to the point given by \fIx\fR and \fIy\fR. @@ -3456,16 +3466,10 @@ You can memorize \fBrnc\fR as an abbreviation of "row 'n' column". .TP \fBrange\fR \fIfirst last\fR \fIQUALIFIERS\fR \fIFirst\fR and \fIlast\fR specify a range of items. -This keyword cannot be followed by any modifiers. +This keyword cannot be followed by any modifiers unless a single item is matched. .TP \fBroot\fR Indicates the root item of the treectrl. -.TP -\fBtag\fR \fItagExpr\fR \fIQUALIFIERS\fR -\fITagExpr\fR is a tag expression (see \fBITEM AND COLUMN TAGS\fR) against which -every item's tags are tested for a match. -This keyword cannot be followed by any modifiers unless a single item is -matched. .PP The initial part of the item description (matching any of the values above) may be followed by one or more \fImodifier\fRs. @@ -3544,6 +3548,10 @@ Use the item in the first row of this column. The word \fIQUALIFIERS\fR above represents a series of zero or more of the following terms that changes which item is chosen: .TP +\fBdepth\fR \fIdepth\fR +Matches items whose depth (as returned by the \fBdepth\fR command) is equal to +\fIdepth\fR. +.TP \fBstate\fR \fIstateList\fR \fIStateList\fR is a list of item state names (static and dynamic, see \fBSTATES\fR). Only items that have the given states set (or unset if the '!' prefix is used) @@ -3551,7 +3559,7 @@ are considered. .TP \fBtag\fR \fItagExpr\fR \fITagExpr\fR is a tag expression (see \fBITEM AND COLUMN TAGS\fR) against which -every item's tags are tested for a match. +an item's tags are tested for a match. .TP \fBvisible\fR When this qualifier is given, only items that are displayed are considered. @@ -3580,6 +3588,7 @@ To get the every hidden item with tag "a" or "b": .nf $T item id "all !visible tag a||b" +$T item id "!visible tag a||b" $T item id "tag a||b !visible" $T item id "a||b !visible" -- cgit v0.12