This is the main class implementation of GradientButton.
__init__ | Default class constructor. |
AcceptsFocus | Can this window be given focus by mouse click? |
DoGetBestSize | Overridden base class virtual. Determines the best size of the |
Enable | Enables/disables the button. |
GetBottomEndColour | Returns the bottom end colour for the gradient shading. |
GetBottomStartColour | Returns the bottom start colour for the gradient shading. |
GetDefaultAttributes | Overridden base class virtual. By default we should use |
GetPath | Returns a rounded GraphicsPath rectangle. |
GetPressedBottomColour | Returns the pressed bottom start colour for the gradient shading. |
GetPressedTopColour | Returns the pressed top start colour for the gradient shading. |
GetTopEndColour | Returns the top end colour for the gradient shading. |
GetTopStartColour | Returns the top start colour for the gradient shading. |
LightColour | Return light contrast of colour. The colour returned is from the scale of |
Notify | Actually sends a EVT_BUTTON event to the listener (if any). |
OnGainFocus | Handles the EVT_SET_FOCUS event for GradientButton. |
OnKeyDown | Handles the EVT_KEY_DOWN event for GradientButton. |
OnKeyUp | Handles the EVT_KEY_UP event for GradientButton. |
OnLeftDown | Handles the EVT_LEFT_DOWN event for GradientButton. |
OnLeftUp | Handles the EVT_LEFT_UP event for GradientButton. |
OnLoseFocus | Handles the EVT_KILL_FOCUS event for GradientButton. |
OnMouseEnter | Handles the EVT_ENTER_WINDOW event for GradientButton. |
OnMouseLeave | Handles the EVT_LEAVE_WINDOW event for GradientButton. |
OnPaint | Handles the EVT_PAINT event for GradientButton. |
OnSize | Handles the EVT_SIZE event for GradientButton. |
SetBaseColours | Sets the bottom, top, pressed and foreground colour |
SetBottomEndColour | Sets the bottom end colour for the gradient shading. |
SetBottomStartColour | Sets the top bottom colour for the gradient shading. |
SetDefault | Sets the default button. |
SetForegroundColour | Sets the GradientButton foreground (text) colour. |
SetInitialSize | Given the current font and bezel width settings, calculate |
SetPressedBottomColour | Sets the pressed bottom start colour for the gradient shading. |
SetPressedTopColour | Sets the pressed top start colour for the gradient shading. |
SetTopEndColour | Sets the top end colour for the gradient shading. |
SetTopStartColour | Sets the top start colour for the gradient shading. |
ShouldInheritColours | Overridden base class virtual. Buttons usually don’t inherit |
This is the main class implementation of GradientButton.
Default class constructor.
Parameters: |
|
---|
Can this window be given focus by mouse click?
Note
Overridden from PyControl.
Overridden base class virtual. Determines the best size of the button based on the label and bezel size.
Note
Overridden from PyControl.
Enables/disables the button.
Parameters: | enable – True to enable the button, False to disable it. |
---|
Note
Overridden from PyControl.
Returns the bottom end colour for the gradient shading.
Returns the bottom start colour for the gradient shading.
Overridden base class virtual. By default we should use the same font/colour attributes as the native Button.
Returns a rounded GraphicsPath rectangle.
Parameters: |
|
---|
Returns the pressed bottom start colour for the gradient shading.
Returns the pressed top start colour for the gradient shading.
Returns the top end colour for the gradient shading.
Returns the top start colour for the gradient shading.
Return light contrast of colour. The colour returned is from the scale of colour ==> white.
Parameters: |
|
---|
Actually sends a EVT_BUTTON event to the listener (if any).
Handles the EVT_SET_FOCUS event for GradientButton.
Parameters: | event – a FocusEvent event to be processed. |
---|
Handles the EVT_KEY_DOWN event for GradientButton.
Parameters: | event – a KeyEvent event to be processed. |
---|
Handles the EVT_KEY_UP event for GradientButton.
Parameters: | event – a KeyEvent event to be processed. |
---|
Handles the EVT_LEFT_DOWN event for GradientButton.
Parameters: | event – a MouseEvent event to be processed. |
---|
Handles the EVT_LEFT_UP event for GradientButton.
Parameters: | event – a MouseEvent event to be processed. |
---|
Handles the EVT_KILL_FOCUS event for GradientButton.
Parameters: | event – a FocusEvent event to be processed. |
---|
Handles the EVT_ENTER_WINDOW event for GradientButton.
Parameters: | event – a MouseEvent event to be processed. |
---|
Handles the EVT_LEAVE_WINDOW event for GradientButton.
Parameters: | event – a MouseEvent event to be processed. |
---|
Handles the EVT_PAINT event for GradientButton.
Parameters: | event – a PaintEvent event to be processed. |
---|
Handles the EVT_SIZE event for GradientButton.
Parameters: | event – a SizeEvent event to be processed. |
---|
Sets the bottom, top, pressed and foreground colour
Parameters: |
|
---|
Sets the bottom end colour for the gradient shading.
Parameters: | colour – a valid Colour object. |
---|
Sets the top bottom colour for the gradient shading.
Parameters: | colour – a valid Colour object. |
---|
Sets the default button.
Sets the GradientButton foreground (text) colour.
Parameters: | colour – a valid Colour object. |
---|
Note
Overridden from PyControl.
Given the current font and bezel width settings, calculate and set a good size.
Parameters: | size – an instance of Size. |
---|
Sets the pressed bottom start colour for the gradient shading.
Parameters: | colour – a valid Colour object. |
---|
Sets the pressed top start colour for the gradient shading.
Parameters: | colour – a valid Colour object. |
---|
Sets the top end colour for the gradient shading.
Parameters: | colour – a valid Colour object. |
---|
Sets the top start colour for the gradient shading.
Parameters: | colour – a valid Colour object. |
---|
Overridden base class virtual. Buttons usually don’t inherit the parent’s colours.
Note
Overridden from PyControl.