source: trunk/include/win/treeview.h@ 2820

Last change on this file since 2820 was 2820, checked in by cbratschi, 26 years ago

* empty log message *

File size: 4.4 KB
Line 
1/* $Id: treeview.h,v 1.11 2000-02-18 17:12:43 cbratschi Exp $ */
2/*
3 * Treeview class extra info
4 *
5 * Copyright 1998 Eric Kohl
6 * Copyright 1998 Alex Priem
7 * Copyright 2000 Christoph Bratschi
8 */
9
10#ifndef __WINE_TREEVIEW_H
11#define __WINE_TREEVIEW_H
12
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 32 /* default nr of items to allocate at first try */
17#define TV_ISEARCH_DELAY 500
18
19
20/* internal structures */
21
22typedef struct
23{
24 UINT mask;
25 HTREEITEM hItem;
26 UINT state;
27 UINT stateMask;
28 LPWSTR pszText;
29 int cchTextMax;
30 int iImage;
31 int iSelectedImage;
32 int cChildren;
33 LPARAM lParam;
34 int iIntegral;
35 int iLevel; /* indentation level:0=root level */
36 COLORREF clrText;
37 HTREEITEM parent; /* handle to parent or 0 if at root*/
38 HTREEITEM firstChild; /* handle to first child or 0 if no child*/
39 HTREEITEM sibling; /* handle to next item in list, 0 if last */
40 HTREEITEM upsibling; /* handle to previous item in list, 0 if first */
41 int visible;
42 RECT rect;
43 RECT text;
44 RECT expandBox; /* expand box (+/-) coordinate */
45 RECT bitmap;
46 RECT statebitmap;
47 BOOL calculated;
48} TREEVIEW_ITEM, *LPTREEVIEW_ITEM;
49
50typedef struct tagTREEVIEW_INFO
51{
52 UINT uInternalStatus;
53 INT Timer;
54 UINT uNumItems; /* number of valid TREEVIEW_ITEMs */
55 UINT uNumPtrsAlloced;
56 HTREEITEM uMaxHandle; /* needed for delete_item */
57 HTREEITEM TopRootItem; /* handle to first item in treeview */
58 INT cdmode; /* last custom draw setting */
59 UINT uScrollTime; /* max. time for scrolling in milliseconds*/
60 UINT uItemHeight; /* item height, -1 for default item height */
61 UINT uRealItemHeight;/* current item height in pixels */
62 UINT uVisibleHeight; /* visible height of treeview in pixels */
63 UINT uTotalHeight; /* total height of treeview in pixels */
64 UINT uVisibleWidth;
65 UINT uTotalWidth;
66 UINT uIndent; /* indentation in pixels */
67 HTREEITEM selectedItem; /* handle to selected item or 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 */
76 COLORREF clrBk;
77 COLORREF clrText;
78 COLORREF clrLine;
79 COLORREF clrInsertMark;
80 HFONT hFont;
81 HFONT hBoldFont;
82 HWND hwndToolTip;
83 HWND hwndEdit;
84 WNDPROC wpEditOrig; /* needed for subclassing edit control */
85 HIMAGELIST himlNormal;
86 HIMAGELIST himlState;
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 */
92 LPWSTR pszISearch;
93 UINT uISearchLen;
94} TREEVIEW_INFO, *LPTREEVIEW_INFO;
95
96/* bitflags for infoPtr->uInternalStatus */
97
98#define TV_UNICODE 0x001 // for TVM_GETUNICODEFORMAT
99#define TV_HSCROLL 0x002 /* treeview too large to fit in window */
100#define TV_VSCROLL 0x004 /* (horizontal/vertical) */
101#define TV_LDRAG 0x008 /* Lbutton pushed to start drag */
102#define TV_LDRAGGING 0x010 /* Lbutton pushed, mouse moved. */
103#define TV_RDRAG 0x020 /* dito Rbutton */
104#define TV_RDRAGGING 0x040
105#define TV_NOREDRAW 0x080
106#define TV_CALCALL 0x100
107
108/* bitflags for infoPtr->timer */
109
110#define TV_REFRESH_TIMER 1
111#define TV_EDIT_TIMER 2
112#define TV_ISEARCH_TIMER 3
113
114#define TV_REFRESH_TIMER_SET 1
115#define TV_EDIT_TIMER_SET 2
116#define TV_ISEARCH_TIMER_SET 3
117
118
119extern VOID TREEVIEW_Register (VOID);
120extern VOID TREEVIEW_Unregister (VOID);
121
122#endif /* __WINE_TREEVIEW_H */
Note: See TracBrowser for help on using the repository browser.