namespace Msp {
namespace GLtk {
-Row::Row(bool u):
- uniform(u)
+Row::Row(Layout &l):
+ LinearArrangement(l, RIGHT)
{ }
-Layout::Slot *Row::create_slot(Widget &w)
+void Row::finish_widget(Widget &wdg)
{
- Slot *slot = new Slot(*this, w);
-
- if(!slots.empty())
- {
- Slot &prev = *slots.back();
- slot->constraints.push_back(Constraint(RIGHT_OF, prev));
- slot->constraints.push_back(Constraint(ALIGN_TOP, prev));
- slot->constraints.push_back(Constraint(ALIGN_BOTTOM, prev));
- if(uniform)
- slot->constraints.push_back(Constraint(COPY_WIDTH, prev));
- }
- slot->vert_pack.expand = true;
-
- return slot;
+ layout.set_gravity(wdg, (gravity==LEFT ? -1 : 1), 1);
}
} // namespace GLtk