Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRenderer ¶
func CreateRenderer(r Renderer) fyne.WidgetRenderer
CreateRenderer creates a widget renderer from a sparky.Renderer.
func MaxFloat32 ¶
MaxFloat32 returns the larger of the passed values.
func MinFloat32 ¶
MinFloat32 returns the smaller of the passed values.
Types ¶
type Context ¶
type Context interface { // Child creates a child context for a child window. The new context // will inherit all the parent context values. Child(win fyne.Window) Context // Window returns the underlying window. Window() fyne.Window // PutValue puts a value into the context, that later can be retrieved // with GetValue. PutValue(key ValueKey, v interface{}) // GetValue gets a value previously added with PutValue. GetValue(key ValueKey) interface{} // ShowLoader shows a loader dialog. ShowLoader(message string) *Loader // ShowModal shows a modal with the specified content. ShowModal(content fyne.CanvasObject) *widget.PopUp // ShowInfo shows an information alert. ShowInfo(title, message string) // ShowSuccess shows a success alert. ShowSuccess(title, message string) // ShowError shows an error alert. ShowError(title, message string) // ShowConfirm shows a confirm alert. This will return a boolean // channel that will have the confirmation response. ShowConfirm(title, message, confirmButtonText string) <-chan bool // ShowTextInput shows a text input dialog. It will return a nil string // if the user cancels the dialog. ShowTextInput(title, message, submitText string) <-chan *string // ShowPasswordInput shows a password input dialog. It will return a nil string // if the user cancels the dialog. ShowPasswordInput(title, message, submitText string) <-chan *string }
Context defines a sparky context.
func NewContextWithStyle ¶
func NewContextWithStyle(win fyne.Window, s *DialogStyle) Context
NewContextWithStyle creates a new sparky context with style options.
type DialogStyle ¶
type DialogStyle struct { MinWidth float32 LoaderTitles LoaderTitles }
DialogStyle define context dialog style.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader defines sparky loader.
func (*Loader) UpdateMessage ¶
UpdateMessage updates loader message.
type LoaderTitles ¶
LoaderTitles defines the title text on the specified loader state.
type Renderer ¶
type Renderer interface { // CreateContent creates the render content. // This function is called only the first time the render is created. CreateContent() *fyne.Container // Destroy destroys the render content. Destroy() // Refresh refreshes the render content. Refresh() }
Renderer defines sparky renderer interface.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.