+/**
+ * Creates a popup that shows the version information of the DALi libraries and demo
+ */
+Dali::Toolkit::Popup CreateVersionPopup(Application& application, ConnectionTrackerInterface& connectionTracker)
+{
+ std::ostringstream stream;
+ stream << "DALi Core: " << CORE_MAJOR_VERSION << "." << CORE_MINOR_VERSION << "." << CORE_MICRO_VERSION << std::endl
+ << "(" << CORE_BUILD_DATE << ")\n";
+ stream << "DALi Adaptor: " << ADAPTOR_MAJOR_VERSION << "." << ADAPTOR_MINOR_VERSION << "." << ADAPTOR_MICRO_VERSION << std::endl
+ << "(" << ADAPTOR_BUILD_DATE << ")\n";
+ stream << "DALi Toolkit: " << TOOLKIT_MAJOR_VERSION << "." << TOOLKIT_MINOR_VERSION << "." << TOOLKIT_MICRO_VERSION << std::endl
+ << "(" << TOOLKIT_BUILD_DATE << ")\n";
+ stream << "DALi Demo:"
+ << "\n(" << DEMO_BUILD_DATE << ")\n";
+
+ Dali::Toolkit::Popup popup = Dali::Toolkit::Popup::New();
+
+ Toolkit::TextLabel titleActor = Toolkit::TextLabel::New("Version information");
+ titleActor.SetProperty(Actor::Property::NAME, "titleActor");
+ titleActor.SetProperty(Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, HorizontalAlignment::CENTER);
+ titleActor.SetProperty(Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE);
+
+ Toolkit::TextLabel contentActor = Toolkit::TextLabel::New(stream.str());
+ contentActor.SetProperty(Actor::Property::NAME, "contentActor");
+ contentActor.SetProperty(Toolkit::TextLabel::Property::MULTI_LINE, true);
+ contentActor.SetProperty(Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, HorizontalAlignment::CENTER);
+ contentActor.SetProperty(Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE);
+ contentActor.SetProperty(Actor::Property::PADDING, Padding(0.0f, 0.0f, 20.0f, 0.0f));
+
+ popup.SetTitle(titleActor);
+ popup.SetContent(contentActor);
+
+ popup.SetResizePolicy(ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH);
+ popup.SetProperty(Actor::Property::SIZE_MODE_FACTOR, Vector3(0.75f, 1.0f, 1.0f));
+ popup.SetResizePolicy(ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT);
+
+ application.GetWindow().Add(popup);
+
+ // Hide the popup when touched outside
+ popup.OutsideTouchedSignal().Connect(
+ &connectionTracker,
+ [popup]() mutable {
+ if(popup && (popup.GetDisplayState() == Toolkit::Popup::SHOWN))
+ {
+ popup.SetDisplayState(Popup::HIDDEN);
+ }
+ });
+
+ return popup;
+}
+
+/// Sets up the inner cube effect
+Dali::Toolkit::ScrollViewEffect SetupInnerPageCubeEffect(const Vector2 windowSize, int totalPages)
+{
+ Dali::Path path = Dali::Path::New();
+ Dali::Property::Array points;
+ points.Resize(3);
+ points[0] = Vector3(windowSize.x * 0.5, 0.0f, windowSize.x * 0.5f);
+ points[1] = Vector3(0.0f, 0.0f, 0.0f);
+ points[2] = Vector3(-windowSize.x * 0.5f, 0.0f, windowSize.x * 0.5f);
+ path.SetProperty(Path::Property::POINTS, points);
+
+ Dali::Property::Array controlPoints;
+ controlPoints.Resize(4);
+ controlPoints[0] = Vector3(windowSize.x * 0.5f, 0.0f, windowSize.x * 0.3f);
+ controlPoints[1] = Vector3(windowSize.x * 0.3f, 0.0f, 0.0f);
+ controlPoints[2] = Vector3(-windowSize.x * 0.3f, 0.0f, 0.0f);
+ controlPoints[3] = Vector3(-windowSize.x * 0.5f, 0.0f, windowSize.x * 0.3f);
+ path.SetProperty(Path::Property::CONTROL_POINTS, controlPoints);
+
+ return ScrollViewPagePathEffect::New(path,
+ Vector3(-1.0f, 0.0f, 0.0f),
+ Toolkit::ScrollView::Property::SCROLL_FINAL_X,
+ Vector3(windowSize.x * TABLE_RELATIVE_SIZE.x, windowSize.y * TABLE_RELATIVE_SIZE.y, 0.0f),
+ totalPages);
+}
+
+/// Sets up the scroll view rulers
+void SetupScrollViewRulers(ScrollView& scrollView, const uint16_t windowWidth, const float pageWidth, const int totalPages)