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

Last change on this file since 3408 was 3408, checked in by cbratschi, 25 years ago

* empty log message *

File size: 4.7 KB
Line 
1/* $Id: treeview.h,v 1.18 2000-04-16 18:25:06 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 ITEM_VSPACE 2
15#define TV_REFRESH_DELAY 100 /* 100 ms delay between two refreshes */
16#define TV_DEFAULTITEMHEIGHT 16
17#define TVITEM_ALLOC 32 /* default nr of items to allocate at first try */
18#define TV_ISEARCH_DELAY 1000 //documented in ListView_Message_Processing.htm
19#define TV_INFOTIP_DELAY 500
20
21
22/* internal structures */
23
24typedef struct
25{
26 UINT mask;
27 HTREEITEM hItem;
28 UINT state;
29 UINT stateMask;
30 LPWSTR pszText;
31 int cchTextMax;
32 int iImage;
33 int iSelectedImage;
34 int cChildren;
35 LPARAM lParam;
36 int iIntegral;
37 int iLevel; /* indentation level:0=root level */
38 COLORREF clrText;
39 HTREEITEM parent; /* handle to parent or 0 if at root*/
40 HTREEITEM firstChild; /* handle to first child or 0 if no child*/
41 HTREEITEM sibling; /* handle to next item in list, 0 if last */
42 HTREEITEM upsibling; /* handle to previous item in list, 0 if first */
43 int visible;
44 RECT rect;
45 RECT text;
46 RECT expandBox; /* expand box (+/-) coordinate */
47 RECT bitmap;
48 RECT statebitmap;
49 BOOL calculated;
50} TREEVIEW_ITEM, *LPTREEVIEW_ITEM;
51
52typedef struct tagTREEVIEW_INFO
53{
54 COMCTL32_HEADER header;
55 UINT uInternalStatus;
56 INT Timer;
57 UINT uNumItems; /* number of valid TREEVIEW_ITEMs */
58 UINT uNumPtrsAlloced;
59 HTREEITEM uMaxHandle; /* needed for delete_item */
60 HTREEITEM TopRootItem; /* handle to first item in treeview */
61 INT cdmode; /* last custom draw setting */
62 UINT uScrollTime; /* max. time for scrolling in milliseconds*/
63 UINT uItemHeight; /* item height, -1 for default item height */
64 UINT uRealItemHeight;// current item height in pixels
65 UINT uVScrollStep; // scroll step in pixels
66 UINT uVisibleHeight; /* visible height of treeview in pixels */
67 UINT uTotalHeight; /* total height of treeview in pixels */
68 UINT uVisibleWidth;
69 UINT uTotalWidth;
70 UINT uIndent; /* indentation in pixels */
71 HTREEITEM selectedItem; /* handle to selected item or 0 if none */
72 HTREEITEM hotItem; /* handle currently under cursor, 0 if none */
73 HTREEITEM tipItem; // item with tooltip
74 HTREEITEM editItem; /* handle to item currently editted, 0 if none */
75 HTREEITEM firstVisible; /* handle to first visible item */
76 HTREEITEM dropItem; /* handle to item selected by drag cursor */
77 HTREEITEM insertMarkItem; /* item after which insertion mark is placed */
78 BOOL insertBeforeorAfter; /* flag used by TVM_SETINSERTMARK */
79 HIMAGELIST dragList; /* Bitmap of dragged item */
80 POINT lefttop; //in pixels
81 COLORREF clrBk;
82 COLORREF clrText;
83 COLORREF clrLine;
84 COLORREF clrInsertMark;
85 HFONT hFont;
86 HFONT hBoldFont;
87 HWND hwndToolTip;
88 HWND hwndEdit;
89 WNDPROC wpEditOrig; /* needed for subclassing edit control */
90 HIMAGELIST himlNormal;
91 HIMAGELIST himlState;
92 LPTVSORTCB pCallBackSort; /* ptr to TVSORTCB struct for callback sorting */
93 TREEVIEW_ITEM *items; /* itemlist */
94 INT *freeList; /* bitmap indicating which elements are valid */
95 /* 1=valid, 0=free; */
96 /* size of list= uNumPtrsAlloced/32 */
97 LPWSTR pszISearch;
98 UINT uISearchLen;
99 DWORD dwISearchTime;
100} TREEVIEW_INFO, *LPTREEVIEW_INFO;
101
102/* bitflags for infoPtr->uInternalStatus */
103
104#define TV_HSCROLL 0x001 /* treeview too large to fit in window */
105#define TV_VSCROLL 0x002 /* (horizontal/vertical) */
106#define TV_LDRAG 0x004 /* Lbutton pushed to start drag */
107#define TV_LDRAGGING 0x008 /* Lbutton pushed, mouse moved. */
108#define TV_RDRAG 0x010 /* dito Rbutton */
109#define TV_RDRAGGING 0x020
110#define TV_NOREDRAW 0x040
111#define TV_CALCALL 0x080
112
113/* bitflags for infoPtr->timer */
114
115#define TV_REFRESH_TIMER 1
116#define TV_EDIT_TIMER 2
117#define TV_INFOTIP_TIMER 3
118
119#define TV_REFRESH_TIMER_SET 1
120#define TV_EDIT_TIMER_SET 2
121#define TV_INFOTIP_TIMER_SET 4
122
123extern VOID TREEVIEW_Register (VOID);
124extern VOID TREEVIEW_Unregister (VOID);
125
126#endif /* __WINE_TREEVIEW_H */
Note: See TracBrowser for help on using the repository browser.