Added new quick widget: quick_groupbox.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
4ef4a5e032
Коммит
f9f686af1e
@ -411,6 +411,13 @@ quick_dialog_skip (QuickDialog *qd, int nskip)
|
||||
qw->widget = (Widget *) label_new (ypos, xpos, I18N (qw->u.label.text));
|
||||
break;
|
||||
|
||||
case quick_groupbox:
|
||||
qw->widget = (Widget *) groupbox_new (ypos, xpos,
|
||||
qw->u.groupbox.height,
|
||||
qw->u.groupbox.width,
|
||||
I18N (qw->u.groupbox.title));
|
||||
break;
|
||||
|
||||
case quick_radio:
|
||||
{
|
||||
int i;
|
||||
|
26
src/wtools.h
26
src/wtools.h
@ -31,7 +31,8 @@ typedef enum {
|
||||
quick_button = 2,
|
||||
quick_input = 3,
|
||||
quick_label = 4,
|
||||
quick_radio = 5
|
||||
quick_radio = 5,
|
||||
quick_groupbox = 6
|
||||
} quick_t;
|
||||
|
||||
/* The widget is placed on relative_?/divisions_? of the parent widget */
|
||||
@ -75,6 +76,12 @@ typedef struct {
|
||||
const char **items;
|
||||
int *value; /* in/out */
|
||||
} radio;
|
||||
|
||||
struct {
|
||||
int width;
|
||||
int height;
|
||||
const char *title;
|
||||
} groupbox;
|
||||
} u;
|
||||
} QuickWidget;
|
||||
|
||||
@ -162,6 +169,23 @@ typedef struct {
|
||||
} \
|
||||
}
|
||||
|
||||
#define QUICK_GROUPBOX(x, xdiv, y, ydiv, w, h, t) \
|
||||
{ \
|
||||
.widget_type = quick_groupbox, \
|
||||
.relative_x = x, \
|
||||
.x_divisions = xdiv, \
|
||||
.relative_y = y, \
|
||||
.y_divisions = ydiv, \
|
||||
.widget = NULL, \
|
||||
.u = { \
|
||||
.groupbox = { \
|
||||
.width = w, \
|
||||
.height = h, \
|
||||
.title = t \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define QUICK_END \
|
||||
{ \
|
||||
.widget_type = quick_end, \
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user