()
| 1500 | } |
| 1501 | |
| 1502 | func (b *FullscreenRendererBackend) renderScreen() { |
| 1503 | if !b.renderEnabled || !b.screenActive || b.out == nil { |
| 1504 | return |
| 1505 | } |
| 1506 | sections := []string{b.renderHeader(), b.TranscriptControlText, b.TasksControlText} |
| 1507 | if b.ModalControlText != "" { |
| 1508 | sections = append(sections, b.ModalControlText) |
| 1509 | } |
| 1510 | if b.StatusText != "" { |
| 1511 | sections = append(sections, b.renderStatusRegion()) |
| 1512 | } |
| 1513 | if b.InputMetaText != "" { |
| 1514 | sections = append(sections, b.renderInputRegion()) |
| 1515 | } |
| 1516 | fmt.Fprint(b.out, "\x1b[H\x1b[2J") |
| 1517 | screen := strings.ReplaceAll(strings.Join(sections, "\n")+"\n", "\n", "\r\n") |
| 1518 | fmt.Fprint(b.out, screen) |
| 1519 | } |
| 1520 | |
| 1521 | func (b *FullscreenRendererBackend) renderHeader() string { |
| 1522 | width := b.panelWidth() |
no test coverage detected