Added macros to header file for easier function calling.
[wine/multimedia.git] / include / treeview.h
blob68b9c28e231b4c6ae296a9bc1b2af44d222847c8
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
14 #define TVITEM_ALLOC 16
15 #define TV_REFRESH_TIMER 1
16 #define TV_EDIT_TIMER 2
17 #define TV_REFRESH_TIMER_SET 1
18 #define TV_EDIT_TIMER_SET 2
19 #define TV_REFRESH_DELAY 100 /* 100 ms delay between two refreshes */
20 #define TV_DEFAULTITEMHEIGHT 15
22 /* internal structures */
24 typedef struct {
25 UINT32 mask;
26 HTREEITEM hItem;
27 UINT32 state;
28 UINT32 stateMask;
29 LPSTR pszText;
30 int cchTextMax;
31 int iImage;
32 int iSelectedImage;
33 int cChildren;
34 LPARAM lParam;
35 int iIntegral;
36 int clrText;
38 int parent; /* handle to parent or 0 if at root*/
39 int firstChild; /* handle to first child or 0 if no child*/
40 int sibling; /* handle to next item in list, 0 if last */
41 int upsibling; /* handle to previous item in list, 0 if first */
42 int visible;
43 RECT32 rect;
44 RECT32 text;
45 } TREEVIEW_ITEM;
48 #define TV_HSCROLL 0x01 /* treeview too large to fit in window */
49 #define TV_VSCROLL 0x02 /* (horizontal/vertical) */
51 typedef struct tagTREEVIEW_INFO
53 UINT32 uInternalStatus;
54 INT32 Timer;
55 UINT32 uNumItems; /* number of valid TREEVIEW_ITEMs */
56 UINT32 uNumPtrsAlloced;
57 UINT32 uMaxHandle; /* needed for delete_item */
58 HTREEITEM TopRootItem; /* handle to first item in treeview */
60 UINT32 uItemHeight; /* item height, -1 for default item height */
61 UINT32 uRealItemHeight; /* real item height in pixels */
62 UINT32 uVisibleHeight; /* visible height of treeview in pixels */
63 UINT32 uTotalHeight; /* total height of treeview in pixels */
64 UINT32 uIndent; /* indentation in pixels */
65 HTREEITEM selectedItem; /* handle to selected item or 0 if none */
66 HTREEITEM firstVisible; /* handle to first visible item */
67 HTREEITEM dropItem; /* handle to item selected by drag cursor */
68 INT32 cx,cy; /* current x/y place in list */
69 COLORREF clrBk;
70 COLORREF clrText;
71 HFONT32 hFont;
72 HWND32 hwndToolTip;
74 HIMAGELIST himlNormal;
75 HIMAGELIST himlState;
76 TREEVIEW_ITEM *items; /* itemlist */
77 INT32 *freeList; /* bitmap indicating which elements are valid */
78 /* 1=valid, 0=free; */
79 /* size of list= uNumPtrsAlloced/32 */
81 } TREEVIEW_INFO;
84 extern VOID TREEVIEW_Register (VOID);
85 extern VOID TREEVIEW_Unregister (VOID);
87 #endif /* __WINE_TREEVIEW_H */