ui/motif/container.c

changeset 63
46a42f0c4f93
parent 62
70d2aee84432
child 64
6ef2c7f73a30
equal deleted inserted replaced
62:70d2aee84432 63:46a42f0c4f93
245 245
246 // get the maximum height in this row 246 // get the maximum height in this row
247 if(widget_height > rheight) { 247 if(widget_height > rheight) {
248 rheight = widget_height; 248 rheight = widget_height;
249 } 249 }
250 rowdim = ucx_list_append(rowdim, (void*)(intptr_t)rheight);
251 250
252 // get the maximum width in this column 251 // get the maximum width in this column
253 if(widget_width > coldim[i]) { 252 if(widget_width > coldim[i]) {
254 coldim[i] = widget_width; 253 coldim[i] = widget_width;
255 } 254 }
261 i++; 260 i++;
262 if(i > numcol) { 261 if(i > numcol) {
263 numcol = i; 262 numcol = i;
264 } 263 }
265 } 264 }
265 rowdim = ucx_list_append(rowdim, (void*)(intptr_t)rheight);
266 sumh += rheight; 266 sumh += rheight;
267 } 267 }
268 268
269 // check container size 269 // check container size
270 int gwidth = 0; 270 int gwidth = 0;
282 UCX_FOREACH(row, grid->lines) { 282 UCX_FOREACH(row, grid->lines) {
283 int x = 0; 283 int x = 0;
284 int i=0; 284 int i=0;
285 UCX_FOREACH(elm, row->data) { 285 UCX_FOREACH(elm, row->data) {
286 Widget w = elm->data; 286 Widget w = elm->data;
287 XtVaSetValues(w, XmNx, x, XmNy, y, NULL); 287 XtVaSetValues(
288 w,
289 XmNx, x,
290 XmNy, y,
291 XmNwidth, coldim[i],
292 XmNheight, rowdim->data,
293 NULL);
288 294
289 x += coldim[i]; 295 x += coldim[i];
290 i++; 296 i++;
291 } 297 }
292 y += (intptr_t)rowdim->data; 298 y += (intptr_t)rowdim->data;

mercurial