MCPcopy Create free account
hub / github.com/egonelbre/exp / Init

Method Init

dos/ui/render.go:5–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import termbox "github.com/nsf/termbox-go"
4
5func (form *Form) Init() {
6 widgets := ReflectLoadWidgets(form.Record)
7
8 form.Components = nil
9 form.FocusedIndex = -1
10
11 form.Components = nil
12 for _, w := range widgets {
13 form.Components = append(form.Components,
14 &Component{Widget: w})
15 }
16 form.UpdateLayout()
17
18 form.TabFocus(1)
19}
20
21func (form *Form) UpdateLayout() {
22 form.ClientRect = form.BoundsRect

Callers 2

ShowMethod · 0.95
StartMethod · 0.45

Calls 3

UpdateLayoutMethod · 0.95
TabFocusMethod · 0.95
ReflectLoadWidgetsFunction · 0.85

Tested by

no test coverage detected