Пример #1
0
    def __init__(self, fill=None, border="white", borderwidth=1):
        CSimpleContainer.__init__(self)
        self.fill = fill
        self.border = border

        self.fill_obj = gtk.gdk.color_parse(fill)
        self.border_obj = gtk.gdk.color_parse(border)

        self.borderwidth = int(borderwidth)
Пример #2
0
 def Paint(self, x, y, element, w=None, h=None):
     if w is None:
         w = self.GetWidth(element)
     if h is None:
         h = self.GetHeight(element)
     CSimpleContainer.Paint(self, x + self.padding, y + self.padding,
                            element, w - 2 * self.padding,
                            h - 2 * self.padding)
Пример #3
0
 def __init__(self, condition, type, negate):
     CSimpleContainer.__init__(self)
     self.condition = condition
     self.type = type
     self.negate = ToBool(negate)
Пример #4
0
 def Paint(self, x, y, element, w = None, h = None):
     if self.__IsTrue(element):
         for child in self.childs:
             CSimpleContainer.Paint(self, x, y, element, w, h)
Пример #5
0
 def GetWidth(self, element):
     if self.__IsTrue(element):
         return CSimpleContainer.GetWidth(self, element)
     return 0
Пример #6
0
 def __init__(self, padding, color):
     CSimpleContainer.__init__(self)
     self.padding = int(padding)
     self.color = color
Пример #7
0
    def __init__(self, fill=None, border="white", borderwidth=1):
        CSimpleContainer.__init__(self)
        self.fill = fill
        self.border = border

        self.borderwidth = int(borderwidth)
Пример #8
0
 def __init__(self, padding):
     CSimpleContainer.__init__(self)
     self.padding = int(padding)
Пример #9
0
 def GetWidth(self, element):
     return CSimpleContainer.GetWidth(self, element) + 2 * self.padding
Пример #10
0
 def GetHeight(self, element):
     return CSimpleContainer.GetHeight(self, element) + 2 * self.padding
Пример #11
0
 def __init__(self, collection):
     CSimpleContainer.__init__(self)
     self.collection = collection