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

.. highlight:: python



.. _wx.lib.agw.cubecolourdialog.BasePyControl:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.cubecolourdialog.BasePyControl**
==========================================================================================================================================

Base class used to hold common code for the HSB colour wheel and the RGB
colour cube.



|

|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>BasePyControl</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.agw.cubecolourdialog.BasePyControl_inheritance.png" alt="Inheritance diagram of BasePyControl" 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.agw.cubecolourdialog.BasePyControl.html" title="Base class used to hold common code for the HSB colour wheel and the RGB" alt="" coords="5,392,317,421"/> <area shape="rect" id="node2" href="wx.Control.html" title="This is the base class for a control or 'widget'." alt="" coords="115,315,208,344"/> <area shape="rect" id="node3" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="113,237,210,267"/> <area shape="rect" id="node4" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="96,160,227,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="102,83,221,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="56,5,144,35"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="169,5,279,35"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:class:`wx.lib.agw.cubecolourdialog.HSVWheel`, :class:`wx.lib.agw.cubecolourdialog.RGBCube`

|


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

:class:`wx.Control`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.__init__`                      Default class constructor.
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.AcceptsFocus`                  Can this window be given focus by mouse click?
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.AcceptsFocusFromKeyboard`      Can this window be given focus by keyboard navigation? If not, the
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.DoGetBestSize`                 Overridden base class virtual. Determines the best size of the
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.DrawLines`                     Draws the lines connecting the markers on top of the background bitmap.
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.DrawMarkers`                   Draws the markers on top of the background bitmap.
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.OnEraseBackground`             Handles the ``wx.EVT_ERASE_BACKGROUND`` for :class:`BasePyControl`.
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.OnLeftDown`                    Handles the ``wx.EVT_LEFT_DOWN`` for :class:`BasePyControl`.
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.OnLeftUp`                      Handles the ``wx.EVT_LEFT_UP`` for :class:`BasePyControl`.
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.OnMotion`                      Handles the ``wx.EVT_MOTION`` for :class:`BasePyControl`.
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.OnPaint`                       Handles the ``wx.EVT_PAINT`` for :class:`BasePyControl`.
:meth:`~wx.lib.agw.cubecolourdialog.BasePyControl.OnSize`                        Handles the ``wx.EVT_SIZE`` for :class:`BasePyControl`.
================================================================================ ================================================================================


|


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


.. class:: BasePyControl(wx.Control)

   Base class used to hold common code for the HSB colour wheel and the RGB
   colour cube.

   .. method:: __init__(self, parent, bitmap=None)

      Default class constructor.
      Used internally. Do not call it in your code!
      
      :param `parent`: the control parent;
      :param `bitmap`: the background bitmap for this custom control.


   .. method:: AcceptsFocus(self)

      Can this window be given focus by mouse click?
      
      .. note:: This method always returns ``False`` as we do not accept focus from
       mouse click.
      
      .. note:: Overridden from :class:`wx.Control`.


   .. method:: AcceptsFocusFromKeyboard(self)

      Can this window be given focus by keyboard navigation? If not, the
      only way to give it focus (provided it accepts it at all) is to click
      it.
      
      .. note:: This method always returns ``False`` as we do not accept focus from
       the keyboard.
      
      .. note:: Overridden from :class:`wx.Control`.


   .. method:: DoGetBestSize(self)

      Overridden base class virtual. Determines the best size of the
      control based on the bitmap size.
      
      .. note:: Overridden from :class:`wx.Control`.


   .. method:: DrawLines(self, dc)

      Draws the lines connecting the markers on top of the background bitmap.
      
      :param `dc`: an instance of :class:`wx.DC`.
      
      .. note:: This method must be overridden in derived classes.


   .. method:: DrawMarkers(self, dc=None)

      Draws the markers on top of the background bitmap.
      
      :param `dc`: an instance of :class:`wx.DC`.
      
      .. note:: This method must be overridden in derived classes.


   .. method:: OnEraseBackground(self, event)

      Handles the ``wx.EVT_ERASE_BACKGROUND`` for :class:`BasePyControl`.
      
      :param `event`: a :class:`EraseEvent` event to be processed.
      
      .. note:: This is intentionally empty to reduce flicker.


   .. method:: OnLeftDown(self, event)

      Handles the ``wx.EVT_LEFT_DOWN`` for :class:`BasePyControl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.
      
      .. note:: This method must be overridden in derived classes.


   .. method:: OnLeftUp(self, event)

      Handles the ``wx.EVT_LEFT_UP`` for :class:`BasePyControl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.
      
      .. note:: This method must be overridden in derived classes.


   .. method:: OnMotion(self, event)

      Handles the ``wx.EVT_MOTION`` for :class:`BasePyControl`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.
      
      .. note:: This method must be overridden in derived classes.


   .. method:: OnPaint(self, event)

      Handles the ``wx.EVT_PAINT`` for :class:`BasePyControl`.
      
      :param `event`: a :class:`PaintEvent` event to be processed.


   .. method:: OnSize(self, event)

      Handles the ``wx.EVT_SIZE`` for :class:`BasePyControl`.
      
      :param `event`: a :class:`wx.SizeEvent` event to be processed.