| 1 | /* $Id: treeview.h,v 1.1 2002-10-29 13:47:35 sandervl Exp $ */
|
|---|
| 2 | /*
|
|---|
| 3 | * Treeview class extra info
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright 1998 Eric Kohl
|
|---|
| 6 | * Copyright 1998 Alex Priem
|
|---|
| 7 | * Copyright 2000 Christoph Bratschi
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | #ifndef __WINE_TREEVIEW_H
|
|---|
| 11 | #define __WINE_TREEVIEW_H
|
|---|
| 12 |
|
|---|
| 13 | #define ITEM_VSPACE 2
|
|---|
| 14 | #define TV_REFRESH_DELAY 100 /* 100 ms delay between two refreshes */
|
|---|
| 15 | #define TV_DEFAULTITEMHEIGHT 16
|
|---|
| 16 | #define TVITEM_ALLOC 32 /* default nr of items to allocate at first try */
|
|---|
| 17 | #define TV_ISEARCH_DELAY 1000 //documented in ListView_Message_Processing.htm
|
|---|
| 18 | #define TV_INFOTIP_DELAY 500
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | /* internal structures */
|
|---|
| 22 |
|
|---|
| 23 | typedef struct _TREEITEM /* HTREEITEM is a _TREEINFO *. */
|
|---|
| 24 | {
|
|---|
| 25 | UINT callbackMask;
|
|---|
| 26 | UINT state;
|
|---|
| 27 | UINT stateMask;
|
|---|
| 28 | LPWSTR pszText;
|
|---|
| 29 | int cchTextMax;
|
|---|
| 30 | int iImage;
|
|---|
| 31 | int iSelectedImage;
|
|---|
| 32 | int cChildren;
|
|---|
| 33 | LPARAM lParam;
|
|---|
| 34 | int iIntegral; /* item height multiplier (1 is normal) */
|
|---|
| 35 | int iLevel; /* indentation level:0=root level */
|
|---|
| 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 lastChild;
|
|---|
| 39 | HTREEITEM prevSibling; /* handle to prev item in list, 0 if first */
|
|---|
| 40 | HTREEITEM nextSibling; /* handle to next item in list, 0 if last */
|
|---|
| 41 | RECT rect;
|
|---|
| 42 | LONG linesOffset;
|
|---|
| 43 | LONG stateOffset;
|
|---|
| 44 | LONG imageOffset;
|
|---|
| 45 | LONG textOffset;
|
|---|
| 46 | LONG textWidth; /* horizontal text extent for pszText */
|
|---|
| 47 | LONG textHeight;
|
|---|
| 48 | BOOL inclient; // displayed in client rect
|
|---|
| 49 | BOOL displayed; // item is displayed
|
|---|
| 50 | int displayOrder; /* display ordering, 0 is first display item */
|
|---|
| 51 |
|
|---|
| 52 | BOOL calculated; //rect is valid
|
|---|
| 53 | } TREEVIEW_ITEM, *LPTREEVIEW_ITEM;
|
|---|
| 54 |
|
|---|
| 55 | typedef struct tagTREEVIEW_INFO
|
|---|
| 56 | {
|
|---|
| 57 | COMCTL32_HEADER header;
|
|---|
| 58 |
|
|---|
| 59 | HWND hwnd;
|
|---|
| 60 | DWORD dwStyle;
|
|---|
| 61 | HTREEITEM root;
|
|---|
| 62 | UINT uInternalStatus;
|
|---|
| 63 | INT Timer;
|
|---|
| 64 | UINT uNumItems; /* number of valid TREEVIEW_ITEMs */
|
|---|
| 65 | INT cdmode; /* last custom draw setting */
|
|---|
| 66 | UINT uScrollTime; /* max. time for scrolling in milliseconds*/
|
|---|
| 67 |
|
|---|
| 68 | UINT uItemHeight; /* item height */
|
|---|
| 69 | BOOL bHeightSet;
|
|---|
| 70 |
|
|---|
| 71 | LONG clientWidth; /* width of control window */
|
|---|
| 72 | LONG clientHeight; /* height of control window */
|
|---|
| 73 |
|
|---|
| 74 | LONG treeWidth; /* width of displayed tree items */
|
|---|
| 75 | LONG treeHeight; /* height of displayed tree items */
|
|---|
| 76 |
|
|---|
| 77 | UINT uIndent; /* indentation in pixels */
|
|---|
| 78 | HTREEITEM selectedItem; /* handle to selected item or 0 if none */
|
|---|
| 79 | HTREEITEM focusItem; /* handle to item that has focus, 0 if none */
|
|---|
| 80 | HTREEITEM hotItem; /* handle currently under cursor, 0 if none */
|
|---|
| 81 | HTREEITEM firstVisible; /* handle to first visible item */
|
|---|
| 82 | int maxDisplayOrder;
|
|---|
| 83 | HTREEITEM dropItem; /* handle to item selected by drag cursor */
|
|---|
| 84 | HTREEITEM insertMarkItem; /* item after which insertion mark is placed */
|
|---|
| 85 | BOOL insertBeforeorAfter; /* flag used by TVM_SETINSERTMARK */
|
|---|
| 86 | HIMAGELIST dragList; /* Bitmap of dragged item */
|
|---|
| 87 | COLORREF clrBk;
|
|---|
| 88 | COLORREF clrText;
|
|---|
| 89 | COLORREF clrLine;
|
|---|
| 90 | COLORREF clrInsertMark;
|
|---|
| 91 | HFONT hFont;
|
|---|
| 92 | HFONT hBoldFont;
|
|---|
| 93 | HWND hwndToolTip;
|
|---|
| 94 |
|
|---|
| 95 | HWND hwndEdit;
|
|---|
| 96 | WNDPROC wpEditOrig; /* orig window proc for subclassing edit */
|
|---|
| 97 | BOOL bIgnoreEditKillFocus;
|
|---|
| 98 | BOOL bLabelChanged;
|
|---|
| 99 |
|
|---|
| 100 | HIMAGELIST himlNormal;
|
|---|
| 101 | int normalImageHeight;
|
|---|
| 102 | int normalImageWidth;
|
|---|
| 103 | HIMAGELIST himlState;
|
|---|
| 104 | int stateImageHeight;
|
|---|
| 105 | int stateImageWidth;
|
|---|
| 106 | HDPA items;
|
|---|
| 107 |
|
|---|
| 108 | HTREEITEM tipItem; // item with tooltip
|
|---|
| 109 | POINT lefttop; //in pixels
|
|---|
| 110 |
|
|---|
| 111 | LPWSTR pszISearch;
|
|---|
| 112 | UINT uISearchLen;
|
|---|
| 113 | DWORD dwISearchTime;
|
|---|
| 114 | } TREEVIEW_INFO, *LPTREEVIEW_INFO;
|
|---|
| 115 |
|
|---|
| 116 | /* bitflags for infoPtr->uInternalStatus */
|
|---|
| 117 |
|
|---|
| 118 | #define TV_HSCROLL 0x001 /* treeview too large to fit in window */
|
|---|
| 119 | #define TV_VSCROLL 0x002 /* (horizontal/vertical) */
|
|---|
| 120 | #define TV_LDRAG 0x004 /* Lbutton pushed to start drag */
|
|---|
| 121 | #define TV_LDRAGGING 0x008 /* Lbutton pushed, mouse moved. */
|
|---|
| 122 | #define TV_RDRAG 0x010 /* dito Rbutton */
|
|---|
| 123 | #define TV_RDRAGGING 0x020
|
|---|
| 124 | #define TV_NOREDRAW 0x040
|
|---|
| 125 | #define TV_CALCALL 0x080
|
|---|
| 126 |
|
|---|
| 127 | /* bitflags for infoPtr->timer */
|
|---|
| 128 |
|
|---|
| 129 | #define TV_REFRESH_TIMER 1
|
|---|
| 130 | #define TV_EDIT_TIMER 2
|
|---|
| 131 | #define TV_INFOTIP_TIMER 3
|
|---|
| 132 |
|
|---|
| 133 | #define TV_REFRESH_TIMER_SET 1
|
|---|
| 134 | #define TV_EDIT_TIMER_SET 2
|
|---|
| 135 | #define TV_INFOTIP_TIMER_SET 4
|
|---|
| 136 |
|
|---|
| 137 | #endif /* __WINE_TREEVIEW_H */
|
|---|