Phoenix Logo

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

Inheritance diagram for class BasePyControl:


super_classes Known Superclasses

wx.Control


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
DoGetBestSize Overridden base class virtual. Determines the best size of the
DrawLines Draws the lines connecting the markers on top of the background bitmap.
DrawMarkers Draws the markers on top of the background bitmap.
OnEraseBackground Handles the wx.EVT_ERASE_BACKGROUND for BasePyControl.
OnLeftDown Handles the wx.EVT_LEFT_DOWN for BasePyControl.
OnLeftUp Handles the wx.EVT_LEFT_UP for BasePyControl.
OnMotion Handles the wx.EVT_MOTION for BasePyControl.
OnPaint Handles the wx.EVT_PAINT for BasePyControl.
OnSize Handles the wx.EVT_SIZE for 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.


Methods



__init__(self, parent, bitmap=None)

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

Parameters:
  • parent – the control parent;
  • bitmap – the background bitmap for this custom control.


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 wx.Control.



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 wx.Control.



DoGetBestSize(self)

Overridden base class virtual. Determines the best size of the control based on the bitmap size.

Note

Overridden from wx.Control.



DrawLines(self, dc)

Draws the lines connecting the markers on top of the background bitmap.

Parameters:dc – an instance of wx.DC.

Note

This method must be overridden in derived classes.



DrawMarkers(self, dc=None)

Draws the markers on top of the background bitmap.

Parameters:dc – an instance of wx.DC.

Note

This method must be overridden in derived classes.



OnEraseBackground(self, event)

Handles the wx.EVT_ERASE_BACKGROUND for BasePyControl.

Parameters:event – a EraseEvent event to be processed.

Note

This is intentionally empty to reduce flicker.



OnLeftDown(self, event)

Handles the wx.EVT_LEFT_DOWN for BasePyControl.

Parameters:event – a MouseEvent event to be processed.

Note

This method must be overridden in derived classes.



OnLeftUp(self, event)

Handles the wx.EVT_LEFT_UP for BasePyControl.

Parameters:event – a MouseEvent event to be processed.

Note

This method must be overridden in derived classes.



OnMotion(self, event)

Handles the wx.EVT_MOTION for BasePyControl.

Parameters:event – a MouseEvent event to be processed.

Note

This method must be overridden in derived classes.



OnPaint(self, event)

Handles the wx.EVT_PAINT for BasePyControl.

Parameters:event – a PaintEvent event to be processed.


OnSize(self, event)

Handles the wx.EVT_SIZE for BasePyControl.

Parameters:event – a wx.SizeEvent event to be processed.