package ui import ( "fyne.io/fyne/v2/container" "gitea.mmo.to/ppForge/ppforge/packet" "gitea.mmo.to/ppForge/ppforge/packetctl" ) // PacketFileHandler implements TabProvider, FileHandler type PacketFileHandler struct { PacketEditor *PacketEditor name string path string changed bool tab *container.TabItem Reference *packet.Structure } func NewPacketFileHandler() *PacketFileHandler { pfh := PacketFileHandler{} pfh.name = "*new" pfh.changed = true pfh.Reference = packetctl.NewPacketStructure() pfh.PacketEditor = NewPacketEditor(pfh.Reference) return &pfh } func (pfh *PacketFileHandler) SetTab(tab *container.TabItem) { pfh.tab = tab } func (pfh *PacketFileHandler) Tab() *container.TabItem { return pfh.tab } func (pfh *PacketFileHandler) Name() string { return pfh.name } func (pfh *PacketFileHandler) Path() string { return pfh.path } func (pfh *PacketFileHandler) Open(path string) error { return nil } func (pfh *PacketFileHandler) Save() error { return nil } func (pfh *PacketFileHandler) SaveAs(path string) error { return nil } func (pfh *PacketFileHandler) Close() error { return nil } func (pfh *PacketFileHandler) SetChanged() { } func (pfh *PacketFileHandler) HasChanged() bool { return true } func (pfh *PacketFileHandler) GetReference() interface{} { return nil }