Package wx :: Package lib :: Package agw :: Module cubecolourdialog :: Class CubeColourDialog
[frames | no frames]

Type CubeColourDialog

object --+                    
         |                    
    Object --+                
             |                
    EvtHandler --+            
                 |            
            Window --+        
                     |        
        TopLevelWindow --+    
                         |    
                    Dialog --+
                             |
                            CubeColourDialog


This is the CubeColourDialog main class implementation.
Method Summary
  __init__(self, parent, colourData, style)
Default class constructor.
  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)
Draws the markers for all the controls.
  DrawRGB(self)
Refreshes the RGB colour cube.
  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)
  OnAlphaSpin(self, event)
Handles the wx.EVT_SPINCTRL event for the alpha channel.
  OnCancel(self, event)
Handles the Cancel wx.EVT_BUTTON event for CubeColourDialog.
  OnCloseWindow(self, event)
User canceled the dialog.
  OnKeyUp(self, event)
  OnOk(self, event)
Handles the Ok wx.EVT_BUTTON event for CubeColourDialog.
  OnShowAlpha(self, event)
Shows/hides the alpha channel control in CubeColourDialog.
  OnSpinCtrl(self, event)
Handles the wx.EVT_SPINCTRL event for RGB and HSB colours.
  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 (sizes, values).
  SetSpinVals(self)
Sets the values for all the spin controls.
  SetWindowStyleFlag(self, style)
Sets the CubeColourDialog window style flags.
  ShowModal(self)
Overridden wx.Dialog.ShowModal.

Property Summary

Class Variable Summary

Instance Method Details

__init__(self, parent, colourData=None, style=1)
(Constructor)

Default class constructor.
Parameters:
colourData - a wxPython wx.ColourData;

style - can be either None or CCD_SHOW_ALPHA, depending if you want to hide the alpha channel control or not.

Overrides:
wx.Dialog.__init__

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.

DrawRGB(self)

Refreshes the RGB colour cube.

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.
Overrides:
wx.Window.InitDialog

OnAlphaSpin(self, event)

Handles the wx.EVT_SPINCTRL event for the alpha channel.

OnCancel(self, event)

Handles the Cancel wx.EVT_BUTTON event for CubeColourDialog.

OnCloseWindow(self, event)

User canceled the dialog.

OnOk(self, event)

Handles the Ok wx.EVT_BUTTON event for CubeColourDialog.

OnShowAlpha(self, event)

Shows/hides the alpha channel control in CubeColourDialog.

OnSpinCtrl(self, event)

Handles the wx.EVT_SPINCTRL event for RGB and HSB colours.

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 (sizes, values).

SetSpinVals(self)

Sets the values for all the spin controls.

SetWindowStyleFlag(self, style)

Sets the CubeColourDialog window style flags.
Overrides:
wx.Window.SetWindowStyleFlag

ShowModal(self)

Overridden wx.Dialog.ShowModal.
Overrides:
wx.Dialog.ShowModal

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:51:26 2009 http://epydoc.sf.net