ui/layout: document List, Stack

Tweak Flex documentation.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-10 16:35:51 +02:00
parent 8f17163a13
commit ba3a952af2
3 changed files with 22 additions and 4 deletions
+2 -2
View File
@@ -30,8 +30,7 @@ type Flex struct {
maxBaseline int
}
// FlexChild is the layout result of a call to Rigid or
// Flexible.
// FlexChild is the layout result of a call End.
type FlexChild struct {
macro ui.MacroOp
dims Dimens
@@ -67,6 +66,7 @@ const (
modeFlex
)
// Init must be called before Rigid or Flexible.
func (f *Flex) Init(ops *ui.Ops, cs Constraints) *Flex {
if f.mode > modeBegun {
panic("must End the current child before calling Init again")