.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.grid.GridBlockCoords:
==========================================================================================================================================
|phoenix_title| **wx.grid.GridBlockCoords**
==========================================================================================================================================
Represents coordinates of a block of cells in the grid.
An object of this class contains coordinates of the left top and the bottom right corners of a block.
.. versionadded:: 4.1/wxWidgets-3.1.4
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
GridBlockCoords:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.grid.GridBlockCoords.__init__` Default constructor initializes the object to invalid state.
:meth:`~wx.grid.GridBlockCoords.Canonicalize` Return the canonicalized block where top left coordinates is less then bottom right coordinates.
:meth:`~wx.grid.GridBlockCoords.Contains` Check whether this block contains the given cell.
:meth:`~wx.grid.GridBlockCoords.Difference` Calculates the result blocks by subtracting the other block from this block.
:meth:`~wx.grid.GridBlockCoords.Get` Return the block coordinants as a tuple.
:meth:`~wx.grid.GridBlockCoords.GetBottomRight` Return the coordinates of the bottom right corner.
:meth:`~wx.grid.GridBlockCoords.GetBottomRow` Return the row of the bottom right corner.
:meth:`~wx.grid.GridBlockCoords.GetLeftCol` Return the column of the left top corner.
:meth:`~wx.grid.GridBlockCoords.GetRightCol` Return the column of the bottom right corner.
:meth:`~wx.grid.GridBlockCoords.GetTopLeft` Return the coordinates of the top left corner.
:meth:`~wx.grid.GridBlockCoords.GetTopRow` Return the row of the left top corner.
:meth:`~wx.grid.GridBlockCoords.Intersects` Whether the blocks intersect.
:meth:`~wx.grid.GridBlockCoords.SetBottomRow` Set the row of the bottom right corner.
:meth:`~wx.grid.GridBlockCoords.SetLeftCol` Set the column of the left top corner.
:meth:`~wx.grid.GridBlockCoords.SetRightCol` Set the column of the bottom right corner.
:meth:`~wx.grid.GridBlockCoords.SetTopRow` Set the row of the left top corner.
:meth:`~wx.grid.GridBlockCoords.SymDifference` Calculates the symmetric difference of the blocks.
:meth:`~wx.grid.GridBlockCoords.__bool__`
:meth:`~wx.grid.GridBlockCoords.__repr__`
:meth:`~wx.grid.GridBlockCoords.__str__`
:meth:`~wx.grid.GridBlockCoords.__ne__` Inequality operator.
:meth:`~wx.grid.GridBlockCoords.__eq__` Equality operator.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.grid.GridBlockCoords.BottomRight` See :meth:`~wx.grid.GridBlockCoords.GetBottomRight`
:attr:`~wx.grid.GridBlockCoords.BottomRow` See :meth:`~wx.grid.GridBlockCoords.GetBottomRow` and :meth:`~wx.grid.GridBlockCoords.SetBottomRow`
:attr:`~wx.grid.GridBlockCoords.LeftCol` See :meth:`~wx.grid.GridBlockCoords.GetLeftCol` and :meth:`~wx.grid.GridBlockCoords.SetLeftCol`
:attr:`~wx.grid.GridBlockCoords.RightCol` See :meth:`~wx.grid.GridBlockCoords.GetRightCol` and :meth:`~wx.grid.GridBlockCoords.SetRightCol`
:attr:`~wx.grid.GridBlockCoords.TopLeft` See :meth:`~wx.grid.GridBlockCoords.GetTopLeft`
:attr:`~wx.grid.GridBlockCoords.TopRow` See :meth:`~wx.grid.GridBlockCoords.GetTopRow` and :meth:`~wx.grid.GridBlockCoords.SetTopRow`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.grid.GridBlockCoords(object)
**Possible constructors**::
GridBlockCoords() -> None
GridBlockCoords(topRow : int, leftCol : int, bottomRow : int, rightCol :
int) -> None
Represents coordinates of a block of cells in the grid.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self)`
Default constructor initializes the object to invalid state.
Initially the coordinates are invalid (-1) and so :meth:`operator!` for an uninitialized :ref:`wx.grid.GridBlockCoords` returns ``True``.
:rtype: `None`
:html:`
`
**__init__** `(self, topRow : int, leftCol : int, bottomRow : int, rightCol : int)`
Constructor taking a coordinates of the left top and the bottom right corners.
:param `topRow`:
:type `topRow`: int
:param `leftCol`:
:type `leftCol`: int
:param `bottomRow`:
:type `bottomRow`: int
:param `rightCol`:
:type `rightCol`: int
:rtype: `None`
:html:`
`
.. method:: Canonicalize(self)
Return the canonicalized block where top left coordinates is less then bottom right coordinates.
:rtype: :ref:`wx.grid.GridBlockCoords`
.. method:: Contains(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**Contains** `(self, cell : GridCellCoords)`
Check whether this block contains the given cell.
:param `cell`:
:type `cell`: wx.grid.GridCellCoords
:rtype: `bool`
:returns:
``True``, if the block contains the cell, ``False`` otherwise.
:html:`
`
**Contains** `(self, other : GridBlockCoords)`
Check whether this block contains another one.
:param `other`:
:type `other`: wx.grid.GridBlockCoords
:rtype: `bool`
:returns:
``True`` if `other` is entirely contained within this block.
:html:`
`
.. method:: Difference(self, other : GridBlockCoords, splitOrientation : int)
Calculates the result blocks by subtracting the other block from this block.
:param `other`: The block to subtract from this block.
:type `other`: wx.grid.GridBlockCoords
:param `splitOrientation`: The block splitting orientation (either ``HORIZONTAL`` or ``VERTICAL`` ).
:type `splitOrientation`: int
:rtype: :ref:`wx.grid.GridBlockDiffResult`
:returns:
Up to 4 blocks. If block doesn't exist in the result, it has value of ``GridNoBlockCoords`` .
.. method:: Get(self)
Return the block coordinants as a tuple.
:rtype: `tuple`
:returns:
( `topRow`, `leftCol`, `bottomRow`, `rightCol` )
.. method:: GetBottomRight(self)
Return the coordinates of the bottom right corner.
:rtype: :ref:`wx.grid.GridCellCoords`
.. method:: GetBottomRow(self)
Return the row of the bottom right corner.
:rtype: `int`
.. method:: GetLeftCol(self)
Return the column of the left top corner.
:rtype: `int`
.. method:: GetRightCol(self)
Return the column of the bottom right corner.
:rtype: `int`
.. method:: GetTopLeft(self)
Return the coordinates of the top left corner.
:rtype: :ref:`wx.grid.GridCellCoords`
.. method:: GetTopRow(self)
Return the row of the left top corner.
:rtype: `int`
.. method:: Intersects(self, other : GridBlockCoords)
Whether the blocks intersect.
:param `other`:
:type `other`: wx.grid.GridBlockCoords
:rtype: `bool`
:returns:
``True``, if the block intersects with the other, ``False``, otherwise.
.. method:: SetBottomRow(self, row : int)
Set the row of the bottom right corner.
:param `row`:
:type `row`: int
:rtype: `None`
.. method:: SetLeftCol(self, col : int)
Set the column of the left top corner.
:param `col`:
:type `col`: int
:rtype: `None`
.. method:: SetRightCol(self, col : int)
Set the column of the bottom right corner.
:param `col`:
:type `col`: int
:rtype: `None`
.. method:: SetTopRow(self, row : int)
Set the row of the left top corner.
:param `row`:
:type `row`: int
:rtype: `None`
.. method:: SymDifference(self, other : GridBlockCoords)
Calculates the symmetric difference of the blocks.
:param `other`: The block to subtract from this block.
:type `other`: wx.grid.GridBlockCoords
:rtype: :ref:`wx.grid.GridBlockDiffResult`
:returns:
Up to 4 blocks. If block doesn't exist in the result, it has value of ``GridNoBlockCoords`` .
.. method:: __bool__(self)
:rtype: `int`
.. method:: __repr__(self)
.. method:: __str__(self)
.. method:: __ne__(self)
Inequality operator.
:param `other`:
:type `other`: wx.grid.GridBlockCoords
.. method:: __eq__(self)
Equality operator.
:param `other`:
:type `other`: wx.grid.GridBlockCoords
.. attribute:: BottomRight
See :meth:`~wx.grid.GridBlockCoords.GetBottomRight`
.. attribute:: BottomRow
See :meth:`~wx.grid.GridBlockCoords.GetBottomRow` and :meth:`~wx.grid.GridBlockCoords.SetBottomRow`
.. attribute:: LeftCol
See :meth:`~wx.grid.GridBlockCoords.GetLeftCol` and :meth:`~wx.grid.GridBlockCoords.SetLeftCol`
.. attribute:: RightCol
See :meth:`~wx.grid.GridBlockCoords.GetRightCol` and :meth:`~wx.grid.GridBlockCoords.SetRightCol`
.. attribute:: TopLeft
See :meth:`~wx.grid.GridBlockCoords.GetTopLeft`
.. attribute:: TopRow
See :meth:`~wx.grid.GridBlockCoords.GetTopRow` and :meth:`~wx.grid.GridBlockCoords.SetTopRow`