ui/motif/container.c

changeset 101
7b3a3130be44
parent 100
d2bd73d28ff1
equal deleted inserted replaced
100:d2bd73d28ff1 101:7b3a3130be44
126 // public 126 // public
127 UIWIDGET ui_grid_create(UiObject *obj, UiContainerArgs args) { 127 UIWIDGET ui_grid_create(UiObject *obj, UiContainerArgs args) {
128 Arg xargs[16]; 128 Arg xargs[16];
129 int n = 0; 129 int n = 0;
130 130
131 XtSetArg(xargs[n], XmNbackground, 0); n++;
132
133 UiContainerPrivate *ctn = ui_obj_container(obj); 131 UiContainerPrivate *ctn = ui_obj_container(obj);
134 UI_APPLY_LAYOUT(ctn->layout, args); 132 UI_APPLY_LAYOUT(ctn->layout, args);
135 133
136 Widget parent = ctn->prepare(ctn, xargs, &n); 134 Widget parent = ctn->prepare(ctn, xargs, &n);
135 XtSetArg(xargs[n], gridMargin, args.margin); n++;
136 XtSetArg(xargs[n], gridColumnSpacing, args.columnspacing); n++;
137 XtSetArg(xargs[n], gridRowSpacing, args.rowspacing); n++;
137 Widget grid = XtCreateManagedWidget(args.name ? args.name : "gridcontainer", gridClass, parent, xargs, n); 138 Widget grid = XtCreateManagedWidget(args.name ? args.name : "gridcontainer", gridClass, parent, xargs, n);
138 ctn->add(ctn, grid); 139 ctn->add(ctn, grid);
139 140
140 UiContainerX *container = ui_grid_container(obj, grid); 141 UiContainerX *container = ui_grid_container(obj, grid);
141 uic_object_push_container(obj, container); 142 uic_object_push_container(obj, container);

mercurial