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

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

* empty log message *

File size: 4.3 KB
Line 
1/* $Id: treeview.h,v 1.7 2000-02-12 18:08:23 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#include "commctrl.h"
13
14#define MINIMUM_INDENT 10
15#define TV_DEFAULTITEMHEIGHT 16
16#define TV_REFRESH_DELAY 100 /* 100 ms delay between two refreshes */
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 RECT bitmap;
45 RECT statebitmap;
46 BOOL calculated;
47} TREEVIEW_ITEM;
48
49
50typedef struct tagTREEVIEW_INFO
51{
52 UINT uInternalStatus;
53 UINT bAutoSize; /* merge with uInternalStatus */
54 INT Timer;
55 UINT uNumItems; /* number of valid TREEVIEW_ITEMs */
56 UINT uNumPtrsAlloced;
57 HTREEITEM uMaxHandle; /* needed for delete_item */
58 HTREEITEM TopRootItem; /* handle to first item in treeview */
59 INT cdmode; /* last custom draw setting */
60 UINT uScrollTime; /* max. time for scrolling in milliseconds*/
61 UINT uItemHeight; /* item height, -1 for default item height */
62 UINT uRealItemHeight;/* current item height in pixels */
63 UINT uVisibleHeight; /* visible height of treeview in pixels */
64 UINT uTotalHeight; /* total height of treeview in pixels */
65 UINT uVisibleWidth;
66 UINT uTotalWidth;
67 UINT uIndent; /* indentation in pixels */
68 HTREEITEM selectedItem; /* handle to selected item or 0 if none */
69 HTREEITEM focusItem; /* handle to item that has focus, 0 if none */
70 HTREEITEM hotItem; /* handle currently under cursor, 0 if none */
71 HTREEITEM editItem; /* handle to item currently editted, 0 if none */
72 HTREEITEM firstVisible; /* handle to first visible item */
73 HTREEITEM dropItem; /* handle to item selected by drag cursor */
74 HTREEITEM insertMarkItem; /* item after which insertion mark is placed */
75 BOOL insertBeforeorAfter; /* flag used by TVM_SETINSERTMARK */
76 HIMAGELIST dragList; /* Bitmap of dragged item */
77 INT cx,cy; /* current x/y place in list */
78 COLORREF clrBk;
79 COLORREF clrText;
80 COLORREF clrLine;
81 COLORREF clrInsertMark;
82 HFONT hFont;
83 HFONT hBoldFont;
84 HWND hwndToolTip;
85 HWND hwndEdit;
86 WNDPROC wpEditOrig; /* needed for subclassing edit control */
87 HIMAGELIST himlNormal;
88 HIMAGELIST himlState;
89 LPTVSORTCB pCallBackSort; /* ptr to TVSORTCB struct for callback sorting */
90 TREEVIEW_ITEM *items; /* itemlist */
91 INT *freeList; /* bitmap indicating which elements are valid */
92 /* 1=valid, 0=free; */
93 /* size of list= uNumPtrsAlloced/32 */
94} TREEVIEW_INFO;
95
96
97
98/* bitflags for infoPtr->uInternalStatus */
99
100#define TV_HSCROLL 0x01 /* treeview too large to fit in window */
101#define TV_VSCROLL 0x02 /* (horizontal/vertical) */
102#define TV_LDRAG 0x04 /* Lbutton pushed to start drag */
103#define TV_LDRAGGING 0x08 /* Lbutton pushed, mouse moved. */
104#define TV_RDRAG 0x10 /* dito Rbutton */
105#define TV_RDRAGGING 0x20
106#define TV_NOREDRAW 0x40
107#define TV_CALCALL 0x80
108
109/* bitflags for infoPtr->timer */
110
111#define TV_EDIT_TIMER 1
112#define TV_REFRESH_TIMER 2
113
114#define TV_EDIT_TIMER_SET 1
115#define TV_REFRESH_TIMER_SET 2
116
117
118extern VOID TREEVIEW_Register (VOID);
119extern VOID TREEVIEW_Unregister (VOID);
120
121#endif /* __WINE_TREEVIEW_H */
Note: See TracBrowser for help on using the repository browser.