AGW Logo

agw_title BasePyControl

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

hierarchy Inheritance Diagram

Inheritance diagram for: BasePyControl

Inheritance diagram of BasePyControl


method_summary Methods Summary

__init__Default class constructor.
AcceptsFocusCan this window be given focus by mouse click? ..
AcceptsFocusFromKeyboardCan this window be given focus by keyboard navigation? If not, the
DoGetBestSizeOverridden base class virtual.
DrawLinesDraws the lines connecting the markers on top of the background bitmap.
DrawMarkersDraws the markers on top of the background bitmap.
OnEraseBackgroundHandles the wx.EVT_ERASE_BACKGROUND for BasePyControl.
OnLeftDownHandles the wx.EVT_LEFT_DOWN for BasePyControl.
OnLeftUpHandles the wx.EVT_LEFT_UP for BasePyControl.
OnMotionHandles the wx.EVT_MOTION for BasePyControl.
OnPaintHandles the wx.EVT_PAINT for BasePyControl.
OnSizeHandles the wx.EVT_SIZE for BasePyControl.

API Class API

class BasePyControl(wx.PyControl)[source]

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



__init__(parent, bitmap=None)[source]

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()[source]

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



AcceptsFocusFromKeyboard()[source]

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



DoGetBestSize()[source]

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

Note

Overridden from wx.PyControl.



DrawLines(dc)[source]

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(dc=None)[source]

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(event)[source]

Handles the wx.EVT_ERASE_BACKGROUND for BasePyControl.

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

Note

This is intentionally empty to reduce flicker.



OnLeftDown(event)[source]

Handles the wx.EVT_LEFT_DOWN for BasePyControl.

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

Note

This method must be overridden in derived classes.



OnLeftUp(event)[source]

Handles the wx.EVT_LEFT_UP for BasePyControl.

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

Note

This method must be overridden in derived classes.



OnMotion(event)[source]

Handles the wx.EVT_MOTION for BasePyControl.

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

Note

This method must be overridden in derived classes.



OnPaint(event)[source]

Handles the wx.EVT_PAINT for BasePyControl.

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


OnSize(event)[source]

Handles the wx.EVT_SIZE for BasePyControl.

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

Table Of Contents

Previous topic

BaseLineCtrl

Next topic

BrightCtrl