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

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

* empty log message *

File size: 4.3 KB
Line 
1/* $Id: treeview.h,v 1.8 2000-02-14 17:27:55 cbratschi Exp $ */
2/*
3 * Treeview class extra info
4 *
5 * Copyright 1998 Eric Kohl
6 * Copyright 1998 Alex Priem
7 */
8
9#ifndef __WINE_TREEVIEW_H
10#define __WINE_TREEVIEW_H
11
12#define MINIMUM_INDENT 10
13#define TV_REFRESH_DELAY 100 /* 100 ms delay between two refreshes */
14#define TV_DEFAULTITEMHEIGHT 16
15#define TVITEM_ALLOC 32 /* default nr of items to allocate at first try */
16
17
18/* internal structures */
19
20typedef struct
21{
22 UINT mask;
23 HTREEITEM hItem;
24 UINT state;
25 UINT stateMask;
26 LPSTR pszText;
27 int cchTextMax;
28 int iImage;
29 int iSelectedImage;
30 int cChildren;
31 LPARAM lParam;
32 int iIntegral;
33 int iLevel; /* indentation level:0=root level */
34 COLORREF clrText;
35 HTREEITEM parent; /* handle to parent or 0 if at root*/
36 HTREEITEM firstChild; /* handle to first child or 0 if no child*/
37 HTREEITEM sibling; /* handle to next item in list, 0 if last */
38 HTREEITEM upsibling; /* handle to previous item in list, 0 if first */
39 int visible;
40 RECT rect;
41 RECT text;
42 RECT expandBox; /* expand box (+/-) coordinate */
43 RECT bitmap;
44 RECT statebitmap;
45 BOOL calculated;
46} TREEVIEW_ITEM, *LPTREEVIEW_ITEM;
47
48typedef struct tagTREEVIEW_INFO
49{
50 UINT uInternalStatus;
51 UINT bAutoSize; /* merge with uInternalStatus */
52 INT Timer;
53 UINT uNumItems; /* number of valid TREEVIEW_ITEMs */
54 UINT uNumPtrsAlloced;
55 HTREEITEM uMaxHandle; /* needed for delete_item */
56 HTREEITEM TopRootItem; /* handle to first item in treeview */
57 INT cdmode; /* last custom draw setting */
58 UINT uScrollTime; /* max. time for scrolling in milliseconds*/
59 UINT uItemHeight; /* item height, -1 for default item height */
60 UINT uRealItemHeight;/* current item height in pixels */
61 UINT uVisibleHeight; /* visible height of treeview in pixels */
62 UINT uTotalHeight; /* total height of treeview in pixels */
63 UINT uVisibleWidth;
64 UINT uTotalWidth;
65 UINT uIndent; /* indentation in pixels */
66 HTREEITEM selectedItem; /* handle to selected item or 0 if none */
67 HTREEITEM hotItem; /* handle currently under cursor, 0 if none */
68 HTREEITEM editItem; /* handle to item currently editted, 0 if none */
69 HTREEITEM firstVisible; /* handle to first visible item */
70 HTREEITEM dropItem; /* handle to item selected by drag cursor */
71 HTREEITEM insertMarkItem; /* item after which insertion mark is placed */
72 BOOL insertBeforeorAfter; /* flag used by TVM_SETINSERTMARK */
73 HIMAGELIST dragList; /* Bitmap of dragged item */
74 INT cx,cy; /* current x/y place in list */
75 COLORREF clrBk;
76 COLORREF clrText;
77 COLORREF clrLine;
78 COLORREF clrInsertMark;
79 HFONT hFont;
80 HFONT hBoldFont;
81 HWND hwndToolTip;
82 HWND hwndEdit;
83 WNDPROC wpEditOrig; /* needed for subclassing edit control */
84 HIMAGELIST himlNormal;
85 HIMAGELIST himlState;
86 LPTVSORTCB pCallBackSort; /* ptr to TVSORTCB struct for callback sorting */
87 TREEVIEW_ITEM *items; /* itemlist */
88 INT *freeList; /* bitmap indicating which elements are valid */
89 /* 1=valid, 0=free; */
90 /* size of list= uNumPtrsAlloced/32 */
91} TREEVIEW_INFO, *LPTREEVIEW_INFO;
92
93/* bitflags for infoPtr->uInternalStatus */
94
95#define TV_HSCROLL 0x01 /* treeview too large to fit in window */
96#define TV_VSCROLL 0x02 /* (horizontal/vertical) */
97#define TV_LDRAG 0x04 /* Lbutton pushed to start drag */
98#define TV_LDRAGGING 0x08 /* Lbutton pushed, mouse moved. */
99#define TV_RDRAG 0x10 /* dito Rbutton */
100#define TV_RDRAGGING 0x20
101#define TV_NOREDRAW 0x40
102#define TV_CALCALL 0x80
103
104/* bitflags for infoPtr->timer */
105
106#define TV_REFRESH_TIMER 1
107#define TV_EDIT_TIMER 2
108#define TV_REFRESH_TIMER_SET 1
109#define TV_EDIT_TIMER_SET 2
110
111
112extern VOID TREEVIEW_Register (VOID);
113extern VOID TREEVIEW_Unregister (VOID);
114
115#endif /* __WINE_TREEVIEW_H */
Note: See TracBrowser for help on using the repository browser.