import "fyne.io/fyne/v2/widget"
  

Usage

type PopUp

  type PopUp struct {
	BaseWidget

	Content fyne.CanvasObject
	Canvas  fyne.Canvas
}
  

PopUp is a widget that can float above the user interface. It wraps any standard elements with padding and a shadow. If it is modal then the shadow will cover the entire canvas it hovers over and block interactions.

func NewModalPopUp

  func NewModalPopUp(content fyne.CanvasObject, canvas fyne.Canvas) *PopUp
  

NewModalPopUp creates a new popUp for the specified content and displays it on the passed canvas. A modal PopUp blocks interactions with underlying elements, covered with a semi-transparent overlay.

func NewPopUp

  func NewPopUp(content fyne.CanvasObject, canvas fyne.Canvas) *PopUp
  

NewPopUp creates a new popUp for the specified content and displays it on the passed canvas.

func (*PopUp) CreateRenderer

  func (p *PopUp) CreateRenderer() fyne.WidgetRenderer
  

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*PopUp) Hide

  func (p *PopUp) Hide()
  

Hide this widget, if it was previously visible

func (*PopUp) MinSize

  func (p *PopUp) MinSize() fyne.Size
  

MinSize returns the size that this widget should not shrink below

func (*PopUp) Refresh

  func (p *PopUp) Refresh()
  

Refresh the background for a modal popup and the content of this popup.

func (*PopUp) Show

  func (p *PopUp) Show()
  

Show this pop-up as overlay if not already shown.

func (*PopUp) ShowAtPosition

  func (p *PopUp) ShowAtPosition(pos fyne.Position)
  

ShowAtPosition shows this pop-up at the given position.

func (*PopUp) ShowAtRelativePosition

  func (p *PopUp) ShowAtRelativePosition(rel fyne.Position, to fyne.CanvasObject)
  

ShowAtRelativePosition shows this pop-up at the given position relative to stated object.

Since 2.4

func (*PopUp) Tapped

  func (p *PopUp) Tapped(*fyne.PointEvent)
  

Tapped is called when the user taps the popUp. This is not called when tapping the background, but non-modal popups will dismiss when tapped outside.

func (*PopUp) TappedSecondary

  func (p *PopUp) TappedSecondary(*fyne.PointEvent)
  

TappedSecondary is called when the user right/alt taps the popUp. This is not called when tapping the background, but non-modal popups will dismiss when tapped outside.