载入中...
搜索中...
未找到
WorkspacePresentation.cpp
浏览该文件的文档.
10Result<void> WorkspacePresentation::stage(IWorkspacePresentationSource& source, PropertyPath path, EditorValue value) {
12 return failure(EditorStatus::Conflict, "Finish or cancel the active field before editing another field");
14 if (draft_ && (draft_->start.revision != state.revision || draft_->start.context != state.context)) {
19 if (!descriptor) return failure(EditorStatus::NotFound, "Property is unavailable: " + path.value());
31 return failure(EditorStatus::Rejected, "Property has no single editable value: " + path.value());
63Result<void> WorkspacePresentation::action(IWorkspacePresentationSource& source, std::string_view id) {
Dotted property path (layout.size) compared and persisted as text.
Definition EditingIds.h:78
Deterministic owning value tree shared by authoring hosts.
Definition EditingValue.h:23
Synchronous adapter for an open domain editor, without UI or domain includes. @ownership Caller owns ...
Definition WorkspacePresentation.h:27
Value snapshot(const IWorkspacePresentationSource &source) const
Immutable current schema/value projection, including any local draft.
Definition WorkspacePresentation.cpp:71
void cancel() noexcept
Cancel the draft without changing the domain or history.
Definition WorkspacePresentation.cpp:55
Result< void > action(IWorkspacePresentationSource &source, std::string_view id)
Route an action through the domain backend; pending drafts are cancelled first.
Definition WorkspacePresentation.cpp:63
Result< void > edit(IWorkspacePresentationSource &source, PropertyPath path, EditorValue value)
Validate and commit one discrete keyboard/checkbox edit.
Definition WorkspacePresentation.cpp:57
Result< void > stage(IWorkspacePresentationSource &source, PropertyPath path, EditorValue value)
Stage an owning draft; repeated updates create no document/history mutation.
Definition WorkspacePresentation.cpp:10
Result< void > commit(IWorkspacePresentationSource &source)
Commit the draft once; rejects revision or selection changes and consumes the draft.
Definition WorkspacePresentation.cpp:39
Result< void > noOp(std::vector< Diagnostic > diagnostics={})
Construct a successful void result for an operation that made no change.
Definition EditingResult.h:62
Definition ActionPreviewController.cpp:6