[dali_1.2.30] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-field-impl.h
index 558cced..0b7b629 100644 (file)
@@ -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) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
  *
  */
 
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
+
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-field.h>
-#include <dali-toolkit/internal/text/clipping/text-clipper.h>
 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
 #include <dali-toolkit/internal/text/text-control-interface.h>
+#include <dali-toolkit/internal/text/text-editable-control-interface.h>
 #include <dali-toolkit/internal/text/text-controller.h>
 #include <dali-toolkit/internal/text/rendering/text-renderer.h>
 
-// EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
-
 namespace Dali
 {
 
@@ -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:
 
@@ -162,15 +162,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()
    */
@@ -186,6 +183,11 @@ private: // From Control
    */
   virtual void InputStyleChanged( Text::InputStyle::Mask inputStyleMask );
 
+  /**
+   * @copydoc Text::ControlInterface::AddDecoration()
+   */
+  virtual void AddDecoration( Actor& actor, bool needsClipping );
+
 private: // Implementation
 
   /**
@@ -209,11 +211,8 @@ private: // Implementation
 
   /**
    * @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.
@@ -266,15 +265,18 @@ private: // Data
   Toolkit::TextField::MaxLengthReachedSignalType mMaxLengthReachedSignal;
   Toolkit::TextField::InputStyleChangedSignalType mInputStyleChangedSignal;
 
+  ImfManager         mImfManager;
   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<Actor> mClippingDecorationActors;   ///< Decoration actors which need clipping.
+  Dali::InputMethodOptions mInputMethodOptions;
 
   Actor mRenderableActor;
   CallbackBase* mIdleCallback;
 
+  float mAlignmentOffset;
   int mRenderingBackend;
   int mExceedPolicy;
   bool mHasBeenStaged:1;
@@ -306,4 +308,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