Esempio n. 1
0
    def __init__(self,
                 parent=None,
                 name=None,
                 size=None,
                 min_size=None,
                 max_size=None,
                 fixed_size=None,
                 margins=None,
                 padding=None,
                 helptext=None,
                 position=None,
                 style=None,
                 hexpand=None,
                 vexpand=None,
                 font=None,
                 base_color=None,
                 background_color=None,
                 foreground_color=None,
                 selection_color=None,
                 border_color=None,
                 outline_color=None,
                 border_size=None,
                 outline_size=None,
                 position_technique=None,
                 is_focusable=None,
                 comment=None,
                 background_image=None,
                 opaque=None,
                 layout=None,
                 spacing=None,
                 uniform_size=None,
                 _real_widget=None):

        self.real_widget = _real_widget or fifechan.Container()
        self.children = []
        self._background = []
        self._background_image = None
        self.background_image = self.DEFAULT_BACKGROUND

        self.opaque = self.DEFAULT_OPAQUE
        #self.layout = self.DEFAULT_LAYOUT

        super(Container, self).__init__(parent=parent,
                                        name=name,
                                        size=size,
                                        min_size=min_size,
                                        max_size=max_size,
                                        fixed_size=fixed_size,
                                        margins=margins,
                                        padding=padding,
                                        helptext=helptext,
                                        position=position,
                                        style=style,
                                        hexpand=hexpand,
                                        vexpand=vexpand,
                                        font=font,
                                        base_color=base_color,
                                        background_color=background_color,
                                        foreground_color=foreground_color,
                                        selection_color=selection_color,
                                        border_color=border_color,
                                        outline_color=outline_color,
                                        border_size=border_size,
                                        outline_size=outline_size,
                                        position_technique=position_technique,
                                        is_focusable=is_focusable,
                                        comment=comment)

        if opaque is not None: self.opaque = opaque
        if background_image is not None:
            self.background_image = background_image

        if layout is not None: self.layout = layout
        else: self.layout = self.DEFAULT_LAYOUT

        if spacing is not None: self.spacing = spacing
        else: self.spacing = self.DEFAULT_SPACING

        if uniform_size is not None: self.uniform_size = uniform_size
        else: self.uniform_size = self.DEFAULT_UNIFORM_SIZE
Esempio n. 2
0
    def __init__(self,
                 parent=None,
                 name=None,
                 size=None,
                 min_size=None,
                 max_size=None,
                 helptext=None,
                 position=None,
                 style=None,
                 hexpand=None,
                 vexpand=None,
                 font=None,
                 base_color=None,
                 background_color=None,
                 foreground_color=None,
                 selection_color=None,
                 border_size=None,
                 position_technique=None,
                 is_focusable=None,
                 comment=None,
                 padding=None,
                 background_image=None,
                 opaque=None,
                 margins=None,
                 _real_widget=None):

        self.real_widget = _real_widget or fifechan.Container()
        self.children = []
        self.children_position_cache = []
        self._background = []
        self._background_image = None
        self.background_image = self.DEFAULT_BACKGROUND
        self.margins = self.DEFAULT_MARGINS
        self.padding = self.DEFAULT_PADDING
        self.opaque = self.DEFAULT_OPAQUE

        super(Container, self).__init__(parent=parent,
                                        name=name,
                                        size=size,
                                        min_size=min_size,
                                        max_size=max_size,
                                        helptext=helptext,
                                        position=position,
                                        style=style,
                                        hexpand=hexpand,
                                        vexpand=vexpand,
                                        font=font,
                                        base_color=base_color,
                                        background_color=background_color,
                                        foreground_color=foreground_color,
                                        selection_color=selection_color,
                                        border_size=border_size,
                                        position_technique=position_technique,
                                        is_focusable=is_focusable,
                                        comment=comment)

        if margins is not None: self.margins = margins
        if padding is not None: self.padding = padding
        if opaque is not None: self.opaque = opaque
        if background_image is not None:
            self.background_image = background_image