-#ifndef __DALI_TOOLKIT_TEXT_FIELD_H__
-#define __DALI_TOOLKIT_TEXT_FIELD_H__
+#ifndef DALI_TOOLKIT_TEXT_FIELD_H
+#define DALI_TOOLKIT_TEXT_FIELD_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
namespace Dali
{
-
namespace Toolkit
{
-
namespace Internal DALI_INTERNAL
{
class TextField;
class DALI_TOOLKIT_API TextField : public Control
{
public:
-
/**
* @brief The start and end property ranges for this control.
* @SINCE_1_0.0
enum PropertyRange
{
PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0
- PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices @SINCE_1_0.0
+ PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices @SINCE_1_0.0
};
/**
enum
{
/**
- * @brief The type or rendering e.g. bitmap-based.
- * @details Name "renderingBackend", type Property::INTEGER.
- * @SINCE_1_0.0
- */
- RENDERING_BACKEND = PROPERTY_START_INDEX,
-
- /**
* @brief The text to display in UTF-8 format.
* @details Name "text", type Property::STRING.
* @SINCE_1_0.0
*/
- TEXT,
+ TEXT = PROPERTY_START_INDEX,
/**
* @brief The text to display when the TextField is empty and inactive.
PLACEHOLDER_TEXT_COLOR,
/**
- * @brief This property is removed because it's deprecated.
- */
- RESERVED_PROPERTY_01,
-
- /**
- * @brief This property is removed because it's deprecated.
- */
- RESERVED_PROPERTY_02,
-
- /**
* @brief The color to apply to the primary cursor.
* @details Name "primaryCursorColor", type Property::VECTOR4.
* @SINCE_1_0.0
*/
enum ExceedPolicy
{
- EXCEED_POLICY_ORIGINAL, ///< The text will be display at original size, and may exceed the TextField boundary. @SINCE_1_0.0
- EXCEED_POLICY_CLIP ///< The end of text will be clipped to fit within the TextField. @SINCE_1_0.0
+ EXCEED_POLICY_ORIGINAL, ///< The text will be display at original size, and may exceed the TextField boundary. @SINCE_1_0.0
+ EXCEED_POLICY_CLIP ///< The end of text will be clipped to fit within the TextField. @SINCE_1_0.0
};
/**
*/
struct InputStyle
{
- /**
+ /**
* @brief Mask used by the signal InputStyleChangedSignal().
*
* @SINCE_1_2_2
*/
enum Mask
{
- NONE = 0x0000, ///< @SINCE_1_2_2
- COLOR = 0x0001, ///< @SINCE_1_2_2
- FONT_FAMILY = 0x0002, ///< @SINCE_1_2_2
- POINT_SIZE = 0x0004, ///< @SINCE_1_2_2
- FONT_STYLE = 0x0008, ///< @SINCE_1_2_2
- UNDERLINE = 0x0010, ///< @SINCE_1_2_2
- SHADOW = 0x0020, ///< @SINCE_1_2_2
- EMBOSS = 0x0040, ///< @SINCE_1_2_2
- OUTLINE = 0x0080 ///< @SINCE_1_2_2
+ NONE = 0x0000, ///< @SINCE_1_2_2
+ COLOR = 0x0001, ///< @SINCE_1_2_2
+ FONT_FAMILY = 0x0002, ///< @SINCE_1_2_2
+ POINT_SIZE = 0x0004, ///< @SINCE_1_2_2
+ FONT_STYLE = 0x0008, ///< @SINCE_1_2_2
+ UNDERLINE = 0x0010, ///< @SINCE_1_2_2
+ SHADOW = 0x0020, ///< @SINCE_1_2_2
+ EMBOSS = 0x0040, ///< @SINCE_1_2_2
+ OUTLINE = 0x0080, ///< @SINCE_1_2_2
+ STRIKETHROUGH = 0x1000
};
};
* @brief Text changed signal type.
* @SINCE_1_0.0
*/
- typedef Signal<void ( TextField ) > TextChangedSignalType;
+ typedef Signal<void(TextField)> TextChangedSignalType;
/**
* @brief Max Characters Exceed signal type.
* @SINCE_1_0.0
*/
- typedef Signal<void ( TextField ) > MaxLengthReachedSignalType;
+ typedef Signal<void(TextField)> MaxLengthReachedSignalType;
/**
* @brief Input Style changed signal type.
* @SINCE_1_2_2
*/
- typedef Signal<void ( TextField, InputStyle::Mask ) > InputStyleChangedSignalType;
+ typedef Signal<void(TextField, InputStyle::Mask)> InputStyleChangedSignalType;
/**
* @brief Creates the TextField control.
static TextField New();
/**
+ * @brief Creates the TextField control with additional behaviour.
+ *
+ * @SINCE_2_2.3
+ * @param[in] additionalBehaviour Additional control behaviour
+ * @return A handle to the TextField control
+ */
+ static TextField New(ControlBehaviour additionalBehaviour);
+
+ /**
* @brief Creates an empty handle.
* @SINCE_1_0.0
*/
* @SINCE_1_0.0
* @param[in] handle The handle to copy from
*/
- TextField( const TextField& handle );
+ TextField(const TextField& handle);
+
+ /**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ TextField(TextField&& rhs) noexcept;
/**
* @brief Assignment operator.
* @param[in] handle The handle to copy from
* @return A reference to this
*/
- TextField& operator=( const TextField& handle );
+ TextField& operator=(const TextField& handle);
+
+ /**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ TextField& operator=(TextField&& rhs) noexcept;
/**
* @brief Destructor.
* @param[in] handle Handle to an object
* @return Handle to a TextField or an empty handle
*/
- static TextField DownCast( BaseHandle handle );
+ static TextField DownCast(BaseHandle handle);
// Signals
InputStyleChangedSignalType& InputStyleChangedSignal();
public: // Not intended for application developers
-
/**
* @brief Creates a handle using the Toolkit::Internal implementation.
*
* @SINCE_1_0.0
* @param[in] implementation The Control implementation
*/
- DALI_INTERNAL TextField( Internal::TextField& implementation );
+ DALI_INTERNAL TextField(Internal::TextField& implementation);
/**
* @brief Allows the creation of this Control from an Internal::CustomActor pointer.
* @SINCE_1_0.0
* @param[in] internal A pointer to the internal CustomActor
*/
- explicit DALI_INTERNAL TextField( Dali::Internal::CustomActor* internal );
+ explicit DALI_INTERNAL TextField(Dali::Internal::CustomActor* internal);
};
/**
} // namespace Dali
-#endif // __DALI_TOOLKIT_TEXT_FIELD_H__
+#endif // DALI_TOOLKIT_TEXT_FIELD_H