phoenix_title wx.lib.buttons.__ToggleMixin

A mixin that allows to transform GenButton in the corresponding toggle button.


class_hierarchy Class Hierarchy

Inheritance diagram for class __ToggleMixin:

sub_classes Known Subclasses

wx.lib.buttons.GenBitmapTextToggleButton, wx.lib.buttons.GenBitmapToggleButton, wx.lib.buttons.GenToggleButton


method_summary Methods Summary

GetToggle

Returns the toggled state of a button.

OnKeyDown

Handles the wx.EVT_KEY_DOWN event for GenButton when used as toggle button.

OnKeyUp

Handles the wx.EVT_KEY_UP event for GenButton when used as toggle button.

OnLeftDown

Handles the wx.EVT_LEFT_DOWN event for GenButton when used as toggle button.

OnLeftUp

Handles the wx.EVT_LEFT_UP event for GenButton when used as toggle button.

OnMotion

Handles the wx.EVT_MOTION event for GenButton when used as toggle button.

SetToggle

Sets the button as toggled/not toggled.


api Class API

class __ToggleMixin(object)

A mixin that allows to transform GenButton in the corresponding toggle button.


Methods

GetToggle(self)

Returns the toggled state of a button.

Returns:

True is the button is toggled, False if it is not toggled.



OnKeyDown(self, event)

Handles the wx.EVT_KEY_DOWN event for GenButton when used as toggle button.

Parameters:

event – a wx.KeyEvent event to be processed.



OnKeyUp(self, event)

Handles the wx.EVT_KEY_UP event for GenButton when used as toggle button.

Parameters:

event – a wx.KeyEvent event to be processed.



OnLeftDown(self, event)

Handles the wx.EVT_LEFT_DOWN event for GenButton when used as toggle button.

Parameters:

event – a wx.MouseEvent event to be processed.



OnLeftUp(self, event)

Handles the wx.EVT_LEFT_UP event for GenButton when used as toggle button.

Parameters:

event – a wx.MouseEvent event to be processed.



OnMotion(self, event)

Handles the wx.EVT_MOTION event for GenButton when used as toggle button.

Parameters:

event – a wx.MouseEvent event to be processed.



SetToggle(self, flag)

Sets the button as toggled/not toggled.

Parameters:

flag (bool) – True to set the button as toggled, False otherwise.