2 * Treeview class extra info
4 * Copyright 1998 Eric Kohl
5 * Copyright 1998 Alex Priem
8 #ifndef __WINE_TREEVIEW_H
9 #define __WINE_TREEVIEW_H
13 #define MINIMUM_INDENT 10
14 #define TV_REFRESH_DELAY 100 /* 100 ms delay between two refreshes */
15 #define TV_DEFAULTITEMHEIGHT 16
16 #define TVITEM_ALLOC 16 /* default nr of items to allocate at first try */
19 /* internal structures */
33 int iLevel
; /* indentation level:0=root level */
35 HTREEITEM parent
; /* handle to parent or 0 if at root*/
36 HTREEITEM firstChild
; /* handle to first child or 0 if no child*/
37 HTREEITEM sibling
; /* handle to next item in list, 0 if last */
38 HTREEITEM upsibling
; /* handle to previous item in list, 0 if first */
42 RECT expandBox
; /* expand box (+/-) coordinate */
48 typedef struct tagTREEVIEW_INFO
51 UINT bAutoSize
; /* merge with uInternalStatus */
53 UINT uNumItems
; /* number of valid TREEVIEW_ITEMs */
55 HTREEITEM uMaxHandle
; /* needed for delete_item */
56 HTREEITEM TopRootItem
; /* handle to first item in treeview */
57 INT cdmode
; /* last custom draw setting */
58 UINT uScrollTime
; /* max. time for scrolling in milliseconds*/
59 UINT uItemHeight
; /* item height, -1 for default item height */
60 UINT uRealItemHeight
;/* current item height in pixels */
61 UINT uVisibleHeight
; /* visible height of treeview in pixels */
62 UINT uTotalHeight
; /* total height of treeview in pixels */
65 UINT uIndent
; /* indentation in pixels */
66 HTREEITEM selectedItem
; /* handle to selected item or 0 if none */
67 HTREEITEM focusItem
; /* handle to item that has focus, 0 if none */
68 HTREEITEM hotItem
; /* handle currently under cursor, 0 if none */
69 HTREEITEM editItem
; /* handle to item currently editted, 0 if none */
70 HTREEITEM firstVisible
; /* handle to first visible item */
71 HTREEITEM dropItem
; /* handle to item selected by drag cursor */
72 HTREEITEM insertMarkItem
; /* item after which insertion mark is placed */
73 BOOL insertBeforeorAfter
; /* flag used by TVM_SETINSERTMARK */
74 HIMAGELIST dragList
; /* Bitmap of dragged item */
75 INT cx
,cy
; /* current x/y place in list */
79 COLORREF clrInsertMark
;
84 WNDPROC wpEditOrig
; /* needed for subclassing edit control */
85 HIMAGELIST himlNormal
;
87 LPTVSORTCB pCallBackSort
; /* ptr to TVSORTCB struct for callback sorting */
88 TREEVIEW_ITEM
*items
; /* itemlist */
89 INT
*freeList
; /* bitmap indicating which elements are valid */
90 /* 1=valid, 0=free; */
91 /* size of list= uNumPtrsAlloced/32 */
96 /* bitflags for infoPtr->uInternalStatus */
98 #define TV_HSCROLL 0x01 /* treeview too large to fit in window */
99 #define TV_VSCROLL 0x02 /* (horizontal/vertical) */
100 #define TV_LDRAG 0x04 /* Lbutton pushed to start drag */
101 #define TV_LDRAGGING 0x08 /* Lbutton pushed, mouse moved. */
102 #define TV_RDRAG 0x10 /* dito Rbutton */
103 #define TV_RDRAGGING 0x20
105 /* bitflags for infoPtr->timer */
107 #define TV_REFRESH_TIMER 1
108 #define TV_EDIT_TIMER 2
109 #define TV_REFRESH_TIMER_SET 1
110 #define TV_EDIT_TIMER_SET 2
113 extern VOID
TREEVIEW_Register (VOID
);
114 extern VOID
TREEVIEW_Unregister (VOID
);
116 #endif /* __WINE_TREEVIEW_H */