.. 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 .. 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
Inheritance diagram for class CustomPanel:
| |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.