ui/motif/widget.c

changeset 108
77254bd6dccb
parent 103
6606616eca9f
child 112
c3f2f16fa4b8
equal deleted inserted replaced
107:b34bd1557c6c 108:77254bd6dccb
35 #include "container.h" 35 #include "container.h"
36 #include "../common/context.h" 36 #include "../common/context.h"
37 #include "../common/object.h" 37 #include "../common/object.h"
38 38
39 39
40 UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs args) { 40 UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs *args) {
41 Arg xargs[64]; 41 Arg xargs[64];
42 int n = 0; 42 int n = 0;
43 43
44 UiContainerPrivate *ctn = ui_obj_container(obj); 44 UiContainerPrivate *ctn = ui_obj_container(obj);
45 UI_APPLY_LAYOUT(ctn->layout, args); 45 UI_APPLY_LAYOUT(ctn->layout, args);
54 54
55 55
56 UIEXPORT UIWIDGET ui_separator_create(UiObject *obj, UiWidgetArgs *args) { 56 UIEXPORT UIWIDGET ui_separator_create(UiObject *obj, UiWidgetArgs *args) {
57 Arg xargs[64]; 57 Arg xargs[64];
58 int n = 0; 58 int n = 0;
59 UiWidgetArgs a = *args;
60 59
61 UiContainerPrivate *ctn = ui_obj_container(obj); 60 UiContainerPrivate *ctn = ui_obj_container(obj);
62 UI_APPLY_LAYOUT(ctn->layout, a); 61 UI_APPLY_LAYOUT(ctn->layout, args);
63 62
64 char *name = a.name ? (char*)a.name : "separator"; 63 char *name = args->name ? (char*)args->name : "separator";
65 Widget parent = ctn->prepare(ctn, xargs, &n); 64 Widget parent = ctn->prepare(ctn, xargs, &n);
66 Widget widget = XmCreateSeparator(parent, name, xargs, n); 65 Widget widget = XmCreateSeparator(parent, name, xargs, n);
67 XtManageChild(widget); 66 XtManageChild(widget);
68 ctn->add(ctn, widget); 67 ctn->add(ctn, widget);
69 68
70 return widget; 69 return widget;
71 } 70 }
71
72 void ui_widget_set_size(UIWIDGET w, int width, int height) {
73
74 }
75
76 void ui_widget_redraw(UIWIDGET w) {
77
78 }

mercurial