Home | Trees | Index | Help |
|
---|
Package wx :: Package lib :: Package agw :: Module shapedbutton :: Class SButton |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ | SButton
SBitmapButton
,
SToggleButton
Method Summary | |
---|---|
Default class constructor. | |
Overridden base class virtual. | |
Convert PIL image into wx.Image. | |
Convert wx.Image into PIL image. | |
Overridden base class virtual. | |
Draws the focus indicator. | |
Draws the label on the button. | |
Draws the main button, in whichever state it is. | |
Enables/disables the button. | |
Returns angle of button label rotation (in degrees!!). | |
Returns the button colour. | |
Returns the ellipse axis. | |
Returns the button label. | |
Returns the button label colour. | |
Returns focus indicator flag. | |
Calculates a new set of focus indicator colour and indicator pen based on button colour and label colour. | |
Returns wheter the button is enabled or not. | |
Checks if a mouse events occurred inside the circle/ellipse or not. | |
Creates a palette to be applied on an image based on input colour. | |
Notifies an event and let it be processed. | |
Handles wx.EVT_SET_FOCUS events. | |
Handles key down events just like wx.lib.buttons do. | |
Handles key up events just like wx.lib.buttons do. | |
Handles left down mouse events. | |
Handles left up mouse events. | |
Handles wx.EVT_KILL_FOCUS events. | |
Handles mouse motion events. | |
Handles the wx.EVT_PAINT event. | |
Handles wx.EVT_SIZE events. | |
Sets angle of button label rotation (in degrees!!). | |
Given the current font settings, calculate and set a good size. | |
Sets the button colour, for all button states. | |
Sets the button as default item. | |
Sets the ellipse axis. | |
Sets the button label. | |
Sets the button label colour. | |
Specifies if a focus indicator (dotted line) should be used. | |
Overridden base class virtual. |
Property Summary |
---|
Instance Method Details |
---|
__init__(self,
parent,
id=-1,
label='',
pos=wx.Point(-1, -1),
size=wx.Size(-1, -1))
|
AcceptsFocus(self)Overridden base class virtual.
|
ConvertPILToWX(self, pil, alpha=True)Convert PIL image into wx.Image. |
ConvertWXToPIL(self, bmp)Convert wx.Image into PIL image. |
DoGetBestSize(self)Overridden base class virtual. Determines the best size of the button based on the label size. |
DrawFocusIndicator(self, dc, width, height)Draws the focus indicator. This is a circle/ellipse inside the button drawn with a dotted-style pen, to let the user know which button has the focus. |
DrawLabel(self, dc, width, height, dw=0, dh=0)Draws the label on the button. |
DrawMainButton(self, dc, width, height)Draws the main button, in whichever state it is. |
Enable(self, enable=True)Enables/disables the button.
|
GetAngleOfRotation(self)Returns angle of button label rotation (in degrees!!). |
GetButtonColour(self)Returns the button colour. |
GetEllipseAxis(self)Returns the ellipse axis. |
GetLabel(self)Returns the button label.
|
GetLabelColour(self)Returns the button label colour. |
GetUseFocusIndicator(self)Returns focus indicator flag. |
InitColours(self)Calculates a new set of focus indicator colour and indicator pen based on button colour and label colour. |
IsEnabled(self)Returns wheter the button is enabled or not.
|
IsOutside(self, x, y)Checks if a mouse events occurred inside the circle/ellipse or not. |
MakePalette(self, tr, tg, tb)Creates a palette to be applied on an image based on input colour. |
Notify(self)Notifies an event and let it be processed. |
OnGainFocus(self, event)Handles wx.EVT_SET_FOCUS events. |
OnKeyDown(self, event)Handles key down events just like wx.lib.buttons do. |
OnKeyUp(self, event)Handles key up events just like wx.lib.buttons do. |
OnLeftDown(self, event)Handles left down mouse events. |
OnLeftUp(self, event)Handles left up mouse events. |
OnLoseFocus(self, event)Handles wx.EVT_KILL_FOCUS events. |
OnMotion(self, event)Handles mouse motion events. |
OnPaint(self, event)Handles the wx.EVT_PAINT event. Mandatory on all platforms. |
OnSize(self, event)Handles wx.EVT_SIZE events. Mandatory on windows (MSW). |
SetAngleOfRotation(self, angle=None)Sets angle of button label rotation (in degrees!!). |
SetBestSize(self, size=None)Given the current font settings, calculate and set a good size. |
SetButtonColour(self, colour=None)Sets the button colour, for all button states. The original button images are greyscale with a lot of pixels with different colours. Changing smoothly the button colour in order to give the same 3d effect can be efficiently done only with PIL. |
SetDefault(self)Sets the button as default item. |
SetEllipseAxis(self, main=None, secondary=None)Sets the ellipse axis. What it is important is not their absolute values but their ratio. |
SetLabel(self, label=None)Sets the button label.
|
SetLabelColour(self, colour=None)Sets the button label colour. |
SetUseFocusIndicator(self, flag)Specifies if a focus indicator (dotted line) should be used. |
ShouldInheritColours(self)Overridden base class virtual. Buttons usually do not inherit parent's colours.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:52:21 2009 | http://epydoc.sf.net |