6#include <kanzi/core.ui/message/message_arguments.hpp>
7#include <kanzi/core/metadata/metaclass.hpp>
9#include <app_view_controller.hpp>
26class ForwardingManipulator;
59 KZ_METACLASS_PROPERTY_TYPE(MessageArgumentAppNameProperty)
60 KZ_METACLASS_PROPERTY_TYPE(MessageArgumentCanExitAppProperty)
63 static PropertyTypeEditorInfoSharedPtr makeEditorInfo()
65 return KZ_DECLARE_EDITOR_METADATA(
66 metadata.legacyName =
"AppView.AppViewConcept.StartAppMessageArguments";);
73 KZ_MESSAGE_ARGUMENTS_METACLASS_BEGIN(
85 static PropertyTypeEditorInfoSharedPtr makeEditorInfo()
87 return KZ_DECLARE_EDITOR_METADATA(
88 metadata.legacyName =
"AppView.AppViewConcept.NavigateBackMessageArguments";);
97 KZ_METACLASS_PROPERTY_TYPE(MessageArgumentVirtualDisplayWidthProperty)
98 KZ_METACLASS_PROPERTY_TYPE(MessageArgumentVirtualDisplayHeightProperty)
99 KZ_METACLASS_PROPERTY_TYPE(MessageArgumentVirtualDisplayDensityProperty)
102 static PropertyTypeEditorInfoSharedPtr makeEditorInfo()
104 return KZ_DECLARE_EDITOR_METADATA(
105 metadata.legacyName =
"AppView.AppViewConcept.UpdateVirtualDisplayMessageArguments";);
120 KZ_MIXIN_METACLASS_BEGIN(
AppViewConcept,
"Kanzi.AppView.AppViewConcept")
121 KZ_METACLASS_PROPERTY_TYPE(AppNameProperty)
122 KZ_METACLASS_PROPERTY_TYPE(VirtualDisplayNameProperty)
123 KZ_METACLASS_PROPERTY_TYPE(VirtualDisplayWidthProperty)
124 KZ_METACLASS_PROPERTY_TYPE(VirtualDisplayHeightProperty)
125 KZ_METACLASS_PROPERTY_TYPE(VirtualDisplayDensityProperty)
126 KZ_METACLASS_PROPERTY_TYPE(CanExitAppProperty)
127 KZ_METACLASS_PROPERTY_TYPE(OverrideMaterialProperty)
129 KZ_METACLASS_MESSAGE_TYPE(StartAppMessage)
130 KZ_METACLASS_MESSAGE_TYPE(FinishAppMessage)
131 KZ_METACLASS_MESSAGE_TYPE(NavigateBackMessage)
132 KZ_METACLASS_MESSAGE_TYPE(UpdateVirtualDisplayMessage)
133 KZ_METACLASS_MESSAGE_TYPE(PauseAppMessage)
134 KZ_METACLASS_MESSAGE_TYPE(ResumeAppMessage)
137 static PropertyTypeEditorInfoSharedPtr makeEditorInfo();
140template <typename TBaseClass, typename TDerivedClass>
148 static PropertyTypeEditorInfoSharedPtr makeEditorInfo();
155 void onAttached() override;
156 void onDetached() override;
159 void onFrameAvailable();
161 TextureSharedPtr getAppViewTexture();
162 MaterialSharedPtr getAppViewMaterial();
164 virtual
void setupMaterialOverride() = 0;
165 virtual
bool calculateHitUV(
166 const TouchPoint& touchPoint,
167 Vector2& outHitUV) = 0;
169 virtual
void onAppViewTextureChanged() = 0;
172 void onNodePropertyChanged(AbstractPropertyType propertyType, PropertyNotificationReason reason) override;
180 AppViewControllerSharedPtr m_appViewController;
183 TDerivedClass* getThisObject()
185 return static_cast<TDerivedClass*
>(
this);
188 const TDerivedClass* getThisObject()
const
190 return static_cast<const TDerivedClass*
>(
this);
193 void setupInputHandling();
194 void setupController();
195 void resetController();
196 void setupMaterial();
197 void startApp(
const string& appName,
bool canExitApp);
200 Vector2 getVirtualDisplaySize()
const;
203 Matrix4x4 m_stMatrix;
Definition app_view.hpp:12
shared_ptr< ForwardingManipulator > ForwardingManipulatorSharedPtr
Definition app_view.hpp:27
Definition app_view.hpp:30
static PropertyType< int > MessageArgumentVirtualDisplayDensityProperty
Definition app_view.hpp:49
static PropertyType< bool > CanExitAppProperty
Definition app_view.hpp:39
static PropertyType< int > VirtualDisplayDensityProperty
Definition app_view.hpp:38
static PropertyType< string > AppNameProperty
Definition app_view.hpp:34
static PropertyType< bool > MessageArgumentCanExitAppProperty
Definition app_view.hpp:46
static MessageType< MessageArguments > ResumeAppMessage
Definition app_view.hpp:117
static MessageType< FinishAppMessageArguments > FinishAppMessage
Definition app_view.hpp:113
static PropertyType< int > MessageArgumentVirtualDisplayHeightProperty
Definition app_view.hpp:48
static MessageType< MessageArguments > PauseAppMessage
Definition app_view.hpp:116
static PropertyType< string > MessageArgumentAppNameProperty
Definition app_view.hpp:45
static PropertyType< ResourceSharedPtr > OverrideMaterialProperty
Definition app_view.hpp:40
static PropertyType< int > VirtualDisplayWidthProperty
Definition app_view.hpp:36
static PropertyType< int > MessageArgumentVirtualDisplayWidthProperty
Definition app_view.hpp:47
static MessageType< NavigateBackMessageArguments > NavigateBackMessage
Definition app_view.hpp:114
static PropertyType< int > VirtualDisplayHeightProperty
Definition app_view.hpp:37
static MessageType< StartAppMessageArguments > StartAppMessage
Definition app_view.hpp:112
static PropertyType< string > VirtualDisplayNameProperty
Definition app_view.hpp:35
static MessageType< UpdateVirtualDisplayMessageArguments > UpdateVirtualDisplayMessage
Definition app_view.hpp:115
Definition app_view.hpp:55
KZ_MESSAGE_ARGUMENTS_METACLASS_BEGIN(StartAppMessageArguments, MessageArguments, "Kanzi.AppView.AppViewConcept.StartAppMessageArguments") static PropertyTypeEditorInfoSharedPtr makeEditorInfo()
Definition app_view.hpp:57
Definition app_view.hpp:71
Definition app_view.hpp:79
KZ_MESSAGE_ARGUMENTS_METACLASS_BEGIN(NavigateBackMessageArguments, MessageArguments, "Kanzi.AppView.AppViewConcept.NavigateBackMessageArguments") static PropertyTypeEditorInfoSharedPtr makeEditorInfo()
Definition app_view.hpp:81
Definition app_view.hpp:93
KZ_MESSAGE_ARGUMENTS_METACLASS_BEGIN(UpdateVirtualDisplayMessageArguments, MessageArguments, "Kanzi.AppView.AppViewConcept.UpdateVirtualDisplayMessageArguments") static PropertyTypeEditorInfoSharedPtr makeEditorInfo()
Definition app_view.hpp:95
Definition app_view.hpp:142