X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-selectable-control-interface.h;h=da19108c14f074905c407b4736d482f9fe7438b4;hp=fe70abb2917f6fd86969ceba63053e6c43f564c3;hb=7018f61b640b6fcf9cb576b537bafcb6bb8240e8;hpb=cb826363b4f5e93a8b72521d75b4f456496cf1bb diff --git a/dali-toolkit/internal/text/text-selectable-control-interface.h b/dali-toolkit/internal/text/text-selectable-control-interface.h index fe70abb..da19108 100644 --- a/dali-toolkit/internal/text/text-selectable-control-interface.h +++ b/dali-toolkit/internal/text/text-selectable-control-interface.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_SELECTABLE_CONTROL_INTERFACE_H /* - * Copyright (c) 2020 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. @@ -20,21 +20,18 @@ namespace Dali { - namespace Toolkit { - -using Uint32Pair = std::pair; +using Uint32Pair = std::pair; +using string = std::string; namespace Text { - /** * @brief An interface that the Text::Controller used for text selection functionality. */ class SelectableControlInterface { public: - /** * @brief Virtual destructor. */ @@ -45,13 +42,29 @@ public: * @param start start selection position (pass NULL to ignore). * @param end end selection position (pass NULL to ignore). */ - virtual void SetTextSelectionRange(const uint32_t *start, const uint32_t *end) = 0; + virtual void SetTextSelectionRange(const uint32_t* start, const uint32_t* end) = 0; /** * @brief Called to return the selection postions in the texts. * @return pair contains start and end positions. */ virtual Uint32Pair GetTextSelectionRange() const = 0; + + /** + * @brief Called to select the whole texts. + */ + virtual void SelectWholeText() = 0; + + /** + * @brief Called to unselect the whole texts. + */ + virtual void SelectNone() = 0; + + /** + * @brief Retrive Selected text. + * @return The seletced text. + */ + virtual string GetSelectedText() const = 0; }; } // namespace Text