+ // place/size the widgets
+ if (!adjustable.empty())
+ each = free / adjustable.size();
+ else
+ each = 0;
+ for (it = visible.begin(), end = visible.end(); it != end; ++it) {
+ unsigned int h;
+ // is the widget adjustable?
+ std::list<Widget*>::const_iterator
+ found = std::find(adjustable.begin(), adjustable.end(), *it);
+ if (found != adjustable.end()) {
+ // adjustable
+ h = (*it)->minSize().height() + each;
+ } else {
+ // fixed
+ h = (*it)->minSize().height();
+ }
+ // align it horizontally
+ int xx = x;
+ unsigned int ww = std::max(std::min(w, (*it)->_max_size.width()),
+ (*it)->_min_size.width());
+ if (ww < w) {
+ switch(_alignment) {
+ case RenderStyle::RightBottomJustify:
+ xx += w - ww;
+ break;
+ case RenderStyle::CenterJustify:
+ xx += (w - ww) / 2;
+ break;
+ case RenderStyle::LeftTopJustify:
+ break;
+ }
+ }
+ (*it)->internal_moveresize(xx, y, ww, h);
+ (*it)->render();
+ (*it)->layout();
+ y += h + _bevel;
+ }