#include "math/FUiAnim_MathVector4.h"
#include "math/FUiAnim_MathMatrix4.h"
-#ifndef BUILD_UI_CORE
-#include "FUiAnim_ControlVisualElement.h"
-#endif
+//#ifndef BUILD_UI_CORE
+//#include "FUiAnim_ControlVisualElement.h"
+//#endif
#include "FUiAnim_MatrixUtil.h"
#include "FUiAnim_Debug.h"
#define PRINT(...)
//#define PRINT fprintf(stderr, __VA_ARGS__)
-#ifndef BUILD_UI_CORE
-#define IS_KNOWN_CLASS(_PUBLIC) (likely(typeid(*(_PUBLIC)) == VeTypeId) || likely(typeid(*(_PUBLIC)) == internalVeTypeId) || likely(typeid(*(_PUBLIC)) == controlVeTypeId) || likely(typeid(*(_PUBLIC)) == rootVeTypeId))
-#else
+//#ifndef BUILD_UI_CORE
+//#define IS_KNOWN_CLASS(_PUBLIC) (likely(typeid(*(_PUBLIC)) == VeTypeId) || likely(typeid(*(_PUBLIC)) == internalVeTypeId) || likely(typeid(*(_PUBLIC)) == controlVeTypeId) || likely(typeid(*(_PUBLIC)) == rootVeTypeId))
+//#else
#define IS_KNOWN_CLASS(_PUBLIC) (likely(typeid(*(_PUBLIC)) == VeTypeId) || likely(typeid(*(_PUBLIC)) == internalVeTypeId) || likely(typeid(*(_PUBLIC)) == rootVeTypeId))
-#endif
+//#endif
#define IS_INTERNAL_CLASS(_IMPL) (likely((_IMPL)->__isInternal))
#define IS_NEEDED_UPDATE_RENDER_OBJECT(__MODEL) (((__MODEL)->__isPropertyPropagationEnabled) && ((__MODEL)->__pRenderObject))
static const std::type_info& VeTypeId = typeid(VisualElement);
static const std::type_info& rootVeTypeId = typeid(_RootVisualElement);
static const std::type_info& internalVeTypeId = typeid(_VisualElement);
-#ifndef BUILD_UI_CORE
-static const std::type_info& controlVeTypeId = typeid(_ControlVisualElement);
-#endif
+//#ifndef BUILD_UI_CORE
+//static const std::type_info& controlVeTypeId = typeid(_ControlVisualElement);
+//#endif
// declared AnimationEventListener for implicit animation
class _VisualElementImplicitAnimationEventListener
_VisualElementImpl::_VisualElementImpl(VisualElement& element)
: _zOrderGroup(Z_ORDER_GROUP_NORMAL)
- , __globalRay(_Math::Vector3(0.0f),_Math::Vector3(0.0f))
, __boundingVolume()
+ , __globalRay(_Math::Vector3(0.0f),_Math::Vector3(0.0f))
, __hasGlobalRay(false)
, __nearestDistance(std::numeric_limits<float>::infinity())
, __pNearestVEImpl(null)
ClearLastResult();
// TBD: forward using property or direct return ?
-#if 0
- bool isPropertyPropagationEnabled = InvokeOnGetPropertyRequested(*pVePropPropertyPropagationEnabled).ToBool();
- if (GetLastResult() != E_SUCCESS)
- {
- return false;
- }
- return isPropertyPropagationEnabled;
-#else
return __isPropertyPropagationEnabled;
-#endif
+
}
result
__isPropertyPropagationEnabled = enable;
-// if (IS_MODEL(this))
-// {
-// if (__isPropertyPropagationEnabled)
-// {
-// AddPropertyChangeEventListener(_VisualElementModelObserver::GetInstance());
-// }
-// else
-// {
-// RemovePropertyChangeEventListener(_VisualElementModelObserver::GetInstance());
-// }
-// }
return E_SUCCESS;
}
//InvalidateHierarchyProps(HIERARCHY_PROPERTY_CONTENTBOUNDS, false, false);
InvalidateHierarchyProps(UPDATED_PROP_CONTENT_BOUNDS, false, false);
- GetSharedData().toUpdatePropImmediately.Update(this,UPDATED_PROP_CONTENT_BOUNDS);
+ // observer
+ if(IS_MODEL(this) && IS_NEEDED_UPDATE_RENDER_OBJECT(this))
+ {
+ GetSharedData().toUpdatePropImmediately.Update(this,UPDATED_PROP_CONTENT_BOUNDS);
+ }
+ else if( IS_PRESENTATION(this))
+ {
+ GetSharedData().toUpdatePropImmediately.Update(this,UPDATED_PROP_CONTENT_BOUNDS);
+ }
return E_SUCCESS;
}
return null;
}
-#if 0
- if (property.CompareTo(String(VePropBounds)) == 0)
- {
- //ToDo: default implementation
- }
- else if (property.CompareTo(String(VePropOpacity)) == 0)
- {
- //ToDo: default implementation
- }
- else if (property.CompareTo(String(VePropChildrenOpacity)) == 0)
- {
- //ToDo: default implementation
- }
- else if (property.CompareTo(String(VePropShowState)) == 0)
- {
- //ToDo: default implementation
- }
- else if (property.CompareTo(String(VePropTransform)) == 0)
- {
- //ToDo: default implementation
- }
- else if (property.CompareTo(String(VePropChildrenTransform)) == 0)
- {
- //ToDo: default implementation
- }
- else if (property.CompareTo(String(VePropZPosition)) == 0)
- {
- //ToDo: default implementation
- }
- else
- return null;
-#endif
VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
SysTryReturn(NID_UI_ANIM, pAnimation != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
bool CreateImplicitAnimationIfNeeded(const Tizen::Base::String& property, const Variant& newValue, const Variant& currentPresntationValue, const Tizen::Base::String** pSubProperties, bool isCustomProperty = false);
//Visual Element Bounding volume related
- result AdjustBoundingVolume();
- BoundingVolume& GetBoundingVolume();
+ result AdjustBoundingVolume(void);
+ BoundingVolume& GetBoundingVolume(void);
//Picking instruments
result GetChildListAt(const Tizen::Graphics::FloatPoint& point, Tizen::Base::Collection::IList* list);
private:
//Visual Element Bounding volume related
- void __AdjustBVWithChildren();
- void __AdjustParentsBV();
- void __MergeParentsBV();
+ void __AdjustBVWithChildren(void);
+ void __AdjustParentsBV(void);
+ void __MergeParentsBV(void);
//picking related methods and variables