MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / Widget

Class Widget

site-packages/matplotlib/widgets.py:61–89  ·  view source on GitHub ↗

Abstract base class for GUI neutral widgets

Source from the content-addressed store, hash-verified

59
60
61class Widget(object):
62 """
63 Abstract base class for GUI neutral widgets
64 """
65 drawon = True
66 eventson = True
67 _active = True
68
69 def set_active(self, active):
70 """Set whether the widget is active.
71 """
72 self._active = active
73
74 def get_active(self):
75 """Get whether the widget is active.
76 """
77 return self._active
78
79 # set_active is overridden by SelectorWidgets.
80 active = property(get_active, lambda self, active: self.set_active(active),
81 doc="Is the widget active?")
82
83 def ignore(self, event):
84 """Return True if event should be ignored.
85
86 This method (or a version of it) should be called at the beginning
87 of any event callback.
88 """
89 return not self.active
90
91
92class AxesWidget(Widget):

Callers

nothing calls this directly

Calls 1

set_activeMethod · 0.95

Tested by

no test coverage detected