summaryrefslogtreecommitdiffstats
path: root/generic/tkTreeItem.c
Commit message (Collapse)AuthorAgeFilesLines
* Add info to the stack trace about which item/column was involved when ↵treectrl2006-12-061-1/+7
| | | | getting sort data failed.
* The index argument to the item description modifiers "child" and "sibling" ↵treectrl2006-12-021-104/+184
| | | | | | | | | | may now be of the form "end?-offset?". Redraw parent when children are added or removed and the parent has "-button auto". Use the new column option -itemjustify to align styles. If a second item-description argument to an [item] subcommand refers to multiple items, then make sure they all meet the AF_xxx criteria. No commands were affected by the old behaviour of checking only the first item. Added AF_NOT_DELETED flag to check for deleted items. Misc code cleanup.
* The item option -button may now be "auto" in which case a button is drawn ↵treectrl2006-11-301-27/+60
| | | | only when the item has a child whose -visible option is true.
* Fix potential segfaults when a display update is requested in the middle of ↵treectrl2006-11-251-1/+7
| | | | drawing items.
* Comment added.treectrl2006-11-221-2/+2
|
* Fixed display bugs with TreeItem_WalkSpans; some style routines were ↵treectrl2006-11-191-32/+46
| | | | | | changing the StyleDrawArgs argument. Replaced the hasButton and isVisible integer boolean options with a single bit each in the flags field by using a custom option.
* Added 2 optional arguments to [selection get] to perform lindex- and ↵treectrl2006-11-191-1/+43
| | | | lrange-like operations on the sorted list of selected items.
* Added an optional arg to [item count] to return the number of items matching ↵treectrl2006-11-181-26/+9
| | | | an item description. This replaces the -visible option added earlier.
* Use Tcl_GetIndexFromObjStruct to avoid having to update 2 lists when ↵treectrl2006-11-181-95/+52
| | | | changing the item commands. Also put the item commands in alphabetical order.
* Avoid creating an empty list object in the [item ancestors] command.treectrl2006-11-151-1/+3
|
* Fixed bug with TreeItem_UpdateWindowPositions not stopping on the right edge ↵treectrl2006-11-101-3/+3
| | | | | | of the visible area (was using the bottom edge by mistake). Make TreeItem_Identify2 stop checking spans that are past the right edge of the area being hit-tested.
* Moved checks of tree->updateIndex into Tree_UpdateItemIndex.treectrl2006-11-091-24/+24
| | | | | Fixed [item bbox] not working when the widget was not mapped. Fixed [item bbox] not returning an error if the element name was invalid.
* Removed hundreds of type-casts and pointer copies.treectrl2006-11-081-538/+456
|
* Code cleanup and comments added.treectrl2006-11-081-68/+124
|
* Changed [item bbox] to respect spans.treectrl2006-11-071-4/+110
|
* Remove COLUMN_LOCK-related code.treectrl2006-11-071-90/+8
|
* Remove COLUMN_SPAN-related code.treectrl2006-11-071-290/+43
|
* Remove NEW_SPAN_CODE-related code.treectrl2006-11-071-54/+7
|
* Keep an array of column indexes for each item that has at least one span > ↵treectrl2006-11-061-13/+276
| | | | | | 1. This is to avoid constantly recalculating the list of spans for displayed items. The list of spans is recalculated whenever [item span] changes a span, or whenever a column is created/deleted/moved or has its -lock or -visible option changed. TreeItem_OnScreen disabled since the display code tracks each column's visibility.
* Fixed item background colors not drawing over the whole item in some cases.treectrl2006-11-061-12/+20
|
* Chopped out WALK_SPANS unused code.treectrl2006-11-061-454/+1
|
* Added a routine to walk over each span of an item and call a callback ↵treectrl2006-11-061-77/+536
| | | | routine. This is used for drawing, updating window positions, and hit-testing. Previously the same complicated code for walking over spans was used in each case.
* Deprecated the treectrl option -defaultstyle.treectrl2006-11-031-1/+16
| | | | Added column option -itemstyle (replaces -defaultstyle).
* Changed handling of deleted items (again) so that the item is removed from ↵treectrl2006-10-301-27/+91
| | | | the heirarchy of known items but the record is not freed until it is not in use.
* Qualifiers may now be the first part of an item description. This has the ↵treectrl2006-10-291-149/+150
| | | | | | | | | same effect as "all" followed by qualifiers. Removed "tag" keyword because of this. New qualifier "depth" allowed in item descriptions. Qualifier "nearest x y" takes pixel x/y args instead of plain integers. Renamed ISROOT to IS_ROOT to agree with other macros like the new IS_ALL macro. COLUMN_FOR_EACH no longer iterates over the tail column if the tail is not allowed. This fixed a crash with [style map] and removed the need to check for the tail column in some commands.
* Deprecated commands and options are wrapped inside #ifdef DEPRECATED.treectrl2006-10-281-3/+23
|
* Don't allocate an item-column if setting its style to NULL.treectrl2006-10-261-4/+6
|
* AllocHax_xxx takes a Tk_Uid arg for gathering stats on memory allocations.treectrl2006-10-161-20/+29
| | | | TreeItem_UpdateWindowPositions only considers columns that are onscreen; this is possible because of the changes in tkTreeStyle.c.
* Remove rowlabels.treectrl2006-10-141-25/+1
|
* Renamed TreeItemList_ItemN to TreeItemList_Nth.treectrl2006-10-141-340/+458
| | | | | | | | | Added IFO_LIST_ALL flag and renamed other IFO_xxx flags. Moved ItemForEach delcarations to tkTreeCtrl.h. Added TreeItem_GetSpans so display code can invalidate columns properly. Use Tree_AreaBbox for getting the bounds when displaying window elements. Fixed [item element], [item style], [item configure] and [item enabled] commands using an arbitrary item if multiple items were specified but forbidden. Rewrote [item element configure], [item image], [item span], [item state forcolumn], [item style map], [item style set] and [item text] to use multi-column column descriptions.
* Added column option -lock.treectrl2006-10-111-52/+193
| | | | Tree_InvalidateItemDInfo and Tree_InvalidateColumnWidth now take a TreeColumn arg.
* Changed TagInfo_xxx to accept a TreeCtrl arg.treectrl2006-10-051-7/+7
|
* Moved ItemTags and TagExpr stuff to tkTreeCtrl.h and tkTreeUtils.c.treectrl2006-10-041-1062/+406
| | | | | | | | Added -tags option to items. Renamed [tag] to [item tag]. Removed unused fields from Item and Column to save a bit of memory. Cleaned up TreeItemList_FromObj a bit. Allow tag expressions to be the first part of an item description without using the "tag" keyword. Rename TreeForEach stuff to ItemForEach.
* Rewrote TreeItem_UpdateWindowPositions to respect column spans (code is ↵treectrl2006-09-271-1/+71
| | | | mostly the same as TreeItem_Draw).
* Added [tag] command.treectrl2006-09-241-67/+1159
| | | | | | | | | | Added [item descendants] command. Added "descendants" modifier to item descriptions. Added -tags option to [item create]. TagExpr_xxx routines added for evaluating tag expressions. Code was lifted from theTk Canvas. Created a struct for holding info about qualifiers in item descriptions and added a new qualifiers"tag" and "!visible". Allow keyword "tag" to be the first word in an item description. "all" may now be followed by qualifiers in item descriptions.
* Use new Tree_StateFromListObj for getting state flags from a list object.treectrl2006-09-221-410/+665
| | | | | | | | | | | | | | | Added TreeForEach_xxx to make iterating over item-list arguments easier. Fix TreeItem_ListDescendants; it was appending the given item and skipping the last descendant. Rewrote the following commands to accept multi-item item descriptions: item element configure item image item style map item style set item state forcolumn item state set item remove item span item text
* Added Item.flags field for handling deleted items.treectrl2006-09-211-476/+605
| | | | | | | | | | | | | | | TreeItem_FromObj renamed to TreeItemList_FromObj. TreeItemList_FromObj: added "list", "range", "ancestors" and "children" keywords for matching multiple items. Added TreeItem_FirstAndLast, TreeItem_ListDescendants. [item create]: fixed bug where -nextsibling and -prevsibling options could specify an orphan item. Tree_DeselectHidden rewritten to use TreeItemList. TreeItemCmd: Use TreeItemList_FromObj to get lists of items to operate on instead of single items. [item expand], [item collapse], [item toggle]: Only operate on items which exist when the command is called, not any that might get created by <Expand> or <Collapse> binding scripts. Handle item descriptions that refer to multiple items. [item compare]: removed 2nd-arg code since argInfo[] was changed to handle an extra argument. [item configure]: Handle item descriptions that refer to multiple items. [item delete]: Handle item descriptions that refer to multiple items. Use TreeCtrl.preserveItemList to hold deleted items until any nested calls complete. [item enabled]: Handle item descriptions that refer to multiple items. [item id]: Handle item descriptions that refer to multiple items. Return a list of item ids instead of only one.
* Generalized how the "visible" qualifier in item descriptions is handled, and ↵treectrl2006-09-161-133/+265
| | | | | | | | added a new qualifier "state xxx". The "state" qualifier filters out items which do not match a given list of states. Added [item enabled] command to set/get the "enabled" state of an item. Define TreeItem_GetEnabled. Fix typo in comment.
* Removed unused code.treectrl2006-09-081-52/+20
| | | | Added -visible option to [item count].
* Bumped copyright to 2006.treectrl2006-09-051-2/+2
|
* * generic/tkTreeDisplay.c (Tree_Display): Allow Tree_DeselectHiddenhobbs22006-08-161-14/+20
| | | | | | | * generic/tkTreeItem.c (Item_Configure): to be deferred to next * generic/tkTreeCtrl.h: redraw by calling Tree_DInfoChanged(tree, DINFO_REDO_SELECTION). Significantly improves performance of multiple item visibility changes.
* * generic/tkTreeItem.c (Item_Configure): on checking for -visible,hobbs22006-08-151-2/+3
| | | | verify that the value actually changed, because it can be expensive.
* Did some work on better distributing space when a style spans multiple ↵treectrl2006-07-111-50/+232
| | | | | | | | | | columns. Not used yet. Renamed SortData.count to columnCount for readability. Reformatted some function headers. CompareProc: identity test to save work. find_pivot: bug fix. ItemSortCmd: fix memory leak with -command option.
* Fix a comment typo.treectrl2005-09-281-2/+2
|
* Comment function arguments.treectrl2005-09-161-124/+531
|
* Add Tcl block comments above each function.treectrl2005-09-151-162/+1510
|
* Changed TreeItem_RemoveColumn to delete a range of columns. This is to ↵treectrl2005-09-071-15/+16
| | | | support the updated [column delete] command.
* Eliminate "type-punned pointer" warnings from GCC.treectrl2005-07-231-21/+39
|
* Added offset args to Tree_DrawTiledImage so image element can use it.treectrl2005-07-161-2/+8
| | | | Redo ranges when an item's -height option changes.
* Added [item element perstate] alias to deprecate [item element actual].treectrl2005-07-121-25/+63
| | | | Added [item image] command.