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

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

headers for comctl32 updates

File size: 4.0 KB
Line 
1/* $Id: treeview.h,v 1.4 1999-08-14 17:23:24 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 uScrollTime; /* max. time for scrolling in milliseconds*/
58 UINT uItemHeight; /* item height, -1 for default item height */
59 UINT uRealItemHeight;/* current item height in pixels */
60 UINT uVisibleHeight; /* visible height of treeview in pixels */
61 UINT uTotalHeight; /* total height of treeview in pixels */
62 UINT uVisibleWidth;
63 UINT uTotalWidth;
64 UINT uIndent; /* indentation in pixels */
65 HTREEITEM selectedItem; /* handle to selected item or 0 if none */
66 HTREEITEM focusItem; /* handle to item that has focus, 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 HIMAGELIST dragList; /* Bitmap of dragged item */
72 INT cx,cy; /* current x/y place in list */
73 COLORREF clrBk;
74 COLORREF clrText;
75 COLORREF clrLine;
76 HFONT hFont;
77 HFONT hBoldFont;
78 HWND hwndToolTip;
79 HWND hwndEdit;
80 WNDPROC wpEditOrig; /* needed for subclassing edit control */
81 HIMAGELIST himlNormal;
82 HIMAGELIST himlState;
83 LPTVSORTCB pCallBackSort; /* ptr to TVSORTCB struct for callback sorting */
84 TREEVIEW_ITEM *items; /* itemlist */
85 INT *freeList; /* bitmap indicating which elements are valid */
86 /* 1=valid, 0=free; */
87 /* size of list= uNumPtrsAlloced/32 */
88} TREEVIEW_INFO;
89
90
91
92/* bitflags for infoPtr->uInternalStatus */
93
94#define TV_HSCROLL 0x01 /* treeview too large to fit in window */
95#define TV_VSCROLL 0x02 /* (horizontal/vertical) */
96#define TV_LDRAG 0x04 /* Lbutton pushed to start drag */
97#define TV_LDRAGGING 0x08 /* Lbutton pushed, mouse moved. */
98#define TV_RDRAG 0x10 /* dito Rbutton */
99#define TV_RDRAGGING 0x20
100
101/* bitflags for infoPtr->timer */
102
103#define TV_REFRESH_TIMER 1
104#define TV_EDIT_TIMER 2
105#define TV_REFRESH_TIMER_SET 1
106#define TV_EDIT_TIMER_SET 2
107
108
109extern VOID TREEVIEW_Register (VOID);
110extern VOID TREEVIEW_Unregister (VOID);
111
112#endif /* __WINE_TREEVIEW_H */
Note: See TracBrowser for help on using the repository browser.