fsleyes_widgets.bitmaptoggle¶
This module provides the BitmapToggleButton class, a button
which toggles between two bitmaps.
-
class
fsleyes_widgets.bitmaptoggle.BitmapToggleButton(parent, *args, **kwargs)¶ Bases:
wx._core.ToggleButtonA
wx.ToggleButtonwhich stores a boolean state (True/False), and displays one of two bitmaps depending on the state.When the user presses the button, the boolean state and the displayed bitmap changes accordingly. A
EVT_BITMAP_TOGGLEevent is generated on button presses.Create a
BitmapToggleButton.Parameters: - parent – The
wxparent window. - trueBmp – Required. A
wx.Bitmapto display when the button state isTrue. - falseBmp – Optional. A
wx.Bitmapto display when the button state isFalse.
All other arguemnts are passed through to the
wx.ToggleButton.__init__method.-
__init__(parent, *args, **kwargs)¶ Create a
BitmapToggleButton.Parameters: - parent – The
wxparent window. - trueBmp – Required. A
wx.Bitmapto display when the button state isTrue. - falseBmp – Optional. A
wx.Bitmapto display when the button state isFalse.
All other arguemnts are passed through to the
wx.ToggleButton.__init__method.- parent – The
-
SetBitmap(bitmap, dir=LEFT)¶ Sets the bitmap to display in the button.
-
SetValue(state)¶ Sets the current boolean state of this
BitmapToggleButton.
-
_BitmapToggleButton__onToggle(ev)¶ Called when this button is pressed.
Flips the button state, and emits a
BitmapToggleEvent.
-
_BitmapToggleButton__updateBitmap()¶ Toggles the state of this
BitmapToggleButton.
-
__module__= 'fsleyes_widgets.bitmaptoggle'¶
- parent – The
-
fsleyes_widgets.bitmaptoggle.EVT_BITMAP_TOGGLE= <wx.core.PyEventBinder object>¶ Identifier for the
BitmapToggleEventevent.
-
fsleyes_widgets.bitmaptoggle.BitmapToggleEvent¶ alias of
wx.lib.newevent.NewEvent.<locals>._Event