def draw_all(self, surf):

        # draw the root widgets
        Widget.draw_all(self, surf)

        # only render the cursor if required
        if self.render_cursor:
            pos = self.sq_pos
            pygame.draw.rect(display, (0, 0, 0), Rect(pos[0] - 10, pos[1] - 10, 20, 20))
 def __init__(self, signal_list, dev, buf, rect, **kwds):
     """
     Initialize the renderer with the signal_name to index mapping
     (always all 14 signals).  The measurement device, the signal
     buffer and the rectangle into which the signals are to be rendered.
     To select shown signals, use select_channels.
     """
     Widget.__init__(self, rect, **kwds)
     self.sig_list = signal_list
     self.dev = dev
     self.buf = buf
     self.font = pygame.font.SysFont("Ubuntu", 20, True)
     self.cq_font = pygame.font.SysFont("Ubuntu", 16, True)
     self.multiplier = 1.0
     self.selected = range(14)
     self.display_type = [0] * 14
Exemple #3
0
 def __init__(self, **kwds):
     Widget.__init__(self, Rect((0, 0), (100, 20)), **kwds)
Exemple #4
0
 def __init__(self, board_screen):
     self.pyge = board_screen.pyge
     Widget.__init__(self)
     self.rect = board_screen.rect.inflate(-100, -100)
Exemple #5
0
 def __init__(self, width, client, **kwds):
     Widget.__init__(self, **kwds)
     self.set_size_for_text(width)
     self.client = client
 def __init__(self, width, client, **kwds):
     Widget.__init__(self, **kwds)
     self.set_size_for_text(width)
     self.client = client
Exemple #7
0
 def __init__(self, **kwds):
     Widget.__init__(self, Rect((0, 0), (100, 20)), **kwds)
	def __init__(self, signal_list, buf, rect, **kwds):
		Widget.__init__(self, rect, **kwds)
                self.sig_list = signal_list
                self.buf = buf
Exemple #9
0
 def __init__(self, board_screen):
     self.pyge = board_screen.pyge
     Widget.__init__(self)
     self.rect = board_screen.rect.inflate(-100, -100)
Exemple #10
0
	def make_test_page(self, i):
		page_size = self.pages.content_size()
		page = Widget(size = page_size, bg_color = (128, 64, 32))
		lbl = Label("This is page %s" % i)
		page.add_centered(lbl)
		return page