.. 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>GridBlockCoords</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.grid.GridBlockCoords_inheritance.png" alt="Inheritance diagram of GridBlockCoords" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.grid.GridBlockCoords.html" title="wx.grid.GridBlockCoords" alt="" coords="5,5,188,35"/> </map> 
   </p>
   </div>

|


|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()
       
       GridBlockCoords(topRow, leftCol, bottomRow, rightCol)
       
   
   Represents coordinates of a block of cells in the grid.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__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``.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, topRow, leftCol, bottomRow, rightCol)`
      
      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
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. 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:`<hr class="overloadsep" /><br />`

      
      **Contains** `(self, cell)`
      
      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:`<hr class="overloadsep" /><br />`

      
      **Contains** `(self, other)`
      
      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:`<hr class="overloadsep" /><br />`






   .. method:: Difference(self, other, splitOrientation)

      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)

      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)

      Set the row of the bottom right corner.                  


      :param `row`: 
      :type `row`: int







   .. method:: SetLeftCol(self, col)

      Set the column of the left top corner.                  


      :param `col`: 
      :type `col`: int







   .. method:: SetRightCol(self, col)

      Set the column of the bottom right corner.                  


      :param `col`: 
      :type `col`: int







   .. method:: SetTopRow(self, row)

      Set the row of the left top corner.                  


      :param `row`: 
      :type `row`: int







   .. method:: SymDifference(self, other)

      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`

