.. include:: headings.inc .. _Position: ========================================================================================================================================== |phoenix_title| **Position** ========================================================================================================================================== This class represents the position of an item in any kind of grid of rows and columns such as :ref:`GridBagSizer`, or :ref:`HVScrolledWindow`. .. seealso:: :ref:`Point`, :ref:`Size` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **Position** .. raw:: html

Inheritance diagram of Position

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~Position.__init__` Construct a new :ref:`Position`, setting the row and column to the default value of (0, 0). :meth:`~Position.Get` Return the row and col properties as a tuple. :meth:`~Position.GetCol` A synonym for :meth:`GetColumn` . :meth:`~Position.GetColumn` Get the current row value. :meth:`~Position.GetRow` Get the current row value. :meth:`~Position.SetCol` A synonym for :meth:`SetColumn` . :meth:`~Position.SetColumn` Set a new column value. :meth:`~Position.SetRow` Set a new row value. :meth:`~Position.__getitem__` :meth:`~Position.__len__` :meth:`~Position.__nonzero__` :meth:`~Position.__reduce__` :meth:`~Position.__repr__` :meth:`~Position.__setitem__` :meth:`~Position.__str__` :meth:`~Position.__ne__` :meth:`~Position.__add__` :meth:`~Position.__iadd__` :meth:`~Position.__sub__` :meth:`~Position.__isub__` :meth:`~Position.__eq__` ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~Position.Col` See :meth:`~Position.GetCol` and :meth:`~Position.SetCol` :attr:`~Position.Column` See :meth:`~Position.GetColumn` and :meth:`~Position.SetColumn` :attr:`~Position.Row` See :meth:`~Position.GetRow` and :meth:`~Position.SetRow` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: Position(object) This class represents the position of an item in any kind of grid of rows and columns such as GridBagSizer, or HVScrolledWindow. **Possible constructors**:: Position() Position(row, col) .. method:: __init__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__init__** `(self)` Construct a new :ref:`Position`, setting the row and column to the default value of (0, 0). **~~~** **__init__** `(self, row, col)` Construct a new :ref:`Position`, setting the row and column to the value of (`row`, `col`). :param `row`: :type `row`: int :param `col`: :type `col`: int **~~~** .. method:: Get(self) Return the row and col properties as a tuple. :rtype: `tuple` :returns: ( `row`, `col` ) .. method:: GetCol(self) A synonym for :meth:`GetColumn` . :rtype: `int` .. method:: GetColumn(self) Get the current row value. :rtype: `int` .. method:: GetRow(self) Get the current row value. :rtype: `int` .. method:: SetCol(self, column) A synonym for :meth:`SetColumn` . :param `column`: :type `column`: int .. method:: SetColumn(self, column) Set a new column value. :param `column`: :type `column`: int .. method:: SetRow(self, row) Set a new row value. :param `row`: :type `row`: int .. method:: __getitem__(self, idx) .. method:: __len__(self) .. method:: __nonzero__(self) .. method:: __reduce__(self) .. method:: __repr__(self) .. method:: __setitem__(self, idx, val) .. method:: __str__(self) .. method:: __ne__(self) :param `pos`: :type `pos`: Position .. method:: __add__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__add__** `(self)` :param `pos`: :type `pos`: Position **~~~** **__add__** `(self)` :param `size`: :type `size`: Size **~~~** .. method:: __iadd__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__iadd__** `(self)` :param `pos`: :type `pos`: Position **~~~** **__iadd__** `(self)` :param `size`: :type `size`: Size **~~~** .. method:: __sub__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__sub__** `(self)` :param `pos`: :type `pos`: Position **~~~** **__sub__** `(self)` :param `size`: :type `size`: Size **~~~** .. method:: __isub__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__isub__** `(self)` :param `pos`: :type `pos`: Position **~~~** **__isub__** `(self)` :param `size`: :type `size`: Size **~~~** .. method:: __eq__(self) :param `pos`: :type `pos`: Position .. attribute:: Col See :meth:`~Position.GetCol` and :meth:`~Position.SetCol` .. attribute:: Column See :meth:`~Position.GetColumn` and :meth:`~Position.SetColumn` .. attribute:: Row See :meth:`~Position.GetRow` and :meth:`~Position.SetRow`