Snapshot before repaint phase 2
This commit is contained in:
@@ -54,6 +54,8 @@ class Window
|
||||
// —— 控件/对话框 ——(容器内的普通控件与非模态对话框)
|
||||
std::vector<std::unique_ptr<Control>> controls;
|
||||
std::vector<std::unique_ptr<Control>> dialogs;
|
||||
bool managedDispatchActive = false; // 事件分发期:控件只改状态,不立即画
|
||||
bool managedSceneDirty = false; // 本轮分发是否登记了统一重绘请求
|
||||
|
||||
public:
|
||||
bool dialogClose = false; // 项目内使用的状态位,对话框关闭标志
|
||||
@@ -95,6 +97,12 @@ public:
|
||||
// —— 尺寸调整 ——(供内部与外部调用的尺寸变化处理)
|
||||
void pumpResizeIfNeeded(); // 执行一次统一收口重绘
|
||||
void scheduleResizeFromModal(int w, int h);
|
||||
bool isManagedDispatchActive() const;
|
||||
void requestManagedRepaint();
|
||||
void flushManagedRepaint();
|
||||
private:
|
||||
void adaptiveLayout(std::unique_ptr<Control>& c, const int finalH, const int finalW);
|
||||
void redrawScene(bool forceControlsDirty, bool forceDialogsDirty);
|
||||
void drawWindowBackground();
|
||||
void dispatchSyntheticMouseMoveToControls(short x, short y);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user