Extract XCUI selection model and layout lab click selection

This commit is contained in:
2026-04-05 07:03:51 +08:00
parent d46dcbfa9e
commit 646e5855ce
10 changed files with 202 additions and 15 deletions

View File

@@ -0,0 +1,26 @@
#pragma once
#include <string>
#include <string_view>
namespace XCEngine {
namespace UI {
namespace Widgets {
class UISelectionModel {
public:
bool HasSelection() const;
const std::string& GetSelectedId() const;
bool IsSelected(std::string_view id) const;
bool SetSelection(std::string selectionId);
bool ClearSelection();
bool ToggleSelection(std::string selectionId);
private:
std::string m_selectedId = {};
};
} // namespace Widgets
} // namespace UI
} // namespace XCEngine