add Caller in keyboard ,add OnKdbReturnBackCb on Page interface

This commit is contained in:
cuu
2018-12-09 18:08:18 +08:00
parent efd46d3a35
commit 4ac7debfb4
5 changed files with 31 additions and 6 deletions

View File

@@ -89,7 +89,7 @@ type Keyboard struct {
Textarea *Textarea
Selector *KeyboardSelector
Caller PageInterface
}
func NewKeyboard() *Keyboard {
@@ -466,6 +466,9 @@ func (self *Keyboard) KeyDown( ev *event.Event) {
fmt.Println(strings.Join(self.Textarea.MyWords,""))
self.ReturnToUpLevelPage()
self.Screen.SwapAndShow()
if self.Caller != nil {
self.Caller.OnKbdReturnBackCb()
}
//Uplevel/Parent page invoke OnReturnBackCb,eg: ConfigWireless
}