refactor(new_editor/app): split frame support and texture decoding
This commit is contained in:
@@ -175,61 +175,4 @@ UIRect EditorWindow::ResolveWorkspaceBounds(float clientWidthDips, float clientH
|
||||
(std::max)(0.0f, clientHeightDips - titleBarHeight));
|
||||
}
|
||||
|
||||
std::string EditorWindow::BuildCaptureStatusText() const {
|
||||
if (m_render.autoScreenshot.HasPendingCapture()) {
|
||||
return "Shot pending...";
|
||||
}
|
||||
|
||||
if (!m_render.autoScreenshot.GetLastCaptureError().empty()) {
|
||||
return TruncateText(m_render.autoScreenshot.GetLastCaptureError(), 38u);
|
||||
}
|
||||
|
||||
if (!m_render.autoScreenshot.GetLastCaptureSummary().empty()) {
|
||||
return TruncateText(m_render.autoScreenshot.GetLastCaptureSummary(), 38u);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void EditorWindow::ApplyHostCaptureRequests(const UIEditorShellInteractionResult& result) {
|
||||
if (result.requestPointerCapture && GetCapture() != m_window.hwnd) {
|
||||
SetCapture(m_window.hwnd);
|
||||
}
|
||||
if (result.releasePointerCapture && GetCapture() == m_window.hwnd) {
|
||||
ReleaseCapture();
|
||||
}
|
||||
}
|
||||
|
||||
void EditorWindow::ApplyHostedContentCaptureRequests() {
|
||||
if (m_composition.shellRuntime.WantsHostPointerCapture() &&
|
||||
GetCapture() != m_window.hwnd) {
|
||||
SetCapture(m_window.hwnd);
|
||||
}
|
||||
|
||||
if (m_composition.shellRuntime.WantsHostPointerRelease() &&
|
||||
GetCapture() == m_window.hwnd &&
|
||||
!m_composition.shellRuntime.HasShellInteractiveCapture()) {
|
||||
ReleaseCapture();
|
||||
}
|
||||
}
|
||||
|
||||
std::string EditorWindow::DescribeInputEvents(
|
||||
const std::vector<UIInputEvent>& events) const {
|
||||
std::ostringstream stream = {};
|
||||
stream << "events=[";
|
||||
for (std::size_t index = 0; index < events.size(); ++index) {
|
||||
if (index > 0u) {
|
||||
stream << " | ";
|
||||
}
|
||||
const UIInputEvent& event = events[index];
|
||||
stream << DescribeInputEventType(event)
|
||||
<< '@'
|
||||
<< static_cast<int>(event.position.x)
|
||||
<< ','
|
||||
<< static_cast<int>(event.position.y);
|
||||
}
|
||||
stream << ']';
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
|
||||
Reference in New Issue
Block a user