+ const Sides &margin = part.get_margin();
+ unsigned w = geom.w-min(geom.w, margin.left+margin.right);
+ unsigned y = geom.h-min(geom.h, margin.top);
+ for(unsigned i=0; i<items.size(); ++i)
+ {
+ if(i<first || !y)
+ items[i]->set_visible(false);
+ else
+ {
+ Geometry igeom = items[i]->get_geometry();
+ if(igeom.h+margin.bottom<=y)
+ {
+ items[i]->set_visible(true);
+ y -= igeom.h;
+ igeom.x = margin.left;
+ igeom.y = y;
+ igeom.w = w;
+ items[i]->set_geometry(igeom);
+ }
+ else
+ {
+ items[i]->set_visible(false);
+ y = 0;
+ }
+ }
+ }
+ }
+
+ Widget::rebuild_special(part);
+}
+
+void List::render_special(const Part &part, GL::Renderer &renderer) const
+{
+ if(part.get_name()=="items")
+ {
+ for(unsigned i=first; (i<items.size() && items[i]->is_visible()); ++i)
+ items[i]->render(renderer);
+ }
+ else if(part.get_name()=="slider")
+ slider.render(renderer);