Package wx :: Package lib :: Package agw :: Module gradientbutton :: Class GradientButton

[frames | no frames]

## Type GradientButton

    object --+
             |
        Object --+
                 |
        EvtHandler --+
                     |
                Window --+
                         |
                   Control --+
                             |
                     PyControl --+
                                 |
                                GradientButton

This is the main class implementation of L{GradientButton}.

Method Summary
| ``__init__`(self, parent, id, bitmap, label, pos, size, style, validator, name)` Default class constructor.
| ``AcceptsFocus`(self)` Overridden base class virtual.
| ``DoGetBestSize`(self)` Overridden base class virtual.
| ``Enable`(self, enable)` Enables/disables the button.
| ``GetBottomEndColour`(self)` Returns the bottom end colour for the gradient shading.
| ``GetBottomStartColour`(self)` Returns the bottom start colour for the gradient shading.
| ``GetDefaultAttributes`(self)` Overridden base class virtual.
| ``GetPath`(self, gc, rc, r)` Returns a rounded GraphicsPath.
| ``GetPressedBottomColour`(self)` Returns the pressed bottom start colour for the gradient shading.
| ``GetPressedTopColour`(self)` Returns the pressed top start colour for the gradient shading.
| ``GetTopEndColour`(self)` Returns the top end colour for the gradient shading.
| ``GetTopStartColour`(self)` Returns the top start colour for the gradient shading.
| ``LightColour`(self, color, percent)` Return light contrast of color.
| ``Notify`(self)` Actually sends a wx.EVT_BUTTON event to the listener (if any).
| ``OnGainFocus`(self, event)` Handles the wx.EVT_SET_FOCUS event for L{GradientButton}.
| ``OnKeyDown`(self, event)` Handles the wx.EVT_KEY_DOWN event for L{GradientButton}.
| ``OnKeyUp`(self, event)` Handles the wx.EVT_KEY_UP event for L{GradientButton}.
| ``OnLeftDown`(self, event)` Handles the wx.EVT_LEFT_DOWN event for L{GradientButton}.
| ``OnLeftUp`(self, event)` Handles the wx.EVT_LEFT_UP event for L{GradientButton}.
| ``OnLoseFocus`(self, event)` Handles the wx.EVT_KILL_FOCUS event for L{GradientButton}.
| ``OnMouseEnter`(self, event)` Handles the wx.EVT_ENTER_WINDOW event for L{GradientButton}.
| ``OnMouseLeave`(self, event)` Handles the wx.EVT_LEAVE_WINDOW event for L{GradientButton}.
| ``OnPaint`(self, event)` Handles the wx.EVT_PAINT event for L{GradientButton}.
| ``OnSize`(self, event)` Handles the wx.EVT_SIZE event for L{GradientButton}.
| ``SetBestSize`(self, size)` Given the current font and bezel width settings, calculate and set a good size.
| ``SetBottomEndColour`(self, colour)` Sets the bottom end colour for the gradient shading.
| ``SetBottomStartColour`(self, colour)` Sets the top bottom colour for the gradient shading.
| ``SetDefault`(self)` Sets the default button.
| ``SetForegroundColour`(self, colour)` Sets the L{GradientButton} foreground (text) colour.
| ``SetInitialSize`(self, size)` Given the current font and bezel width settings, calculate and set a good size.
| ``SetPressedBottomColour`(self, colour)` Sets the pressed bottom start colour for the gradient shading.
| ``SetPressedTopColour`(self, colour)` Sets the pressed top start colour for the gradient shading.
| ``SetTopEndColour`(self, colour)` Sets the top end colour for the gradient shading.
| ``SetTopStartColour`(self, colour)` Sets the top start colour for the gradient shading.
| ``ShouldInheritColours`(self)` Overridden base class virtual.

Property Summary

Instance Method Details

### __init__(self, parent, id=-1, bitmap=None, label='', pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=2097152, validator=<wx._core.Validator; proxy of <Swig Object of type 'wxVal..., name='gradientbutton')
(Constructor)

Default class constructor.

@param parent: the AquaButton parent. @param id: the button id; @param bitmap: the button bitmap (if any); @param label: the button text label; @param pos: the button position; @param size: the button size; @param style: the button style (unused); @param validator: the validator associated to the button; @param name: the button name.

  Overrides:
    `wx.PyControl.__init__`

### AcceptsFocus(self)

Overridden base class virtual.

  Overrides:
    `wx.Window.AcceptsFocus`

### DoGetBestSize(self)

Overridden base class virtual. Determines the best size of the button based on the label and bezel size.

  Overrides:
    `wx.PyControl.DoGetBestSize`

### Enable(self, enable=True)

Enables/disables the button.

  Overrides:
    `wx.Window.Enable`

### GetBottomEndColour(self)

Returns the bottom end colour for the gradient shading.

### GetBottomStartColour(self)

Returns the bottom start colour for the gradient shading.

### GetDefaultAttributes(self)

Overridden base class virtual. By default we should use the same font/colour attributes as the native Button.

  Overrides:
    `wx.PyControl.GetDefaultAttributes`

### GetPath(self, gc, rc, r)

Returns a rounded GraphicsPath.

### GetPressedBottomColour(self)

Returns the pressed bottom start colour for the gradient shading.

### GetPressedTopColour(self)

Returns the pressed top start colour for the gradient shading.

### GetTopEndColour(self)

Returns the top end colour for the gradient shading.

### GetTopStartColour(self)

Returns the top start colour for the gradient shading.

### LightColour(self, color, percent)

Return light contrast of color. The color returned is from the scale of color -> white. The percent determines how light the color will be. Percent = 100 return white, percent = 0 returns color.

### Notify(self)

Actually sends a wx.EVT_BUTTON event to the listener (if any).

### OnGainFocus(self, event)

Handles the wx.EVT_SET_FOCUS event for L{GradientButton}.

### OnKeyDown(self, event)

Handles the wx.EVT_KEY_DOWN event for L{GradientButton}.

### OnKeyUp(self, event)

Handles the wx.EVT_KEY_UP event for L{GradientButton}.

### OnLeftDown(self, event)

Handles the wx.EVT_LEFT_DOWN event for L{GradientButton}.

### OnLeftUp(self, event)

Handles the wx.EVT_LEFT_UP event for L{GradientButton}.

### OnLoseFocus(self, event)

Handles the wx.EVT_KILL_FOCUS event for L{GradientButton}.

### OnMouseEnter(self, event)

Handles the wx.EVT_ENTER_WINDOW event for L{GradientButton}.

### OnMouseLeave(self, event)

Handles the wx.EVT_LEAVE_WINDOW event for L{GradientButton}.

### OnPaint(self, event)

Handles the wx.EVT_PAINT event for L{GradientButton}.

### OnSize(self, event)

Handles the wx.EVT_SIZE event for L{GradientButton}.

### SetBestSize(self, size=None)

Given the current font and bezel width settings, calculate and set a good size.

  Overrides:
    `wx.Window.SetInitialSize`

### SetBottomEndColour(self, colour)

Sets the bottom end colour for the gradient shading.

### SetBottomStartColour(self, colour)

Sets the top bottom colour for the gradient shading.

### SetDefault(self)

Sets the default button.

### SetForegroundColour(self, colour)

Sets the L{GradientButton} foreground (text) colour.

  Overrides:
    `wx.Window.SetForegroundColour`

### SetInitialSize(self, size=None)

Given the current font and bezel width settings, calculate and set a good size.

  Overrides:
    `wx.Window.SetInitialSize`

### SetPressedBottomColour(self, colour)

Sets the pressed bottom start colour for the gradient shading.

### SetPressedTopColour(self, colour)

Sets the pressed top start colour for the gradient shading.

### SetTopEndColour(self, colour)

Sets the top end colour for the gradient shading.

### SetTopStartColour(self, colour)

Sets the top start colour for the gradient shading.

### ShouldInheritColours(self)

Overridden base class virtual. Buttons usually don't inherit the parent's colours.

  Overrides:
    `wx.Window.ShouldInheritColours`

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:55:27 2009 | http://epydoc.sf.net