X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-editable-control-interface.h;h=0f55494405b9a338422be9dd9cefb716a6dca3a9;hb=b8da2e53925b9abb9fa362560069e8ca4aa62f81;hp=e54704c834641d42af7e5503d4e640f40c2eb3f4;hpb=3e6769f502e8ce54a9ddd4579707438bb5827a62;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-editable-control-interface.h b/dali-toolkit/internal/text/text-editable-control-interface.h index e54704c..0f55494 100644 --- a/dali-toolkit/internal/text/text-editable-control-interface.h +++ b/dali-toolkit/internal/text/text-editable-control-interface.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_EDITABLE_CONTROL_INTERFACE_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -23,27 +23,39 @@ namespace Dali { - class Actor; namespace Toolkit { - namespace Text { - /** * @brief An interface that the Text::Controller uses to notify about text changes and add decoration to the text control. */ class EditableControlInterface { public: - /** * @brief Virtual destructor. */ virtual ~EditableControlInterface() - {} + { + } + + /** + * @brief Called to signal that text has been inserted. + */ + virtual void TextInserted(unsigned int position, unsigned int length, const std::string& content) = 0; + + /** + * @brief Called to signal that text has been deleted. + */ + virtual void TextDeleted(unsigned int position, unsigned int length, const std::string& content) = 0; + + /** + * @brief Called to signal that caret (cursor position) has been moved. + */ + virtual void CaretMoved(unsigned int position) = 0; /** * @brief Called to signal that text has been inserted or deleted. @@ -60,7 +72,7 @@ public: * * @param[in] inputStyleMask Mask with the bits of the input style that has changed. */ - virtual void InputStyleChanged( InputStyle::Mask inputStyleMask ) = 0; + virtual void InputStyleChanged(InputStyle::Mask inputStyleMask) = 0; /** * @brief Add a decoration. @@ -68,7 +80,21 @@ public: * @param[in] decoration The actor displaying a decoration. * @param[in] needsClipping Whether the actor needs clipping. */ - virtual void AddDecoration( Actor& actor, bool needsClipping ) = 0; + virtual void AddDecoration(Actor& actor, bool needsClipping) = 0; + + /** + * @brief Editable status (on/off). + * + * @return true if it can be edit, else false. + */ + virtual bool IsEditable() const = 0; + + /** + * @brief Change the editable status (on/off) . + * + * @param[in] editable The editable status. + */ + virtual void SetEditable(bool editable) = 0; }; } // namespace Text