MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / _draw_input_dialog

Function _draw_input_dialog

scripts/kconfig/menuconfig.py:1787–1805  ·  view source on GitHub ↗
(win, title, info_lines, s, i, hscroll)

Source from the content-addressed store, hash-verified

1785
1786
1787def _draw_input_dialog(win, title, info_lines, s, i, hscroll):
1788 edit_width = _width(win) - 4
1789
1790 win.erase()
1791
1792 # Note: Perhaps having a separate window for the input field would be nicer
1793 visible_s = s[hscroll:hscroll + edit_width]
1794 _safe_addstr(win, 2, 2, visible_s + " "*(edit_width - len(visible_s)),
1795 _style["edit"])
1796
1797 for linenr, line in enumerate(info_lines):
1798 _safe_addstr(win, 4 + linenr, 2, line)
1799
1800 # Draw the frame last so that it overwrites the body text for small windows
1801 _draw_frame(win, title)
1802
1803 _safe_move(win, 2, 2 + i - hscroll)
1804
1805 win.noutrefresh()
1806
1807
1808def _load_dialog():

Callers 1

_input_dialogFunction · 0.85

Calls 4

_widthFunction · 0.85
_safe_addstrFunction · 0.85
_draw_frameFunction · 0.85
_safe_moveFunction · 0.85

Tested by

no test coverage detected