diff options
| author | Pietro Gagliardi <[email protected]> | 2014-09-01 10:18:22 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-09-01 10:18:22 -0400 |
| commit | 1d67ff52819fada3a167494946f3ef9a6ca729f9 (patch) | |
| tree | 678973b4603edf32c84b9aec3d3e21be1b7c95ff | |
| parent | 83b1957fd7d03e0eb16f86e481596af1d095dd16 (diff) | |
Improved Grid's documentation.
| -rw-r--r-- | grid.go | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 |
