From c5ef06019f738d92e01a664e7b1354ba2accb9a6 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 21 八月 2025 05:27:00 +0800
Subject: [PATCH] 1.完善可折叠列表;
---
SourceCode/Bond/Servo/CExpandableListCtrl.h | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/SourceCode/Bond/Servo/CExpandableListCtrl.h b/SourceCode/Bond/Servo/CExpandableListCtrl.h
index d4ecb51..57d606d 100644
--- a/SourceCode/Bond/Servo/CExpandableListCtrl.h
+++ b/SourceCode/Bond/Servo/CExpandableListCtrl.h
@@ -35,23 +35,24 @@
// 便捷:通过可见行号取 Node*
Node* GetNodeByVisibleIndex(int i) const;
+private:
+ void appendVisible(Node* n);
+ CRect expanderRectForRow(int row) const; // 首列展开按钮区域
+ virtual void PreSubclassWindow();
+
protected:
// 消息
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnClick(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
-
DECLARE_MESSAGE_MAP()
private:
- std::vector<std::unique_ptr<Node>> m_roots; // 顶层节点
- std::vector<Node*> m_visible; // 展开后的可见节点顺序
- int m_expanderPadding = 6; // 首列内侧边距
- int m_expanderSize = 10; // 小三角/方块大小
+ std::vector<std::unique_ptr<Node>> m_roots; // 顶层节点
+ std::vector<Node*> m_visible; // 展开后的可见节点顺序
+ int m_expanderPadding = 6; // 首列内侧边距
+ int m_expanderSize = 10; // 小三角/方块大小
int m_textGap = 6;
-
- void appendVisible(Node* n);
- CRect expanderRectForRow(int row) const; // 首列展开按钮区域
};
--
Gitblit v1.9.3