71 explicit operator bool()
const;
控件
Definition Control.h:12
相等性比较接口
Definition IComparable.h:14
为支持ToString方法的类提供统一接口
Definition IToString.h:13
值转换器接口
Definition IValueConverter.h:14
Win32图像列表句柄的RAII包装
Definition ImageList.h:15
树视图节点复选框状态改变事件参数类型
Definition TreeView.h:248
int checkState
复选框的新状态,0表示未选中,1表示选中,-1表示无复选框
Definition TreeView.h:251
TreeViewNode node
复选框状态改变的节点
Definition TreeView.h:254
TreeViewCheckStateChangedEventArgs(int checkState, const TreeViewNode &node)
构造函数
Definition TreeView.h:259
树视图节点已展开或折叠事件参数类型
Definition TreeView.h:227
TreeViewNode node
已展开或折叠的节点
Definition TreeView.h:233
TreeViewItemExpandedEventArgs(bool action, const TreeViewNode &node)
构造函数
Definition TreeView.h:238
bool action
true表示展开,false表示折叠
Definition TreeView.h:230
树视图节点正在展开或折叠事件参数类型
Definition TreeView.h:206
TreeViewItemExpandingEventArgs(bool action, const TreeViewNode &node)
构造函数
Definition TreeView.h:217
TreeViewNode node
正在展开或折叠的节点
Definition TreeView.h:212
bool action
true表示展开,false表示折叠
Definition TreeView.h:209
树视图项
Definition TreeView.h:20
bool IsExpanded() const
判断当前节点是否展开
bool IsNull() const
判断当前项是否为空
bool SetExpand(bool expand)
设置当前节点展开或折叠
HTREEITEM GetHandle() const
获取当前项的句柄
bool SetImages(int imageIndex, int selectedImageIndex)
设置当前节点的图像
TreeViewNode()=default
默认构造函数
int DeleteAllChildren()
删除当前节点的所有子节点
bool SetText(const std::wstring &text)
设置当前项的文本
TreeViewNode GetParent() const
获取父节点
HWND GetOwnerHandle() const
获取所属树视图控件的窗口句柄
bool SetUserData(void *data)
设置与当前节点关联的用户数据
TreeViewNode GetNextNode() const
获取下一个节点
TreeViewNode GetPreviousNode() const
获取上一个节点
int GetChildCount() const
获取当前节点的直接子节点数
void SetCheck(bool check)
设置当前节点的复选框选中状态
std::wstring ToString() const
获取当前项的文本
void * GetUserData() const
获取与当前节点关联的用户数据
std::wstring GetText() const
获取当前项的文本
TreeViewNode GetFirstChildNode() const
获取第一个子节点
TreeViewNode AddChild(const std::wstring &text)
添加子节点到当前节点下
bool IsSelected() const
判断当前节点是否被选中
TreeViewNode(HWND hwnd, HTREEITEM hitem)
创建TreeViewItem
bool IsChecked() const
判断当前节点是否被选中复选框
bool Equals(const TreeViewNode &other) const
判断当前项与另一个项是否相等
TreeViewNode InsertAfter(const std::wstring &text)
在当前节点后插入新节点
树视图控件
Definition TreeView.h:269
const Property< double > IndentWidth
缩进宽度
Definition TreeView.h:305
virtual bool OnNotified(NMHDR *pNMHDR, LRESULT &result) override
父窗口接收到WM_NOTIFY后且父窗口OnNotify函数返回false时调用发出通知控件的该函数
virtual void OnGetDispInfo(NMTVDISPINFOW *pNMInfo)
当OnNotified接收到TVN_GETDISPINFO通知时调用该函数
virtual bool OnItemExpanding(NMTREEVIEWW *pNMTV)
节点展开或折叠前调用该函数
virtual void OnSetBackColor(Color color, bool redraw) override
设置背景颜色
const Property< Color > LineColor
线条颜色
Definition TreeView.h:300
virtual bool OnDoubleClicked(NMHDR *pNMHDR, LRESULT &result)
控件被双击时调用该函数
const Property< bool > CheckBoxes
是否在第一列显示复选框
Definition TreeView.h:295
const ReadOnlyProperty< TreeViewNode > SelectedItem
选中的节点,若无选中节点则返回空节点
Definition TreeView.h:285
HIMAGELIST SetImageList(TreeViewImageList imageList, HIMAGELIST value)
设置指定类型的图像列表
TreeViewNode AddItem(const std::wstring &text)
添加新节点到根节点
virtual void OnSelectionChanged()
选中的节点发生改变时调用该函数
ImageList GetImageList(TreeViewImageList imageList)
获取指定类型的图像列表
virtual void OnItemChanged(NMTVITEMCHANGE *pNMInfo)
节点某些属性发生变化时调用该函数
virtual void OnSetTextColor(Color color, bool redraw) override
设置文本颜色
const ReadOnlyProperty< TreeViewNode > Root
根节点
Definition TreeView.h:280
virtual bool OnClicked(NMHDR *pNMHDR, LRESULT &result)
控件被单机时调用该函数
const ReadOnlyProperty< int > AllItemsCount
所有节点数
Definition TreeView.h:290
virtual void OnItemExpanded(NMTREEVIEWW *pNMTV)
节点展开或折叠后调用该函数
表示特定类型路由事件的事件参数类型,继承自该类的类型可以直接作为AddHandler函数的模板参数
Definition RoutedEventArgs.h:19
SimpleWindow框架的顶级命名空间,所有公共类型、控件、枚举和工具函数均定义于此。
Definition Alignment.h:4
TreeViewImageList
树视图的图像列表枚举
Definition TreeView.h:10