📄 treeview.h
字号:
/*** $Id: treeview.h,v 1.8 2003/09/04 06:12:04 weiym Exp $**** treeview.h: the head file for TreeView Control.**** Copyright (C) 2003 Feynman Software.** Copyright (C) 2001, 2002 Zheng Yiran, Wei Yongming.**** Create date: 2000/12/01*/#ifndef __TREEVIEW_H#define __TREEVIEW_H#ifdef __cplusplusextern "C" {#endif#ifndef __MINIGUI_LIB__/****** TreeView Control *************************************************/#define CTRL_TREEVIEW ("treeview")#endif /* !__MINIGUI_LIB__ *//** TreeView item structure */typedef struct _TVITEM{ /** text of the item */ char *text; /** * State flags of the item, can be OR'ed by the following values: * - TVIF_ROOT\n * The item is a root item. * - TVIF_SELECTED\n * The item is a selected item. * - TVIF_FOLD\n * The item is folded. */ DWORD dwFlags; /** Handle to the icon of the folded item. */ HICON hIconFold; /** Handle to the icon of the unfolded item. */ HICON hIconUnfold; /** Additional data associated with the item. */ DWORD dwAddData; /** Depth in the tree */ int depth; /** Pointer to the structure of the next treeview item */ struct _TVITEM *next; /** Pointer to the structure of the first child item */ struct _TVITEM *child; /** Pointer to the parent item */ struct _TVITEM *parent; /** Structure of the text extension */ SIZE text_ext;} TVITEM;/** * \var typedef TVITEM *PTVITEM; * \brief Data type of the pointer to a TVITEM. */typedef TVITEM *PTVITEM;typedef struct tagTVDATA{ /* draw icon or not. */ DWORD dwStyle; /* identifier. */ int id; /* STRCMP function */ STRCMP str_cmp; /* how many items can be showed in client area. */ unsigned int nVisCount; /* the height of one item. */ unsigned int nItemHeight; /* Number of all items in treeview. */ unsigned int nItemCount; /* * Number of items which can (not should) be drawed * in client area. That means excluding children of fold items. */ unsigned int nVisItemCount; /* how many items are above the client area and should not be drawed. */ unsigned int nItemTop; /* how many pixels that treeview has moved toward left. */ unsigned int nLeft; /* the width of treeview. */ unsigned int nWidth; /* how many pixels can be showed in client area. */ unsigned int nVisWidth; /* this item is selected. */ PTVITEM pItemSelected; /* the root item of treeview. */ PTVITEM root;} TVDATA;typedef TVDATA* PTVDATA;BOOL RegisterTreeViewControl (void);void TreeViewControlCleanup (void);#ifdef __cplusplus}#endif#endif /* __TREEVIEW_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -