Example #1
0
File: Screen.py Project: sipi/wesb
 def init(self):
   self.num = int(self.num)
   self.width = int(self.width)
   self.height = int(self.height)
   self.space = int(self.space)
   self.g = Graphics(self.num, self.height)
   self.separator = Separator(self.separator_width , self.height, self.separator_color)
Example #2
0
    def addSeparator(self, y):
        if y < self.y0 + SEPARATOR_PAD:
            return None
        if y > self.y1 - SEPARATOR_PAD:
            return None
        for state in self.states:
            if state.intersectY(y):
                return None
        newSep = Separator(self, y, self.handler)
        self.separators.append(newSep)
	return newSep
Example #3
0
File: Screen.py Project: sipi/wesb
class Screen(object):
  
  def __init__(self):
    self.num = -1
    self.width = 600
    self.height = 15
    self.space = 2
    self.separator_color = "#555555"
    self.separator_width = 1
    self.separator_active = True
    self.applets = []

  
  def init(self):
    self.num = int(self.num)
    self.width = int(self.width)
    self.height = int(self.height)
    self.space = int(self.space)
    self.g = Graphics(self.num, self.height)
    self.separator = Separator(self.separator_width , self.height, self.separator_color)

  def paint(self):
    self.g.x = self.width
    for applet in self.applets:
      self.g.x -= self.space
      if(self.separator_active):
        self.separator.paint(self.g)
        self.g.x -= self.space
      applet.paint(self.g)

    self.g.x -= self.space
    if(self.separator_active):
      self.separator.paint(self.g)
    self.g.send()


  def addApplet(self,applet):
    self.applets.append(applet)
Example #4
0
 def newSeparator(self, value, type):
     return Separator(value, type)