Back to godoc.org

Package pkg

v0.0.0-...-328a337
Latest Go to latest

The highest tagged major version is .

Published: Aug 25, 2020 | License: Apache-2.0 | Module: github.com/kpfaulkner/goui

Index

type Window

type Window struct {

	// widget that has focus...  I think that will do?
	FocusedWidget *widgets.IWidget
	// contains filtered or unexported fields
}

Window used to define the UI window for the application. Currently will just cater for single window per app. This will be reviewed in the future.

func NewWindow

func NewWindow(width int, height int, title string, haveMenuBar bool, haveToolBar bool) Window

func (*Window) AddKeyboardHandler

func (w *Window) AddKeyboardHandler(handler func(event events.KeyboardEvent) error) error

func (*Window) AddMouseHandler

func (w *Window) AddMouseHandler(handler func(event events.MouseEvent) error) error

func (*Window) AddPanel

func (w *Window) AddPanel(panel widgets.IPanel) error

func (*Window) Draw

func (w *Window) Draw(screen *ebiten.Image)

func (*Window) FindWidgetForInput

func (w *Window) FindWidgetForInput(x float64, y float64) (*widgets.IWidget, error)

FindWidgetForInput Need to make recursive for panels in panels etc... but just leave pretty linear for now.

func (*Window) FindWidgetRecursive

func (w *Window) FindWidgetRecursive(x float64, y float64, widget widgets.IWidget) widgets.IWidget

func (*Window) HandleButtonDownEvent

func (w *Window) HandleButtonDownEvent(event events.MouseEvent) error

func (*Window) HandleButtonUpEvent

func (w *Window) HandleButtonUpEvent(event events.MouseEvent) error

func (*Window) HandleEvent

func (w *Window) HandleEvent(event events.IEvent) error

func (*Window) HandleKeyboardEvent

func (w *Window) HandleKeyboardEvent(event events.KeyboardEvent) error

func (*Window) Layout

func (w *Window) Layout(outsideWidth, outsideHeight int) (int, int)

func (*Window) MainLoop

func (w *Window) MainLoop() error

func (*Window) Update

func (w *Window) Update(screen *ebiten.Image) error

///////////////////// EBiten specifics below... /////////////////////////////////////////////

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier