phoenix_title wx.lib.agw.cubecolourdialog.ColourPanel

Simple custom class used to display “old” and “new” colour panels, with alpha blending capabilities.


class_hierarchy Class Hierarchy

Inheritance diagram for class ColourPanel:

super_classes Known Superclasses

wx.Panel


method_summary Methods Summary

__init__

Default class constructor.

AcceptsFocus

Can this window be given focus by mouse click?

AcceptsFocusFromKeyboard

Can this window be given focus by keyboard navigation? If not, the

OnEraseBackground

Handles the wx.EVT_ERASE_BACKGROUND for wx.ColourPanel.

OnPaint

Handles the wx.EVT_PAINT for wx.ColourPanel.

OnSize

Handles the wx.EVT_SIZE for wx.ColourPanel.

RefreshColour

Refresh the panel after a colour/alpha change.


api Class API

class ColourPanel(wx.Panel)

Simple custom class used to display “old” and “new” colour panels, with alpha blending capabilities.


Methods

__init__(self, parent, style=wx.SIMPLE_BORDER)

Default class constructor. Used internally. Do not call it in your code!

Parameters:
  • parent – the control parent window;

  • style – the wx.ColourPanel window style.



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



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



OnEraseBackground(self, event)

Handles the wx.EVT_ERASE_BACKGROUND for wx.ColourPanel.

Parameters:

event – a EraseEvent event to be processed.

Note

This is intentionally empty to reduce flicker.



OnPaint(self, event)

Handles the wx.EVT_PAINT for wx.ColourPanel.

Parameters:

event – a PaintEvent event to be processed.



OnSize(self, event)

Handles the wx.EVT_SIZE for wx.ColourPanel.

Parameters:

event – a wx.SizeEvent event to be processed.



RefreshColour(self, colour)

Refresh the panel after a colour/alpha change.

Parameters:

colour – the new background colour of wx.ColourPanel.