package ui import ( "fyne.io/fyne/v2/container" "gitea.mmo.to/ProtocolPacketForger/ppf/packet" "gitea.mmo.to/ProtocolPacketForger/ppf/packetctl" ) // implements TabProvider, FileHandler type PacketFileHandler struct { PacketEditor *PacketEditor name string path string changed bool tab *container.TabItem Reference *packet.PacketStructure } 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 }