dasjkhkljashdkjsha

This commit is contained in:
2023-01-10 11:51:46 -05:00
parent 34848f616b
commit b1fd021120
7 changed files with 178 additions and 17 deletions

12
tomo.go
View File

@@ -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