3 This file is part of libmspgltk
4 Copyright © 2011 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
22 void Grid::start_row()
28 void Grid::skip_cell()
32 if(cur_column>=columns.size())
36 Layout::Slot *Grid::create_slot(Widget &wdg)
38 Slot *slot = new Slot(*this, wdg);
40 slot->vert_pack.gravity = 1;
44 Slot &prev = *slots.back();
46 slot->constraints.push_back(Constraint(BELOW, prev));
49 slot->constraints.push_back(Constraint(ALIGN_TOP, prev));
50 slot->constraints.push_back(Constraint(ALIGN_BOTTOM, prev));
52 slot->constraints.push_back(Constraint(RIGHT_OF, prev));
57 slot->constraints.push_back(Constraint(COPY_WIDTH, prev));
58 slot->constraints.push_back(Constraint(COPY_HEIGHT, prev));
61 if(cur_column<columns.size() && columns[cur_column])
63 Slot &col = *columns[cur_column];
64 slot->constraints.push_back(Constraint(ALIGN_LEFT, col));
65 slot->constraints.push_back(Constraint(ALIGN_RIGHT, col));
69 if(cur_column>=columns.size())
70 columns.push_back(slot);
71 else if(!columns[cur_column])
72 columns[cur_column] = slot;