Save pre-batched-redraw snapshot

This commit is contained in:
Codex
2026-04-07 16:23:40 +08:00
parent 7f8431a18c
commit b07a4ec370
8 changed files with 142 additions and 54 deletions
+4
View File
@@ -41,6 +41,7 @@ protected:
Control* parent = nullptr; // 父控件
bool dirty = true; // 是否重绘
bool show = true; // 是否显示
bool eventVisualChanged = false; // 最近一次 handleEvent 是否真的引发了视觉变化
/* == 布局模式 == */
StellarX::LayoutMode layoutMode = StellarX::LayoutMode::Fixed; // 布局模式
@@ -128,6 +129,7 @@ public:
std::string getId() const { return id; }
//检查是否为脏
bool isDirty() { return dirty; }
bool didEventAffectVisual() const { return eventVisualChanged; }
//用来检查对话框是否模态,其他控件不用实现
virtual bool model()const = 0;
//布局
@@ -139,4 +141,6 @@ public:
protected:
void saveStyle();
void restoreStyle();
void resetEventVisualChanged() { eventVisualChanged = false; }
void markEventVisualChanged(bool changed = true) { eventVisualChanged = changed; }
};