Half-working container flexibility propagation
This commit is contained in:
12
element.go
12
element.go
@@ -16,9 +16,9 @@ type ParentHooks struct {
|
||||
// event.
|
||||
MinimumSizeChange func (width, height int)
|
||||
|
||||
// ExpandingHeightChange is called when the parameters affecting the
|
||||
// FlexibleHeightChange is called when the parameters affecting the
|
||||
// element's expanding height have changed.
|
||||
ExpandingHeightChange func ()
|
||||
FlexibleHeightChange func ()
|
||||
|
||||
// SelectionRequest is called when the child element element wants
|
||||
// itself to be selected. If the parent element chooses to grant the
|
||||
@@ -46,11 +46,11 @@ func (hooks ParentHooks) RunMinimumSizeChange (width, height int) {
|
||||
}
|
||||
}
|
||||
|
||||
// RunExpandingHeightChange runs the ExpandingHeightChange hook if it is not
|
||||
// RunFlexibleHeightChange runs the ExpandingHeightChange hook if it is not
|
||||
// nil. If it is nil, it does nothing.
|
||||
func (hooks ParentHooks) RunExpandingHeightChange () {
|
||||
if hooks.ExpandingHeightChange != nil {
|
||||
hooks.ExpandingHeightChange()
|
||||
func (hooks ParentHooks) RunFlexibleHeightChange () {
|
||||
if hooks.FlexibleHeightChange != nil {
|
||||
hooks.FlexibleHeightChange()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user