const Flex::SizeTuple ITEM_SIZE = Flex::SizeTuple{ 10.0f, 10.0f };
const Flex::SizeTuple ITEM_SIZE_CALLBACK_TEST = Flex::SizeTuple{ 15.0f, 15.0f };
-Flex::SizeTuple MeasureChild( Actor child, float width, int measureModeWidth, float height, int measureModeHeight)
+void MeasureChild( Actor child, float width, int measureModeWidth, float height, int measureModeHeight, Flex::SizeTuple *childSize)
{
- Flex::SizeTuple childSize = ITEM_SIZE;
+ *childSize = ITEM_SIZE;
if (child.GetProperty< std::string >( Dali::Actor::Property::NAME ) == "callbackTest")
{
- childSize = ITEM_SIZE_CALLBACK_TEST;
+ *childSize = ITEM_SIZE_CALLBACK_TEST;
}
- tet_printf(" MeasureChild test callback executed (%f,%f)\n", childSize.width, childSize.height );
- return childSize;
+ tet_printf(" MeasureChild test callback executed (%f,%f)\n", childSize->width, childSize->height );
}
}
Toolkit::Flex::SizeTuple nodeSize{8, 8}; // Default size set to 8,8 to aid bug detection.
if(mImpl->mMeasureCallback && mImpl->mActor.GetHandle())
{
- DALI_LOG_INFO(gLogFilter, Debug::Verbose, "MeasureNode MeasureCallback executing on %s\n", mImpl->mActor.GetHandle().GetProperty<std::string>(Dali::Actor::Property::NAME).c_str());
- nodeSize = mImpl->mMeasureCallback(mImpl->mActor.GetHandle(), width, widthMode, height, heightMode);
+ DALI_LOG_INFO(gLogFilter, Debug::Verbose, "MeasureNode MeasureCallback executing on %s\n", mImpl->mActor.GetHandle().GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str());
+ mImpl->mMeasureCallback(mImpl->mActor.GetHandle(), width, widthMode, height, heightMode, &nodeSize);
}
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "MeasureNode nodeSize width:%f height:%f\n", nodeSize.width, nodeSize.height);
return nodeSize;
* @note int, width measure specifcation mode
* @note float, available height for child
* @note int, height measure specification mode
+ * @note SizeTuple, return value
*/
-using MeasureCallback = SizeTuple (*)(Dali::Actor, float, int, float, int);
+using MeasureCallback = void (*)(Dali::Actor, float , int , float , int, SizeTuple *);
/**
* This class provides the API for calling into the Flex layout implementation.