X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-field-impl.h;h=5be5ba74bcfb4ec7bb6aebc5440ca3d08b9b7658;hb=23b11d5e9e206a703616aeef9bea3f75647a54db;hp=b1150ff535813d12be0c1b60062142537c5c3367;hpb=610da2945e1b56e09b12466b1c23b90aa348abdd;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 b1150ff..5be5ba7 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H__ -#define __DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H__ +#ifndef DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H +#define DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 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. @@ -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 short text string. */ -class TextField : public Control, public Text::ControlInterface +class TextField : public Control, public Text::ControlInterface, public Text::EditableControlInterface { public: @@ -92,6 +92,11 @@ public: */ Toolkit::TextField::MaxLengthReachedSignalType& MaxLengthReachedSignal(); + /** + * @copydoc TextField::TextChangedSignal() + */ + Toolkit::TextField::InputStyleChangedSignalType& InputStyleChangedSignal(); + private: // From Control /** @@ -154,16 +159,15 @@ private: // From Control */ virtual bool OnKeyEvent(const KeyEvent& event); - /** - * @copydoc Text::ControlInterface::AddDecoration() - */ - virtual void AddDecoration( Actor& actor, bool needsClipping ); +// From ControlInterface /** * @copydoc Text::ControlInterface::RequestTextRelayout() */ virtual void RequestTextRelayout(); +// From EditableControlInterface + /** * @copydoc Text::ControlInterface::TextChanged() */ @@ -175,6 +179,18 @@ 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 + + /** * @copydoc Dali::Toolkit::Text::Controller::(ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent) */ ImfManager::ImfCallbackData OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent ); @@ -185,15 +201,18 @@ private: // From Control */ void OnClipboardTextSelected( ClipboardEventNotifier& clipboard ); -private: // Implementation + /** + * @brief Get a Property Map for the image used for the required Handle Image + * @param[out] value the returned image property + * @param[in] handleType the type of handle + * @param[in] handleImageType the type of image for the given handleType + */ + 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 ); + void EnableClipping(); /** * @brief Callback when keyboard is shown/hidden. @@ -203,12 +222,19 @@ private: // Implementation void KeyboardStatusChanged( bool keyboardShown ); /** - * @brief Callback when Textfield is touched + * @brief Callback when TextField is touched * * @param[in] actor TextField 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::TextField::InputStyleChangedSignal() are emitted. */ - bool OnTouched( Actor actor, const TouchEvent& event ); + void OnIdleSignal(); /** * Construct a new TextField. @@ -227,7 +253,7 @@ private: // Implementation /** * @brief Render view, create and attach actor(s) to this Text Field. */ - void RenderText(); + void RenderText( Text::Controller::UpdateTextType updateTextType ); // Connection needed to re-render text, when a Text Field returns to the stage. void OnStageConnect( Dali::Actor actor ); @@ -237,18 +263,20 @@ private: // Data // Signals Toolkit::TextField::TextChangedSignalType mTextChangedSignal; Toolkit::TextField::MaxLengthReachedSignalType mMaxLengthReachedSignal; + Toolkit::TextField::InputStyleChangedSignalType mInputStyleChangedSignal; Text::ControllerPtr mController; Text::RendererPtr mRenderer; Text::DecoratorPtr mDecorator; - Text::ClipperPtr mClipper; ///< For EXCEED_POLICY_CLIP + Toolkit::Control mStencil; ///< For EXCEED_POLICY_CLIP std::vector mClippingDecorationActors; ///< Decoration actors which need clipping. Actor mRenderableActor; + CallbackBase* mIdleCallback; + float mAlignmentOffset; int mRenderingBackend; int mExceedPolicy; - unsigned int mDepth; bool mHasBeenStaged:1; }; @@ -278,4 +306,4 @@ inline const Toolkit::Internal::TextField& GetImpl( const Toolkit::TextField& te } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H__ +#endif // DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H