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

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

* empty log message *

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