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. |
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. |
GetPath | Returns a rounded wx.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. |
Notify | Actually sends a wx.EVT_BUTTON event to the listener (if any). |
OnGainFocus | Handles the wx.EVT_SET_FOCUS event for GradientButton. |
OnKeyDown | Handles the wx.EVT_KEY_DOWN event for GradientButton. |
OnKeyUp | Handles the wx.EVT_KEY_UP event for GradientButton. |
OnLeftDown | Handles the wx.EVT_LEFT_DOWN event for GradientButton. |
OnLeftUp | Handles the wx.EVT_LEFT_UP event for GradientButton. |
OnLoseFocus | Handles the wx.EVT_KILL_FOCUS event for GradientButton. |
OnMouseEnter | Handles the wx.EVT_ENTER_WINDOW event for GradientButton. |
OnMouseLeave | Handles the wx.EVT_LEAVE_WINDOW event for GradientButton. |
OnPaint | Handles the wx.EVT_PAINT event for GradientButton. |
OnSize | Handles the wx.EVT_SIZE event for GradientButton. |
SetBaseColours | Sets the bottom, top, pressed and foreground colour |
SetBestSize | Given the current font and bezel width settings, calculate and set a good size. |
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 and set a good size. |
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. |
This is the main class implementation of GradientButton.
Default class constructor.
Parameters: |
|
---|
Can this window be given focus by mouse click?
Note
Overridden from wx.PyControl.
Overridden base class virtual. Determines the best size of the button based on the label and bezel size.
Note
Overridden from wx.PyControl.
Enables/disables the button.
Parameters: | enable – True to enable the button, False to disable it. |
---|
Note
Overridden from wx.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 wx.Button.
Returns a rounded wx.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 wx.EVT_BUTTON event to the listener (if any).
Handles the wx.EVT_SET_FOCUS event for GradientButton.
Parameters: | event – a wx.FocusEvent event to be processed. |
---|
Handles the wx.EVT_KEY_DOWN event for GradientButton.
Parameters: | event – a wx.KeyEvent event to be processed. |
---|
Handles the wx.EVT_KEY_UP event for GradientButton.
Parameters: | event – a wx.KeyEvent event to be processed. |
---|
Handles the wx.EVT_LEFT_DOWN event for GradientButton.
Parameters: | event – a wx.MouseEvent event to be processed. |
---|
Handles the wx.EVT_LEFT_UP event for GradientButton.
Parameters: | event – a wx.MouseEvent event to be processed. |
---|
Handles the wx.EVT_KILL_FOCUS event for GradientButton.
Parameters: | event – a wx.FocusEvent event to be processed. |
---|
Handles the wx.EVT_ENTER_WINDOW event for GradientButton.
Parameters: | event – a wx.MouseEvent event to be processed. |
---|
Handles the wx.EVT_LEAVE_WINDOW event for GradientButton.
Parameters: | event – a wx.MouseEvent event to be processed. |
---|
Handles the wx.EVT_PAINT event for GradientButton.
Parameters: | event – a wx.PaintEvent event to be processed. |
---|
Handles the wx.EVT_SIZE event for GradientButton.
Parameters: | event – a wx.SizeEvent event to be processed. |
---|
Sets the bottom, top, pressed and foreground colour
Parameters: |
|
---|
Given the current font and bezel width settings, calculate and set a good size.
Parameters: | size – an instance of wx.Size. |
---|
Sets the bottom end colour for the gradient shading.
Parameters: | colour – a valid wx.Colour object. |
---|
Sets the top bottom colour for the gradient shading.
Parameters: | colour – a valid wx.Colour object. |
---|
Sets the default button.
Sets the GradientButton foreground (text) colour.
Parameters: | colour – a valid wx.Colour object. |
---|
Note
Overridden from wx.PyControl.
Given the current font and bezel width settings, calculate and set a good size.
Parameters: | size – an instance of wx.Size. |
---|
Sets the pressed bottom start colour for the gradient shading.
Parameters: | colour – a valid wx.Colour object. |
---|
Sets the pressed top start colour for the gradient shading.
Parameters: | colour – a valid wx.Colour object. |
---|
Sets the top end colour for the gradient shading.
Parameters: | colour – a valid wx.Colour object. |
---|
Sets the top start colour for the gradient shading.
Parameters: | colour – a valid wx.Colour object. |
---|
Overridden base class virtual. Buttons usually don’t inherit the parent’s colours.
Note
Overridden from wx.PyControl.