Display a one-line message on the screen. By default, the toast is displayed in the line right above the scroll bar. But the line location can be overridden with the line_index arg. Args: message: (str) the message to display. color: (str) optional color attribute for the m
(self, message, color=None, line_index=None)
| 1606 | self._candidates_top_row + candidates_num_rows - 1, self._max_x - 2) |
| 1607 | |
| 1608 | def _toast(self, message, color=None, line_index=None): |
| 1609 | """Display a one-line message on the screen. |
| 1610 | |
| 1611 | By default, the toast is displayed in the line right above the scroll bar. |
| 1612 | But the line location can be overridden with the line_index arg. |
| 1613 | |
| 1614 | Args: |
| 1615 | message: (str) the message to display. |
| 1616 | color: (str) optional color attribute for the message. |
| 1617 | line_index: (int) line index. |
| 1618 | """ |
| 1619 | |
| 1620 | pad, _, _ = self._display_lines( |
| 1621 | debugger_cli_common.RichTextLines( |
| 1622 | message, |
| 1623 | font_attr_segs={ |
| 1624 | 0: [(0, len(message), color or cli_shared.COLOR_WHITE)]}), |
| 1625 | 0) |
| 1626 | |
| 1627 | right_end = min(len(message), self._max_x - 2) |
| 1628 | |
| 1629 | if line_index is None: |
| 1630 | line_index = self._output_scroll_row - 1 |
| 1631 | self._screen_scroll_output_pad(pad, 0, 0, line_index, 0, line_index, |
| 1632 | right_end) |
| 1633 | |
| 1634 | def _error_toast(self, message): |
| 1635 | """Display a one-line error message on screen. |
no test coverage detected