#define DALI_TOOLKIT_CONTROL_IMPL_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class StyleManager;
+namespace DevelControl
+{
+class ControlAccessible;
+
+} // namespace DevelControl
+
namespace Internal
{
class Extension; ///< Forward declare future extension interface
// Creation & Destruction
-
/**
* @brief Creates a new ControlImpl instance that does not require touch by default.
*
*/
void ClearBackground();
+ /**
+ * @brief Called when resources of control are ready.
+ * @param[in] relayoutRequest True to request relayout
+ */
+ void SetResourceReady(bool relayoutRequest);
+
+ // Accessibility
+
+ /**
+ * @brief Gets the Accessible object that represents this control.
+ *
+ * This method calls CreateAccessibleObject() if necessary, so a non-null return is expected.
+ *
+ * @return The Accessible object
+ *
+ * @see CreateAccessibleObject()
+ */
+ Toolkit::DevelControl::ControlAccessible* GetAccessibleObject();
+
// Gesture Detection
/**
*/
void OnLayoutNegotiated(float size, Dimension::Type dimension) override;
-protected: // Helpers for deriving classes
- // Construction
+public: // Helpers for deriving classes
/**
* @brief Flags for the constructor.
static const int CONTROL_BEHAVIOUR_FLAG_COUNT = Log<LAST_CONTROL_BEHAVIOUR_FLAG - 1>::value + 1; ///< Total count of flags
/**
+ * @brief Creates a new ControlImpl instance that does not require touch by default.
+ *
+ * If touch is required, then the user can connect to this class' touch signal.
+ * @SINCE_2_1.8
+ * @param[in] additionalBehaviour Additional control behaviour.
+ * @return A handle to the ControlImpl instance
+ */
+ static Toolkit::Control New(ControlBehaviour additionalBehaviour);
+
+protected:
+ // Construction
+
+ /**
* @brief Control constructor.
*
* @SINCE_1_0.0
*/
virtual void OnInitialize();
+ /**
+ * @copydoc Dali::Toolkit::Control::IsResourceReady
+ */
+ virtual bool IsResourceReady() const;
+
// Styling
/**
*/
virtual bool OnAccessibilityZoom();
+ /**
+ * @brief This method should be overriden by deriving classes when they wish to be
+ * represented by a custom Accessible object implementation.
+ *
+ * The AT-SPI infrastructure is responsible for destroying the returned object.
+ *
+ * Currently, this method is called at most once in a given Control's lifetime, when
+ * GetAccessibleObject() is called for the first time. A future version of the
+ * AT-SPI infrastructure, however, may delete the Accessible object and request a new
+ * one to be created (by calling this method) multiple times, for example during
+ * scene connection and disconnection.
+ *
+ * @return The newly created Accessible object
+ *
+ * @see GetAccessibleObject()
+ */
+ virtual DevelControl::ControlAccessible* CreateAccessibleObject();
+
// Keyboard focus
/**