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)
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)
def __init__(self, condition, type, negate): CSimpleContainer.__init__(self) self.condition = condition self.type = type self.negate = ToBool(negate)
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)
def GetWidth(self, element): if self.__IsTrue(element): return CSimpleContainer.GetWidth(self, element) return 0
def __init__(self, padding, color): CSimpleContainer.__init__(self) self.padding = int(padding) self.color = color
def __init__(self, fill=None, border="white", borderwidth=1): CSimpleContainer.__init__(self) self.fill = fill self.border = border self.borderwidth = int(borderwidth)
def __init__(self, padding): CSimpleContainer.__init__(self) self.padding = int(padding)
def GetWidth(self, element): return CSimpleContainer.GetWidth(self, element) + 2 * self.padding
def GetHeight(self, element): return CSimpleContainer.GetHeight(self, element) + 2 * self.padding
def __init__(self, collection): CSimpleContainer.__init__(self) self.collection = collection