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

Last change on this file since 4 was 4, checked in by ktk, 26 years ago

Import

File size: 3.9 KB
Line 
1/* $Id: treeview.h,v 1.1 1999-05-24 20:19:20 ktk Exp $ */
2
3/*
4 * Treeview class extra info
5 *
6 * Copyright 1998 Eric Kohl
7 * Copyright 1998 Alex Priem
8 */
9
10#ifndef __WINE_TREEVIEW_H
11#define __WINE_TREEVIEW_H
12
13#include "commctrl.h"
14
15#define MINIMUM_INDENT 10
16#define TV_REFRESH_DELAY 100 /* 100 ms delay between two refreshes */
17#define TV_DEFAULTITEMHEIGHT 16
18#define TVITEM_ALLOC 16 /* default nr of items to allocate at first try */
19
20
21/* internal structures */
22
23typedef struct {
24 UINT mask;
25 HTREEITEM hItem;
26 UINT state;
27 UINT stateMask;
28 LPSTR pszText;
29 int cchTextMax;
30 int iImage;
31 int iSelectedImage;
32 int cChildren;
33 LPARAM lParam;
34 int iIntegral;
35 int iLevel; /* indentation level:0=root level */
36 COLORREF clrText;
37 HTREEITEM parent; /* handle to parent or 0 if at root*/
38 HTREEITEM firstChild; /* handle to first child or 0 if no child*/
39 HTREEITEM sibling; /* handle to next item in list, 0 if last */
40 HTREEITEM upsibling; /* handle to previous item in list, 0 if first */
41 int visible;
42 RECT rect;
43 RECT text;
44 RECT expandBox; /* expand box (+/-) coordinate */
45} TREEVIEW_ITEM;
46
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 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 HFONT hFont;
76 HFONT hBoldFont;
77 HWND hwndToolTip;
78 HWND hwndEdit;
79 WNDPROC wpEditOrig; /* needed for subclassing edit control */
80 HIMAGELIST himlNormal;
81 HIMAGELIST himlState;
82 LPTVSORTCB pCallBackSort; /* ptr to TVSORTCB struct for callback sorting */
83 TREEVIEW_ITEM *items; /* itemlist */
84 INT *freeList; /* bitmap indicating which elements are valid */
85 /* 1=valid, 0=free; */
86 /* size of list= uNumPtrsAlloced/32 */
87} TREEVIEW_INFO;
88
89
90
91/* bitflags for infoPtr->uInternalStatus */
92
93#define TV_HSCROLL 0x01 /* treeview too large to fit in window */
94#define TV_VSCROLL 0x02 /* (horizontal/vertical) */
95#define TV_LDRAG 0x04 /* Lbutton pushed to start drag */
96#define TV_LDRAGGING 0x08 /* Lbutton pushed, mouse moved. */
97#define TV_RDRAG 0x10 /* dito Rbutton */
98#define TV_RDRAGGING 0x20
99
100/* bitflags for infoPtr->timer */
101
102#define TV_REFRESH_TIMER 1
103#define TV_EDIT_TIMER 2
104#define TV_REFRESH_TIMER_SET 1
105#define TV_EDIT_TIMER_SET 2
106
107
108extern VOID TREEVIEW_Register (VOID);
109extern VOID TREEVIEW_Unregister (VOID);
110
111#endif /* __WINE_TREEVIEW_H */
Note: See TracBrowser for help on using the repository browser.