def __init__(self, spacing, is_homogeneous): """Initialize a new BoxLayout object. Parameters. ----------- * spacing: positive integer. The space that the BoxLayout allocates BETWEEN the children, not around them. * is_homogeneous: boolean. True for a homogeneous BoxLayout (all the children get the same size), False for a heterogeneous BoxLayout. >>> box = BoxLayout(8, True) >>> print box.spacing 8 >>> print box.is_homogeneous True Note that modifying spacing and is_homogeneous after the creation is not guaranteed to work. """ Layout.__init__(self) self.spacing = spacing self.is_homogeneous = is_homogeneous
def __init__(self, margins=0): """margins can be an int or a tuple/list of 1, 2 or 4 int.""" Layout.__init__(self) self.left = 0 self.top = 0 self.right = 0 self.bottom = 0 self.parseMargins(margins)
def __init__(self): """Initialize a new BoardLayout object. >>> my_board = BoardLayout() >>> print my_board.preferred_size Size(64, 64) """ Layout.__init__(self) self.preferred_size = Size(*BoardLayout.PREFERRED_SIZE)
def __init__(self, workspace): Layout.__init__(self, workspace) self.maxmasters = 1 self.root = TileRoot() self.root.add_child(TileVerticalBox(self.root)) self.master = TileHorizontalBox(self.root.child) self.slave = TileHorizontalBox(self.root.child) self.proportions = (0.5, 0.5)
def __init__(self, workspace): Layout.__init__(self, workspace) self.maxmasters = 1 self.root = TileRoot() self.root.add_child(TileVerticalBox(self.root)) self.master = TileHorizontalBox(self.root.child) self.slave = TileHorizontalBox(self.root.child) self.proportions = (0.5, 0.5)
def __init__( self ): Layout.__init__( self ) self.image = []
def __init__(self, workspace): Layout.__init__(self, workspace) self._resizing = None self._moving = None