[docs] Fix build-docs.sh
[llvm-project.git] / lldb / utils / lui / eventwin.py
blobc8d14d7aeb03feab719dc98c7931c86ac176f8db
1 ##===-- eventwin.py ------------------------------------------*- Python -*-===##
2 ##
3 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 # See https://llvm.org/LICENSE.txt for license information.
5 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 ##
7 ##===----------------------------------------------------------------------===##
9 import cui
10 import lldb
11 import lldbutil
14 class EventWin(cui.TitledWin):
16 def __init__(self, x, y, w, h):
17 super(EventWin, self).__init__(x, y, w, h, 'LLDB Event Log')
18 self.win.scrollok(1)
19 super(EventWin, self).draw()
21 def handleEvent(self, event):
22 if isinstance(event, lldb.SBEvent):
23 self.win.scroll()
24 h = self.win.getmaxyx()[0]
25 self.win.addstr(h - 1, 0, lldbutil.get_description(event))
26 return