Example #1
0
 def __init__(self, shell, with_menu=False):
     Screen.__init__(self, shell)
     self.init_command_map()
     if with_menu:
         title = self.create_title()
         buttons = self.create_buttons()
         self.add_title_and_buttons(title, buttons)
Example #2
0
	def __init__(self, shell, with_menu = False):
		Screen.__init__(self, shell)
		self.init_command_map()
		if with_menu:
			title = self.create_title()
			buttons = self.create_buttons()
			self.add_title_and_buttons(title, buttons)
Example #3
0
 def key_down(self, e):
     command = None
     if e.cmd or e.key == K_ESCAPE or K_F1 <= e.key <= K_F12:
         command = self.command_map.get(e.key)
     if command:
         self.do_command(command)
     else:
         Screen.key_down(self, e)
Example #4
0
	def key_down(self, e):
		command = None
		if e.cmd or e.key == K_ESCAPE or K_F1 <= e.key <= K_F12:
			command = self.command_map.get(e.key)
		if command:
			self.do_command(command)
		else:
			Screen.key_down(self, e)