wx.lib.agw.cubecolourdialog.CubeColourDialog¶
This is the CubeColourDialog main class implementation.
Class Hierarchy¶
Control Appearance¶
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Common code to handle spin control changes. |
|
Calculates the RGB colour cube vertices. |
|
Calculates the brightness control user-selected rect. |
|
Calculates the line slopes in the RGB colour cube. |
|
Layouts all the controls in the |
|
Draws all the custom controls after a colour change. |
|
Refreshes the alpha channel control. |
|
Refreshes the brightness control. |
|
Refreshes the HSB colour wheel. |
|
Draws the markers for all the controls. |
|
Refreshes the RGB colour cube. |
|
Returns the |
|
Returns a wxPython compatible |
|
Returns a 4-elements tuple of hue, saturation, brightness, alpha components. |
|
Returns a 4-elements tuple of red, green, blue, alpha components. |
|
Initialize the |
|
Handles the Add Custom |
|
Handles the |
|
Handles the Cancel |
|
Handles the |
|
Handles the |
|
Handles the Ok |
|
Shows/hides the alpha channel control in |
|
Handles the |
|
Sets the |
|
Sets the HTML/MS Access codes (if any) in the text controls. |
|
Assigns colours to the colour panels. |
|
Sets some initial properties for |
|
Sets the values for all the spin controls. |
|
Shows |
Class API¶
- class CubeColourDialog(wx.Dialog)¶
This is the CubeColourDialog main class implementation.
Methods¶
- __init__(self, parent, colourData=None, agwStyle=CCD_SHOW_ALPHA)¶
Default class constructor.
- Parameters:
colourData – a standard
wx.ColourData(as used inwx.ColourDialog);agwStyle – can be either
NoneorCCD_SHOW_ALPHA, depending if you want to hide the alpha channel control or not.
- AssignColourValue(self, attribute, colourVal, maxVal, position)¶
Common code to handle spin control changes.
- CalcCuboid(self)¶
Calculates the RGB colour cube vertices.
- CalcRects(self)¶
Calculates the brightness control user-selected rect.
- CalcSlopes(self)¶
Calculates the line slopes in the RGB colour cube.
- DoLayout(self)¶
Layouts all the controls in the
CubeColourDialog.
- DrawAll(self)¶
Draws all the custom controls after a colour change.
- DrawAlpha(self)¶
Refreshes the alpha channel control.
- DrawBright(self)¶
Refreshes the brightness control.
- DrawHSB(self)¶
Refreshes the HSB colour wheel.
- DrawMarkers(self, dc=None)¶
Draws the markers for all the controls.
- Parameters:
dc – an instance of
wx.DC. If dc isNone, aClientDCis created on the fly.
- DrawRGB(self)¶
Refreshes the RGB colour cube.
- GetAGWWindowStyleFlag(self)¶
Returns the
CubeColourDialogwindow style flags.See also
SetAGWWindowStyleFlagfor a list of possible flags.
- GetColourData(self)¶
Returns a wxPython compatible
wx.ColourData.
- GetHSVAColour(self)¶
Returns a 4-elements tuple of hue, saturation, brightness, alpha components.
- GetRGBAColour(self)¶
Returns a 4-elements tuple of red, green, blue, alpha components.
- InitDialog(self)¶
Initialize the
CubeColourDialog.
- OnAddCustom(self, event)¶
Handles the Add Custom
wx.EVT_BUTTONevent forCubeColourDialog.- Parameters:
event – a
CommandEventevent to be processed.
- OnAlphaSpin(self, event)¶
Handles the
wx.EVT_SPINCTRLevent for the alpha channel.- Parameters:
event – a
SpinEventevent to be processed.
- OnCancel(self, event)¶
Handles the Cancel
wx.EVT_BUTTONevent forCubeColourDialog.- Parameters:
event – a
CommandEventevent to be processed.
- OnCloseWindow(self, event)¶
Handles the
wx.EVT_CLOSEevent forCubeColourDialog.- Parameters:
event – a
CloseEventevent to be processed.
- OnKeyUp(self, event)¶
Handles the
wx.EVT_CHAR_HOOKevent forCubeColourDialog.- Parameters:
event – a
KeyEventevent to be processed.
- OnOk(self, event)¶
Handles the Ok
wx.EVT_BUTTONevent forCubeColourDialog.- Parameters:
event – a
CommandEventevent to be processed.
- OnShowAlpha(self, event)¶
Shows/hides the alpha channel control in
CubeColourDialog.- Parameters:
event – a
CommandEventevent to be processed.
- OnSpinCtrl(self, event)¶
Handles the
wx.EVT_SPINCTRLevent for RGB and HSB colours.- Parameters:
event – a
SpinEventevent to be processed.
- SetAGWWindowStyleFlag(self, agwStyle)¶
Sets the
CubeColourDialogwindow style flags.- Parameters:
agwStyle – can only be
CCD_SHOW_ALPHAorNone.
- SetCodes(self)¶
Sets the HTML/MS Access codes (if any) in the text controls.
- SetPanelColours(self)¶
Assigns colours to the colour panels.
- SetProperties(self)¶
Sets some initial properties for
CubeColourDialog(sizes, values).
- SetSpinVals(self)¶
Sets the values for all the spin controls.
- ShowModal(self)¶
Shows
CubeColourDialogas a modal dialog. Program flow does not return until the dialog has been dismissed withEndModal.Note
Overridden from
Dialog.