All pastes #333029 Raw Edit

Miscellany

public c v1 · immutable
#333029 ·published 2007-01-30 17:00 UTC
rendered paste body
static voidbrowser_widget_cb_configure(Ewl_Widget *w, void *event, void *data){	/* 		Reposition all container's children	*/	int ccount, min, max, row, cell;	Ewl_Widget *child;	Browser_Widget *bw = BROWSER_WIDGET(w);	row = 1;		ccount =  ewl_container_child_count_get (EWL_CONTAINER(w));	ewl_container_child_iterate_begin(EWL_CONTAINER(w));		while((child = ewl_container_child_next(EWL_CONTAINER(w))))	{		max = ewl_object_maximum_w_get (EWL_OBJECT(child));		min = ewl_object_minimum_w_get (EWL_OBJECT(child));				cell +=1;		printf("row %i cell %i /t x %i y %i \n", row, cell, CURRENT_X(w) + cell * max, CURRENT_Y(w) + cell * max);		ewl_object_place(EWL_OBJECT(child),						CURRENT_X(w) + cell * max,						CURRENT_Y(w) + row * max,						min,						min					);		if(cell >= bw->cell_count)		{			cell = 0;			row +=1;		}	}}