Table Of Contents

Previous topic

shapedbutton

Next topic

SBitmapButton

This Page

phoenix_title __SToggleMixin

A mixin that allows to transform any of SButton, SBitmapButton and SBitmapTextButton in the corresponding toggle buttons.


class_hierarchy Inheritance Diagram

Inheritance diagram for class __SToggleMixin

Inheritance diagram of __SToggleMixin


method_summary Methods Summary

GetToggle Returns the toggled state of a button.
OnKeyDown Handles the EVT_KEY_DOWN event for the button.
OnKeyUp Handles the EVT_KEY_UP event for the button.
OnLeftDown Handles the EVT_LEFT_DOWN event for the button.
OnLeftUp Handles the EVT_LEFT_UP event for the button.
OnMotion Handles the EVT_MOTION event for the button.
SetToggle Sets the button as toggled/not toggled.

api Class API



class __SToggleMixin(object)

A mixin that allows to transform any of SButton, SBitmapButton and SBitmapTextButton in the corresponding toggle buttons.


Methods



GetToggle(self)

Returns the toggled state of a button.



OnKeyDown(self, event)

Handles the EVT_KEY_DOWN event for the button.

Parameters:event – a KeyEvent event to be processed.


OnKeyUp(self, event)

Handles the EVT_KEY_UP event for the button.

Parameters:event – a KeyEvent event to be processed.


OnLeftDown(self, event)

Handles the EVT_LEFT_DOWN event for the button.

Parameters:event – a MouseEvent event to be processed.


OnLeftUp(self, event)

Handles the EVT_LEFT_UP event for the button.

Parameters:event – a MouseEvent event to be processed.


OnMotion(self, event)

Handles the EVT_MOTION event for the button.

Parameters:event – a MouseEvent event to be processed.


SetToggle(self, flag)

Sets the button as toggled/not toggled.

Parameters:flagTrue to set the button as toggled, False otherwise.