From eed0eb6a476d54ce19aeff137984aa981d9e3976 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 15 Jun 2010 00:59:57 -0700 Subject: Upgrading to iup 3.1 --- iup/src/iup_tree.h | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'iup/src/iup_tree.h') diff --git a/iup/src/iup_tree.h b/iup/src/iup_tree.h index f96a698..44acc83 100755 --- a/iup/src/iup_tree.h +++ b/iup/src/iup_tree.h @@ -29,6 +29,36 @@ void iupdrvTreeUpdateMarkMode(Ihandle *ih); char* iupTreeGetSpacingAttrib(Ihandle* ih); +#if defined(GTK_MAJOR_VERSION) +typedef void InodeHandle; +#elif defined(XmVERSION) +typedef struct _WidgetRec InodeHandle; +#elif defined(WINVER) +typedef struct _TREEITEM InodeHandle; +#else +typedef struct _InodeData InodeHandle; +#endif + +typedef struct _InodeData +{ + InodeHandle* node_handle; + void* userdata; +} InodeData; + +typedef int (*iupTreeNodeFunc)(Ihandle* ih, InodeHandle* node_handle, int id, void* userdata); +int iupTreeForEach(Ihandle* ih, iupTreeNodeFunc func, void* userdata); +InodeHandle* iupTreeGetNode(Ihandle* ih, int id); +InodeHandle* iupTreeGetNodeFromString(Ihandle* ih, const char* name_id); +int iupTreeFindNodeId(Ihandle* ih, InodeHandle* node_handle); + +InodeHandle* iupdrvTreeGetFocusNode(Ihandle* ih); +int iupdrvTreeTotalChildCount(Ihandle* ih, InodeHandle* node_handle); +void iupTreeSelectLastCollapsedBranch(Ihandle* ih, int *last_id); + +void iupTreeDelFromCache(Ihandle* ih, int id, int count); +void iupTreeAddToCache(Ihandle* ih, int add, int kindPrev, InodeHandle* prevNode, InodeHandle* node_handle); +void iupTreeCopyMoveCache(Ihandle* ih, int id_src, int id_dst, int count, int is_copy); + /* Structure of the tree */ struct _IcontrolData { @@ -36,6 +66,7 @@ struct _IcontrolData add_expanded, show_dragdrop, show_rename, + stamp, /* GTK only */ spacing; void* def_image_leaf; /* Default image leaf */ @@ -44,9 +75,10 @@ struct _IcontrolData void* def_image_leaf_mask; /* Motif Only */ void* def_image_collapsed_mask; - void* def_image_expanded_mask; + void* def_image_expanded_mask; - int id_control; /* auxiliary variable for computing or finding the id of a node */ + InodeData *node_cache; + int node_cache_max, node_count; }; -- cgit v1.2.3