driver

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsolutePositionForObject added in v1.3.0

func AbsolutePositionForObject(object fyne.CanvasObject, trees []fyne.CanvasObject) fyne.Position

AbsolutePositionForObject returns the absolute position of an object in a set of object trees. If the object is not part of any of the trees, the position (0,0) is returned.

func FindObjectAtPositionMatching added in v1.2.0

func FindObjectAtPositionMatching(mouse fyne.Position, matches func(object fyne.CanvasObject) bool, overlay fyne.CanvasObject, roots ...fyne.CanvasObject) (fyne.CanvasObject, fyne.Position, int)

FindObjectAtPositionMatching is used to find an object in a canvas at the specified position. The matches function determines of the type of object that is found at this position is of a suitable type. The various canvas roots and overlays that can be searched are also passed in.

func WalkCompleteObjectTree added in v1.1.1

func WalkCompleteObjectTree(
	obj fyne.CanvasObject,
	beforeChildren func(fyne.CanvasObject, fyne.Position, fyne.Position, fyne.Size) bool,
	afterChildren func(fyne.CanvasObject, fyne.CanvasObject),
) bool

WalkCompleteObjectTree will walk an object tree for all objects (ignoring visible state) executing the passed functions following the following rules: - beforeChildren is called for the start obj before traversing its children - the obj's children are traversed by calling walkObjects on each of the items - afterChildren is called for the obj after traversing the obj's children The walk can be aborted by returning true in one of the functions:

  • if beforeChildren returns true, further traversing is stopped immediately, the after function will not be called for the obj where the walk stopped, however, it will be called for all its parents

func WalkVisibleObjectTree added in v1.1.1

func WalkVisibleObjectTree(
	obj fyne.CanvasObject,
	beforeChildren func(fyne.CanvasObject, fyne.Position, fyne.Position, fyne.Size) bool,
	afterChildren func(fyne.CanvasObject, fyne.CanvasObject),
) bool

WalkVisibleObjectTree will walk an object tree for all visible objects executing the passed functions following the following rules: - beforeChildren is called for the start obj before traversing its children - the obj's children are traversed by calling walkObjects on each of the visible items - afterChildren is called for the obj after traversing the obj's children The walk can be aborted by returning true in one of the functions:

  • if beforeChildren returns true, further traversing is stopped immediately, the after function will not be called for the obj where the walk stopped, however, it will be called for all its parents

Types

type WithContext added in v1.2.0

type WithContext interface {
	RunWithContext(f func())
	RescaleContext()
	Context() interface{}
}

WithContext allows drivers to execute within another context. Mostly this helps GLFW code execute within the painter's GL context.

Directories

Path Synopsis
Package glfw provides a full Fyne desktop driver that uses the system OpenGL libraries.
Package glfw provides a full Fyne desktop driver that uses the system OpenGL libraries.

Jump to

Keyboard shortcuts

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