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 |
This is the CubeColourDialog main class implementation.
Default class constructor.
Parameters: |
|
---|
Common code to handle spin control changes.
Layouts all the controls in the CubeColourDialog.
Draws the markers for all the controls.
Parameters: | dc – an instance of wx.DC. If dc is None, a wx.ClientDC is created on the fly. |
---|
Returns the CubeColourDialog window style flags.
See also
SetAGWWindowStyleFlag for a list of possible flags.
Returns a wxPython compatible wx.ColourData.
Returns a 4-elements tuple of hue, saturation, brightness, alpha components.
Initialize the CubeColourDialog.
Handles the Add Custom wx.EVT_BUTTON event for CubeColourDialog.
Parameters: | event – a wx.CommandEvent event to be processed. |
---|
Handles the wx.EVT_SPINCTRL event for the alpha channel.
Parameters: | event – a wx.SpinEvent event to be processed. |
---|
Handles the Cancel wx.EVT_BUTTON event for CubeColourDialog.
Parameters: | event – a wx.CommandEvent event to be processed. |
---|
Handles the wx.EVT_CLOSE event for CubeColourDialog.
Parameters: | event – a wx.CloseEvent event to be processed. |
---|
Handles the wx.EVT_CHAR_HOOK event for CubeColourDialog.
Parameters: | event – a wx.KeyEvent event to be processed. |
---|
Handles the Ok wx.EVT_BUTTON event for CubeColourDialog.
Parameters: | event – a wx.CommandEvent event to be processed. |
---|
Shows/hides the alpha channel control in CubeColourDialog.
Parameters: | event – a wx.CommandEvent event to be processed. |
---|
Handles the wx.EVT_SPINCTRL event for RGB and HSB colours.
Parameters: | event – a wx.SpinEvent event to be processed. |
---|
Sets the CubeColourDialog window style flags.
Parameters: | agwStyle – can only be CCD_SHOW_ALPHA or None. |
---|
Sets some initial properties for CubeColourDialog (sizes, values).
Shows CubeColourDialog as a modal dialog. Program flow does not return until the dialog has been dismissed with EndModal.
Note
Overridden from wx.Dialog.