summaryrefslogtreecommitdiffstats
path: root/generic/tkTreeCtrl.h
diff options
context:
space:
mode:
authortreectrl <treectrl>2006-11-06 23:50:40 (GMT)
committertreectrl <treectrl>2006-11-06 23:50:40 (GMT)
commit54d698161e8c3419869ac3697ca70f5e7be5445a (patch)
treece8cbe7d13a30044664eaed4808db425f98159e8 /generic/tkTreeCtrl.h
parentf72db05c3ec2d73d00aecc2806bfe54053a82f09 (diff)
downloadtktreectrl-54d698161e8c3419869ac3697ca70f5e7be5445a.zip
tktreectrl-54d698161e8c3419869ac3697ca70f5e7be5445a.tar.gz
tktreectrl-54d698161e8c3419869ac3697ca70f5e7be5445a.tar.bz2
Keep an array of column indexes for each item that has at least one span > 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.
Declare DStringAppendf.
Diffstat (limited to 'generic/tkTreeCtrl.h')
-rw-r--r--generic/tkTreeCtrl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tkTreeCtrl.h b/generic/tkTreeCtrl.h
index 96b9c1b..aabceff 100644
--- a/generic/tkTreeCtrl.h
+++ b/generic/tkTreeCtrl.h
@@ -7,7 +7,7 @@
* Copyright (c) 2002-2003 Christian Krone
* Copyright (c) 2003 ActiveState Corporation
*
- * RCS: @(#) $Id: tkTreeCtrl.h,v 1.65 2006/11/06 01:48:42 treectrl Exp $
+ * RCS: @(#) $Id: tkTreeCtrl.h,v 1.66 2006/11/06 23:50:40 treectrl Exp $
*/
#include "tkPort.h"
@@ -38,6 +38,7 @@
#define COLUMN_SPAN
#define COLUMN_LOCK
#define DEPRECATED
+#define NEW_SPAN_CODE
typedef struct TreeCtrl TreeCtrl;
typedef struct TreeColumn_ *TreeColumn;
@@ -295,6 +296,9 @@ struct TreeCtrl
int nextItemId;
int nextColumnId;
Tcl_HashTable itemHash; /* TreeItem.id -> TreeItem */
+#ifdef NEW_SPAN_CODE
+ Tcl_HashTable itemSpansHash; /* TreeItem -> nothing */
+#endif
Tcl_HashTable elementHash; /* Element.name -> Element */
Tcl_HashTable styleHash; /* Style.name -> Style */
Tcl_HashTable imageNameHash; /* image name -> TreeImageRef */
@@ -463,6 +467,7 @@ extern TreeItem ItemForEach_Next(ItemForEach *iter);
item = ItemForEach_Next(iter))
extern void FormatResult(Tcl_Interp *interp, char *fmt, ...);
+extern void DStringAppendf(Tcl_DString *dString, char *fmt, ...);
extern void Tree_Debug(TreeCtrl *tree);
extern int TreeItem_Init(TreeCtrl *tree);
@@ -507,7 +512,12 @@ extern int TreeItem_Height(TreeCtrl *tree, TreeItem self);
extern int TreeItem_TotalHeight(TreeCtrl *tree, TreeItem self);
extern void TreeItem_InvalidateHeight(TreeCtrl *tree, TreeItem self);
#ifdef COLUMN_LOCK
+#ifdef NEW_SPAN_CODE
+extern void TreeItem_SpansInvalidate(TreeCtrl *tree, TreeItem item_);
+extern int *TreeItem_GetSpans(TreeCtrl *tree, TreeItem item_);
+#else
extern void TreeItem_GetSpans(TreeCtrl *tree, TreeItem item_, int *spans);
+#endif
extern void TreeItem_Draw(TreeCtrl *tree, TreeItem self, int lock, int x, int y, int width, int height, Drawable drawable, int minX, int maxX, int index);
#else
extern void TreeItem_Draw(TreeCtrl *tree, TreeItem self, int x, int y, int width, int height, Drawable drawable, int minX, int maxX, int index);