-#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.
#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>
/**
* @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:
*/
Toolkit::TextField::MaxLengthReachedSignalType& MaxLengthReachedSignal();
+ /**
+ * @copydoc TextField::TextChangedSignal()
+ */
+ Toolkit::TextField::InputStyleChangedSignalType& InputStyleChangedSignal();
+
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()
*/
*/
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
/**
/**
* @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( const Vector2& size );
/**
* @brief Callback when keyboard is shown/hidden.
* @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.
/**
* @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 );
// Signals
Toolkit::TextField::TextChangedSignalType mTextChangedSignal;
Toolkit::TextField::MaxLengthReachedSignalType mMaxLengthReachedSignal;
+ Toolkit::TextField::InputStyleChangedSignalType mInputStyleChangedSignal;
Text::ControllerPtr mController;
Text::RendererPtr mRenderer;
std::vector<Actor> mClippingDecorationActors; ///< Decoration actors which need clipping.
Actor mRenderableActor;
+ CallbackBase* mIdleCallback;
int mRenderingBackend;
int mExceedPolicy;
} // namespace Dali
-#endif // __DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H__
+#endif // DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H