1 ##===-- statuswin.py -----------------------------------------*- Python -*-===##
3 ## The LLVM Compiler Infrastructure
5 ## This file is distributed under the University of Illinois Open Source
6 ## License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
14 class StatusWin(cui.TextWin):
15 def __init__(self, x, y, w, h):
16 super(StatusWin, self).__init__(x, y, w)
18 self.keys = [#('F1', 'Help', curses.KEY_F1),
19 ('F3', 'Cycle-focus', curses.KEY_F3),
20 ('F10', 'Quit', curses.KEY_F10)]
23 self.win.addstr(0, 0, '')
25 self.win.addstr('{0}'.format(key[0]), curses.A_REVERSE)
26 self.win.addstr(' {0} '.format(key[1]), curses.A_NORMAL)
27 super(StatusWin, self).draw()
29 def handleEvent(self, event):
30 if isinstance(event, int):
32 elif isinstance(event, lldb.SBEvent):
33 if lldb.SBProcess.EventIsProcessEvent(event):
34 state = lldb.SBProcess.GetStateFromEvent(event)
35 status = lldbutil.state_type_to_str(state)
37 x = self.win.getmaxyx()[1] - len(status) - 1
38 self.win.addstr(0, x, status)