yvbolt/db_none.go

38 lines
805 B
Go
Raw Permalink Normal View History

package main
import (
"github.com/ying32/govcl/vcl"
)
type noLoadedDatabase struct{}
func (n *noLoadedDatabase) DisplayName() string {
2024-06-27 23:53:01 +00:00
return APPNAME
}
func (n *noLoadedDatabase) DriverName() string {
return "No database selected"
}
func (n *noLoadedDatabase) RootElement() *vcl.TTreeNode {
return nil
}
func (n *noLoadedDatabase) RenderForNav(f *TMainForm, ndata *navData) error {
f.propertiesBox.SetText("Open a database to get started...")
return nil
}
func (n *noLoadedDatabase) NavChildren(ndata *navData) ([]string, error) {
return []string{}, nil
}
2024-06-27 23:34:00 +00:00
func (ld *noLoadedDatabase) NavContext(ndata *navData) ([]contextAction, error) {
return nil, nil // No special actions are supported
}
func (n *noLoadedDatabase) Keepalive(ndata *navData) {
}
func (n *noLoadedDatabase) Close() {}