From 1d67ff52819fada3a167494946f3ef9a6ca729f9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 1 Sep 2014 10:18:22 -0400 Subject: [PATCH] Improved Grid's documentation. --- grid.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/grid.go b/grid.go index a049a38..dd420e6 100644 --- a/grid.go +++ b/grid.go @@ -7,8 +7,15 @@ import ( ) // Grid is a Control that arranges other Controls in a grid. -// Grid is a very powerful container: it can position and size each Control in several ways and can (and must) have Controls added to it at any time. +// Grid is a very powerful container: it can position and size each Control in several ways and can (and must) have Controls added to it at any time, in any direction. // [TODO it can also have Controls spanning multiple rows and columns.] +// +// Each Control in a Grid has associated "expansion" and "alignment" values in both the X and Y direction. +// Expansion determines whether all cells in the same row/column are given whatever space is left over after figuring how big the rest of the Grid should be. +// Alignment determines the position of a Control relative to its cell after computing the above. +// The special alignment Fill can be used to grow a Control to fit its cell. +// Note that expansion and alignment are independent variables. +// For more information on expansion and alignment, read https://developer.gnome.org/gtk3/unstable/ch28s02.html. type Grid interface { Control