X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-impl.h;h=233e3d28bec8e17f75f1615abed453cd179ec312;hb=23b11d5e9e206a703616aeef9bea3f75647a54db;hp=f00d66da4b484b626bc7be8e3d762747babe402a;hpb=dda9d7ca30d6f5c42759647df03a13e52c76228a;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-impl.h b/dali-toolkit/internal/controls/text-controls/text-editor-impl.h index f00d66d..233e3d2 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.h @@ -1,5 +1,5 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H__ -#define __DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H__ +#ifndef DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H +#define DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H /* * Copyright (c) 2016 Samsung Electronics Co., Ltd. @@ -21,9 +21,9 @@ // INTERNAL INCLUDES #include #include -#include #include #include +#include #include #include @@ -42,7 +42,7 @@ namespace Internal /** * @brief A control which renders a long text string with styles. */ -class TextEditor : public Control, public Text::ControlInterface +class TextEditor : public Control, public Text::ControlInterface, public Text::EditableControlInterface { public: @@ -87,6 +87,11 @@ public: */ Toolkit::TextEditor::TextChangedSignalType& TextChangedSignal(); + /** + * @copydoc TextEditor::TextChangedSignal() + */ + Toolkit::TextEditor::InputStyleChangedSignalType& InputStyleChangedSignal(); + private: // From Control /** @@ -152,15 +157,12 @@ private: // From Control // From ControlInterface /** - * @copydoc Text::ControlInterface::AddDecoration() - */ - virtual void AddDecoration( Actor& actor, bool needsClipping ); - - /** * @copydoc Text::ControlInterface::RequestTextRelayout() */ virtual void RequestTextRelayout(); +// From EditableControlInterface + /** * @copydoc Text::ControlInterface::TextChanged() */ @@ -171,6 +173,16 @@ private: // From Control */ virtual void MaxLengthReached(); + /** + * @copydoc Text::ControlInterface::InputStyleChanged() + */ + virtual void InputStyleChanged( Text::InputStyle::Mask inputStyleMask ); + + /** + * @copydoc Text::ControlInterface::AddDecoration() + */ + virtual void AddDecoration( Actor& actor, bool needsClipping ); + private: // Implementation /** @@ -193,14 +205,6 @@ private: // Implementation void GetHandleImagePropertyValue( Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType ); /** - * @brief Enable or disable clipping. - * - * @param[in] clipping True if clipping should be enabled. - * @param[in] size The area to clip within. - */ - void EnableClipping( bool clipping, const Vector2& size ); - - /** * @brief Callback when keyboard is shown/hidden. * * @param[in] keyboardShown True if keyboard is shown. @@ -211,9 +215,16 @@ private: // Implementation * @brief Callback when TextEditor is touched * * @param[in] actor TextEditor touched - * @param[in] event TouchEvent information + * @param[in] touch Touch information + */ + bool OnTouched( Actor actor, const TouchData& touch ); + + /** + * @brief Callbacks called on idle. + * + * If there are notifications of change of input style on the queue, Toolkit::TextEditor::InputStyleChangedSignal() are emitted. */ - bool OnTouched( Actor actor, const TouchEvent& event ); + void OnIdleSignal(); /** * Construct a new TextEditor. @@ -232,7 +243,7 @@ private: // Implementation /** * @brief Render view, create and attach actor(s) to this text editor. */ - void RenderText(); + void RenderText( Text::Controller::UpdateTextType updateTextType ); // Connection needed to re-render text, when a text editor returns to the stage. void OnStageConnect( Dali::Actor actor ); @@ -241,15 +252,18 @@ private: // Data // Signals Toolkit::TextEditor::TextChangedSignalType mTextChangedSignal; + Toolkit::TextEditor::InputStyleChangedSignalType mInputStyleChangedSignal; Text::ControllerPtr mController; Text::RendererPtr mRenderer; Text::DecoratorPtr mDecorator; - Text::ClipperPtr mClipper; + Toolkit::Control mStencil; std::vector mClippingDecorationActors; ///< Decoration actors which need clipping. Actor mRenderableActor; + CallbackBase* mIdleCallback; + float mAlignmentOffset; int mRenderingBackend; bool mHasBeenStaged:1; }; @@ -280,4 +294,4 @@ inline const Toolkit::Internal::TextEditor& GetImpl( const Toolkit::TextEditor& } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H__ +#endif // DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H