.. 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.CustomPanel: ========================================================================================================================================== |phoenix_title| **wx.lib.agw.cubecolourdialog.CustomPanel** ========================================================================================================================================== This panel displays a series of custom colours (chosen by the user) just like the standard :class:`wx.ColourDialog`. | |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>CustomPanel</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.CustomPanel_inheritance.png" alt="Inheritance diagram of CustomPanel" 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.CustomPanel.html" title="This panel displays a series of custom colours (chosen by the user) just like" alt="" coords="5,392,308,421"/> <area shape="rect" id="node2" href="wx.Control.html" title="This is the base class for a control or 'widget'." alt="" coords="110,315,203,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="108,237,205,267"/> <area shape="rect" id="node4" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="91,160,222,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="97,83,216,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="51,5,139,35"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="164,5,275,35"/> </map> </p> </div> | |super_classes| Known Superclasses ================================== :class:`wx.Control` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.__init__` Default class constructor. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.AddCustom` Adds a user-chosen colour to the list of custom colours. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.DoGetBestSize` Overridden base class virtual. Determines the best size of the control. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.InitializeColours` Initializes the 16 custom colours in :class:`CustomPanel`. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.OnEraseBackground` Handles the ``wx.EVT_ERASE_BACKGROUND`` for :class:`CustomPanel`. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.OnLeftDown` Handles the ``wx.EVT_LEFT_DOWN`` for :class:`CustomPanel`. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.OnPaint` Handles the ``wx.EVT_PAINT`` for :class:`CustomPanel`. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.OnSize` Handles the ``wx.EVT_SIZE`` for :class:`CustomPanel`. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.PaintCustomColour` Paints a newly added custom colour subpanel. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.PaintCustomColours` Draws all the 16 subpanels with their custom colours. :meth:`~wx.lib.agw.cubecolourdialog.CustomPanel.PaintHighlight` Highlight the current custom colour selection (if any). ================================================================================ ================================================================================ | |api| Class API =============== .. class:: CustomPanel(wx.Control) This panel displays a series of custom colours (chosen by the user) just like the standard :class:`wx.ColourDialog`. .. method:: __init__(self, parent, colourData) Default class constructor. Used internally. Do not call it in your code! :param `parent`: the control parent window; :param `colourData`: an instance of :class:`wx.ColourData`. .. method:: AddCustom(self, colour) Adds a user-chosen colour to the list of custom colours. :param `colour`: an instance of :class:`wx.Colour`. .. method:: DoGetBestSize(self) Overridden base class virtual. Determines the best size of the control. .. note:: Overridden from :class:`wx.Control`. .. method:: InitializeColours(self) Initializes the 16 custom colours in :class:`CustomPanel`. .. method:: OnEraseBackground(self, event) Handles the ``wx.EVT_ERASE_BACKGROUND`` for :class:`CustomPanel`. :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:`CustomPanel`. :param `event`: a :class:`MouseEvent` event to be processed. .. method:: OnPaint(self, event) Handles the ``wx.EVT_PAINT`` for :class:`CustomPanel`. :param `event`: a :class:`PaintEvent` event to be processed. .. method:: OnSize(self, event) Handles the ``wx.EVT_SIZE`` for :class:`CustomPanel`. :param `event`: a :class:`wx.SizeEvent` event to be processed. .. method:: PaintCustomColour(self, dc, selX, selY) Paints a newly added custom colour subpanel. :param `dc`: an instance of :class:`wx.DC`; :param `selX`: the x coordinate of the custom colour subpanel; :param `selY`: the y coordinate of the custom colour subpanel. .. method:: PaintCustomColours(self, dc) Draws all the 16 subpanels with their custom colours. :param `dc`: an instance of :class:`wx.DC`. .. method:: PaintHighlight(self, dc, draw=True) Highlight the current custom colour selection (if any). :param `dc`: an instance of :class:`wx.DC`; :param `draw`: whether to draw a thin black border around the selected custom colour or not.