#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-field-devel.h>
#include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/internal/controls/text-controls/common-text-utils.h>
#include <dali-toolkit/internal/text/decorator/text-decorator.h>
#include <dali-toolkit/internal/text/rendering/text-renderer.h>
#include <dali-toolkit/internal/text/text-anchor-control-interface.h>
#include <dali-toolkit/internal/text/text-control-interface.h>
-#include <dali-toolkit/internal/text/text-controller.h>
+#include <dali-toolkit/internal/text/controller/text-controller.h>
#include <dali-toolkit/internal/text/text-editable-control-interface.h>
#include <dali-toolkit/internal/text/text-selectable-control-interface.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
void OnInitialize() override;
/**
+ * @copydoc Toolkit::Internal::Control::CreateAccessibleObject()
+ */
+ DevelControl::ControlAccessible* CreateAccessibleObject() override;
+
+ /**
* @copydoc Control::OnStyleChange()
*/
void OnStyleChange(Toolkit::StyleManager styleManager, StyleChange::Type change) override;
void OnSceneConnection(int depth) override;
/**
+ * @copydoc Control::OnPropertySet()
+ */
+ void OnPropertySet(Property::Index index, const Property::Value& propertyValue) override;
+
+ /**
* @copydoc Dali::CustomActorImpl::OnKeyEvent(const KeyEvent&)
*/
bool OnKeyEvent(const KeyEvent& event) override;
/**
* @brief This structure is to connect TextField with Accessible functions.
*/
- class TextFieldAccessible : public DevelControl::ControlAccessible,
- public virtual Dali::Accessibility::EditableText,
- public virtual Dali::Accessibility::Hypertext
+ class TextFieldAccessible : public EditableTextControlAccessible
{
public:
- using DevelControl::ControlAccessible::ControlAccessible;
+ using EditableTextControlAccessible::EditableTextControlAccessible;
/**
* @copydoc Dali::Accessibility::Accessible::GetName()
*/
std::string GetName() const override;
+ protected:
/**
- * @copydoc Dali::Accessibility::Text::GetText()
- */
- std::string GetText(size_t startOffset, size_t endOffset) const override;
-
- /**
- * @copydoc Dali::Accessibility::Text::GetCharacterCount()
- */
- size_t GetCharacterCount() const override;
-
- /**
- * @copydoc Dali::Accessibility::Text::GetCursorOffset()
- */
- size_t GetCursorOffset() const override;
-
- /**
- * @copydoc Dali::Accessibility::Text::SetCursorOffset()
- */
- bool SetCursorOffset(size_t offset) override;
-
- /**
- * @copydoc Dali::Accessibility::Text::GetTextAtOffset()
- */
- Accessibility::Range GetTextAtOffset(size_t offset, Accessibility::TextBoundary boundary) const override;
-
- /**
- * @copydoc Dali::Accessibility::Text::GetRangeOfSelection()
- */
- Accessibility::Range GetRangeOfSelection(size_t selectionIndex) const override;
-
- /**
- * @copydoc Dali::Accessibility::Text::RemoveSelection()
- */
- bool RemoveSelection(size_t selectionIndex) override;
-
- /**
- * @copydoc Dali::Accessibility::Text::SetRangeOfSelection()
- */
- bool SetRangeOfSelection(size_t selectionIndex, size_t startOffset, size_t endOffset) override;
-
- /**
- * @copydoc Dali::Accessibility::Text::GetRangeExtents()
- */
- Rect<> GetRangeExtents(size_t startOffset, size_t endOffset, Accessibility::CoordinateType type) override;
-
- /**
- * @copydoc Dali::Accessibility::EditableText::CopyText()
- */
- bool CopyText(size_t startPosition, size_t endPosition) override;
-
- /**
- * @copydoc Dali::Accessibility::EditableText::CutText()
- */
- bool CutText(size_t startPosition, size_t endPosition) override;
-
- /**
- * @copydoc Dali::Accessibility::Accessible::GetStates()
- */
- Accessibility::States CalculateStates() override;
-
- /**
- * @copydoc Dali::Accessibility::EditableText::InsertText()
- */
- bool InsertText(size_t startPosition, std::string text) override;
-
- /**
- * @copydoc Dali::Accessibility::EditableText::SetTextContents()
+ * @copydoc Dali::Toolkit::Internal::TextControlAccessible::GetTextAnchors()
*/
- bool SetTextContents(std::string newContents) override;
+ const std::vector<Toolkit::TextAnchor>& GetTextAnchors() const override;
/**
- * @copydoc Dali::Accessibility::EditableText::DeleteText()
+ * @copydoc Dali::Toolkit::Internal::TextControlAccessible::GetTextController()
*/
- bool DeleteText(size_t startPosition, size_t endPosition) override;
+ Toolkit::Text::ControllerPtr GetTextController() const override;
/**
- * @copydoc Dali::Accessibility::Hypertext::GetLink()
+ * @copydoc Dali::Toolkit::Internal::TextControlAccessible::GetSubstituteCharacter()
*/
- Accessibility::Hyperlink* GetLink(int32_t linkIndex) const override;
+ std::uint32_t GetSubstituteCharacter() const override;
/**
- * @copydoc Dali::Accessibility::Hypertext::GetLinkIndex()
+ * @copydoc Dali::Toolkit::Internal::TextControlAccessible::IsHiddenInput()
*/
- int32_t GetLinkIndex(int32_t characterOffset) const override;
+ bool IsHiddenInput() const override;
/**
- * @copydoc Dali::Accessibility::Hypertext::GetLinkCount()
+ * @copydoc Dali::Toolkit::Internal::EditableTextControlAccessible::RequestTextRelayout()
*/
- int32_t GetLinkCount() const override;
+ void RequestTextRelayout() override;
};
};