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 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 EVT_BUTTON event for CubeColourDialog. |
OnAlphaSpin | Handles the EVT_SPINCTRL event for the alpha channel. |
OnCancel | Handles the Cancel EVT_BUTTON event for CubeColourDialog. |
OnCloseWindow | Handles the EVT_CLOSE event for CubeColourDialog. |
OnKeyUp | Handles the EVT_CHAR_HOOK event for CubeColourDialog. |
OnOk | Handles the Ok EVT_BUTTON event for CubeColourDialog. |
OnShowAlpha | Shows/hides the alpha channel control in CubeColourDialog. |
OnSpinCtrl | Handles the 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.
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 CubeColourDialog.
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.
Parameters: | dc – an instance of DC. If dc is None, a ClientDC is created on the fly. |
---|
Refreshes the RGB colour cube.
Returns the CubeColourDialog window style flags.
See also
SetAGWWindowStyleFlag for a list of possible flags.
Returns a wxPython compatible ColourData.
Returns a 4-elements tuple of hue, saturation, brightness, alpha components.
Returns a 4-elements tuple of red, green, blue, alpha components.
Initialize the CubeColourDialog.
Handles the Add Custom EVT_BUTTON event for CubeColourDialog.
Parameters: | event – a CommandEvent event to be processed. |
---|
Handles the EVT_SPINCTRL event for the alpha channel.
Parameters: | event – a SpinEvent event to be processed. |
---|
Handles the Cancel EVT_BUTTON event for CubeColourDialog.
Parameters: | event – a CommandEvent event to be processed. |
---|
Handles the EVT_CLOSE event for CubeColourDialog.
Parameters: | event – a CloseEvent event to be processed. |
---|
Handles the EVT_CHAR_HOOK event for CubeColourDialog.
Parameters: | event – a KeyEvent event to be processed. |
---|
Handles the Ok EVT_BUTTON event for CubeColourDialog.
Parameters: | event – a CommandEvent event to be processed. |
---|
Shows/hides the alpha channel control in CubeColourDialog.
Parameters: | event – a CommandEvent event to be processed. |
---|
Handles the EVT_SPINCTRL event for RGB and HSB colours.
Parameters: | event – a SpinEvent event to be processed. |
---|
Sets the CubeColourDialog window style flags.
Parameters: | agwStyle – can only be CCD_SHOW_ALPHA or None. |
---|
Sets the HTML/MS Access codes (if any) in the text controls.
Assigns colours to the colour panels.
Sets some initial properties for CubeColourDialog (sizes, values).
Sets the values for all the spin controls.
Shows CubeColourDialog as a modal dialog. Program flow does not return until the dialog has been dismissed with EndModal.
Note
Overridden from Dialog.