diff options
author | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
commit | eed0eb6a476d54ce19aeff137984aa981d9e3976 (patch) | |
tree | 807891636efd2f87dcbd261e971216269973ae07 /iup/src/iup_tree.h | |
parent | ccc8261e4d48de89da4ddfe7b55e378ae0cd6f47 (diff) |
Upgrading to iup 3.1
Diffstat (limited to 'iup/src/iup_tree.h')
-rwxr-xr-x | iup/src/iup_tree.h | 36 |
1 files changed, 34 insertions, 2 deletions
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; }; |