()
| 135 | } |
| 136 | |
| 137 | func ExampleWidgetBase_AddCloseDialog() { |
| 138 | b := NewBody() |
| 139 | b.AddCloseDialog(func(d *Body) bool { |
| 140 | d.AddTitle("Are you sure?").AddText("Are you sure you want to close the Cogent Core Demo?") |
| 141 | d.AddBottomBar(func(parent Widget) { |
| 142 | d.AddOK(parent).SetText("Close").OnClick(func(e events.Event) { |
| 143 | b.Scene.Close() |
| 144 | }) |
| 145 | }) |
| 146 | return true |
| 147 | }) |
| 148 | b.RunMainWindow() |
| 149 | } |
nothing calls this directly
no test coverage detected