.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.ogl.composit

.. highlight:: python



.. _wx.lib.ogl.composit.DivisionShape:

==========================================================================================================================================
|phoenix_title|  **wx.lib.ogl.composit.DivisionShape**
==========================================================================================================================================

A :class:`DivisionShape` class is a composite with special properties,
to be used for containment. It's a subdivision of a container.
A containing node image consists of a composite with a main child shape
such as rounded rectangle, plus a list of division objects.
It needs to be a composite because a division contains pieces
of diagram.

.. note:: A container has at least one wxDivisionShape for consistency.
 This can be subdivided, so it turns into two objects, then each of
 these can be subdivided, etc.



|

|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>DivisionShape</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.lib.ogl.composit.DivisionShape_inheritance.png" alt="Inheritance diagram of DivisionShape" 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.lib.ogl.composit.DivisionShape.html" title="A DivisionShape class is a composite with special properties," alt="" coords="15,315,264,344"/> <area shape="rect" id="node2" href="wx.lib.ogl.composit.CompositeShape.html" title="The CompositeShape is a shape with a list of child objects, and a" alt="" coords="5,237,273,267"/> <area shape="rect" id="node3" href="wx.lib.ogl.basic.RectangleShape.html" title="The wx.RectangleShape class has rounded or square corners." alt="" coords="21,160,258,189"/> <area shape="rect" id="node4" href="wx.lib.ogl.basic.Shape.html" title="The Shape is the base class for OGL shapes." alt="" coords="54,83,225,112"/> <area shape="rect" id="node5" href="wx.lib.ogl.basic.ShapeEvtHandler.html" title="The ShapeEvtHandler class." alt="" coords="17,5,261,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.lib.ogl.composit.CompositeShape`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.ogl.composit.DivisionShape.__init__`                              Default class constructor.
:meth:`~wx.lib.ogl.composit.DivisionShape.AdjustLeft`                            Adjust a side.
:meth:`~wx.lib.ogl.composit.DivisionShape.AdjustRight`                           Adjust a side.
:meth:`~wx.lib.ogl.composit.DivisionShape.AdjustTop`                             Adjust a side.
:meth:`~wx.lib.ogl.composit.DivisionShape.CalculateSize`                         not implemented???
:meth:`~wx.lib.ogl.composit.DivisionShape.Divide`                                Divide this division into two further divisions.
:meth:`~wx.lib.ogl.composit.DivisionShape.EditEdge`                              
:meth:`~wx.lib.ogl.composit.DivisionShape.GetBottomSide`                         Return the division on the bottom side of this division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetHandleSide`                         Return the side which the handle appears on.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetLeftSide`                           Return the division on the left side of this division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetLeftSideColour`                     Return the colour used for drawing the left side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetLeftSidePen`                        Return the pen used for drawing the left side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetLeftSideStyle`                      Return the style used for the left side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetRightSide`                          Return the division on the right side of this division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetTopSide`                            Return the division on the top side of this division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetTopSideColour`                      Return the colour used for drawing the top side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetTopSidePen`                         Return the pen used for drawing the top side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.GetTopSideStyle`                       Return the style used for the top side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.MakeControlPoints`                     Make control points.
:meth:`~wx.lib.ogl.composit.DivisionShape.MakeMandatoryControlPoints`            Make mandatory control points.
:meth:`~wx.lib.ogl.composit.DivisionShape.OnBeginDragLeft`                       The begin drag left handler.
:meth:`~wx.lib.ogl.composit.DivisionShape.OnDragLeft`                            The drag left handler.
:meth:`~wx.lib.ogl.composit.DivisionShape.OnDraw`                                The draw handler.
:meth:`~wx.lib.ogl.composit.DivisionShape.OnDrawContents`                        The draw contens handler.
:meth:`~wx.lib.ogl.composit.DivisionShape.OnEndDragLeft`                         The end drag left handler.
:meth:`~wx.lib.ogl.composit.DivisionShape.OnMovePre`                             The move 'pre' handler.
:meth:`~wx.lib.ogl.composit.DivisionShape.OnRightClick`                          The right click handler.
:meth:`~wx.lib.ogl.composit.DivisionShape.PopupMenu`                             Popup menu handler.
:meth:`~wx.lib.ogl.composit.DivisionShape.ResetControlPoints`                    Reset control points.
:meth:`~wx.lib.ogl.composit.DivisionShape.ResetMandatoryControlPoints`           Reset mandatory control points.
:meth:`~wx.lib.ogl.composit.DivisionShape.ResizeAdjoining`                       Resize adjoining divisions at the given side.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetBottomSide`                         Set the the division on the bottom side of this division.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetHandleSide`                         Sets the side which the handle appears on.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetLeftSide`                           Set the the division on the left side of this division.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetLeftSideColour`                     Set the colour for drawing the left side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetLeftSidePen`                        Set the colour for drawing the left side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetLeftSideStyle`                      Set the left side style.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetRightSide`                          Set the the division on the right side of this division.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetSize`                               Set the size.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetTopSide`                            Set the the division on the top side of this division.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetTopSideColour`                      Set the colour for drawing the top side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetTopSidePen`                         Set the colour for drawing the top side of the division.
:meth:`~wx.lib.ogl.composit.DivisionShape.SetTopSideStyle`                       Set the top side style.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: DivisionShape(CompositeShape)

   A :class:`DivisionShape` class is a composite with special properties,
   to be used for containment. It's a subdivision of a container.
   A containing node image consists of a composite with a main child shape
   such as rounded rectangle, plus a list of division objects.
   It needs to be a composite because a division contains pieces
   of diagram.
   
   .. note:: A container has at least one wxDivisionShape for consistency.
    This can be subdivided, so it turns into two objects, then each of
    these can be subdivided, etc.

   .. method:: __init__(self)

      Default class constructor.


   .. method:: AdjustLeft(self, left, test)

      Adjust a side.
      
      :param `left`: desired left position ???
      :param `test`: if `True` just a test
      :returns: `False` if it's not physically possible to adjust it to
       this point.


   .. method:: AdjustRight(self, right, test)

      Adjust a side.
      
      :param `right`: desired right position ???
      :param `test`: if `True` just a test
      :returns: `False` if it's not physically possible to adjust it to
       this point.


   .. method:: AdjustTop(self, top, test)

      Adjust a side.
      
      :param `top`: desired top position ???
      :param `test`: if `True` just a test
      :returns: `False` if it's not physically possible to adjust it to
       this point.


   .. method:: CalculateSize(self)

      not implemented???


   .. method:: Divide(self, direction)

      Divide this division into two further divisions.
      
      :param `direction`: `wx.HORIZONTAL` for horizontal or `wx.VERTICAL` for
       vertical division.


   .. method:: EditEdge(self, side)


   .. method:: GetBottomSide(self)

      Return the division on the bottom side of this division.


   .. method:: GetHandleSide(self)

      Return the side which the handle appears on.


   .. method:: GetLeftSide(self)

      Return the division on the left side of this division.


   .. method:: GetLeftSideColour(self)

      Return the colour used for drawing the left side of the division.


   .. method:: GetLeftSidePen(self)

      Return the pen used for drawing the left side of the division.


   .. method:: GetLeftSideStyle(self)

      Return the style used for the left side of the division.


   .. method:: GetRightSide(self)

      Return the division on the right side of this division.


   .. method:: GetTopSide(self)

      Return the division on the top side of this division.


   .. method:: GetTopSideColour(self)

      Return the colour used for drawing the top side of the division.


   .. method:: GetTopSidePen(self)

      Return the pen used for drawing the top side of the division.


   .. method:: GetTopSideStyle(self)

      Return the style used for the top side of the division.


   .. method:: MakeControlPoints(self)

      Make control points.


   .. method:: MakeMandatoryControlPoints(self)

      Make mandatory control points.


   .. method:: OnBeginDragLeft(self, x, y, keys = 0, attachment = 0)

      The begin drag left handler.


   .. method:: OnDragLeft(self, draw, x, y, keys = 0, attachment = 0)

      The drag left handler.


   .. method:: OnDraw(self, dc)

      The draw handler.


   .. method:: OnDrawContents(self, dc)

      The draw contens handler.


   .. method:: OnEndDragLeft(self, x, y, keys = 0, attachment = 0)

      The end drag left handler.


   .. method:: OnMovePre(self, dc, x, y, oldx, oldy, display = True)

      The move 'pre' handler.


   .. method:: OnRightClick(self, x, y, keys = 0, attachment = 0)

      The right click handler.


   .. method:: PopupMenu(self, x, y)

      Popup menu handler.


   .. method:: ResetControlPoints(self)

      Reset control points.


   .. method:: ResetMandatoryControlPoints(self)

      Reset mandatory control points.


   .. method:: ResizeAdjoining(self, side, newPos, test)

      Resize adjoining divisions at the given side.
      
      :param `side`: can be one of
      
      ======================= =======================
      Side option             Description
      ======================= =======================
      `DIVISION_SIDE_NONE`    no side
      `DIVISION_SIDE_LEFT`    Left side
      `DIVISION_SIDE_TOP`     Top side
      `DIVISION_SIDE_RIGHT`   Right side
      `DIVISION_SIDE_BOTTOM`  Bottom side
      ======================= =======================
      
      :param `newPos`: new position
      :param `test`: if `True`, just see whether it's possible for each
       adjoining region, returning `False` if it's not.


   .. method:: SetBottomSide(self, shape)

      Set the the division on the bottom side of this division.


   .. method:: SetHandleSide(self, side)

      Sets the side which the handle appears on.
      
      :param `side`: Either DIVISION_SIDE_LEFT or DIVISION_SIDE_TOP.


   .. method:: SetLeftSide(self, shape)

      Set the the division on the left side of this division.


   .. method:: SetLeftSideColour(self, colour)

      Set the colour for drawing the left side of the division.


   .. method:: SetLeftSidePen(self, pen)

      Set the colour for drawing the left side of the division.


   .. method:: SetLeftSideStyle(self, style)

      Set the left side style.
      
      :param `style`: valid values ???


   .. method:: SetRightSide(self, shape)

      Set the the division on the right side of this division.


   .. method:: SetSize(self, w, h, recursive = True)

      Set the size.
      
      :param `w`: the width
      :param `h`: the heigth
      :param `recursive`: `True` recurse all children


   .. method:: SetTopSide(self, shape)

      Set the the division on the top side of this division.


   .. method:: SetTopSideColour(self, colour)

      Set the colour for drawing the top side of the division.


   .. method:: SetTopSidePen(self, pen)

      Set the colour for drawing the top side of the division.


   .. method:: SetTopSideStyle(self, style)

      Set the top side style.
      
      :param `style`: valid values ???