dasjkhkljashdkjsha
This commit is contained in:
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user