This is the CubeColourDialog main class implementation.
__init__ |
Default class constructor. |
AssignColourValue |
Common code to handle spin control changes. |
CalcCuboid |
Calculates the RGB colour cube vertices. |
CalcRects |
Calculates the brightness control user-selected rect. |
CalcSlopes |
Calculates the line slopes in the RGB colour cube. |
DoLayout |
Layouts all the controls in the CubeColourDialog . |
DrawAll |
Draws all the custom controls after a colour change. |
DrawAlpha |
Refreshes the alpha channel control. |
DrawBright |
Refreshes the brightness control. |
DrawHSB |
Refreshes the HSB colour wheel. |
DrawMarkers |
Draws the markers for all the controls. |
DrawRGB |
Refreshes the RGB colour cube. |
GetAGWWindowStyleFlag |
Returns the CubeColourDialog window style flags. |
GetColourData |
Returns a wxPython compatible wx.ColourData . |
GetHSVAColour |
Returns a 4-elements tuple of hue, saturation, brightness, alpha components. |
GetRGBAColour |
Returns a 4-elements tuple of red, green, blue, alpha components. |
InitDialog |
Initialize the CubeColourDialog . |
OnAddCustom |
Handles the Add Custom wx.EVT_BUTTON event for CubeColourDialog . |
OnAlphaSpin |
Handles the wx.EVT_SPINCTRL event for the alpha channel. |
OnCancel |
Handles the Cancel wx.EVT_BUTTON event for CubeColourDialog . |
OnCloseWindow |
Handles the wx.EVT_CLOSE event for CubeColourDialog . |
OnKeyUp |
Handles the wx.EVT_CHAR_HOOK event for CubeColourDialog . |
OnOk |
Handles the Ok wx.EVT_BUTTON event for CubeColourDialog . |
OnShowAlpha |
Shows/hides the alpha channel control in CubeColourDialog . |
OnSpinCtrl |
Handles the wx.EVT_SPINCTRL event for RGB and HSB colours. |
SetAGWWindowStyleFlag |
Sets the CubeColourDialog window style flags. |
SetCodes |
Sets the HTML/MS Access codes (if any) in the text controls. |
SetPanelColours |
Assigns colours to the colour panels. |
SetProperties |
Sets some initial properties for CubeColourDialog (sizes, values). |
SetSpinVals |
Sets the values for all the spin controls. |
ShowModal |
Shows CubeColourDialog as a modal dialog. Program flow does |
CubeColourDialog
(wx.Dialog)¶This is the CubeColourDialog main class implementation.
__init__
(self, parent, colourData=None, agwStyle=CCD_SHOW_ALPHA)¶Default class constructor.
Parameters: |
|
---|
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 is None , a ClientDC is
created on the fly. |
---|
DrawRGB
(self)¶Refreshes the RGB colour cube.
GetAGWWindowStyleFlag
(self)¶Returns the CubeColourDialog
window style flags.
See also
SetAGWWindowStyleFlag
for 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_BUTTON
event for CubeColourDialog
.
Parameters: | event – a CommandEvent event to be processed. |
---|
OnAlphaSpin
(self, event)¶Handles the wx.EVT_SPINCTRL
event for the alpha channel.
Parameters: | event – a SpinEvent event to be processed. |
---|
OnCancel
(self, event)¶Handles the Cancel wx.EVT_BUTTON
event for CubeColourDialog
.
Parameters: | event – a CommandEvent event to be processed. |
---|
OnCloseWindow
(self, event)¶Handles the wx.EVT_CLOSE
event for CubeColourDialog
.
Parameters: | event – a CloseEvent event to be processed. |
---|
OnKeyUp
(self, event)¶Handles the wx.EVT_CHAR_HOOK
event for CubeColourDialog
.
Parameters: | event – a KeyEvent event to be processed. |
---|
OnOk
(self, event)¶Handles the Ok wx.EVT_BUTTON
event for CubeColourDialog
.
Parameters: | event – a CommandEvent event to be processed. |
---|
OnShowAlpha
(self, event)¶Shows/hides the alpha channel control in CubeColourDialog
.
Parameters: | event – a CommandEvent event to be processed. |
---|
OnSpinCtrl
(self, event)¶Handles the wx.EVT_SPINCTRL
event for RGB and HSB colours.
Parameters: | event – a SpinEvent event to be processed. |
---|
SetAGWWindowStyleFlag
(self, agwStyle)¶Sets the CubeColourDialog
window style flags.
Parameters: | agwStyle – can only be CCD_SHOW_ALPHA or None . |
---|
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 CubeColourDialog
as a modal dialog. Program flow does
not return until the dialog has been dismissed with EndModal
.
Note
Overridden from Dialog
.