fyne: fyne.io/fyne/dialog Index | Files

package dialog

import "fyne.io/fyne/dialog"

Package dialog defines standard dialog windows for application GUIs

Index

Package Files

base.go confirm.go information.go progress.go

func ShowConfirm Uses

func ShowConfirm(title, message string, callback func(bool), parent fyne.Window)

ShowConfirm shows a dialog over the specified window for a user confirmation. The title is used for the dialog window and message is the content. The callback is executed when the user decides.

func ShowCustom Uses

func ShowCustom(title, dismiss string, content fyne.CanvasObject, parent fyne.Window)

ShowCustom shows a dialog over the specified application using custom content. The button will have the dismiss text set. The MinSize() of the CanvasObject passed will be used to set the size of the window.

func ShowCustomConfirm Uses

func ShowCustomConfirm(title, confirm, dismiss string, content fyne.CanvasObject,
    callback func(bool), parent fyne.Window)

ShowCustomConfirm shows a dialog over the specified application using custom content. The cancel button will have the dismiss text set and the "OK" will use the confirm text. The response callback is called on user action. The MinSize() of the CanvasObject passed will be used to set the size of the window.

func ShowError Uses

func ShowError(err error, parent fyne.Window)

ShowError shows a dialog over the specified window for an application error. The title and message are extracted from the provided error.

func ShowInformation Uses

func ShowInformation(title, message string, parent fyne.Window)

ShowInformation shows a dialog over the specified window for user information. The title is used for the dialog window and message is the content.

type ConfirmDialog Uses

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

ConfirmDialog is like the standard Dialog but with an additional confirmation button

func NewConfirm Uses

func NewConfirm(title, message string, callback func(bool), parent fyne.Window) *ConfirmDialog

NewConfirm creates a dialog over the specified window for user confirmation. The title is used for the dialog window and message is the content. The callback is executed when the user decides. After creation you should call Show().

func (ConfirmDialog) ApplyTheme Uses

func (d ConfirmDialog) ApplyTheme()

func (ConfirmDialog) Hide Uses

func (d ConfirmDialog) Hide()

func (ConfirmDialog) Layout Uses

func (d ConfirmDialog) Layout(obj []fyne.CanvasObject, size fyne.Size)

func (ConfirmDialog) MinSize Uses

func (d ConfirmDialog) MinSize(obj []fyne.CanvasObject) fyne.Size

func (*ConfirmDialog) SetConfirmText Uses

func (d *ConfirmDialog) SetConfirmText(label string)

SetConfirmText allows custom text to be set in the confirmation button

func (ConfirmDialog) SetDismissText Uses

func (d ConfirmDialog) SetDismissText(label string)

SetDismissText allows custom text to be set in the confirmation button

func (ConfirmDialog) Show Uses

func (d ConfirmDialog) Show()

type Dialog Uses

type Dialog interface {
    Show()
    Hide()
    SetDismissText(label string)
}

Dialog is the common API for any dialog window with a single dismiss button

func NewInformation Uses

func NewInformation(title, message string, parent fyne.Window) Dialog

NewInformation creates a dialog over the specified window for user information. The title is used for the dialog window and message is the content. After creation you should call Show().

type ProgressDialog Uses

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

ProgressDialog is a simple dialog window that displays text and a progress bar.

func NewProgress Uses

func NewProgress(title, message string, parent fyne.Window) *ProgressDialog

NewProgress creates a progress dialog and returns the handle. Using the returned type you should call Show() and then set its value through SetValue().

func (ProgressDialog) ApplyTheme Uses

func (d ProgressDialog) ApplyTheme()

func (ProgressDialog) Hide Uses

func (d ProgressDialog) Hide()

func (ProgressDialog) Layout Uses

func (d ProgressDialog) Layout(obj []fyne.CanvasObject, size fyne.Size)

func (ProgressDialog) MinSize Uses

func (d ProgressDialog) MinSize(obj []fyne.CanvasObject) fyne.Size

func (ProgressDialog) SetDismissText Uses

func (d ProgressDialog) SetDismissText(label string)

SetDismissText allows custom text to be set in the confirmation button

func (*ProgressDialog) SetValue Uses

func (p *ProgressDialog) SetValue(v float64)

SetValue updates the value of the progress bar - this should be between 0.0 and 1.0.

func (ProgressDialog) Show Uses

func (d ProgressDialog) Show()

Package dialog imports 6 packages (graph) and is imported by 1 packages. Updated 2019-10-13. Refresh now. Tools for package owners.