app

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplySettings

func ApplySettings(set fyne.Settings, app fyne.App)

ApplySettings ensures that all widgets and themeable objects in an application will be updated for the current theme. It also checks that scale changes are reflected if required

func ApplySettingsWithCallback

func ApplySettingsWithCallback(set fyne.Settings, app fyne.App, onEveryWindow func(w fyne.Window))

ApplySettingsWithCallback ensures that all widgets and themeable objects in an application will be updated for the current theme. It also checks that scale changes are reflected if required. Also it will call `onEveryWindow` on every window interaction

func ApplyThemeTo

func ApplyThemeTo(content fyne.CanvasObject, canv fyne.Canvas)

ApplyThemeTo ensures that the specified canvasobject and all widgets and themeable objects will be updated for the current theme.

Types

type FocusManager

type FocusManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

FocusManager represents a standard manager of input focus for a canvas

func NewFocusManager

func NewFocusManager(c fyne.CanvasObject) *FocusManager

NewFocusManager returns a new instance of the standard focus manager for a canvas.

func (*FocusManager) Focus

func (f *FocusManager) Focus(obj fyne.Focusable) bool

Focus focuses the given obj.

func (*FocusManager) FocusGained

func (f *FocusManager) FocusGained()

FocusGained signals to the manager that its content got focus (due to window/overlay switch for instance).

func (*FocusManager) FocusLost

func (f *FocusManager) FocusLost()

FocusLost signals to the manager that its content lost focus (due to window/overlay switch for instance).

func (*FocusManager) FocusNext

func (f *FocusManager) FocusNext()

FocusNext will find the item after the current that can be focused and focus it. If current is nil then the first focusable item in the canvas will be focused.

func (*FocusManager) FocusPrevious

func (f *FocusManager) FocusPrevious()

FocusPrevious will find the item before the current that can be focused and focus it. If current is nil then the last focusable item in the canvas will be focused.

func (*FocusManager) Focused

func (f *FocusManager) Focused() fyne.Focusable

Focused returns the currently focused object or nil if none.

type Lifecycle

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

Lifecycle represents the various phases that an app can transition through.

Since: 2.1

func (*Lifecycle) SetOnEnteredForeground

func (l *Lifecycle) SetOnEnteredForeground(f func())

SetOnEnteredForeground hooks into the the app becoming foreground.

func (*Lifecycle) SetOnExitedForeground

func (l *Lifecycle) SetOnExitedForeground(f func())

SetOnExitedForeground hooks into the app having moved to the background. Depending on the platform it may still be visible but will not receive keyboard events. On some systems hover or desktop mouse move events may still occur.

func (*Lifecycle) SetOnStarted

func (l *Lifecycle) SetOnStarted(f func())

SetOnStarted hooks into an event that says the app is now running.

func (*Lifecycle) SetOnStopped

func (l *Lifecycle) SetOnStopped(f func())

SetOnStopped hooks into an event that says the app is no longer running.

func (*Lifecycle) TriggerEnteredForeground

func (l *Lifecycle) TriggerEnteredForeground()

TriggerEnteredForeground will call the focus gained hook, if one is registered.

func (*Lifecycle) TriggerExitedForeground

func (l *Lifecycle) TriggerExitedForeground()

TriggerExitedForeground will call the focus lost hook, if one is registered.

func (*Lifecycle) TriggerStarted

func (l *Lifecycle) TriggerStarted()

TriggerStarted will call the started hook, if one is registered.

func (*Lifecycle) TriggerStopped

func (l *Lifecycle) TriggerStopped()

TriggerStopped will call the stopped hook, if one is registered.

Jump to

Keyboard shortcuts

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