package internal
import "fyne.io/fyne/internal"
Index ¶
- func LogHint(reason string)
- func ScaleInt(c fyne.Canvas, v int) int
- func UnscaleInt(c fyne.Canvas, v int) int
- type InMemoryPreferences
- func NewInMemoryPreferences() *InMemoryPreferences
- func (p *InMemoryPreferences) Bool(key string) bool
- func (p *InMemoryPreferences) BoolWithFallback(key string, fallback bool) bool
- func (p *InMemoryPreferences) Float(key string) float64
- func (p *InMemoryPreferences) FloatWithFallback(key string, fallback float64) float64
- func (p *InMemoryPreferences) Int(key string) int
- func (p *InMemoryPreferences) IntWithFallback(key string, fallback int) int
- func (p *InMemoryPreferences) SetBool(key string, value bool)
- func (p *InMemoryPreferences) SetFloat(key string, value float64)
- func (p *InMemoryPreferences) SetInt(key string, value int)
- func (p *InMemoryPreferences) SetString(key string, value string)
- func (p *InMemoryPreferences) String(key string) string
- func (p *InMemoryPreferences) StringWithFallback(key, fallback string) string
- func (p *InMemoryPreferences) Values() map[string]interface{}
Functions ¶
func LogHint ¶
func LogHint(reason string)
LogHint reports a developer hint that should be followed to improve their app. This does nothing unless the "hints" build flag is used.
func ScaleInt ¶
ScaleInt converts a fyne coordinate in the given canvas to a screen coordinate
func UnscaleInt ¶
UnscaleInt converts a screen coordinate for a given canvas to a fyne coordinate
Types ¶
type InMemoryPreferences ¶
type InMemoryPreferences struct { OnChange func() // contains filtered or unexported fields }
InMemoryPreferences provides an implementation of the fyne.Preferences API that is stored in memory.
func NewInMemoryPreferences ¶
func NewInMemoryPreferences() *InMemoryPreferences
NewInMemoryPreferences creates a new preferences implementation stored in memory
func (*InMemoryPreferences) Bool ¶
func (p *InMemoryPreferences) Bool(key string) bool
Bool looks up a boolean value for the key
func (*InMemoryPreferences) BoolWithFallback ¶
func (p *InMemoryPreferences) BoolWithFallback(key string, fallback bool) bool
BoolWithFallback looks up a boolean value and returns the given fallback if not found
func (*InMemoryPreferences) Float ¶
func (p *InMemoryPreferences) Float(key string) float64
Float looks up a float64 value for the key
func (*InMemoryPreferences) FloatWithFallback ¶
func (p *InMemoryPreferences) FloatWithFallback(key string, fallback float64) float64
FloatWithFallback looks up a float64 value and returns the given fallback if not found
func (*InMemoryPreferences) Int ¶
func (p *InMemoryPreferences) Int(key string) int
Int looks up an integer value for the key
func (*InMemoryPreferences) IntWithFallback ¶
func (p *InMemoryPreferences) IntWithFallback(key string, fallback int) int
IntWithFallback looks up an integer value and returns the given fallback if not found
func (*InMemoryPreferences) SetBool ¶
func (p *InMemoryPreferences) SetBool(key string, value bool)
SetBool saves a boolean value for the given key
func (*InMemoryPreferences) SetFloat ¶
func (p *InMemoryPreferences) SetFloat(key string, value float64)
SetFloat saves a float64 value for the given key
func (*InMemoryPreferences) SetInt ¶
func (p *InMemoryPreferences) SetInt(key string, value int)
SetInt saves an integer value for the given key
func (*InMemoryPreferences) SetString ¶
func (p *InMemoryPreferences) SetString(key string, value string)
SetString saves a string value for the given key
func (*InMemoryPreferences) String ¶
func (p *InMemoryPreferences) String(key string) string
String looks up a string value for the key
func (*InMemoryPreferences) StringWithFallback ¶
func (p *InMemoryPreferences) StringWithFallback(key, fallback string) string
StringWithFallback looks up a string value and returns the given fallback if not found
func (*InMemoryPreferences) Values ¶
func (p *InMemoryPreferences) Values() map[string]interface{}
Values provides access to the underlying value map - for internal use only...
Source Files ¶
hints_disabled.go preferences.go scale.go
Directories ¶
Path | Synopsis |
---|---|
internal/app | |
internal/cache | |
internal/driver | |
internal/driver/glfw | Package glfw provides a full Fyne desktop driver that uses tje system OpenGL libraries. |
internal/driver/gomobile | |
internal/painter | |
internal/painter/gl | Package gl provides a full Fyne render implementation using system OpenGL libraries. |
internal/painter/software |
- Version
- v1.2.0
- Published
- Dec 12, 2019
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 4 minutes ago –
Tools for package owners.