def __init__(self, parent='osd', x=None, y=None, width=0, height=0): GUIObject.__init__(self, x, y, width, height) if not parent or parent == 'osd': parent = self.osd.app_list[0] parent.add_child(self) self.osd.add_app(self) self.event_context = 'input' _debug_('window: setting context to %s' % self.event_context, 2) rc.set_context(self.event_context) if not width: self.width = self.osd.width / 2 if not height: self.height = self.osd.height / 4 if not self.left: self.left = self.osd.width / 2 - self.width / 2 if not self.top: self.top = self.osd.height / 2 - self.height / 2 self.center_on_screen = True self.internal_h_align = Align.CENTER self.internal_v_align = Align.CENTER
def __init__(self, parent='osd', x=None, y=None, width=0, height=0): GUIObject.__init__(self, x, y, width, height) if not parent or parent == 'osd': global OSD_PARENT if OSD_PARENT is None: OSD_PARENT = GUIObject() parent = OSD_PARENT parent.add_child(self) self.event_context = 'input' if not width: self.width = self.osd.width / 2 if not height: self.height = self.osd.height / 4 if not self.left: self.left = self.osd.width/2 - self.width/2 if not self.top: self.top = self.osd.height/2 - self.height/2 self.center_on_screen = True self.internal_h_align = Align.CENTER self.internal_v_align = Align.CENTER self.refresh_abs_position()
def __init__(self, type='frame', left=0, top=0, width=0, height=0, bg_color=None, fg_color=None, selected_bg_color=None, selected_fg_color=None, border=None, bd_color=None, bd_width=None, vertical_expansion=0): GUIObject.__init__(self, left, top, width, height, bg_color, fg_color) self.layout_manager = None self.border = border self.bd_color = bd_color self.bd_width = bd_width self.vertical_expansion = vertical_expansion self.internal_h_align = Align.LEFT self.internal_v_align = Align.TOP self.h_spacing = self.h_margin self.v_spacing = self.v_margin if type == 'widget': ci = self.content_layout.types['selected'].rectangle self.selected_bg_color = selected_bg_color or Color(ci.bgcolor) self.selected_fg_color = selected_fg_color or Color(ci.color) if not self.bd_color: self.bd_color = Color(self.skin_info_widget.rectangle.color) if not self.bd_width: self.bd_width = self.skin_info_widget.rectangle.size if not self.border: self.border = Border(self, Border.BORDER_FLAT, self.bd_color, self.bd_width) elif border == -1: self.border = None
def __init__(self, type='frame', left=0, top=0, width=0, height=0, bg_color=None, fg_color=None, selected_bg_color=None, selected_fg_color=None, border=None, bd_color=None, bd_width=None, vertical_expansion=0): GUIObject.__init__(self, left, top, width, height, bg_color, fg_color) self.layout_manager = None self.border = border self.bd_color = bd_color self.bd_width = bd_width self.vertical_expansion = vertical_expansion self.internal_h_align = Align.LEFT self.internal_v_align = Align.TOP self.h_spacing = self.h_margin self.v_spacing = self.v_margin if type == 'widget': ci = self.content_layout.types['selected'].rectangle self.selected_bg_color = selected_bg_color or Color(ci.bgcolor) self.selected_fg_color = selected_fg_color or Color(ci.color) if not self.bd_color: self.bd_color = Color(self.skin_info_widget.rectangle.color) if not self.bd_width: self.bd_width = self.skin_info_widget.rectangle.size if not self.border: self.border = Border(self, Border.BORDER_FLAT, self.bd_color, self.bd_width) elif border == -1: self.border = None