// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
-#include <dali-toolkit/public-api/text/rendering/text-renderer.h>
namespace Dali
{
/**
* @brief A control which renders a short text string.
+ *
+ * Text labels are lightweight, non-editable and do not respond to user input.
*/
class DALI_IMPORT_API TextLabel : public Control
{
public:
- // Property indices
- static const Property::Index PROPERTY_TEXT; ///< name "text", type STRING
- static const 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 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 "rendering-backend", 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 "font-family", The requested font family, type STRING
+ FONT_STYLE, ///< name "font-style", The requested font style e.g. Regular/Italic, type STRING
+ POINT_SIZE, ///< name "point-size", The size of font in points, type FLOAT
+ MULTI_LINE, ///< name "multi-line", The single-line or multi-line layout option, type BOOLEAN
+ ALIGNMENT, ///< name "alignment", The line alignment, type STRING, values "BEGIN", "CENTER", "END"
+ };
+ };
/**
* Create the TextLabel control.
*/
static TextLabel DownCast( BaseHandle handle );
- /**
- * @brief Set the rendering back-end used by the TextLabel.
- *
- * @param[in] renderer The text renderer to use.
- */
- void SetRenderer( Text::RendererPtr renderer );
-
public: // Not intended for application developers
/**