载入中...
搜索中...
未找到
UiDocumentProperty.cpp
浏览该文件的文档.
36 if (path == PropertyPath("layout.position")) return EditorValue::Array{widget.layout.x, widget.layout.y};
121 if (*text != "start" && *text != "center" && *text != "end" && *text != "stretch") return false;
135 for (int i = 0; i < 4; ++i) { const auto* number = (*tuple)[i].getIf<double>(); if (!number || *number < 0.0) return false; values[i] = *number; }
139 widget.style.tintR = values[0]; widget.style.tintG = values[1]; widget.style.tintB = values[2]; widget.style.tintA = values[3];
141 widget.content.textR = values[0]; widget.content.textG = values[1]; widget.content.textB = values[2]; widget.content.textA = values[3];
144 widget.style.marginLeft = values[0]; widget.style.marginTop = values[1]; widget.style.marginRight = values[2]; widget.style.marginBottom = values[3];
146 widget.style.paddingLeft = values[0]; widget.style.paddingTop = values[1]; widget.style.paddingRight = values[2]; widget.style.paddingBottom = values[3];
177eve::Result<eve::Revision> UiDocumentTarget::currentRevision(const SelectionSnapshot& selection) const {
200 uiProperty("content.horizontalAlign", "editor.ui.horizontalAlign", PropertyType::Enum, "start", "content"),
201 uiProperty("content.verticalAlign", "editor.ui.verticalAlign", PropertyType::Enum, "start", "content"),
242 return common ? PropertyReadResult{PropertyReadState::Value, *common, {}} : PropertyReadResult{};
251 return eve::editing::failed<DomainOperation>(EditorStatus::Unsupported, RuleId("editor.ui.property-mode"),
254 return eve::editing::failed<DomainOperation>(EditorStatus::Unsupported, RuleId("editor.ui.property-path"),
261 return eve::editing::failed<DomainOperation>(EditorStatus::Rejected, RuleId("editor.ui.property-target"),
265 return eve::editing::failed<DomainOperation>(EditorStatus::NotFound, RuleId("editor.ui.widget-not-found"),
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
const std::string & value() const noexcept
Returns the exact legacy or canonical compatibility spelling.
Definition Identity.h:362
Revision revisionValue() const noexcept
Return the revision as the shared protocol revision type.
Definition EditableTarget.h:169
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:19
PropertyReadResult read(const SelectionSnapshot &selection, const PropertyPath &path) const override
Reads .
Definition UiDocumentProperty.cpp:230
PropertySchema schema(const SelectionSnapshot &selection) const override
Schema.
Definition UiDocumentProperty.cpp:190
Result< DomainOperation > makeReset(const SelectionSnapshot &selection, const PropertyPath &path) const override
Make reset.
Definition UiDocumentProperty.cpp:285
Result< DomainOperation > makeSet(const SelectionSnapshot &selection, const PropertyPath &path, const EditorValue &value, PropertySetMode mode) const override
Make set.
Definition UiDocumentProperty.cpp:245
eve::Result< eve::Revision > currentRevision(const SelectionSnapshot &selection) const override
Current revision.
Definition UiDocumentProperty.cpp:177
editing::PropertyDescriptor PropertyDescriptor
Definition ArchSpaceTarget.h:31
editing::PropertyPath PropertyPath
Definition ArchSpaceTarget.h:33
Definition UiDocument.cpp:9
@ InvalidArgument
std::vector< PropertyDescriptor > properties
Definition EditingProperty.h:120
PropertyDescriptorLookup find(const PropertyPath &path) const
Finds find.
Definition EditingProperty.cpp:9
std::vector< SelectionItem > items
Definition EditingSelection.h:22
Immutable widget snapshot used across editor/runtime boundaries.
Definition UiDocument.h:94