gui

package
v0.0.0-...-c1607c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DarkerTheme

func DarkerTheme() fyne.Theme

DarkerTheme is a darker variant of fyne.DarkTheme()

Types

type GraphicalInterface

type GraphicalInterface struct {
	App     fyne.App
	Primary Window
	Windows map[string]Window
}

GraphicalInterface represents a wrapped fyne.App

func New

func New(id string) *GraphicalInterface

New returns a wrapped fyne.App

func (*GraphicalInterface) Init

func (ui *GraphicalInterface) Init(windows map[string]Window, primary string)

Init assigns the Windows and Primary, to keep track of managed fyne.Windows

func (*GraphicalInterface) OpenWindow

func (ui *GraphicalInterface) OpenWindow(windowName string)

OpenWindow shows a given window, initializing it first if needed

func (*GraphicalInterface) Run

func (ui *GraphicalInterface) Run()

Run starts the fyne.App and shows the main window

type Window

type Window interface {
	GetWindow() fyne.Window
	SetWindow(fyne.Window)
	Init()
	Hide()
	Show()
}

Window represents a managed fyne.Window

type WindowBase

type WindowBase struct {
	App fyne.App
	UI  *GraphicalInterface
	// contains filtered or unexported fields
}

WindowBase implements the Window common pieces interface

func (*WindowBase) GetWindow

func (b *WindowBase) GetWindow() fyne.Window

GetWindow returns reference to the fyne.Window we are managing

func (*WindowBase) Hide

func (b *WindowBase) Hide()

Hide does what it says on the tin

func (*WindowBase) Init

func (b *WindowBase) Init()

Init creates a new "Hello, World" window (should be overridden!)

func (*WindowBase) SetWindow

func (b *WindowBase) SetWindow(w fyne.Window)

SetWindow immediately changes the fyne.Window we are managing

func (*WindowBase) Show

func (b *WindowBase) Show()

Show does what it says on the tin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL