ActivityElement is the base class for all Activity and Activity Host classes. More...
#include <kanzi/ui/node/concept/activity/activity_element.hpp>
Public Member Functions | |
virtual void | deserialize (string_view data) |
Deserializes the activity element from a byte buffer. More... | |
Node * | findChildHost (string_view hostName) |
Finds a child Activity Host by name. More... | |
vector< string > | getCommands () const |
Gets the list of commands handled by code behind of this activity element. More... | |
ActivityHistoryManager * | getHistoryManager () const |
Gets the history manager of this activity element. More... | |
virtual Node * | getNode ()=0 |
Gets the underlying Node object. More... | |
virtual const Node * | getNode () const =0 |
Gets the underlying Node object. More... | |
ActivityElement * | getParentElement () |
Gets the parent ActivityElement type node. More... | |
bool | isLeafActivityNode () const |
Returns whether an ActivityElement has a child Activity Host. More... | |
const Node * | restoreLastFocusedNode () |
Restores the focus to a child node of this Activity node, if the Activity node: More... | |
virtual string | serialize () |
Serializes the activity element to a byte buffer. More... | |
void | setCodeBehind (const Metaclass *metaclass) |
Instantiates and attaches a code behind object by specifying its metaclass. More... | |
void | setCodeBehind (CodeBehindSharedPtr codeBehind) |
Attaches a code behind object. More... | |
void | setLastFocusedNodePath () |
Sets the last focused node path of this Activity node to the currently focused child node, if the Activity node: More... | |
virtual | ~ActivityElement ()=default |
Destructor. More... | |
Static Public Member Functions | |
static string | getFirstElement (string_view activationSequence) |
Gets the first element of the activation sequence. More... | |
static string | getRestToForward (string_view activationSequence) |
Gets the remainder of the activation sequence. More... | |
template<typename Type > | |
static bool | isActivityElement (const Type &object) |
Checks if and object is an ActivityElement. More... | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Attributes | |
Properties | |
Use this property to check whether an ActivityElement type node is attached or not. The default value is false. | |
static PropertyType< bool > | AttachedProperty |
Protected Member Functions | |
optional< ActivityBrowserController::ActivityID > | getActivityID () const |
Gets the unique ID that is used by the implementation of the Activity Browser. More... | |
string | getPathInParent () |
Gets the activation path of this activity element relative to its parent. More... | |
void | initialize () |
Initializes the activity element. More... | |
bool | isRootActivityElement () const |
Returns whether an ActivityElement is the root Activity Host node of the Screen node. More... | |
virtual void | notifyChildrenNodeTreeAvailable () |
Notifies child activity elements that node info tree is available. More... | |
void | onForceTrigger (const ActivityBrowserController::ForceTriggerMessageArguments &args) |
Message handler for ActivityBrowserController::ForceTriggerMessage. More... | |
void | onNodeInfoTreeAvailable (const ActivityBrowserController::NodeInfoTreeAvailableArguments &) |
Message handler for ActivityBrowserController::NodeInfoTreeAvailableMessage. More... | |
void | registerChildHost (string_view hostPath) |
Registers a child host in this activity element. More... | |
virtual void | registerInParentActivityElement ()=0 |
Derived classes implement this function to register themselves in the parent during the construction of the activity graph. More... | |
void | setActivityID (optional< ActivityBrowserController::ActivityID > activityID) |
Sets the unique ID that is used by the implementation of the Activity Browser. More... | |
void | unregisterChildHost (string_view hostName) |
Unregisters a child host from this activity element. More... | |
virtual void | unregisterInParentActivityElement ()=0 |
Derived classes implement this function to unregister themselves from the parent during the destruction of the activity graph. More... | |
void | updateActivityBrowserProperties () |
Triggers the Activity Browser to update the properties of the Activity Element. More... | |
ActivityElement is the base class for all Activity and Activity Host classes.
ActivityElement provides the way to manipulate the activity graph in a uniform manner. ActivityElement provides this base functionality to all Activity and Activity Host classes:
|
virtualdefault |
Destructor.
|
static |
|
pure virtual |
Gets the underlying Node object.
Implemented in kanzi::ExclusiveActivityHostBaseImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::DataDrivenExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< TBaseClass, TDerivedClass >, kanzi::ActivityElementImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, Activity2D >, and kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >.
|
pure virtual |
Gets the underlying Node object.
Implemented in kanzi::ExclusiveActivityHostBaseImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::DataDrivenExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::DataDrivenExclusiveActivityHostImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< TBaseClass, TDerivedClass >, kanzi::ActivityElementImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityElementImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityElementImpl< ContentLayout2D, Activity2D >, and kanzi::ActivityElementImpl< ContentLayout3D, Activity3D >.
|
virtual |
Serializes the activity element to a byte buffer.
Reimplemented in kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, and kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >.
|
virtual |
Deserializes the activity element from a byte buffer.
data | The byte buffer containing the serialized data. |
Reimplemented in kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ParallelActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ParallelActivityHostImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ExclusiveActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostImpl< ContentLayout2D, ExclusiveActivityHost2D >, and kanzi::ExclusiveActivityHostImpl< ContentLayout3D, ExclusiveActivityHost3D >.
void kanzi::ActivityElement::setCodeBehind | ( | const Metaclass * | metaclass | ) |
Instantiates and attaches a code behind object by specifying its metaclass.
metaclass | The metaclass of the code behind class you want to instantiate and attach. |
void kanzi::ActivityElement::setCodeBehind | ( | CodeBehindSharedPtr | codeBehind | ) |
Attaches a code behind object.
codeBehind | The code behind object you want to attach. |
vector<string> kanzi::ActivityElement::getCommands | ( | ) | const |
Gets the list of commands handled by code behind of this activity element.
ActivityHistoryManager* kanzi::ActivityElement::getHistoryManager | ( | ) | const |
Gets the history manager of this activity element.
ActivityElement* kanzi::ActivityElement::getParentElement | ( | ) |
Gets the parent ActivityElement type node.
Node* kanzi::ActivityElement::findChildHost | ( | string_view | hostName | ) |
Finds a child Activity Host by name.
hostName | The name of the child Activity Host to find. |
bool kanzi::ActivityElement::isLeafActivityNode | ( | ) | const |
Returns whether an ActivityElement has a child Activity Host.
const Node* kanzi::ActivityElement::restoreLastFocusedNode | ( | ) |
Restores the focus to a child node of this Activity node, if the Activity node:
If Kanzi successfully restores the focus, it clears the value of the Kanzi internal property FocusScopeCore::LastFocusedNodePathProperty.
void kanzi::ActivityElement::setLastFocusedNodePath | ( | ) |
Sets the last focused node path of this Activity node to the currently focused child node, if the Activity node:
|
static |
Checks if and object is an ActivityElement.
object | Object you want to check. |
|
static |
Gets the first element of the activation sequence.
activationSequence | Activation sequence to parse. |
|
static |
Gets the remainder of the activation sequence.
activationSequence | Activation sequence to parse. |
|
protectedpure virtual |
Derived classes implement this function to register themselves in the parent during the construction of the activity graph.
Implemented in kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, and kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >.
|
protectedpure virtual |
Derived classes implement this function to unregister themselves from the parent during the destruction of the activity graph.
Implemented in kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ActivityConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityConceptImpl< ContentLayout2D, Activity2D >, and kanzi::ActivityConceptImpl< ContentLayout3D, Activity3D >.
|
protected |
Initializes the activity element.
You must call this function in derived classes.
|
protected |
Registers a child host in this activity element.
hostPath | The node tree path to the host to register. |
|
protected |
Unregisters a child host from this activity element.
hostName | The name of the host to unregister. |
|
protectedvirtual |
Notifies child activity elements that node info tree is available.
Reimplemented in kanzi::ActivityHostConceptImpl< TBaseClass, TDerivedClass >, kanzi::ActivityHostConceptImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, ParallelActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ParallelActivityHost2D >, kanzi::ActivityHostConceptImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ActivityHostConceptImpl< ContentLayout2D, ExclusiveActivityHost2D >, and kanzi::ActivityHostConceptImpl< ContentLayout3D, ExclusiveActivityHost3D >.
|
protected |
Gets the unique ID that is used by the implementation of the Activity Browser.
|
protected |
Sets the unique ID that is used by the implementation of the Activity Browser.
|
protected |
Gets the activation path of this activity element relative to its parent.
|
protected |
Triggers the Activity Browser to update the properties of the Activity Element.
|
protected |
Returns whether an ActivityElement is the root Activity Host node of the Screen node.
|
protected |
Message handler for ActivityBrowserController::NodeInfoTreeAvailableMessage.
Performs connection to the Activity Browser data model.
|
protected |
Message handler for ActivityBrowserController::ForceTriggerMessage.
Forces a trigger to execute.
|
static |