예제 #1
0
파일: boxlayout.py 프로젝트: Niriel/pynguin
    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
예제 #2
0
 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)
예제 #3
0
    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)
예제 #4
0
파일: tile.py 프로젝트: BurntSushi/pyndow
    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)
예제 #5
0
    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)
예제 #6
0
	def __init__( self ):

		Layout.__init__( self )

		self.image = []
예제 #7
0
    def __init__(self, workspace):
        Layout.__init__(self, workspace)

        self._resizing = None
        self._moving = None