Temporary fix suggested by Ulrich to allow the
[wine.git] / include / treeview.h
bloba2d98f86df083e31cea4ec8fd77097344b4a25c7
1 /*
2 * Treeview class extra info
4 * Copyright 1998 Eric Kohl
5 * Copyright 1998 Alex Priem
6 */
8 #ifndef __WINE_TREEVIEW_H
9 #define __WINE_TREEVIEW_H
11 #define MINIMUM_INDENT 10
12 #define TV_REFRESH_DELAY 100 /* 100 ms delay between two refreshes */
13 #define TV_DEFAULTITEMHEIGHT 16
14 #define TVITEM_ALLOC 16 /* default nr of items to allocate at first try */
17 /* internal structures */
19 typedef struct {
20 UINT32 mask;
21 HTREEITEM hItem;
22 UINT32 state;
23 UINT32 stateMask;
24 LPSTR pszText;
25 int cchTextMax;
26 int iImage;
27 int iSelectedImage;
28 int cChildren;
29 LPARAM lParam;
30 int iIntegral;
31 int iLevel; /* indentation level:0=root level */
32 COLORREF clrText;
34 HTREEITEM parent; /* handle to parent or 0 if at root*/
35 HTREEITEM firstChild; /* handle to first child or 0 if no child*/
36 HTREEITEM sibling; /* handle to next item in list, 0 if last */
37 HTREEITEM upsibling; /* handle to previous item in list, 0 if first */
38 int visible;
39 RECT32 rect;
40 RECT32 text;
41 } TREEVIEW_ITEM;
45 typedef struct tagTREEVIEW_INFO
47 UINT32 uInternalStatus;
48 UINT32 bAutoSize; /* merge with uInternalStatus */
49 INT32 Timer;
50 UINT32 uNumItems; /* number of valid TREEVIEW_ITEMs */
51 UINT32 uNumPtrsAlloced;
52 HTREEITEM uMaxHandle; /* needed for delete_item */
53 HTREEITEM TopRootItem; /* handle to first item in treeview */
54 INT32 cdmode; /* last custom draw setting */
56 UINT32 uItemHeight; /* item height, -1 for default item height */
57 UINT32 uRealItemHeight; /* current item height in pixels */
58 UINT32 uVisibleHeight; /* visible height of treeview in pixels */
59 UINT32 uTotalHeight; /* total height of treeview in pixels */
60 UINT32 uVisibleWidth;
61 UINT32 uTotalWidth;
62 UINT32 uIndent; /* indentation in pixels */
63 HTREEITEM selectedItem; /* handle to selected item or 0 if none */
64 HTREEITEM focusItem; /* handle to item that has focus, 0 if none */
65 HTREEITEM hotItem; /* handle currently under cursor, 0 if none */
66 HTREEITEM editItem; /* handle to item currently editted, 0 if none */
67 HTREEITEM firstVisible; /* handle to first visible item */
68 HTREEITEM dropItem; /* handle to item selected by drag cursor */
69 HIMAGELIST dragList; /* Bitmap of dragged item */
70 INT32 cx,cy; /* current x/y place in list */
71 COLORREF clrBk;
72 COLORREF clrText;
73 HFONT32 hFont;
74 HFONT32 hBoldFont;
75 HWND32 hwndToolTip;
76 HWND32 hwndEdit;
77 WNDPROC32 wpEditOrig; /* needed for subclassing edit control */
79 HIMAGELIST himlNormal;
80 HIMAGELIST himlState;
81 TREEVIEW_ITEM *items; /* itemlist */
82 INT32 *freeList; /* bitmap indicating which elements are valid */
83 /* 1=valid, 0=free; */
84 /* size of list= uNumPtrsAlloced/32 */
86 } TREEVIEW_INFO;
90 /* bitflags for infoPtr->uInternalStatus */
92 #define TV_HSCROLL 0x01 /* treeview too large to fit in window */
93 #define TV_VSCROLL 0x02 /* (horizontal/vertical) */
94 #define TV_LDRAG 0x04 /* Lbutton pushed to start drag */
95 #define TV_LDRAGGING 0x08 /* Lbutton pushed, mouse moved. */
96 #define TV_RDRAG 0x10 /* dito Rbutton */
97 #define TV_RDRAGGING 0x20
99 /* bitflags for infoPtr->timer */
101 #define TV_REFRESH_TIMER 1
102 #define TV_EDIT_TIMER 2
103 #define TV_REFRESH_TIMER_SET 1
104 #define TV_EDIT_TIMER_SET 2
107 extern VOID TREEVIEW_Register (VOID);
108 extern VOID TREEVIEW_Unregister (VOID);
110 #endif /* __WINE_TREEVIEW_H */