Plasma Engine  2.0
Loading...
Searching...
No Matches
PropertyMetaState.h
1#pragma once
2
3#include <GuiFoundation/GuiFoundationDLL.h>
4
5#include <Foundation/Configuration/Singleton.h>
6#include <Foundation/Configuration/Startup.h>
7#include <Foundation/Serialization/AbstractObjectGraph.h>
8#include <Foundation/Types/RefCounted.h>
9#include <GuiFoundation/PropertyGrid/PropertyBaseWidget.moc.h>
10#include <ToolsFoundation/Object/DocumentObjectBase.h>
11#include <ToolsFoundation/Reflection/ReflectedType.h>
12
15{
23
25 {
26 m_Visibility = Visibility::Default;
27 }
28
29 Visibility m_Visibility;
30 plString m_sNewLabelText;
31};
32
43
55
61class PL_GUIFOUNDATION_DLL plPropertyMetaState
62{
63 PL_DECLARE_SINGLETON(plPropertyMetaState);
64
65public:
67
69 void GetTypePropertiesState(const plDocumentObject* pObject, plMap<plString, plPropertyUiState>& out_propertyStates);
70
74 void GetTypePropertiesState(const plHybridArray<plPropertySelection, 8>& items, plMap<plString, plPropertyUiState>& out_propertyStates);
75
77 void GetContainerElementsState(const plDocumentObject* pObject, const char* szProperty, plHashTable<plVariant, plPropertyUiState>& out_propertyStates);
78
82 void GetContainerElementsState(const plHybridArray<plPropertySelection, 8>& items, const char* szProperty, plHashTable<plVariant, plPropertyUiState>& out_propertyStates);
83
90
91private:
94};
Definition DocumentObjectBase.h:11
Definition Event.h:177
Definition HashTable.h:333
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition Map.h:408
This class allows to query additional information about how to present properties in the property gri...
Definition PropertyMetaState.h:62
plEvent< plContainerElementMetaStateEvent & > m_ContainerEvents
Definition PropertyMetaState.h:89
plEvent< plPropertyMetaStateEvent & > m_Events
Definition PropertyMetaState.h:86
Event that is broadcast whenever information about how to present elements in a container is required...
Definition PropertyMetaState.h:46
const char * m_szProperty
The Container property.
Definition PropertyMetaState.h:50
const plDocumentObject * m_pObject
The object for which the information is queried.
Definition PropertyMetaState.h:48
plHashTable< plVariant, plPropertyUiState > * m_pContainerElementStates
Definition PropertyMetaState.h:53
Event that is broadcast whenever information about how to present properties is required.
Definition PropertyMetaState.h:35
plMap< plString, plPropertyUiState > * m_pPropertyStates
Definition PropertyMetaState.h:41
const plDocumentObject * m_pObject
The object for which the information is queried.
Definition PropertyMetaState.h:37
Describes the current meta state of a property for display purposes in the property grid.
Definition PropertyMetaState.h:15
Visibility
Definition PropertyMetaState.h:17
@ Invisible
Hides the property entirely.
Definition PropertyMetaState.h:19
@ Default
Displayed normally, for editing (unless the property is read-only)
Definition PropertyMetaState.h:18
@ Disabled
Definition PropertyMetaState.h:20