|
|
|
|
Etk_Label
Detailed Description
The Etk_Label widget is a simple widget that can display text.
You can use html-like tags to format the text of the label. For example, "<b>Text</b>" makes Text bold.
Here is the list of the supported tags:
- "<left>Text</left>": Align left
- "<right>Text</right>": Align right
- "<center>Text</center>": Align center
- "<b>Text</b>": Bold
- "<b>Text</b>": Italic
- "<bi>Text</bi>": Bold-Italic
- "<color=#rrggbbaa>Text</>": Set the color of the text
- "<font_size=16>Text</>": Set the size of the text
- "<title>Text</title>": Style for titles
- "<subtitle>Text</subtitle>": Style for subtitles
- "<glow>Text</glow>": Make the the text glow
- "<description>Text</description>": Style for descriptions
- "<br>": End of line
- "<tab>": Add a tab
- Object Hierarchy:
-
- Properties:
- "label": The text of the label widget
Type: String (char *)Access: Read/WriteDefault Value: NULL
- "xalign": The horizontal alignment of the text of the label, from 0.0 (left-aligned) to 1.0 (right-aligned)
Type: FloatAccess: Read/WriteDefault Value: 0.0
- "yalign": The vertical alignment of the text of the label, from 0.0 (top-aligned) to 1.0 (bottom-aligned)
Type: FloatAccess: Read/WriteDefault Value: 0.5
Define Documentation
#define ETK_LABEL_TYPE (etk_label_type_get()) |
#define ETK_LABEL |
( |
obj |
|
) |
(ETK_OBJECT_CAST((obj), ETK_LABEL_TYPE, Etk_Label)) |
#define ETK_IS_LABEL |
( |
obj |
|
) |
(ETK_OBJECT_CHECK_TYPE((obj), ETK_LABEL_TYPE)) |
Function Documentation
Creates a new label.
- Parameters:
-
| text | the text to set to the label |
- Returns:
- Returns the new label widget
void etk_label_set |
( |
Etk_Label * |
label, |
|
|
const char * |
text | |
|
) |
| | |
Sets the text of the label.
- Parameters:
-
| label | a label |
| text | the text to set |
const char * etk_label_get |
( |
Etk_Label * |
label |
) |
|
Gets the text of the label.
- Parameters:
-
- Returns:
- Returns the text of the label
void etk_label_alignment_set |
( |
Etk_Label * |
label, |
|
|
float |
xalign, |
|
|
float |
yalign | |
|
) |
| | |
Sets the alignment of the label.
- Parameters:
-
| label | a label |
| xalign | the horizontal alignment (0.0 = left, 0.5 = center, 1.0 = right, ...) |
| yalign | the vertical alignment (0.0 = top, 0.5 = center, 1.0 = bottom, ...) |
void etk_label_alignment_get |
( |
Etk_Label * |
label, |
|
|
float * |
xalign, |
|
|
float * |
yalign | |
|
) |
| | |
Gets the alignment of the label.
- Parameters:
-
| label | a label |
| xalign | the location to store the horizontal alignment |
| yalign | the location to store the vertical alignment |
|
|
|
|
|
|