{
class TextLabel;
}
+/**
+ * @addtogroup dali_toolkit_controls_text_controls
+ * @{
+ */
/**
* @brief A control which renders a short text string.
{
public:
- // Property indices
- static const Dali::Property::Index PROPERTY_RENDERING_BACKEND; ///< name "rendering-backend", type INT
- static const Dali::Property::Index PROPERTY_TEXT; ///< name "text", type STRING
- static const Dali::Property::Index PROPERTY_MULTI_LINE; ///< name "multi-line", type BOOLEAN
+ /**
+ * @brief The start and end property ranges for this control.
+ */
+ enum PropertyRange
+ {
+ PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+ PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices
+ };
- // Property names
- static const std::string RENDERING_BACKEND_PROPERTY_NAME; ///< Property, name "rendering-backend", type INT
- static const std::string TEXT_PROPERTY_NAME; ///< Property, name "text", type STRING
- static const std::string MULTI_LINE_PROPERTY_NAME; ///< Property, name "multi-line", type BOOLEAN
+ /**
+ * @brief An enumeration of properties belonging to the TextLabel class.
+ */
+ struct Property
+ {
+ enum
+ {
+ RENDERING_BACKEND = PROPERTY_START_INDEX, ///< name "renderingBackend", The type or rendering e.g. bitmap-based, type INT
+ TEXT, ///< name "text", The text to display in UTF-8 format, type STRING
+ FONT_FAMILY, ///< name "fontFamily", The requested font family, type STRING
+ FONT_STYLE, ///< name "fontStyle", The requested font style, type STRING
+ POINT_SIZE, ///< name "pointSize", The size of font in points, type FLOAT
+ MULTI_LINE, ///< name "multiLine", The single-line or multi-line layout option, type BOOLEAN
+ HORIZONTAL_ALIGNMENT, ///< name "horizontalAlignment", The line horizontal alignment, type STRING, values "BEGIN", "CENTER", "END"
+ VERTICAL_ALIGNMENT, ///< name "verticalAlignment", The line vertical alignment, type STRING, values "TOP", "CENTER", "BOTTOM"
+ TEXT_COLOR, ///< name "textColor", The text color, type VECTOR4
+ SHADOW_OFFSET, ///< name "shadowOffset", The drop shadow offset 0 indicates no shadow, type VECTOR2
+ SHADOW_COLOR, ///< name "shadowColor", The color of a drop shadow, type VECTOR4
+ UNDERLINE_ENABLED, ///< name "underlineEnabled", The underline enabled flag, type BOOLEAN
+ UNDERLINE_COLOR, ///< name "underlineColor", The color of the underline, type VECTOR4
+ UNDERLINE_HEIGHT ///< name "underlineHeight", Overrides the underline height from font metrics, type FLOAT
+ };
+ };
/**
- * Create the TextLabel control.
+ * @brief Create the TextLabel control.
+ *
* @return A handle to the TextLabel control.
*/
static TextLabel New();
/**
+ * @brief Create the TextLabel control.
+ *
+ * @param[in] text The text to display.
+ * @return A handle to the TextLabel control.
+ */
+ static TextLabel New( const std::string& text );
+
+ /**
* @brief Creates an empty handle.
*/
TextLabel();
explicit DALI_INTERNAL TextLabel( Dali::Internal::CustomActor* internal );
};
+/**
+ * @}
+ */
} // namespace Toolkit
} // namespace Dali