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

View File

@@ -15,6 +15,7 @@ type Core struct {
minimumHeight int
}
selectable bool
hooks tomo.ParentHooks
}
@@ -50,6 +51,10 @@ func (core *Core) SetParentHooks (hooks tomo.ParentHooks) {
core.hooks = hooks
}
func (core Core) Selectable () (selectable bool) {
return core.selectable
}
func (core Core) MinimumSize () (width, height int) {
return core.metrics.minimumWidth, core.metrics.minimumHeight
}
@@ -86,6 +91,14 @@ func (control *CoreControl) AllocateCanvas (width, height int) {
control.RGBA = core.canvas
}
func (control CoreControl) SetSelectable (selectable bool) {
changed := control.core.selectable != selectable
control.core.selectable = selectable
if changed {
control.core.hooks.RunSelectabilityChange(selectable)
}
}
func (control CoreControl) SetMinimumSize (width, height int) {
core := control.core
if width != core.metrics.minimumWidth ||