X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-field-impl.h;h=329d7b5a708b57e1cb998150fbed7d6b9ed27cdf;hp=b788d809bd7fc44ea3911c000bae04df0a1e57e3;hb=27e7fb1ad1e36527c7af8b739ec49ac19b4ff309;hpb=bf58973c37b31d52707463a1e9cdecdbe91099f6 diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.h b/dali-toolkit/internal/controls/text-controls/text-field-impl.h index b788d80..329d7b5 100755 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -42,7 +43,7 @@ namespace Internal /** * @brief A control which renders a short text string. */ -class TextField : public Control, public Text::ControlInterface, public Text::EditableControlInterface +class TextField : public Control, public Text::ControlInterface, public Text::EditableControlInterface, public Text::SelectableControlInterface { public: @@ -102,106 +103,133 @@ public: */ Toolkit::TextField::InputStyleChangedSignalType& InputStyleChangedSignal(); - /** - * @brief Called to select the whole texts. - */ - void SelectWholeText(); - - /** - * @brief Called to unselect the whole texts. - */ - void SelectNone(); - private: // From Control /** * @copydoc Control::OnInitialize() */ - virtual void OnInitialize(); + void OnInitialize() override; /** * @copydoc Control::OnStyleChange() */ - virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ); + void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ) override; /** * @copydoc Control::GetNaturalSize() */ - virtual Vector3 GetNaturalSize(); + Vector3 GetNaturalSize() override; /** * @copydoc Control::GetHeightForWidth() */ - virtual float GetHeightForWidth( float width ); + float GetHeightForWidth( float width ) override; /** * @copydoc Control::OnInitialize() */ - virtual void OnRelayout( const Vector2& size, RelayoutContainer& container ); + void OnRelayout( const Vector2& size, RelayoutContainer& container ) override; /** * @copydoc Control::OnKeyInputFocusGained() */ - virtual void OnKeyInputFocusGained(); + void OnKeyInputFocusGained() override; /** * @copydoc Control::OnKeyInputFocusLost() */ - virtual void OnKeyInputFocusLost(); + void OnKeyInputFocusLost() override; /** * @copydoc Control::OnTap() */ - virtual void OnTap( const TapGesture& tap ); + void OnTap( const TapGesture& tap ) override; /** * @copydoc Control::OnPan() */ - virtual void OnPan( const PanGesture& gesture ); + void OnPan( const PanGesture& gesture ) override; /** * @copydoc Control::OnLongPress() */ - virtual void OnLongPress( const LongPressGesture& gesture ); + void OnLongPress( const LongPressGesture& gesture ) override; /** * @copydoc Control::OnSceneConnection() */ - virtual void OnSceneConnection( int depth ); + void OnSceneConnection( int depth ) override; /** * @copydoc Dali::CustomActorImpl::OnKeyEvent(const KeyEvent&) */ - virtual bool OnKeyEvent(const KeyEvent& event); + bool OnKeyEvent(const KeyEvent& event) override; // From ControlInterface /** * @copydoc Text::ControlInterface::RequestTextRelayout() */ - virtual void RequestTextRelayout(); + void RequestTextRelayout() override; // From EditableControlInterface /** - * @copydoc Text::ControlInterface::TextChanged() + * @copydoc Text::EditableControlInterface::TextChanged() + */ + void TextChanged() override; + + /** + * @copydoc Text::EditableControlInterface::MaxLengthReached() + */ + void MaxLengthReached() override; + + /** + * @copydoc Text::EditableControlInterface::InputStyleChanged() + */ + void InputStyleChanged( Text::InputStyle::Mask inputStyleMask ) override; + + /** + * @copydoc Text::EditableControlInterface::AddDecoration() + */ + void AddDecoration( Actor& actor, bool needsClipping ) override; + +// From SelectableControlInterface +public: + /** + * @copydoc Text::SelectableControlInterface::SetTextSelectionRange() + */ + void SetTextSelectionRange(const uint32_t *start, const uint32_t *end) override; + + /** + * @copydoc Text::SelectableControlInterface::GetTextSelectionRange() + */ + Uint32Pair GetTextSelectionRange() const override; + + /** + * @copydoc Text::SelectableControlInterface::SelectWholeText() + */ + void SelectWholeText() override; + + /** + * @copydoc Text::SelectableControlInterface::SelectNone() */ - virtual void TextChanged(); + void SelectNone() override; /** - * @copydoc Text::ControlInterface::MaxLengthReached() + * @copydoc Text::SelectableControlInterface::GetSelectedText() */ - virtual void MaxLengthReached(); + string GetSelectedText() const override; /** - * @copydoc Text::ControlInterface::InputStyleChanged() + * @copydoc Text::EditableControlInterface::IsEditable() */ - virtual void InputStyleChanged( Text::InputStyle::Mask inputStyleMask ); + bool IsEditable() const override; /** - * @copydoc Text::ControlInterface::AddDecoration() + * @copydoc Text::EditableControlInterface::SetEditable() */ - virtual void AddDecoration( Actor& actor, bool needsClipping ); + void SetEditable( bool editable ) override; private: // Implementation