mapeditor

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(app fyne.App, x int, y int, data string)

New creates a new map editor

Types

type Widget

type Widget struct {
	// contains filtered or unexported fields
}

Widget is a complete map editor as a widget

func NewMapEditorWidget

func NewMapEditorWidget() *Widget

NewMapEditorWidget creates and returns a new map editor widget

func (*Widget) CreateRenderer

func (m *Widget) CreateRenderer() fyne.WidgetRenderer

CreateRenderer creates a renderer for the widget

func (*Widget) Hide

func (m *Widget) Hide()

Hide is called to hide the widget

func (*Widget) Key

func (m *Widget) Key(event *fyne.KeyEvent)

Key is called when a key is pressed

func (*Widget) MinSize

func (m *Widget) MinSize() fyne.Size

MinSize returns the minimum size of the widget

func (*Widget) Move

func (m *Widget) Move(p fyne.Position)

Move is called when the widget is to be moved

func (*Widget) Position

func (m *Widget) Position() fyne.Position

Position retuns the current position of the widget

func (*Widget) Resize

func (m *Widget) Resize(s fyne.Size)

Resize is called when the widget needs to be resized

func (*Widget) Rune

func (m *Widget) Rune(r rune)

Rune is called when a user types a char

func (*Widget) SetData

func (m *Widget) SetData(data string)

SetData sets the contents of the map

func (*Widget) SetMapSize

func (m *Widget) SetMapSize(x, y int)

SetMapSize sets the map size by grid units

func (*Widget) Show

func (m *Widget) Show()

Show makes the widget visible

func (*Widget) Size

func (m *Widget) Size() fyne.Size

Size returns the size of the widget

func (*Widget) Tapped

func (m *Widget) Tapped(event *fyne.PointEvent)

Tapped is called when the user taps the map widget

func (*Widget) TappedSecondary

func (m *Widget) TappedSecondary(event *fyne.PointEvent)

TappedSecondary is called when the user right-taps the map widget

func (*Widget) Visible

func (m *Widget) Visible() bool

Visible returns true / false whether the widget is visible

Jump to

Keyboard shortcuts

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