 |
 |
 |
 |
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)) |
Casts the object to an Etk_Label
Referenced by etk_button_alignment_set(), etk_button_label_get(), etk_button_label_set(), etk_combobox_active_item_set(), etk_combobox_entry_item_field_get(), etk_combobox_entry_item_fields_get_valist(), etk_combobox_fields_set_valist(), etk_combobox_item_field_get(), etk_combobox_item_fields_get_valist(), etk_message_dialog_text_get(), etk_message_dialog_text_set(), and etk_tooltips_pop_up().
#define ETK_IS_LABEL |
( |
obj |
|
) |
(ETK_OBJECT_CHECK_TYPE((obj), ETK_LABEL_TYPE)) |
Function Documentation
void etk_label_set |
( |
Etk_Label * |
label, |
|
|
const char * |
text | |
|
) |
| | |
const char * etk_label_get |
( |
Etk_Label * |
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, ...) |
References ETK_CLAMP, ETK_OBJECT, etk_object_notify(), ETK_WIDGET, etk_widget_redraw_queue(), xalign, and yalign.
Referenced by etk_button_alignment_set().
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 |
References xalign, and yalign.
|
 |
 |
 |
 |
|