def __init__(self, args): StringList.__init__(self, args) from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_HALIGN_RIGHT, RT_VALIGN_TOP, RT_VALIGN_CENTER, RT_VALIGN_BOTTOM, RT_WRAP, \ SCALE_ASPECT, SCALE_CENTER, SCALE_FILL, SCALE_HEIGHT, SCALE_NONE, SCALE_STRETCH, SCALE_WIDTH from Components.MultiContent import MultiContentEntryText, MultiContentEntryTextAlphaBlend, MultiContentEntryPixmap, MultiContentEntryPixmapAlphaTest, MultiContentEntryPixmapAlphaBlend, MultiContentTemplateColor, MultiContentEntryProgress, MultiContentEntryProgressPixmap l = locals() del l["self"] # cleanup locals a bit del l["args"] self.active_style = None self.active_buildfunc = None self.selectionEnabled = True self.template = eval(args, {}, l) assert "template" in self.template or "templates" in self.template assert "template" in self.template or "default" in self.template[ "templates"] # we need to have a default template assert "fonts" in self.template if not "template" in self.template: # default template can be ["template"] or ["templates"]["default"] self.template["template"] = self.template["templates"]["default"][ 1] self.template["itemHeight"] = self.template["template"][0] assert "itemHeight" in self.template
def __init__(self, args): StringList.__init__(self, args) from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_HALIGN_RIGHT, RT_VALIGN_TOP, RT_VALIGN_CENTER, RT_VALIGN_BOTTOM, RT_WRAP, BT_SCALE from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmap, MultiContentEntryPixmapAlphaTest, MultiContentEntryPixmapAlphaBlend, MultiContentTemplateColor, MultiContentEntryProgress l = locals() del l['self'] del l['args'] self.active_style = None self.template = eval(args, {}, l) if 'template' not in self.template: self.template['template'] = self.template['templates']['default'][1] self.template['itemHeight'] = self.template['template'][0]
def __init__(self, args): StringList.__init__(self, args) from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_HALIGN_RIGHT, RT_VALIGN_TOP, RT_VALIGN_CENTER, RT_VALIGN_BOTTOM, RT_WRAP, BT_SCALE from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmap, MultiContentEntryPixmapAlphaTest, MultiContentEntryPixmapAlphaBlend, MultiContentTemplateColor, MultiContentEntryProgress l = locals() del l['self'] del l['args'] self.active_style = None self.template = eval(args, {}, l) if 'template' not in self.template: self.template['template'] = self.template['templates']['default'][1] self.template['itemHeight'] = self.template['template'][0] return
def __init__(self, args): StringList.__init__(self, args) from enigma import BT_SCALE, RT_HALIGN_CENTER, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_VALIGN_BOTTOM, RT_VALIGN_CENTER, RT_VALIGN_TOP, RT_WRAP, eListboxPythonMultiContent, gFont from skin import parseFont from Components.MultiContent import MultiContentEntryPixmap, MultiContentEntryPixmapAlphaBlend, MultiContentEntryPixmapAlphaTest, MultiContentEntryProgress, MultiContentEntryProgressPixmap, MultiContentEntryText, MultiContentTemplateColor loc = locals() del loc["self"] # Cleanup locals a bit. del loc["args"] self.active_style = None self.template = eval(args, {}, loc) assert "fonts" in self.template assert "itemHeight" in self.template assert "template" in self.template or "templates" in self.template assert "template" in self.template or "default" in self.template["templates"] # We need to have a default template. if "template" not in self.template: # Default template can be ["template"] or ["templates"]["default"]. self.template["template"] = self.template["templates"]["default"][1] self.template["itemHeight"] = self.template["template"][0]
def __init__(self, args): StringList.__init__(self, args) from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_HALIGN_RIGHT, RT_VALIGN_TOP, RT_VALIGN_CENTER, RT_VALIGN_BOTTOM, RT_WRAP from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmap, MultiContentEntryPixmapAlphaTest, MultiContentEntryPixmapAlphaBlend, MultiContentTemplateColor, MultiContentEntryProgress, MultiContentEntryProgressPixmap l = locals() del l["self"] # cleanup locals a bit del l["args"] self.active_style = None self.template = eval(args, {}, l) assert "fonts" in self.template assert "itemHeight" in self.template assert "template" in self.template or "templates" in self.template assert "template" in self.template or "default" in self.template["templates"] # we need to have a default template if not "template" in self.template: # default template can be ["template"] or ["templates"]["default"] self.template["template"] = self.template["templates"]["default"][1] self.template["itemHeight"] = self.template["template"][0]
def __init__(self, args): StringList.__init__(self, args) from enigma import BT_HALIGN_CENTER, BT_HALIGN_LEFT, BT_HALIGN_RIGHT, BT_KEEP_ASPECT_RATIO, BT_SCALE, BT_VALIGN_BOTTOM, BT_VALIGN_CENTER, BT_VALIGN_TOP, RT_HALIGN_CENTER, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_VALIGN_BOTTOM, RT_VALIGN_CENTER, RT_VALIGN_TOP, RT_WRAP, gFont from skin import getSkinFactor, parseFont from Components.MultiContent import MultiContentEntryPixmap, MultiContentEntryPixmapAlphaBlend, MultiContentEntryPixmapAlphaTest, MultiContentEntryProgress, MultiContentEntryProgressPixmap, MultiContentEntryText, MultiContentTemplateColor f = getSkinFactor() loc = locals() del loc["self"] # Cleanup locals a bit. del loc["args"] self.active_style = None self.template = eval(args, {}, loc) assert "fonts" in self.template, "templates must include a 'fonts' entry" assert "itemHeight" in self.template, "templates must include an 'itemHeight' entry" assert "template" in self.template or "templates" in self.template, "templates must include a 'template' or 'templates' entry" assert "template" in self.template or "default" in self.template[ "templates"], "templates must include a 'default' template" # We need to have a default template. if "template" not in self.template: # Default template can be ["template"] or ["templates"]["default"]. self.template["template"] = self.template["templates"]["default"][ 1] self.template["itemHeight"] = self.template["template"][0]
def __init__(self, args): StringList.__init__(self, args) from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_HALIGN_RIGHT, RT_VALIGN_TOP, RT_VALIGN_CENTER, RT_VALIGN_BOTTOM, RT_WRAP from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmap, MultiContentEntryPixmapAlphaTest, MultiContentEntryPixmapAlphaBlend, MultiContentTemplateColor, MultiContentEntryProgress l = locals() del l["self"] # cleanup locals a bit del l["args"] self.active_style = None self.template = eval(args, {}, l) assert "fonts" in self.template assert "itemHeight" in self.template assert "template" in self.template or "templates" in self.template assert "template" in self.template or "default" in self.template[ "templates"] # we need to have a default template if not "template" in self.template: # default template can be ["template"] or ["templates"]["default"] self.template["template"] = self.template["templates"]["default"][ 1] self.template["itemHeight"] = self.template["template"][0]
def __init__(self, args): StringList.__init__(self, args) from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_HALIGN_RIGHT, RT_VALIGN_TOP, RT_VALIGN_CENTER, RT_VALIGN_BOTTOM, RT_WRAP, BT_SCALE from skin import parseFont # Use wildcard import to ensure that all template variants are imported prior to calling eval from Components.MultiContent import * l = locals() del l["self"] # cleanup locals a bit del l["args"] self.active_style = None self.template = eval(args, {}, l) assert "fonts" in self.template assert "itemHeight" in self.template assert "template" in self.template or "templates" in self.template assert "template" in self.template or "default" in self.template["templates"] # we need to have a default template if not "template" in self.template: # default template can be ["template"] or ["templates"]["default"] self.template["template"] = self.template["templates"]["default"][1] self.template["itemHeight"] = self.template["template"][0]