Plasma Engine  2.0
Loading...
Searching...
No Matches
ExposedParametersDefaultStateProvider.h
1#pragma once
2
3#include <EditorFramework/EditorFrameworkDLL.h>
4
5#include <GuiFoundation/PropertyGrid/DefaultState.h>
6
9
12{
13public:
14 static plSharedPtr<plDefaultStateProvider> CreateProvider(plObjectAccessorBase* pAccessor, const plDocumentObject* pObject, const plAbstractProperty* pProp);
16
17 virtual plInt32 GetRootDepth() const override;
18 virtual plColorGammaUB GetBackgroundColor() const override;
19 virtual plString GetStateProviderName() const override { return "Exposed Parameters"; }
20
21 virtual plVariant GetDefaultValue(SuperArray superPtr, plObjectAccessorBase* pAccessor, const plDocumentObject* pObject, const plAbstractProperty* pProp, plVariant index = plVariant()) override;
22 virtual plStatus CreateRevertContainerDiff(SuperArray superPtr, plObjectAccessorBase* pAccessor, const plDocumentObject* pObject, const plAbstractProperty* pProp, plDeque<plAbstractGraphDiffOperation>& out_diff) override;
23
24 virtual bool IsDefaultValue(SuperArray superPtr, plObjectAccessorBase* pAccessor, const plDocumentObject* pObject, const plAbstractProperty* pProp, plVariant index = plVariant()) override;
25 virtual plStatus RevertProperty(SuperArray superPtr, plObjectAccessorBase* pAccessor, const plDocumentObject* pObject, const plAbstractProperty* pProp, plVariant index = plVariant()) override;
26
27private:
28 const plDocumentObject* m_pObject = nullptr;
29 const plAbstractProperty* m_pProp = nullptr;
30 const plExposedParametersAttribute* m_pAttrib = nullptr;
31 const plAbstractProperty* m_pParameterSourceProp = nullptr;
32};
This is the base interface for all properties in the reflection system. It provides enough informatio...
Definition AbstractProperty.h:150
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition Color8UNorm.h:99
Interface for querying and restoring the default state of objects and containers.
Definition DefaultState.h:110
virtual plStatus CreateRevertContainerDiff(SuperArray superPtr, plObjectAccessorBase *pAccessor, const plDocumentObject *pObject, const plAbstractProperty *pProp, plDeque< plAbstractGraphDiffOperation > &out_diff)=0
Queries an array of diff operations that can be executed to revert the object container.
virtual plColorGammaUB GetBackgroundColor() const =0
Returns a color to be used in the property grid. Only the hue of the color is used....
virtual plInt32 GetRootDepth() const =0
Returns the root depth of this provider instance.
virtual plVariant GetDefaultValue(SuperArray superPtr, plObjectAccessorBase *pAccessor, const plDocumentObject *pObject, const plAbstractProperty *pProp, plVariant index=plVariant())=0
Returns the default value of an object's property at a given index.
Definition Deque.h:270
Definition DocumentObjectBase.h:11
Definition ExposedParametersPropertyWidget.moc.h:13
Add this attribute to a variant map property to make it map to the exposed parameters of an asset....
Definition PropertyAttributes.h:312
Default state provider handling variant maps with the plExposedParametersAttribute set....
Definition ExposedParametersDefaultStateProvider.h:12
virtual plString GetStateProviderName() const override
Returns the name of this state provider. Can be used to check what the outer most provider is for GUI...
Definition ExposedParametersDefaultStateProvider.h:19
Definition ObjectAccessorBase.h:8
A Shared ptr manages a shared object and destroys that object when no one references it anymore....
Definition SharedPtr.h:10
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
An plResult with an additional message for the reason of failure.
Definition Status.h:12