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 ##===----------------------------------------------------------------------===##
16 class StatusWin(cui.TextWin):
18 def __init__(self, x, y, w, h):
19 super(StatusWin, self).__init__(x, y, w)
21 self.keys = [ # ('F1', 'Help', curses.KEY_F1),
22 ('F3', 'Cycle-focus', curses.KEY_F3),
23 ('F10', 'Quit', curses.KEY_F10)]
26 self.win.addstr(0, 0, '')
28 self.win.addstr('{0}'.format(key[0]), curses.A_REVERSE)
29 self.win.addstr(' {0} '.format(key[1]), curses.A_NORMAL)
30 super(StatusWin, self).draw()
32 def handleEvent(self, event):
33 if isinstance(event, int):
35 elif isinstance(event, lldb.SBEvent):
36 if lldb.SBProcess.EventIsProcessEvent(event):
37 state = lldb.SBProcess.GetStateFromEvent(event)
38 status = lldbutil.state_type_to_str(state)
40 x = self.win.getmaxyx()[1] - len(status) - 1
41 self.win.addstr(0, x, status)