MCPcopy
hub / github.com/mum4k/termdash / MustDraw

Function MustDraw

private/fakewidget/fakewidget.go:191–195  ·  view source on GitHub ↗

MustDraw is like Draw, but panics on all errors.

(t terminalapi.Terminal, cvs *canvas.Canvas, meta *widgetapi.Meta, opts widgetapi.Options, events ...*Event)

Source from the content-addressed store, hash-verified

189
190// MustDraw is like Draw, but panics on all errors.
191func MustDraw(t terminalapi.Terminal, cvs *canvas.Canvas, meta *widgetapi.Meta, opts widgetapi.Options, events ...*Event) {
192 if err := Draw(t, cvs, meta, opts, events...); err != nil {
193 panic(fmt.Sprintf("Draw => %v", err))
194 }
195}
196
197// DrawWithMirror is like Draw, but uses the provided Mirror instead of creating one.
198func DrawWithMirror(mirror *Mirror, t terminalapi.Terminal, cvs *canvas.Canvas, meta *widgetapi.Meta, events ...*Event) error {

Callers 9

TestRunFunction · 0.92
TestControllerFunction · 0.92
TestNewFunction · 0.92
TestKeyboardFunction · 0.92
TestMouseFunction · 0.92
TestUpdateFunction · 0.92
TestDrawWidgetFunction · 0.92
TestBuilderFunction · 0.92

Calls 1

DrawFunction · 0.85

Tested by 9

TestRunFunction · 0.74
TestControllerFunction · 0.74
TestNewFunction · 0.74
TestKeyboardFunction · 0.74
TestMouseFunction · 0.74
TestUpdateFunction · 0.74
TestDrawWidgetFunction · 0.74
TestBuilderFunction · 0.74