Removed Control.setParent() as the parent/child hierarchy is now unidirectional.
This commit is contained in:
parent
a400ec6666
commit
91113a32bf
|
@ -12,7 +12,6 @@ type Button struct {
|
|||
|
||||
lock sync.Mutex
|
||||
created bool
|
||||
parent Control
|
||||
sysData *sysData
|
||||
initText string
|
||||
}
|
||||
|
@ -55,7 +54,3 @@ func (b *Button) setRect(x int, y int, width int, height int) error {
|
|||
|
||||
return b.sysData.setRect(x, y, width, height)
|
||||
}
|
||||
|
||||
func (b *Button) setParent(c Control) {
|
||||
b.parent = c
|
||||
}
|
||||
|
|
|
@ -10,5 +10,4 @@ import (
|
|||
type Control interface {
|
||||
apply(window *sysData) error
|
||||
setRect(x int, y int, width int, height int) error
|
||||
setParent(c Control)
|
||||
}
|
||||
|
|
|
@ -105,6 +105,3 @@ func (w *Window) apply(window *sysData) error {
|
|||
func (w *Window) setRect(x int, y int, width int, height int) error {
|
||||
panic("Window.setRect() should never be called")
|
||||
}
|
||||
func (w *Window) setParent(c Control) {
|
||||
panic("Window.setParent() should never be called")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue