ppforge/app.go

57 lines
1.0 KiB
Go
Raw Normal View History

2022-11-25 11:36:29 +01:00
package ppf
2022-11-23 20:33:07 +01:00
import (
2022-11-24 21:49:10 +01:00
"fyne.io/fyne/v2"
2022-11-23 20:33:07 +01:00
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/widget"
)
func Appmain() {
a := app.New()
2022-11-25 11:36:29 +01:00
w := a.NewWindow("ProtocolPacketForger")
2022-11-24 21:49:10 +01:00
w.Resize(fyne.NewSize(800, 600))
2022-11-23 20:33:07 +01:00
hello := widget.NewLabel("Hello Fyne!")
w.SetContent(container.NewBorder(
hello,
nil,
nil,
nil,
2022-11-24 21:49:10 +01:00
container.NewVScroll(GetProtocolEditor().Representation),
2022-11-23 20:33:07 +01:00
// widget.NewButton("Hi!", func() {
// hello.SetText("Welcome :)")
// }),
))
w.ShowAndRun()
}
2022-11-25 11:36:29 +01:00
type ppfApp struct {
Toolbar *fyne.Container
Metadata *fyne.Container
Extensions *fyne.Container
ContextBar *fyne.Container
Workarea *fyne.Container
Settings map[string]string
ProtocolForging bool
}
var application ppfApp
func CreateApp() *fyne.Container {
return container.NewBorder(
application.Toolbar,
application.Metadata,
application.ContextBar,
application.Extensions,
container.NewVScroll(application.Workarea),
)
}
func CreateToolbar() *fyne.Container {
return nil
}