ui/ui/display.h

branch
newapi
changeset 220
e377456302df
parent 219
527a66c0afb2
child 221
a82d9beaa94a
equal deleted inserted replaced
219:527a66c0afb2 220:e377456302df
52 UiTri fill; 52 UiTri fill;
53 UiBool hexpand; 53 UiBool hexpand;
54 UiBool vexpand; 54 UiBool vexpand;
55 int colspan; 55 int colspan;
56 int rowspan; 56 int rowspan;
57 int width;
58 57
59 const char* label; 58 const char* label;
60 UiAlignment align; 59 UiAlignment align;
61 UiString* value; 60 UiString* value;
62 const char* varname; 61 const char* varname;
63 } UiLabelArgs; 62 } UiLabelArgs;
63
64 typedef struct UiProgressbarArgs {
65 UiTri fill;
66 UiBool hexpand;
67 UiBool vexpand;
68 int colspan;
69 int rowspan;
70 int width;
71
72 double min;
73 double max;
74 UiDouble* value;
75 const char* varname;
76 } UiProgressbarArgs;
64 77
65 /* label widgets */ 78 /* label widgets */
66 79
67 #define ui_label(obj, ...) ui_label_create(obj, (UiLabelArgs) { __VA_ARGS__ }) 80 #define ui_label(obj, ...) ui_label_create(obj, (UiLabelArgs) { __VA_ARGS__ })
68 #define ui_llabel(obj, ...) ui_llabel_create(obj, (UiLabelArgs) { __VA_ARGS__ }) 81 #define ui_llabel(obj, ...) ui_llabel_create(obj, (UiLabelArgs) { __VA_ARGS__ })
71 84
72 UIEXPORT UIWIDGET ui_label_create(UiObject* obj, UiLabelArgs args); 85 UIEXPORT UIWIDGET ui_label_create(UiObject* obj, UiLabelArgs args);
73 UIEXPORT UIWIDGET ui_llabel_create(UiObject* obj, UiLabelArgs args); 86 UIEXPORT UIWIDGET ui_llabel_create(UiObject* obj, UiLabelArgs args);
74 UIEXPORT UIWIDGET ui_rlabel_create(UiObject* obj, UiLabelArgs args); 87 UIEXPORT UIWIDGET ui_rlabel_create(UiObject* obj, UiLabelArgs args);
75 88
76 UIWIDGET ui_label_deprecated(UiObject *obj, char *label);
77 UIWIDGET ui_llabel_deprecated(UiObject *obj, char *label);
78 UIWIDGET ui_rlabel_deprecated(UiObject *obj, char *label);
79
80 UIWIDGET ui_space(UiObject *obj); 89 UIWIDGET ui_space(UiObject *obj);
81 UIWIDGET ui_separator(UiObject *obj); 90 UIWIDGET ui_separator(UiObject *obj);
82 91
83 /* progress bar */ 92 /* progress bar */
84 UIWIDGET ui_progressbar(UiObject *obj, UiDouble *value); 93
85 UIWIDGET ui_progressbar_nv(UiObject *obj, char *varname); 94 #define ui_progressbar(obj, ...) ui_progressbar_create(obj, (UiProgressbarArgs) { __VA_ARGS__ } )
95
96 UIEXPORT UIWIDGET ui_progressbar_create(UiObject *obj, UiProgressbarArgs args);
86 97
87 98
88 #ifdef __cplusplus 99 #ifdef __cplusplus
89 } 100 }
90 #endif 101 #endif

mercurial