+ i->build(geom, state, part_cache);
+ else
+ rebuild_special(*i);
+ }
+ part_cache.end_rebuild();
+}
+
+void Widget::rebuild_special(const Part &part)
+{
+ part_cache.insert_special(part);
+}
+
+void Widget::render(GL::Renderer &renderer) const
+{
+ if(!style)
+ throw logic_error(format("Attempt to render a widget with null style (class=\"%s\", style_name=\"%s\")", get_class(), style_name));
+
+ GL::Renderer::Push _push(renderer);
+ renderer.transform(GL::Matrix::translation(geom.x, geom.y, 0));
+ const PartCache::PartList &parts = part_cache.get_parts();
+ for(PartCache::PartList::const_iterator i=parts.begin(); i!=parts.end(); ++i)
+ {
+ if(i->mesh && i->texture)