Base class for prefab views. More...
#include <kanzi/ui/node/concept/prefab_view.hpp>
Public Types | |
typedef shared_ptr< TBaseClass > | NodeTypeSharedPtr |
Public Member Functions | |
NodeTypeSharedPtr | getInstantiatedNode () const |
Gets the node instantiated from prefab. More... | |
PrefabTemplateSharedPtr | getPrefab () const |
Gets the value of PrefabProperty. More... | |
void | loadPrefabAsynchronously (ResourceID key) |
Post LoadAsynchronouslyMessage to load a prefab. More... | |
void | setPrefab (PrefabTemplateSharedPtr value) |
Sets the value of PrefabProperty. More... | |
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::PrefabViewConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Protected Member Functions | |
void | initialize () |
Initialize the prefab view. More... | |
void | onAsyncLoadCompleted (ResourceID key) |
Function to be ran from onAsyncLoadCompletedCallback. More... | |
void | onLoadAsynchronously (LoadAsynchronouslyMessageArguments &arguments) |
Message handler for load asynchronously message. More... | |
void | onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override |
Node::onNodePropertyChanged() implementation. More... | |
PrefabViewConceptImpl (Domain *domain, string_view name) | |
Constructor. More... | |
void | updateNode (PrefabTemplateSharedPtr prefabTemplate) |
Updates the displayed node by creating a new node from the specified prefab template and removing the old node. More... | |
Static Protected Member Functions | |
static void | onAsyncLoadCompletedCallback (weak_ptr< TDerivedClass > prefabView, ResourceID key) |
Callback for async load completion. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from kanzi::PrefabViewConcept | |
static MessageType< AsynchronousLoadCompletedMessageArguments > | AsynchronousLoadCompletedMessage |
Asynchronous load complete message. More... | |
static MessageType< LoadAsynchronouslyMessageArguments > | LoadAsynchronouslyMessage |
Start asynchronous load message. More... | |
static PropertyType< ResourceSharedPtr > | PrefabProperty |
Prefab property. More... | |
Base class for prefab views.
typedef shared_ptr<TBaseClass> kanzi::PrefabViewConceptImpl< TBaseClass, TDerivedClass >::NodeTypeSharedPtr |
|
explicitprotected |
Constructor.
domain | The domain the new node belongs to. |
name | The name of the node. |
|
static |
PrefabTemplateSharedPtr kanzi::PrefabViewConceptImpl< TBaseClass, TDerivedClass >::getPrefab | ( | ) | const |
Gets the value of PrefabProperty.
void kanzi::PrefabViewConceptImpl< TBaseClass, TDerivedClass >::setPrefab | ( | PrefabTemplateSharedPtr | value | ) |
Sets the value of PrefabProperty.
shared_ptr< TBaseClass > kanzi::PrefabViewConceptImpl< TBaseClass, TDerivedClass >::getInstantiatedNode | ( | ) | const |
Gets the node instantiated from prefab.
void kanzi::PrefabViewConceptImpl< TBaseClass, TDerivedClass >::loadPrefabAsynchronously | ( | ResourceID | key | ) |
Post LoadAsynchronouslyMessage to load a prefab.
key | ResourceID referring to the prefab to load. |
|
protected |
Initialize the prefab view.
|
overrideprotected |
Node::onNodePropertyChanged() implementation.
|
protected |
Message handler for load asynchronously message.
|
staticprotected |
Callback for async load completion.
Takes weak_ptr of prefab view to allow the prefab view to be destroyed before completion.
|
protected |
Function to be ran from onAsyncLoadCompletedCallback.
|
protected |
Updates the displayed node by creating a new node from the specified prefab template and removing the old node.
prefabTemplate | The prefab template that will be instantiated. |