1
2 /** \file label.h
3 * \brief Header: WLabel widget
4 */
5
6 #ifndef MC__WIDGET_LABEL_H
7 #define MC__WIDGET_LABEL_H
8
9 /*** enums ***************************************************************************************/
10
11 typedef enum
12 {
13 LABEL_COLOR_MAIN,
14 LABEL_COLOR_DISABLED,
15 LABEL_COLOR_COUNT
16 } label_colors_enum_t;
17
18 /*** typedefs(not structures) and defined constants **********************************************/
19
20 #define LABEL(x) ((WLabel *) (x))
21
22 typedef int label_colors_t[LABEL_COLOR_COUNT];
23
24 /*** structures declarations (and typedefs of structures)*****************************************/
25
26 typedef struct
27 {
28 Widget widget;
29 gboolean auto_adjust_cols; // compute widget.cols from strlen(text)?
30 char *text;
31 const int *color; // NULL to inherit from parent widget
32 } WLabel;
33
34 /*** global variables defined in .c file *********************************************************/
35
36 /*** declarations of public functions ************************************************************/
37
38 WLabel *label_new (int y, int x, const char *text);
39 void label_set_text (WLabel *label, const char *text);
40 void label_set_textv (WLabel *label, const char *format, ...) G_GNUC_PRINTF (2, 3);
41
42 /*** inline functions ****************************************************************************/
43
44 #endif