dasjkhkljashdkjsha
This commit is contained in:
12
tomo.go
12
tomo.go
@@ -37,6 +37,10 @@ type ParentHooks struct {
|
||||
// event.
|
||||
MinimumSizeChange func (width, height int)
|
||||
|
||||
// SelectabilityChange is called when the chid element becomes
|
||||
// selectable or non-selectable.
|
||||
SelectabilityChange func (selectable bool)
|
||||
|
||||
// SelectionRequest is called when the child element element wants
|
||||
// itself to be selected. If the parent element chooses to grant the
|
||||
// request, it must send the child element a selection event.
|
||||
@@ -66,6 +70,14 @@ func (hooks ParentHooks) RunSelectionRequest () {
|
||||
}
|
||||
}
|
||||
|
||||
// RunSelectabilityChange runs the SelectionRequest hook if it is not nil. If it
|
||||
// is nil, it does nothing.
|
||||
func (hooks ParentHooks) RunSelectabilityChange (selectable bool) {
|
||||
if hooks.SelectabilityChange != nil {
|
||||
hooks.SelectabilityChange(selectable)
|
||||
}
|
||||
}
|
||||
|
||||
// Element represents a basic on-screen object.
|
||||
type Element interface {
|
||||
// Element must implement the Image interface. Elements should start out
|
||||
|
||||
Reference in New Issue
Block a user