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

Last change on this file since 94 was 94, checked in by achimha, 26 years ago

Added CVS tag to many files (comctl32 and headers) .

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