Workspace controller for one encapsulated procedural script module. 更多...
#include <ProcgenScriptEditor.h>
Public 成员函数 | |
| ProcgenScriptEditor (std::string targetId) | |
| Construct an empty generator host. | |
| ProcgenScriptEditor (const ProcgenScriptEditor &)=delete | |
| ProcgenScriptEditor & | operator= (const ProcgenScriptEditor &)=delete |
| const procgen_editing::ProcgenScriptDocumentTarget & | target () const noexcept |
| Borrow the authoritative generator document. | |
| procgen_editing::Result< void > | configureWorkspace (editor::EditorWorkspace &workspace) const |
| Install Modules / Preview / Inspector / Debug Stages panels. | |
| procgen_editing::Result< void > | loadModule (procgen_editing::ProcgenScriptModuleSpec spec) |
| procgen_editing::Result< void > | loadModule (std::string uri, std::string id, std::string displayName, std::string kind, const procgen_editing::EditorValue &schema) |
| procgen_editing::Result< void > | setParam (std::string key, procgen_editing::EditorValue value) |
| Sets the param. | |
| procgen_editing::Result< void > | setInt (std::string key, int value) |
| Sets the int. | |
| procgen_editing::Result< void > | setFloat (std::string key, double value) |
| Sets the float. | |
| procgen_editing::Result< void > | setBool (std::string key, bool value) |
| Sets the bool. | |
| procgen_editing::Result< void > | setString (std::string key, std::string value) |
| Sets the string. | |
| procgen_editing::Result< void > | publishPreview (const procgen::PointSet *points, std::string stage, std::uint64_t expectedRevision) |
| Copy a successful generation into the preview cache. | |
| procgen_editing::Result< void > | publishStage (const procgen::PointSet *points, std::string stage) |
| Copy an intermediate debug stage without changing the displayed output unless it is selected. | |
| procgen_editing::Result< void > | failPreview (std::string message, std::uint64_t expectedRevision) |
| procgen_editing::Result< void > | selectStage (std::string stage) |
| Select stage. | |
| procgen_editing::Result< void > | setPointBudget (int budget) |
| Sets the point budget. | |
| procgen_editing::Result< void > | setLive (bool enabled) |
| Choose whether the presenter should rebuild on every parameter commit. | |
| procgen_editing::Result< editor::TransactionReceipt > | undo () |
| procgen_editing::Result< editor::TransactionReceipt > | redo () |
| bool | canUndo () const noexcept |
| bool | canRedo () const noexcept |
| Can redo. | |
| bool | isDirty () const noexcept |
| True when dirty. | |
| bool | isContinuousRebuild () const noexcept |
| True when the presenter should rebuild after every committed parameter edit. | |
| std::uint64_t | revision () const noexcept |
| Revision. | |
| std::uint64_t | previewRevision () const noexcept |
| Preview revision. | |
| int | pointBudget () const noexcept |
| Point budget. | |
| std::string | moduleId () const |
| Module id. | |
| std::string | moduleUri () const |
| Module uri. | |
| std::string | displayName () const |
| Display name. | |
| std::string | kind () const |
| Kind. | |
| std::string | selectedStage () const |
| Selected stage. | |
| std::string | previewFailureSummary () const |
| Empty when the last publish succeeded; otherwise the failPreview summary. | |
| int | paramCount () const |
| Param count. | |
| std::string | paramKey (int index) const |
| Param key. | |
| std::string | paramLabel (int index) const |
| Param label. | |
| std::string | paramKind (int index) const |
| Param kind. | |
| float | paramMinimum (int index) const |
| Param minimum. | |
| float | paramMaximum (int index) const |
| Param maximum. | |
| float | paramStep (int index) const |
| Param step. | |
| int | paramChoiceCount (int index) const |
| Param choice count. | |
| std::string | paramChoice (int paramIndex, int choiceIndex) const |
| Param choice. | |
| int | getInt (const std::string &key) const |
| Returns the int. | |
| float | getFloat (const std::string &key) const |
| Returns the float. | |
| bool | getBool (const std::string &key) const |
| Returns the bool. | |
| std::string | getString (const std::string &key) const |
| Returns the string. | |
| int | stageCount () const |
| Stage count. | |
| std::string | stageName (int index) const |
| Stage name. | |
| int | pointCount () const |
| Point count. | |
| float | pointX (int index) const |
| Point x. | |
| float | pointZ (int index) const |
| Point z. | |
| std::uint32_t | pointSeed (int index) const |
| Point seed. | |
详细描述
Workspace controller for one encapsulated procedural script module.
Owns the Params document and local undo. Script presenters run generate and publish copied PointSets; a stale or failed rebuild keeps the last successful preview on screen.
@ownership Editor owns the document and preview copies. PointSet arguments are borrowed only for the publish call. @threadaffinity Owner thread only. @reentrancy Does not invoke script generate callbacks.
在文件 ProcgenScriptEditor.h 第 36 行定义.
构造及析构函数说明
◆ ProcgenScriptEditor() [1/2]
|
explicit |
Construct an empty generator host.
在文件 ProcgenScriptEditor.cpp 第 22 行定义.
◆ ProcgenScriptEditor() [2/2]
|
delete |
成员函数说明
◆ canRedo()
|
inlinenoexcept |
Can redo.
在文件 ProcgenScriptEditor.h 第 104 行定义.
◆ canUndo()
|
inlinenoexcept |
在文件 ProcgenScriptEditor.h 第 102 行定义.
◆ configureWorkspace()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::configureWorkspace | ( | editor::EditorWorkspace & | workspace | ) | const |
Install Modules / Preview / Inspector / Debug Stages panels.
- 注解
- Does not retain
workspace.
在文件 ProcgenScriptEditor.cpp 第 25 行定义.
引用了 eve::editor::EditorWorkspace::activatePanel(), context, id, order, eve::editor::EditorWorkspace::registerPanel(), eve::editor::EditorWorkspace::setPanelCapability(), eve::editor::EditorWorkspace::setPanelContext() , 以及 title.
◆ displayName()
|
inline |
◆ failPreview()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::failPreview | ( | std::string | message, |
| std::uint64_t | expectedRevision | ||
| ) |
在文件 ProcgenScriptEditor.cpp 第 182 行定义.
引用了 message , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::revision().
◆ getBool()
| bool eve::procgen_editor::ProcgenScriptEditor::getBool | ( | const std::string & | key | ) | const |
Returns the bool.
在文件 ProcgenScriptEditor.cpp 第 295 行定义.
引用了 found, key , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::values().
◆ getFloat()
| float eve::procgen_editor::ProcgenScriptEditor::getFloat | ( | const std::string & | key | ) | const |
Returns the float.
在文件 ProcgenScriptEditor.cpp 第 288 行定义.
引用了 found, key , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::values().
◆ getInt()
| int eve::procgen_editor::ProcgenScriptEditor::getInt | ( | const std::string & | key | ) | const |
Returns the int.
在文件 ProcgenScriptEditor.cpp 第 281 行定义.
引用了 found, key , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::values().
◆ getString()
| std::string eve::procgen_editor::ProcgenScriptEditor::getString | ( | const std::string & | key | ) | const |
Returns the string.
在文件 ProcgenScriptEditor.cpp 第 302 行定义.
引用了 found, key, text , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::values().
◆ isContinuousRebuild()
|
inlinenoexcept |
True when the presenter should rebuild after every committed parameter edit.
在文件 ProcgenScriptEditor.h 第 108 行定义.
◆ isDirty()
|
inlinenoexcept |
True when dirty.
在文件 ProcgenScriptEditor.h 第 106 行定义.
◆ kind()
|
inline |
◆ loadModule() [1/2]
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::loadModule | ( | procgen_editing::ProcgenScriptModuleSpec | spec | ) |
在文件 ProcgenScriptEditor.cpp 第 92 行定义.
引用了 eve::procgen_editing::ProcgenScriptDocumentTarget::makeLoadModule().
被这些函数引用 loadModule().
◆ loadModule() [2/2]
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::loadModule | ( | std::string | uri, |
| std::string | id, | ||
| std::string | displayName, | ||
| std::string | kind, | ||
| const procgen_editing::EditorValue & | schema | ||
| ) |
◆ moduleId()
|
inline |
Module id.
在文件 ProcgenScriptEditor.h 第 116 行定义.
◆ moduleUri()
|
inline |
Module uri.
在文件 ProcgenScriptEditor.h 第 118 行定义.
◆ operator=()
|
delete |
◆ paramChoice()
| std::string eve::procgen_editor::ProcgenScriptEditor::paramChoice | ( | int | paramIndex, |
| int | choiceIndex | ||
| ) | const |
Param choice.
在文件 ProcgenScriptEditor.cpp 第 275 行定义.
◆ paramChoiceCount()
| int eve::procgen_editor::ProcgenScriptEditor::paramChoiceCount | ( | int | index | ) | const |
◆ paramCount()
|
inline |
Param count.
在文件 ProcgenScriptEditor.h 第 129 行定义.
◆ paramKey()
| std::string eve::procgen_editor::ProcgenScriptEditor::paramKey | ( | int | index | ) | const |
◆ paramKind()
| std::string eve::procgen_editor::ProcgenScriptEditor::paramKind | ( | int | index | ) | const |
Param kind.
在文件 ProcgenScriptEditor.cpp 第 242 行定义.
引用了 eve::procgen::Boolean, eve::procgen::Choice, eve::procgen::Float, index, eve::procgen::Integer , 以及 eve::procgen::String.
◆ paramLabel()
| std::string eve::procgen_editor::ProcgenScriptEditor::paramLabel | ( | int | index | ) | const |
◆ paramMaximum()
| float eve::procgen_editor::ProcgenScriptEditor::paramMaximum | ( | int | index | ) | const |
◆ paramMinimum()
| float eve::procgen_editor::ProcgenScriptEditor::paramMinimum | ( | int | index | ) | const |
◆ paramStep()
| float eve::procgen_editor::ProcgenScriptEditor::paramStep | ( | int | index | ) | const |
◆ pointBudget()
|
inlinenoexcept |
Point budget.
在文件 ProcgenScriptEditor.h 第 114 行定义.
◆ pointCount()
| int eve::procgen_editor::ProcgenScriptEditor::pointCount | ( | ) | const |
Point count.
在文件 ProcgenScriptEditor.cpp 第 320 行定义.
◆ pointSeed()
| std::uint32_t eve::procgen_editor::ProcgenScriptEditor::pointSeed | ( | int | index | ) | const |
◆ pointX()
| float eve::procgen_editor::ProcgenScriptEditor::pointX | ( | int | index | ) | const |
◆ pointZ()
| float eve::procgen_editor::ProcgenScriptEditor::pointZ | ( | int | index | ) | const |
◆ previewFailureSummary()
|
inline |
Empty when the last publish succeeded; otherwise the failPreview summary.
在文件 ProcgenScriptEditor.h 第 126 行定义.
◆ previewRevision()
|
inlinenoexcept |
Preview revision.
在文件 ProcgenScriptEditor.h 第 112 行定义.
◆ publishPreview()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::publishPreview | ( | const procgen::PointSet * | points, |
| std::string | stage, | ||
| std::uint64_t | expectedRevision | ||
| ) |
Copy a successful generation into the preview cache.
- 参数
-
points Borrowed output; null is rejected. Not retained after return. stage Debug-stage name also used as the displayed output. expectedRevision Document revision observed before generate; mismatch keeps the old preview. @ownership pointsis borrowed for this call only. @lifetimepointsmust outlive this call.
在文件 ProcgenScriptEditor.cpp 第 150 行定义.
引用了 eve::Result< T >::failure(), points , 以及 eve::procgen_editing::ProcgenScriptDocumentTarget::revision().
◆ publishStage()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::publishStage | ( | const procgen::PointSet * | points, |
| std::string | stage | ||
| ) |
Copy an intermediate debug stage without changing the displayed output unless it is selected.
- 参数
-
points Borrowed stage output; null is rejected. Not retained after return. @ownership pointsis borrowed for this call only. @lifetimepointsmust outlive this call.
在文件 ProcgenScriptEditor.cpp 第 169 行定义.
引用了 eve::Result< T >::failure() , 以及 points.
◆ redo()
| procgen_editing::Result< editor::TransactionReceipt > eve::procgen_editor::ProcgenScriptEditor::redo | ( | ) |
在文件 ProcgenScriptEditor.cpp 第 221 行定义.
◆ revision()
|
inlinenoexcept |
Revision.
在文件 ProcgenScriptEditor.h 第 110 行定义.
◆ selectedStage()
|
inline |
Selected stage.
在文件 ProcgenScriptEditor.h 第 124 行定义.
◆ selectStage()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::selectStage | ( | std::string | stage | ) |
Select stage.
在文件 ProcgenScriptEditor.cpp 第 192 行定义.
◆ setBool()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setBool | ( | std::string | key, |
| bool | value | ||
| ) |
◆ setFloat()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setFloat | ( | std::string | key, |
| double | value | ||
| ) |
◆ setInt()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setInt | ( | std::string | key, |
| int | value | ||
| ) |
◆ setLive()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setLive | ( | bool | enabled | ) |
Choose whether the presenter should rebuild on every parameter commit.
- 参数
-
enabled True for continuous rebuild after each committed edit.
在文件 ProcgenScriptEditor.cpp 第 208 行定义.
引用了 enabled.
◆ setParam()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setParam | ( | std::string | key, |
| procgen_editing::EditorValue | value | ||
| ) |
Sets the param.
在文件 ProcgenScriptEditor.cpp 第 106 行定义.
引用了 eve::editing::Absolute, key, eve::procgen_editing::ProcgenScriptDocumentTarget::makeSet() , 以及 value.
被这些函数引用 setBool(), setFloat(), setInt() , 以及 setString().
◆ setPointBudget()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setPointBudget | ( | int | budget | ) |
Sets the point budget.
在文件 ProcgenScriptEditor.cpp 第 200 行定义.
◆ setString()
| procgen_editing::Result< void > eve::procgen_editor::ProcgenScriptEditor::setString | ( | std::string | key, |
| std::string | value | ||
| ) |
◆ stageCount()
|
inline |
Stage count.
在文件 ProcgenScriptEditor.h 第 156 行定义.
◆ stageName()
| std::string eve::procgen_editor::ProcgenScriptEditor::stageName | ( | int | index | ) | const |
◆ target()
|
inlinenoexcept |
Borrow the authoritative generator document.
在文件 ProcgenScriptEditor.h 第 45 行定义.
◆ undo()
| procgen_editing::Result< editor::TransactionReceipt > eve::procgen_editor::ProcgenScriptEditor::undo | ( | ) |
在文件 ProcgenScriptEditor.cpp 第 213 行定义.
该类的文档由以下文件生成:
- src/modules/procgen/editor/ProcgenScriptEditor.h
- src/modules/procgen/editor/ProcgenScriptEditor.cpp