From f0a5c7e9a3b1cbafa013b8e8a3a6788c2c912a9f Mon Sep 17 00:00:00 2001 From: treectrl Date: Wed, 11 May 2005 03:31:32 +0000 Subject: Replaced -XXXbuttonXXX with -buttonbitmap, -buttonimage. New -minitemheight and -usetheme treectrl options. New -arrowpadx, -arrowpady, -arrowbitmap, -arrowimage, -state, -textlines column options. Removed -relief and -sunken column options. Added PER-STATE OPTIONS section. New "window" element type. New event. --- doc/treectrl.html | 253 ++++++++++++++++++++++++++++++++++++++---------------- doc/treectrl.man | 211 ++++++++++++++++++++++++++++++++------------- doc/treectrl.n | 244 +++++++++++++++++++++++++++++++++++----------------- 3 files changed, 494 insertions(+), 214 deletions(-) diff --git a/doc/treectrl.html b/doc/treectrl.html index 2d52e10..dd34d5d 100644 --- a/doc/treectrl.html +++ b/doc/treectrl.html @@ -1,14 +1,14 @@ - treectrl - Tk Commands - -

treectrl(n) 1.1 "Tk Commands"

+

treectrl(n) 1.2 "Tk Commands"

NAME

treectrl - Create and manipulate hierarchical multicolumn widgets @@ -18,7 +18,7 @@

SYNOPSIS

-package require treectrl 1.1
+package require treectrl 1.2

@@ -247,6 +247,16 @@ items are counted also for evaluating the background color, for visindex only the visible items are counted.

+
Command-Line Switch: -buttonbitmap
+Database Name: buttonBitmap
+Database Class: ButtonBitmap
+
+Specifies the bitmap to be used as the expand/collapse button to the left of +an item. This is a per-state option (see PER-STATE OPTIONS). If +a bitmap is specified for a certain item state, it overrides the effects of +-usetheme. + +

Command-Line Switch: -buttoncolor
Database Name: buttonColor
Database Class: ButtonColor
@@ -255,6 +265,16 @@ Specifies the foreground color which should be used for drawing the outline and the plus or minus sign of the button to the left of an item.

+
Command-Line Switch: -buttonimage
+Database Name: buttonImage
+Database Class: ButtonImage
+
+Specifies the image to be used as the expand/collapse button to the left of +an item. This is a per-state option (see PER-STATE OPTIONS). +If an image is specified for a certain item state, it overrides the effects of +-buttonbitmap and -usetheme. + +

Command-Line Switch: -buttonsize
Database Name: buttonSize
Database Class: ButtonSize
@@ -272,22 +292,6 @@ of the button to the left of an item in any of the forms acceptable to Tk_GetPixels.

-
Command-Line Switch: -closedbuttonbitmap
-Database Name: closedButtonBitmap
-Database Class: ClosedButtonBitmap
-
-Specifies the bitmap to be used as the button to the left of a closed item -in any of the forms acceptable to Tk_GetPixels. - -

-
Command-Line Switch: -closedbuttonimage
-Database Name: closedButtonImage
-Database Class: ClosedButtonImage
-
-Specifies the image to be used as the button to the left of a closed item -in any of the forms acceptable to Tk_GetImage. - -

Command-Line Switch: -columnproxy
Database Name: columnProxy
Database Class: ColumnProxy
@@ -357,10 +361,11 @@ Database Name: itemHeight
Database Class: ItemHeight
Specifies a fixed height for every item -in any of the forms acceptable to Tk_GetPixels. +in any of the forms acceptable to Tk_GetPixels. If non-zero, this +option overrides the requested height of an item and the -minitemheight option. The default is 0, which means that every item has the height requested by the arrangement of elements -in each column. +in each column. Items are never shorter than the maximum height of a button.

Command-Line Switch: -linecolor
@@ -387,20 +392,16 @@ Specifies the thickness of the connecting lines between related items in any of the forms acceptable to Tk_GetPixels.

-
Command-Line Switch: -openbuttonbitmap
-Database Name: openButtonBitmap
-Database Class: OpenButtonBitmap
+
Command-Line Switch: -minitemheight
+Database Name: minItemHeight
+Database Class: MinItemHeight
-Specifies the bitmap to be used as the button to the left of an opened item -in any of the forms acceptable to Tk_GetBitmap. - -

-
Command-Line Switch: -openbuttonimage
-Database Name: openButtonImage
-Database Class: OpenButtonImage
-
-Specifies the image to be used as the button to the left of an opened item -in any of the forms acceptable to Tk_GetImage. +Specifies a minimum height for every item +in any of the forms acceptable to Tk_GetPixels. +The default is 0, which means that +every item has the height requested by the arrangement of elements +in each column. This option has no effect if the -itemheight option is specified. +Items are never shorter than the maximum height of a button.

Command-Line Switch: -scrollmargin
@@ -491,6 +492,15 @@ column displays the data in an hierarchical fashion. Default is 0 meaning that the first column displays the tree.

+
Command-Line Switch: -usetheme
+Database Name: useTheme
+Database Class: UseTheme
+
+Specifies a boolean value that determines whether this widget should draw +parts of itself using a platform-specific theme manager. +The default is false. + +

Command-Line Switch: -width
Database Name: width
Database Class: Width
@@ -2233,8 +2243,12 @@ There is always one special column, the tail column, which fill all space to the right of the last ordinary column. This column has no number; it can only be specified by its tag tail, which cannot be modified. -It is explicitely mentioned for a widget command, -if its column argument can also specify the tail column. + +

+When a column configuration option is specified as per-state, the state +names are normal, active, pressed or up, i.e. +do not use item state names. See PER-STATE OPTIONS +for more info.

The following options are supported for columns: @@ -2247,6 +2261,17 @@ to the right of the column title. none (the default), up, or down.

+

-arrowbitmap bitmap
+Specifies as a per-state option the bitmap to use to draw the arrow if +this columns -arrow option is not none. + +

+
-arrowimage image
+Specifies as a per-state option the image to use to draw the arrow if +this columns -arrow option is not none. If an image is specified for +a certain state, it overrides the -arrowbitmap option. + +

-arrowside side
Indicates on which side an arrow should be drawn, if at all. Side must be either left or right (the default). @@ -2258,11 +2283,19 @@ if there is more space available for drawing the arrow then needed. Side must be either left (the default) or right.

-
-arrowpad amount
+
-arrowpadx amount
Amount specifies how much padding to leave on the left and right side of the arrow. Amount may be a list -of two values to specify padding for left and right separately, +of two values to specify padding for left and right separately; +it defaults to 6. + +

+
-arrowpady amount
+Amount specifies how much padding to +leave on the top and bottom of the arrow. +Amount may be a list +of two values to specify padding for top and bottom separately; it defaults to 0.

@@ -2272,7 +2305,8 @@ to the left of the column title.

-background color
-Specifies the color to use for the background of the column header. +Specifies as a per-state option the color to use for the background of the +column header.

-borderwidth size
@@ -2306,12 +2340,18 @@ This option overrides the -bitmap column option.

-imagepadx amount
+Amount specifies how much padding to +leave on the left and right side of the image. +Amount may be a list +of two values to specify padding for left and right separately; +it defaults to 6. + +

-imagepady amount
Amount specifies how much padding to -leave on the left and right (for -imagepadx) -or top and bottom (for -imagepady) side of the image. +leave on the top and bottom of the image. Amount may be a list -of two values to specify padding for the two sides separately, +of two values to specify padding for top and bottom separately; it defaults to 0.

@@ -2331,13 +2371,6 @@ Specifies the minimum size, in screen units, that will be permitted for this column.

-
-relief relief
-Specifies the 3-D effect desired for the column header containing the title. -Acceptable values are the typical relief values, -but the value seems to be ignored anyway; -better use the -sunken column option instead. - -

-squeeze boolean
Specifies a boolean value that indicates whether or not the column should shrink when the content width of the treectrl is less than the total needed width @@ -2347,6 +2380,12 @@ of its -minwidth option, if specified. This option has no effec -width option is set.

+
-state state
+Specifies one of three states for the column header: normal, active, +or pressed. The active state is used when the mouse is over the header. +The pressed state is used when the mouse button is pressed in the header. + +

-stepwidth size
Specifies a sort of tabbed alignment for columns that displays more than one item next to each other @@ -2354,11 +2393,6 @@ more than one item next to each other Every item will get an x-coordinate which is a multiple of size.

-
-sunken boolean
-Indicates whether or not the column header containing the column title -will be displayed with a sunken relief. - -

-tag tag
Defines a unique name for the columns which can be used in subsequent calls of the treectrl widget commands, wherever a column must be specified. @@ -2373,13 +2407,26 @@ Specifies a color, which should be used as foreground color to display the column title.

+
-textlines count
+Specifies the maximum number of lines of text to display in the column title. +If this value is zero, the number of lines displayed is determined by any newline +characters and the effects of wrapping when the column width is less than +needed. The default is 1. + +

-textpadx amount
+Amount specifies how much padding to +leave on the left and right side of the text. +Amount may be a list +of two values to specify padding for left and right separately; +it defaults to 6. + +

-textpady amount
Amount specifies how much padding to -leave on the left and right (for -textpadx) -or top and bottom (for -textpady) side of the text. +leave on the top and bottom of the text. Amount may be a list -of two values to specify padding for the two sides separately, +of two values to specify padding for top and bottom separately; it defaults to 0.

@@ -2444,7 +2491,7 @@ the descendants of the item are not displayed - the item is collapsed. For a new item this state is switched on. It can be modified by means of the widget commands -expand, collapse, or toggle. +item expand, item collapse, or item toggle.

selected
@@ -2470,18 +2517,49 @@ which should be a non empty list of stateDescs. The pattern matches, if for every element of the list the stateDesc describes the same state as the item currently has. +

PER-STATE OPTIONS

+

+ +The visual appearance of an item can change depending on the state the item +is in, such as being the active item, being included in the selection, being +collapsed, or some combination of those or other states. When a configuration +option is described as per-state, it means the option describes a +value which varies depending on the state of the item. If a per-state option is +specified as a single value, the value is used for all states. Otherwise +the per-state option must be specified as an even-numbered list. For example, +to use the font "Times 12 bold" in a text element regardless of the +item state you can write: +

treectrl pathName ?options?
pathName activate itemDesc
pathName canvasx screenx
 
+$T element configure MyTextElement -font {{Times 12 bold}}
+

+However, to use a different font when the item is selected you could write: +

 
+$T element configure MyTextElement -font {{Courier 10} selected {Times 12 bold} {}}
+

+In the second example above the -font option reads "value stateList value stateList". +If stateList is an empty list, the preceding value is used regardless +of the item state. A non-empty stateList specifies a list of states which must be +set for the item in order to use the preceding value. Each stateList can also +include state names preceded by a ! sign, indicating the state must *not* be +set for the item. For example: +

 
+$T element configure MyRectElement -fill {blue {selected focus} gray {selected !focus}}
+

+In the example above, the rect element is filled with blue when the treectrl +has the focus and the item is selected. If the treectrl does not have the focus, the +example specifies that gray should be used for selected items. Also note that if the +item is not selected, no color is specified for the -fill option. +

ELEMENTS

-Elements are the smallest building block +Elements are the smallest building blocks which are handled by a treectrl widget. One or more elements together can be combined to a style, which can be considered as a blueprint for an item. -They can also be used to create an item directly -by means of the item complex widget command. An element can be of type bitmap, border, image, -rect, or text. -For each element type there is a section below describing all options -which can modify the behaviour of an element of this type. +rect, text or window. +For each element type there is a section below describing the options +which can modify an element of that type.

There are some options which can be configured to get different values @@ -2494,7 +2572,7 @@ For acceptable values of statePattern see the section STATES above. The last statePattern can be empty, implementing a sort of otherwise clause. -The options with this behaviour are called per state options. +The options with this behaviour are called per-state options.

BITMAP ELEMENT

@@ -2503,17 +2581,17 @@ The following options are supported for bitmap elements:

-background color
-Specifies as a per state option +Specifies as a per-state option the color to use for each of the bitmap's '0' valued pixels.

-bitmap bitmap
-Specifies as a per state option +Specifies as a per-state option the bitmap to display in the element.

-foreground color
-Specifies as a per state option +Specifies as a per-state option the color to use for each of the bitmap's '1' valued pixels.
@@ -2524,7 +2602,7 @@ The following options are supported for border elements:
-background color
-Specifies as a per state option +Specifies as a per-state option the color to use for the background of the border.

@@ -2539,7 +2617,7 @@ Specifies the height of the area of the border.

-relief reliefList
-Specifies as a per state option +Specifies as a per-state option relief of the border. For acceptable values see the description of the -relief option in the options manual page. @@ -2564,7 +2642,7 @@ Specifies the height of the image.

-image image
-Specifies as a per state option +Specifies as a per-state option the image to display in the element.

@@ -2579,7 +2657,7 @@ The following options are supported for rectangle elements:
-fill fillColor
-Specifies as a per state option +Specifies as a per-state option the color to be used to fill rectangle's area. Color may have any of the forms accepted by Tk_GetColor. If color is an empty string (the default), then @@ -2600,7 +2678,7 @@ The default is the empty string, which causes the outline to be drawn completely

-outline outlineColor
-Specifies as a per state option +Specifies as a per-state option the color that should be used to draw the outline of the rectangle. Color may have any of the forms accepted by Tk_GetColor. If color is specified as an empty string (the default), @@ -2642,7 +2720,7 @@ Specifies the datatype which should be used to convert the value of the

-fill color
-Specifies as a per state option +Specifies as a per-state option the color to be used as foreground color of the text. Color may have any of the forms accepted by Tk_GetColor. If color is an empty string (the default), then @@ -2660,7 +2738,7 @@ a valid format element of the format command.

-font fontName
-Specifies as a per state option +Specifies as a per-state option the font to use for the text. FontName may be any string acceptable to Tk_GetFont. If this option isn't specified, it defaults to the font configured for @@ -2699,6 +2777,22 @@ text's area. Acceptable values are char or word.
+

WINDOW ELEMENT

+

+An element of type window can be used to display a Tk window in an item. +The following options are supported for window elements: + +

+
-window pathName
+Specifies the window to associate with this element. The window specified by +pathName must either be a child of the treectrl widget or a child of +some ancestor of the treectrl widget. PathName may not refer to a +top-level window. This option cannot be specified by +the element create or element configure commands, only by the +item element configure command; i.e., the element must be associated +with a particular item. +
+

ITEM DESCRIPTION

Many of the widget commands for a treectrl take as one argument an @@ -2903,6 +2997,13 @@ Generated after an item is expanded.

%I
The item id
+
<ItemDelete>
+Generated when items are about to be deleted by the item delete command. +

+
+
%i
List of items ids being deleted. +
+
<Scroll-x>
Generated whenever the view in the treectrl changes in such a way that a horizontal scrollbar should be redisplayed. diff --git a/doc/treectrl.man b/doc/treectrl.man index d694b97..b1a0bef 100644 --- a/doc/treectrl.man +++ b/doc/treectrl.man @@ -3,11 +3,11 @@ 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.12 2005/03/29 21:20:41 treectrl Exp $} -][manpage_begin treectrl n 1.1] + $Id: treectrl.man,v 1.13 2005/05/11 03:31:32 treectrl Exp $} +][manpage_begin treectrl n 1.2] [moddesc {Tk Commands}] [titledesc {Create and manipulate hierarchical multicolumn widgets}] -[require treectrl 1.1] +[require treectrl 1.2] [description] [list_begin definitions] @@ -89,10 +89,22 @@ is specified respectively. When [const index] is specified, collapsed items are counted also for evaluating the background color, for [const visindex] only the visible items are counted. +[tkoption_def -buttonbitmap buttonBitmap ButtonBitmap] +Specifies the bitmap to be used as the expand/collapse button to the left of +an item. This is a per-state option (see [sectref {PER-STATE OPTIONS}]). If +a bitmap is specified for a certain item state, it overrides the effects of +-usetheme. + [tkoption_def -buttoncolor buttonColor ButtonColor] Specifies the foreground color which should be used for drawing the outline and the plus or minus sign of the button to the left of an item. +[tkoption_def -buttonimage buttonImage ButtonImage] +Specifies the image to be used as the expand/collapse button to the left of +an item. This is a per-state option (see [sectref {PER-STATE OPTIONS}]). +If an image is specified for a certain item state, it overrides the effects of +-buttonbitmap and -usetheme. + [tkoption_def -buttonsize buttonSize ButtonSize] Specifies the diameter of the button drawn to the left of an item in any of the forms acceptable to [fun Tk_GetPixels]. @@ -102,14 +114,6 @@ Specifies the width of the outline and the plus or minus sign of the button to the left of an item in any of the forms acceptable to [fun Tk_GetPixels]. -[tkoption_def -closedbuttonbitmap closedButtonBitmap ClosedButtonBitmap] -Specifies the bitmap to be used as the button to the left of a closed item -in any of the forms acceptable to [fun Tk_GetPixels]. - -[tkoption_def -closedbuttonimage closedButtonImage ClosedButtonImage] -Specifies the image to be used as the button to the left of a closed item -in any of the forms acceptable to [fun Tk_GetImage]. - [tkoption_def -columnproxy columnProxy ColumnProxy] If this option specifies a non empty value, it should be a screen distance @@ -156,10 +160,11 @@ the right than its father. [tkoption_def -itemheight itemHeight ItemHeight] Specifies a fixed height for every item -in any of the forms acceptable to [fun Tk_GetPixels]. +in any of the forms acceptable to [fun Tk_GetPixels]. If non-zero, this +option overrides the requested height of an item and the -minitemheight option. The default is 0, which means that every item has the height requested by the arrangement of elements -in each column. +in each column. Items are never shorter than the maximum height of a button. [tkoption_def -linecolor lineColor LineColor] Specifies the color which should be used for drawing @@ -173,13 +178,13 @@ should be [const dot] which is the default, or [const solid]. Specifies the thickness of the connecting lines between related items in any of the forms acceptable to [fun Tk_GetPixels]. -[tkoption_def -openbuttonbitmap openButtonBitmap OpenButtonBitmap] -Specifies the bitmap to be used as the button to the left of an opened item -in any of the forms acceptable to [fun Tk_GetBitmap]. - -[tkoption_def -openbuttonimage openButtonImage OpenButtonImage] -Specifies the image to be used as the button to the left of an opened item -in any of the forms acceptable to [fun Tk_GetImage]. +[tkoption_def -minitemheight minItemHeight MinItemHeight] +Specifies a minimum height for every item +in any of the forms acceptable to [fun Tk_GetPixels]. +The default is 0, which means that +every item has the height requested by the arrangement of elements +in each column. This option has no effect if the -itemheight option is specified. +Items are never shorter than the maximum height of a button. [tkoption_def -scrollmargin scrollMargin ScrollMargin] The interpretation of this option is left to Tcl scripts @@ -233,6 +238,11 @@ Specifies an integer value that determines which column displays the data in an hierarchical fashion. Default is 0 meaning that the first column displays the tree. +[tkoption_def -usetheme useTheme UseTheme] +Specifies a boolean value that determines whether this widget should draw +parts of itself using a platform-specific theme manager. +The default is false. + [tkoption_def -width width Width] Specifies the desired width for the window in any of the forms acceptable to [fun Tk_GetPixels]. @@ -1721,8 +1731,12 @@ There is always one special column, the [const tail] column, which fills all space to the right of the last ordinary column. This column has no number; it can only be specified by its tag [const tail], which cannot be modified. -It is explicitely mentioned for a widget command, -if its [arg column] argument can also specify the tail column. + +[para] +When a column configuration option is specified as [const per-state], the state +names are [const normal], [const active], [const pressed] or [const up], i.e. +do not use item state names. See [sectref {PER-STATE OPTIONS}] +for more info. [para] The following options are supported for columns: @@ -1734,6 +1748,15 @@ to the right of the column title. [arg Direction] must have one of the values [const none] (the default), [const up], or [const down]. +[opt_def [option -arrowbitmap] [arg bitmap]] +Specifies as a per-state option the bitmap to use to draw the arrow if +this column's -arrow option is not [const none]. + +[opt_def [option -arrowimage] [arg image]] +Specifies as a per-state option the image to use to draw the arrow if +this column's -arrow option is not [const none]. If an image is specified for +a certain state, it overrides the -arrowbitmap option. + [opt_def [option -arrowside] [arg side]] Indicates on which side an arrow should be drawn, if at all. [arg Side] must be either [const left] or [const right] (the default). @@ -1743,11 +1766,18 @@ Indicates onto which side an arrow should be packed, if there is more space available for drawing the arrow then needed. [arg Side] must be either [const left] (the default) or [const right]. -[opt_def [option -arrowpad] [arg amount]] +[opt_def [option -arrowpadx] [arg amount]] [arg Amount] specifies how much padding to leave on the left and right side of the arrow. [arg Amount] may be a list -of two values to specify padding for left and right separately, +of two values to specify padding for left and right separately; +it defaults to 6. + +[opt_def [option -arrowpady] [arg amount]] +[arg Amount] specifies how much padding to +leave on the top and bottom of the arrow. +[arg Amount] may be a list +of two values to specify padding for top and bottom separately; it defaults to 0. [opt_def [option -bitmap] [arg bitmap]] @@ -1755,7 +1785,8 @@ Specifies the bitmap to display in the element to the left of the column title. [opt_def [option -background] [arg color]] -Specifies the color to use for the background of the column header. +Specifies as a per-state option the color to use for the background of the +column header. [opt_def [option -borderwidth] [arg size]] Specifies a non-negative value indicating the width @@ -1783,12 +1814,17 @@ to the left of the column title. This option overrides the [option -bitmap] column option. [opt_def [option -imagepadx] [arg amount]] +[arg Amount] specifies how much padding to +leave on the left and right side of the image. +[arg Amount] may be a list +of two values to specify padding for left and right separately; +it defaults to 6. + [opt_def [option -imagepady] [arg amount]] [arg Amount] specifies how much padding to -leave on the left and right (for [option -imagepadx]) -or top and bottom (for [option -imagepady]) side of the image. +leave on the top and bottom of the image. [arg Amount] may be a list -of two values to specify padding for the two sides separately, +of two values to specify padding for top and bottom separately; it defaults to 0. [opt_def [option -itembackground] [arg colorList]] @@ -1804,12 +1840,6 @@ Must be one of [const left] (the default), [const center], or [const right]. Specifies the minimum size, in screen units, that will be permitted for this column. -[opt_def [option -relief] [arg relief]] -Specifies the 3-D effect desired for the column header containing the title. -Acceptable values are the typical relief values, -but the value seems to be ignored anyway; -better use the [option -sunken] column option instead. - [opt_def [option -squeeze] [arg boolean]] Specifies a boolean value that indicates whether or not the column should shrink when the content width of the treectrl is less than the total needed width @@ -1818,16 +1848,17 @@ smaller than its needed width. The column will not get smaller than the value of its [option -minwidth] option, if specified. This option has no effect if the [option -width] option is set. +[opt_def [option -state] [arg state]] +Specifies one of three states for the column header: [const normal], [const active], +or [const pressed]. The active state is used when the mouse is over the header. +The pressed state is used when the mouse button is pressed in the header. + [opt_def [option -stepwidth] [arg size]] Specifies a sort of tabbed alignment for columns that displays more than one item next to each other (typically in a treectrl widget with horizontal orientation). Every item will get an x-coordinate which is a multiple of [arg size]. -[opt_def [option -sunken] [arg boolean]] -Indicates whether or not the column header containing the column title -will be displayed with a sunken relief. - [opt_def [option -tag] [arg tag]] Defines a unique name for the columns which can be used in subsequent calls of the treectrl widget commands, wherever a column must be specified. @@ -1839,13 +1870,24 @@ Specifies a text to be displayed inside the column title. Specifies a color, which should be used as foreground color to display the column title. +[opt_def [option -textlines] [arg count]] +Specifies the maximum number of lines of text to display in the column title. +If this value is zero, the number of lines displayed is determined by any newline +characters and the effects of wrapping when the column width is less than +needed. The default is 1. + [opt_def [option -textpadx] [arg amount]] +[arg Amount] specifies how much padding to +leave on the left and right side of the text. +[arg Amount] may be a list +of two values to specify padding for left and right separately; +it defaults to 6. + [opt_def [option -textpady] [arg amount]] [arg Amount] specifies how much padding to -leave on the left and right (for [option -textpadx]) -or top and bottom (for [option -textpady]) side of the text. +leave on the top and bottom of the text. [arg Amount] may be a list -of two values to specify padding for the two sides separately, +of two values to specify padding for top and bottom separately; it defaults to 0. [opt_def [option -visible] [arg boolean]] @@ -1903,7 +1945,7 @@ the descendants of the item are not displayed - the item is collapsed. For a new item this state is switched on. It can be modified by means of the widget commands -[cmd expand], [cmd collapse], or [cmd toggle]. +[cmd {item expand}], [cmd {item collapse}], or [cmd {item toggle}]. [lst_item [const selected]] This state is set for every item, which is included in the selection. @@ -1928,17 +1970,47 @@ which should be a non empty list of [arg stateDesc]s. The pattern matches, if for every element of the list the [arg stateDesc] describes the same state as the item currently has. +[section {PER-STATE OPTIONS}] + +The visual appearance of an item can change depending on the state the item +is in, such as being the active item, being included in the selection, being +collapsed, or some combination of those or other states. When a configuration +option is described as [const per-state], it means the option describes a +value which varies depending on the state of the item. If a per-state option is +specified as a single value, the value is used for all states. Otherwise +the per-state option must be specified as an even-numbered list. For example, +to use the font "Times 12 bold" in a [const text] element regardless of the +item state you can write: +[example_begin] +$T element configure MyTextElement -font {{Times 12 bold}} +[example_end] +However, to use a different font when the item is selected you could write: +[example_begin] +$T element configure MyTextElement -font {{Courier 10} selected {Times 12 bold} {}} +[example_end] +In the example above, the -font option reads "value stateList value stateList". +If [arg stateList] is an empty list, the preceding [arg value] is used regardless +of the item state. A non-empty stateList specifies a list of states which must be +set for the item in order to use the preceding value. Each stateList can also +include state names preceded by a ! sign, indicating the state must *not* be +set for the item. For example: +[example_begin] +$T element configure MyRectElement -fill {blue {selected focus} gray {selected !focus}} +[example_end] +In the example above, the [const rect] element is filled with blue when the treectrl +has the focus and the item is selected. If the treectrl does not have the focus, the +example specifies that gray should be used for selected items. Also note that if the +item is not selected, no color is specified for the -fill option. + [section ELEMENTS] -Elements are the smallest building block +Elements are the smallest building blocks which are handled by a treectrl widget. One or more elements together can be combined to a style, which can be considered as a blueprint for an item. -They can also be used to create an item directly -by means of the [cmd {item complex}] widget command. An element can be of type [const bitmap], [const border], [const image], -[const rect], or [const text]. -For each element type there is a section below describing all options -which can modify the behaviour of an element of this type. +[const rect], [const text] or [const window]. +For each element type there is a section below describing the options +which can modify an element of that type. [para] There are some options which can be configured to get different values @@ -1951,7 +2023,7 @@ For acceptable values of [arg statePattern] see the section [sectref STATES] above. The last [arg statePattern] can be empty, implementing a sort of [emph {otherwise clause}]. -The options with this behaviour are called [emph {per state options}]. +The options with this behaviour are called [emph {per-state options}]. [section {BITMAP ELEMENT}] An element of type [const bitmap] can be used to display a bitmap in an item. @@ -1959,15 +2031,15 @@ The following options are supported for bitmap elements: [list_begin opt] [opt_def [option -background] [arg color]] -Specifies as a per state option +Specifies as a per-state option the color to use for each of the bitmap's '0' valued pixels. [opt_def [option -bitmap] [arg bitmap]] -Specifies as a per state option +Specifies as a per-state option the bitmap to display in the element. [opt_def [option -foreground] [arg color]] -Specifies as a per state option +Specifies as a per-state option the color to use for each of the bitmap's '1' valued pixels. [list_end] @@ -1977,7 +2049,7 @@ The following options are supported for border elements: [list_begin opt] [opt_def [option -background] [arg color]] -Specifies as a per state option +Specifies as a per-state option the color to use for the background of the border. [opt_def [option -filled] [arg boolean]] @@ -1989,7 +2061,7 @@ background color of the tree is visible between the borders. Specifies the height of the area of the border. [opt_def [option -relief] [arg reliefList]] -Specifies as a per state option +Specifies as a per-state option relief of the border. For acceptable values see the description of the [option -relief] option in the [cmd options] manual page. @@ -2010,7 +2082,7 @@ The following options are supported for image elements: Specifies the height of the image. [opt_def [option -image] [arg image]] -Specifies as a per state option +Specifies as a per-state option the image to display in the element. [opt_def [option -width] [arg size]] @@ -2023,7 +2095,7 @@ The following options are supported for rectangle elements: [list_begin opt] [opt_def [option -fill] [arg fillColor]] -Specifies as a per state option +Specifies as a per-state option the color to be used to fill rectangle's area. [arg Color] may have any of the forms accepted by [fun Tk_GetColor]. If [arg color] is an empty string (the default), then @@ -2041,7 +2113,7 @@ will not be drawn. The default is the empty string, which causes the outline to be drawn completely. [opt_def [option -outline] [arg outlineColor]] -Specifies as a per state option +Specifies as a per-state option the color that should be used to draw the outline of the rectangle. [arg Color] may have any of the forms accepted by [fun Tk_GetColor]. If [arg color] is specified as an empty string (the default), @@ -2077,7 +2149,7 @@ Specifies the datatype which should be used to convert the value of the [const double], [const integer], [const long], [const string], or [const time]. [opt_def [option -fill] [arg color]] -Specifies as a per state option +Specifies as a per-state option the color to be used as foreground color of the text. [arg Color] may have any of the forms accepted by [fun Tk_GetColor]. If [arg color] is an empty string (the default), then @@ -2093,7 +2165,7 @@ for all other datatypes it should be a valid format element of the [cmd format] command. [opt_def [option -font] [arg fontName]] -Specifies as a per state option +Specifies as a per-state option the font to use for the text. [arg FontName] may be any string acceptable to [fun Tk_GetFont]. If this option isn't specified, it defaults to the font configured for @@ -2127,6 +2199,21 @@ text's area. Acceptable values are [const char] or [const word]. [list_end] +[section {WINDOW ELEMENT}] +An element of type [const window] can be used to display a Tk window in an item. +The following options are supported for window elements: + +[list_begin opt] +[opt_def [option -window] [arg pathName]] +Specifies the window to associate with this element. The window specified by +[arg pathName] must either be a child of the treectrl widget or a child of +some ancestor of the treectrl widget. [arg PathName] may not refer to a +top-level window. This option cannot be specified by +the [cmd {element create}] or [cmd {element configure}] commands, only by the +[cmd {item element configure}] command; i.e., the element must be associated +with a particular item. +[list_end] + [section {ITEM DESCRIPTION}] Many of the widget commands for a treectrl take as one argument an indicator of which item of the treectrl to operate on. These @@ -2294,6 +2381,12 @@ Generated after an item is expanded. [opt_def %I] The item id [list_end] +[lst_item [const ]] +Generated when items are about to be deleted by the [cmd {item delete}] command. +[list_begin opt] +[opt_def %i] List of items ids being deleted. +[list_end] + [lst_item [const ]] Generated whenever the view in the treectrl changes in such a way that a horizontal scrollbar should be redisplayed. diff --git a/doc/treectrl.n b/doc/treectrl.n index d3a3ad3..0ed1b33 100644 --- a/doc/treectrl.n +++ b/doc/treectrl.n @@ -6,14 +6,14 @@ '\" 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.28 2005/03/29 21:20:42 treectrl Exp $ +'\" $Id: treectrl.n,v 1.29 2005/05/11 03:31:33 treectrl Exp $ .so man.macros -.TH "treectrl" n 1.1 "Tk Commands" +.TH "treectrl" n 1.2 "Tk Commands" .BS .SH "NAME" treectrl \- Create and manipulate hierarchical multicolumn widgets .SH "SYNOPSIS" -package require \fBtreectrl 1.1\fR +package require \fBtreectrl 1.2\fR .sp \fBtreectrl\fR \fIpathName\fR ?\fIoptions\fR?\fR .sp @@ -384,6 +384,18 @@ for \fBvisindex\fR only the visible items are counted. .LP .nf .ta 6c +Command-Line Switch: \fB-buttonbitmap\fR +Database Name: \fBbuttonBitmap\fR +Database Class: \fBButtonBitmap\fR +.fi +.IP +Specifies the bitmap to be used as the expand/collapse button to the left of +an item. This is a per-state option (see \fBPER-STATE OPTIONS\fR). If +a bitmap is specified for a certain item state, it overrides the effects of +-usetheme. +.LP +.nf +.ta 6c Command-Line Switch: \fB-buttoncolor\fR Database Name: \fBbuttonColor\fR Database Class: \fBButtonColor\fR @@ -394,6 +406,18 @@ and the plus or minus sign of the button to the left of an item. .LP .nf .ta 6c +Command-Line Switch: \fB-buttonimage\fR +Database Name: \fBbuttonImage\fR +Database Class: \fBButtonImage\fR +.fi +.IP +Specifies the image to be used as the expand/collapse button to the left of +an item. This is a per-state option (see \fBPER-STATE OPTIONS\fR). +If an image is specified for a certain item state, it overrides the effects of +-buttonbitmap and -usetheme. +.LP +.nf +.ta 6c Command-Line Switch: \fB-buttonsize\fR Database Name: \fBbuttonSize\fR Database Class: \fBButtonSize\fR @@ -415,26 +439,6 @@ in any of the forms acceptable to \fBTk_GetPixels\fR. .LP .nf .ta 6c -Command-Line Switch: \fB-closedbuttonbitmap\fR -Database Name: \fBclosedButtonBitmap\fR -Database Class: \fBClosedButtonBitmap\fR -.fi -.IP -Specifies the bitmap to be used as the button to the left of a closed item -in any of the forms acceptable to \fBTk_GetPixels\fR. -.LP -.nf -.ta 6c -Command-Line Switch: \fB-closedbuttonimage\fR -Database Name: \fBclosedButtonImage\fR -Database Class: \fBClosedButtonImage\fR -.fi -.IP -Specifies the image to be used as the button to the left of a closed item -in any of the forms acceptable to \fBTk_GetImage\fR. -.LP -.nf -.ta 6c Command-Line Switch: \fB-columnproxy\fR Database Name: \fBcolumnProxy\fR Database Class: \fBColumnProxy\fR @@ -515,10 +519,11 @@ Database Class: \fBItemHeight\fR .fi .IP Specifies a fixed height for every item -in any of the forms acceptable to \fBTk_GetPixels\fR. +in any of the forms acceptable to \fBTk_GetPixels\fR. If non-zero, this +option overrides the requested height of an item and the -minitemheight option. The default is 0, which means that every item has the height requested by the arrangement of elements -in each column. +in each column. Items are never shorter than the maximum height of a button. .LP .nf .ta 6c @@ -552,23 +557,17 @@ in any of the forms acceptable to \fBTk_GetPixels\fR. .LP .nf .ta 6c -Command-Line Switch: \fB-openbuttonbitmap\fR -Database Name: \fBopenButtonBitmap\fR -Database Class: \fBOpenButtonBitmap\fR +Command-Line Switch: \fB-minitemheight\fR +Database Name: \fBminItemHeight\fR +Database Class: \fBMinItemHeight\fR .fi .IP -Specifies the bitmap to be used as the button to the left of an opened item -in any of the forms acceptable to \fBTk_GetBitmap\fR. -.LP -.nf -.ta 6c -Command-Line Switch: \fB-openbuttonimage\fR -Database Name: \fBopenButtonImage\fR -Database Class: \fBOpenButtonImage\fR -.fi -.IP -Specifies the image to be used as the button to the left of an opened item -in any of the forms acceptable to \fBTk_GetImage\fR. +Specifies a minimum height for every item +in any of the forms acceptable to \fBTk_GetPixels\fR. +The default is 0, which means that +every item has the height requested by the arrangement of elements +in each column. This option has no effect if the -itemheight option is specified. +Items are never shorter than the maximum height of a button. .LP .nf .ta 6c @@ -678,6 +677,17 @@ Default is 0 meaning that the first column displays the tree. .LP .nf .ta 6c +Command-Line Switch: \fB-usetheme\fR +Database Name: \fBuseTheme\fR +Database Class: \fBUseTheme\fR +.fi +.IP +Specifies a boolean value that determines whether this widget should draw +parts of itself using a platform-specific theme manager. +The default is false. +.LP +.nf +.ta 6c Command-Line Switch: \fB-width\fR Database Name: \fBwidth\fR Database Class: \fBWidth\fR @@ -2125,8 +2135,11 @@ There is always one special column, the \fBtail\fR column, which fills all space to the right of the last ordinary column. This column has no number; it can only be specified by its tag \fBtail\fR, which cannot be modified. -It is explicitely mentioned for a widget command, -if its \fIcolumn\fR argument can also specify the tail column. +.PP +When a column configuration option is specified as \fBper-state\fR, the state +names are \fBnormal\fR, \fBactive\fR, \fBpressed\fR or \fBup\fR, i.e. +do not use item state names. See \fBPER-STATE OPTIONS\fR +for more info. .PP The following options are supported for columns: .TP @@ -2136,6 +2149,15 @@ to the right of the column title. \fIDirection\fR must have one of the values \fBnone\fR (the default), \fBup\fR, or \fBdown\fR. .TP +\fB\fB-arrowbitmap\fR\fR \fIbitmap\fR +Specifies as a per-state option the bitmap to use to draw the arrow if +this columns -arrow option is not \fBnone\fR. +.TP +\fB\fB-arrowimage\fR\fR \fIimage\fR +Specifies as a per-state option the image to use to draw the arrow if +this columns -arrow option is not \fBnone\fR. If an image is specified for +a certain state, it overrides the -arrowbitmap option. +.TP \fB\fB-arrowside\fR\fR \fIside\fR Indicates on which side an arrow should be drawn, if at all. \fISide\fR must be either \fBleft\fR or \fBright\fR (the default). @@ -2145,11 +2167,18 @@ Indicates onto which side an arrow should be packed, if there is more space available for drawing the arrow then needed. \fISide\fR must be either \fBleft\fR (the default) or \fBright\fR. .TP -\fB\fB-arrowpad\fR\fR \fIamount\fR +\fB\fB-arrowpadx\fR\fR \fIamount\fR \fIAmount\fR specifies how much padding to leave on the left and right side of the arrow. \fIAmount\fR may be a list -of two values to specify padding for left and right separately, +of two values to specify padding for left and right separately; +it defaults to 6. +.TP +\fB\fB-arrowpady\fR\fR \fIamount\fR +\fIAmount\fR specifies how much padding to +leave on the top and bottom of the arrow. +\fIAmount\fR may be a list +of two values to specify padding for top and bottom separately; it defaults to 0. .TP \fB\fB-bitmap\fR\fR \fIbitmap\fR @@ -2157,7 +2186,8 @@ Specifies the bitmap to display in the element to the left of the column title. .TP \fB\fB-background\fR\fR \fIcolor\fR -Specifies the color to use for the background of the column header. +Specifies as a per-state option the color to use for the background of the +column header. .TP \fB\fB-borderwidth\fR\fR \fIsize\fR Specifies a non-negative value indicating the width @@ -2185,13 +2215,17 @@ to the left of the column title. This option overrides the \fB-bitmap\fR column option. .TP \fB\fB-imagepadx\fR\fR \fIamount\fR +\fIAmount\fR specifies how much padding to +leave on the left and right side of the image. +\fIAmount\fR may be a list +of two values to specify padding for left and right separately; +it defaults to 6. .TP \fB\fB-imagepady\fR\fR \fIamount\fR \fIAmount\fR specifies how much padding to -leave on the left and right (for \fB-imagepadx\fR) -or top and bottom (for \fB-imagepady\fR) side of the image. +leave on the top and bottom of the image. \fIAmount\fR may be a list -of two values to specify padding for the two sides separately, +of two values to specify padding for top and bottom separately; it defaults to 0. .TP \fB\fB-itembackground\fR\fR \fIcolorList\fR @@ -2207,12 +2241,6 @@ Must be one of \fBleft\fR (the default), \fBcenter\fR, or \fBright\fR. Specifies the minimum size, in screen units, that will be permitted for this column. .TP -\fB\fB-relief\fR\fR \fIrelief\fR -Specifies the 3-D effect desired for the column header containing the title. -Acceptable values are the typical relief values, -but the value seems to be ignored anyway; -better use the \fB-sunken\fR column option instead. -.TP \fB\fB-squeeze\fR\fR \fIboolean\fR Specifies a boolean value that indicates whether or not the column should shrink when the content width of the treectrl is less than the total needed width @@ -2221,16 +2249,17 @@ smaller than its needed width. The column will not get smaller than the value of its \fB-minwidth\fR option, if specified. This option has no effect if the \fB-width\fR option is set. .TP +\fB\fB-state\fR\fR \fIstate\fR +Specifies one of three states for the column header: \fBnormal\fR, \fBactive\fR, +or \fBpressed\fR. The active state is used when the mouse is over the header. +The pressed state is used when the mouse button is pressed in the header. +.TP \fB\fB-stepwidth\fR\fR \fIsize\fR Specifies a sort of tabbed alignment for columns that displays more than one item next to each other (typically in a treectrl widget with horizontal orientation). Every item will get an x-coordinate which is a multiple of \fIsize\fR. .TP -\fB\fB-sunken\fR\fR \fIboolean\fR -Indicates whether or not the column header containing the column title -will be displayed with a sunken relief. -.TP \fB\fB-tag\fR\fR \fItag\fR Defines a unique name for the columns which can be used in subsequent calls of the treectrl widget commands, wherever a column must be specified. @@ -2242,14 +2271,24 @@ Specifies a text to be displayed inside the column title. Specifies a color, which should be used as foreground color to display the column title. .TP +\fB\fB-textlines\fR\fR \fIcount\fR +Specifies the maximum number of lines of text to display in the column title. +If this value is zero, the number of lines displayed is determined by any newline +characters and the effects of wrapping when the column width is less than +needed. The default is 1. +.TP \fB\fB-textpadx\fR\fR \fIamount\fR +\fIAmount\fR specifies how much padding to +leave on the left and right side of the text. +\fIAmount\fR may be a list +of two values to specify padding for left and right separately; +it defaults to 6. .TP \fB\fB-textpady\fR\fR \fIamount\fR \fIAmount\fR specifies how much padding to -leave on the left and right (for \fB-textpadx\fR) -or top and bottom (for \fB-textpady\fR) side of the text. +leave on the top and bottom of the text. \fIAmount\fR may be a list -of two values to specify padding for the two sides separately, +of two values to specify padding for top and bottom separately; it defaults to 0. .TP \fB\fB-visible\fR\fR \fIboolean\fR @@ -2303,7 +2342,7 @@ the descendants of the item are not displayed - the item is collapsed. For a new item this state is switched on. It can be modified by means of the widget commands -\fBexpand\fR, \fBcollapse\fR, or \fBtoggle\fR. +\fBitem expand\fR, \fBitem collapse\fR, or \fBitem toggle\fR. .TP \fBselected\fR This state is set for every item, which is included in the selection. @@ -2323,17 +2362,45 @@ Some widget commands expect a \fIstatePattern\fR argument, which should be a non empty list of \fIstateDesc\fRs. The pattern matches, if for every element of the list the \fIstateDesc\fR describes the same state as the item currently has. +.SH "PER-STATE OPTIONS" +The visual appearance of an item can change depending on the state the item +is in, such as being the active item, being included in the selection, being +collapsed, or some combination of those or other states. When a configuration +option is described as \fBper-state\fR, it means the option describes a +value which varies depending on the state of the item. If a per-state option is +specified as a single value, the value is used for all states. Otherwise +the per-state option must be specified as an even-numbered list. For example, +to use the font "Times 12 bold" in a \fBtext\fR element regardless of the +item state you can write: +.nf +$T element configure MyTextElement -font {{Times 12 bold}} +.fi +However, to use a different font when the item is selected you could write: +.nf +$T element configure MyTextElement -font {{Courier 10} selected {Times 12 bold} {}} +.fi +In the second example above the -font option reads "value stateList value stateList". +If \fIstateList\fR is an empty list, the preceding \fIvalue\fR is used regardless +of the item state. A non-empty stateList specifies a list of states which must be +set for the item in order to use the preceding value. Each stateList can also +include state names preceded by a ! sign, indicating the state must *not* be +set for the item. For example: +.nf +$T element configure MyRectElement -fill {blue {selected focus} gray {selected !focus}} +.fi +In the example above, the \fBrect\fR element is filled with blue when the treectrl +has the focus and the item is selected. If the treectrl does not have the focus, the +example specifies that gray should be used for selected items. Also note that if the +item is not selected, no color is specified for the -fill option. .SH "ELEMENTS" -Elements are the smallest building block +Elements are the smallest building blocks which are handled by a treectrl widget. One or more elements together can be combined to a style, which can be considered as a blueprint for an item. -They can also be used to create an item directly -by means of the \fBitem complex\fR widget command. An element can be of type \fBbitmap\fR, \fBborder\fR, \fBimage\fR, -\fBrect\fR, or \fBtext\fR. -For each element type there is a section below describing all options -which can modify the behaviour of an element of this type. +\fBrect\fR, \fBtext\fR or \fBwindow\fR. +For each element type there is a section below describing the options +which can modify an element of that type. .PP There are some options which can be configured to get different values dependent on the state of the item in which their element is included. @@ -2345,28 +2412,28 @@ For acceptable values of \fIstatePattern\fR see the section \fBSTATES\fR above. The last \fIstatePattern\fR can be empty, implementing a sort of \fIotherwise clause\fR. -The options with this behaviour are called \fIper state options\fR. +The options with this behaviour are called \fIper-state options\fR. .SH "BITMAP ELEMENT" An element of type \fBbitmap\fR can be used to display a bitmap in an item. The following options are supported for bitmap elements: .TP \fB\fB-background\fR\fR \fIcolor\fR -Specifies as a per state option +Specifies as a per-state option the color to use for each of the bitmap's '0' valued pixels. .TP \fB\fB-bitmap\fR\fR \fIbitmap\fR -Specifies as a per state option +Specifies as a per-state option the bitmap to display in the element. .TP \fB\fB-foreground\fR\fR \fIcolor\fR -Specifies as a per state option +Specifies as a per-state option the color to use for each of the bitmap's '1' valued pixels. .SH "BORDER ELEMENT" An element of type \fBborder\fR can be used to add a border to an item. The following options are supported for border elements: .TP \fB\fB-background\fR\fR \fIcolor\fR -Specifies as a per state option +Specifies as a per-state option the color to use for the background of the border. .TP \fB\fB-filled\fR\fR \fIboolean\fR @@ -2378,7 +2445,7 @@ background color of the tree is visible between the borders. Specifies the height of the area of the border. .TP \fB\fB-relief\fR\fR \fIreliefList\fR -Specifies as a per state option +Specifies as a per-state option relief of the border. For acceptable values see the description of the \fB-relief\fR option in the \fBoptions\fR manual page. @@ -2396,7 +2463,7 @@ The following options are supported for image elements: Specifies the height of the image. .TP \fB\fB-image\fR\fR \fIimage\fR -Specifies as a per state option +Specifies as a per-state option the image to display in the element. .TP \fB\fB-width\fR\fR \fIsize\fR @@ -2406,7 +2473,7 @@ An element of type \fBrect\fR can be used to display a rectangle in an item. The following options are supported for rectangle elements: .TP \fB\fB-fill\fR\fR \fIfillColor\fR -Specifies as a per state option +Specifies as a per-state option the color to be used to fill rectangle's area. \fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR is an empty string (the default), then @@ -2424,7 +2491,7 @@ will not be drawn. The default is the empty string, which causes the outline to be drawn completely. .TP \fB\fB-outline\fR\fR \fIoutlineColor\fR -Specifies as a per state option +Specifies as a per-state option the color that should be used to draw the outline of the rectangle. \fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR is specified as an empty string (the default), @@ -2457,7 +2524,7 @@ Specifies the datatype which should be used to convert the value of the \fBdouble\fR, \fBinteger\fR, \fBlong\fR, \fBstring\fR, or \fBtime\fR. .TP \fB\fB-fill\fR\fR \fIcolor\fR -Specifies as a per state option +Specifies as a per-state option the color to be used as foreground color of the text. \fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR is an empty string (the default), then @@ -2473,7 +2540,7 @@ for all other datatypes it should be a valid format element of the \fBformat\fR command. .TP \fB\fB-font\fR\fR \fIfontName\fR -Specifies as a per state option +Specifies as a per-state option the font to use for the text. \fIFontName\fR may be any string acceptable to \fBTk_GetFont\fR. If this option isn't specified, it defaults to the font configured for @@ -2505,6 +2572,18 @@ Specifies the width of the area of the text. \fIMode\fR specifies how to handle lines that are wider than the text's area. Acceptable values are \fBchar\fR or \fBword\fR. +.SH "WINDOW ELEMENT" +An element of type \fBwindow\fR can be used to display a Tk window in an item. +The following options are supported for window elements: +.TP +\fB\fB-window\fR\fR \fIpathName\fR +Specifies the window to associate with this element. The window specified by +\fIpathName\fR must either be a child of the treectrl widget or a child of +some ancestor of the treectrl widget. \fIPathName\fR may not refer to a +top-level window. This option cannot be specified by +the \fBelement create\fR or \fBelement configure\fR commands, only by the +\fBitem element configure\fR command; i.e., the element must be associated +with a particular item. .SH "ITEM DESCRIPTION" Many of the widget commands for a treectrl take as one argument an indicator of which item of the treectrl to operate on. These @@ -2674,6 +2753,13 @@ Generated after an item is expanded. \fB%I\fR The item id .RE .TP +\fB\fR +Generated when items are about to be deleted by the \fBitem delete\fR command. +.RS +.TP +\fB%i\fR List of items ids being deleted. +.RE +.TP \fB\fR Generated whenever the view in the treectrl changes in such a way that a horizontal scrollbar should be redisplayed. -- cgit v0.12