Upgrade to v2.7 Fyne API v2.7
package fyne Animation Animation AnimationCurve AnimationCurve App App AppMetadata AppMetadata BuildType BuildType Canvas Canvas CanvasObject CanvasObject Clipboard Clipboard CloudProvider CloudProvider CloudProviderPreferences CloudProviderPreferences CloudProviderStorage CloudProviderStorage Container Container Delta Delta Device Device DeviceOrientation DeviceOrientation Disableable Disableable DoubleTappable DoubleTappable DragEvent DragEvent Draggable Draggable Driver Driver Focusable Focusable HardwareKey HardwareKey KeyboardShortcut KeyboardShortcut KeyEvent KeyEvent KeyModifier KeyModifier KeyName KeyName Layout Layout LegacyTheme LegacyTheme Lifecycle Lifecycle ListableURI ListableURI Locale Locale MainMenu MainMenu Menu Menu MenuItem MenuItem Notification Notification OverlayStack OverlayStack PointEvent PointEvent Position Position Preferences Preferences Resource Resource Scrollable Scrollable ScrollDirection ScrollDirection ScrollEvent ScrollEvent SecondaryTappable SecondaryTappable Settings Settings Shortcut Shortcut Shortcutable Shortcutable ShortcutCopy ShortcutCopy ShortcutCut ShortcutCut ShortcutHandler ShortcutHandler ShortcutPaste ShortcutPaste ShortcutRedo ShortcutRedo ShortcutSelectAll ShortcutSelectAll ShortcutUndo ShortcutUndo Size Size StaticResource StaticResource Storage Storage StringValidator StringValidator Tabbable Tabbable Tappable Tappable TextAlign TextAlign TextStyle TextStyle TextTruncation TextTruncation TextWrap TextWrap Theme Theme ThemeColorName ThemeColorName ThemedResource ThemedResource ThemeIconName ThemeIconName ThemeSizeName ThemeSizeName ThemeVariant ThemeVariant URI URI URIReadCloser URIReadCloser URIWithIcon URIWithIcon URIWriteCloser URIWriteCloser Validatable Validatable Vector2 Vector2 Widget Widget WidgetRenderer WidgetRenderer Window Window
app canvas container data/binding data/validation dialog driver driver/desktop driver/embedded driver/mobile driver/software lang layout storage storage/repository test theme widget

Fyne API "fyne"

fyne


import "fyne.io/fyne/v2"

Package fyne describes the objects and components available to any Fyne app. These can all be created, manipulated and tested without rendering (for speed). Your main package should use the app package to create an application with a default driver that will render your UI.

A simple application may look like this:

    package main

    import "fyne.io/fyne/v2/app"
    import "fyne.io/fyne/v2/container"
    import "fyne.io/fyne/v2/widget"

    func main() {
    	a := app.New()
    	w := a.NewWindow("Hello")

    	hello := widget.NewLabel("Hello Fyne!")
    	w.SetContent(container.NewVBox(
    		hello,
    		widget.NewButton("Hi!", func() {
    			hello.SetText("Welcome :)")
    		}),
    	))

    	w.ShowAndRun()
    }

Usage

const AnimationRepeatForever = -1

AnimationRepeatForever is an AnimationCount value that indicates it should not stop looping.

Since: 2.0
const KeyModifierShortcutDefault = KeyModifierSuper

KeyModifierShortcutDefault is the default key modifier for shortcuts (Control or Command).

Since: 2.2
const KeyModifierShortcutDefault = KeyModifierControl

KeyModifierShortcutDefault is the default key modifier for shortcuts (Control or Command).

Since: 2.2
var (
	// AnimationEaseInOut is the default easing, it starts slowly, accelerates to the middle and slows to the end.
	//
	// Since: 2.0
	AnimationEaseInOut = animationEaseInOut
	// AnimationEaseIn starts slowly and accelerates to the end.
	//
	// Since: 2.0
	AnimationEaseIn = animationEaseIn
	// AnimationEaseOut starts at speed and slows to the end.
	//
	// Since: 2.0
	AnimationEaseOut = animationEaseOut
	// AnimationLinear is a linear mapping for animations that progress uniformly through their duration.
	//
	// Since: 2.0
	AnimationLinear = animationLinear
)

func IsHorizontal

func IsHorizontal(orient DeviceOrientation) bool

IsHorizontal is a helper utility that determines if a passed orientation is horizontal

func IsVertical

func IsVertical(orient DeviceOrientation) bool

IsVertical is a helper utility that determines if a passed orientation is vertical

func LogError

func LogError(reason string, err error)

LogError reports an error to the command line with the specified err cause, if not nil. The function also reports basic information about the code location.

func Max

func Max(x, y float32) float32

Max returns the larger of the passed values.

func Min

func Min(x, y float32) float32

Min returns the smaller of the passed values.

func SetCurrentApp

func SetCurrentApp(current App)

SetCurrentApp is an internal function to set the app instance currently running.

types