43 lines
655 B
Go
43 lines
655 B
Go
package ui
|
|
|
|
import "fyne.io/fyne/v2/container"
|
|
|
|
type appInterface interface {
|
|
LazyInit() error
|
|
GetTabItem() *container.TabItem
|
|
GetAppName() string
|
|
OpenDefault() bool
|
|
OnClose() bool
|
|
}
|
|
|
|
var (
|
|
appRegister = []appInterface{
|
|
&appWelcome{},
|
|
&appTester{},
|
|
}
|
|
)
|
|
|
|
type appAdapter struct {
|
|
tabItem *container.TabItem
|
|
}
|
|
|
|
func (a appAdapter) LazyInit() error {
|
|
panic("implement LazyInit")
|
|
}
|
|
|
|
func (a appAdapter) GetAppName() string {
|
|
panic("implement GetAppName()")
|
|
}
|
|
|
|
func (a appAdapter) OpenDefault() bool {
|
|
return false
|
|
}
|
|
|
|
func (a appAdapter) GetTabItem() *container.TabItem {
|
|
return a.tabItem
|
|
}
|
|
|
|
func (a appAdapter) OnClose() bool {
|
|
return true
|
|
}
|