34 #include "../common/context.h" |
34 #include "../common/context.h" |
35 #include "../common/object.h" |
35 #include "../common/object.h" |
36 |
36 |
37 #include "Grid.h" |
37 #include "Grid.h" |
38 |
38 |
|
39 |
|
40 UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs args) { |
|
41 Arg xargs[64]; |
|
42 int n = 0; |
|
43 |
|
44 UiContainerPrivate *ctn = ui_obj_container(obj); |
|
45 UI_APPLY_LAYOUT(ctn->layout, args); |
|
46 |
|
47 Widget parent = ctn->prepare(ctn, xargs, &n); |
|
48 Widget widget = create_widget(obj, args, userdata, parent, xargs, n); |
|
49 XtManageChild(widget); |
|
50 ctn->add(ctn, widget); |
|
51 |
|
52 return widget; |
|
53 } |
|
54 |
39 /* ---------------------------- Box Container ---------------------------- */ |
55 /* ---------------------------- Box Container ---------------------------- */ |
40 |
56 |
41 static UIWIDGET box_create(UiObject *obj, UiContainerArgs args, UiBoxOrientation orientation) { |
57 static UIWIDGET box_create(UiObject *obj, UiContainerArgs args, UiBoxOrientation orientation) { |
42 UiContainerPrivate *ctn = ui_obj_container(obj); |
58 UiContainerPrivate *ctn = ui_obj_container(obj); |
43 UI_APPLY_LAYOUT(ctn->layout, args); |
59 UI_APPLY_LAYOUT(ctn->layout, args); |