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

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

* empty log message *

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