MCPcopy Create free account
hub / github.com/cogentcore/core / NewWindowDialog

Method NewWindowDialog

core/dialog.go:74–78  ·  view source on GitHub ↗

NewWindowDialog returns a new [DialogStage] that is placed in a new system window on multi-window platforms, in the context of the given widget. You must call [Stage.Run] to run the dialog; see [Body.RunWindowDialog] for a version that automatically runs it.

(ctx Widget)

Source from the content-addressed store, hash-verified

72// You must call [Stage.Run] to run the dialog; see [Body.RunWindowDialog]
73// for a version that automatically runs it.
74func (bd *Body) NewWindowDialog(ctx Widget) *Stage {
75 bd.NewFullDialog(ctx)
76 bd.Scene.Stage.SetNewWindow(true)
77 return bd.Scene.Stage
78}
79
80// RecycleDialog looks for a dialog with the given data. If it
81// finds it, it shows it and returns true. Otherwise, it returns false.

Callers 1

RunWindowDialogMethod · 0.95

Calls 2

NewFullDialogMethod · 0.95
SetNewWindowMethod · 0.45

Tested by

no test coverage detected