Improved Grid's documentation.

This commit is contained in:
Pietro Gagliardi 2014-09-01 10:18:22 -04:00
parent 83b1957fd7
commit 1d67ff5281
1 changed files with 8 additions and 1 deletions

View File

@ -7,8 +7,15 @@ import (
) )
// Grid is a Control that arranges other Controls in a grid. // 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.] // [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 { type Grid interface {
Control Control