File: abstract_controller.py

package info (click to toggle)
python-chaco 4.4.1-1.2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,664 kB
  • ctags: 4,246
  • sloc: python: 25,890; ansic: 1,217; makefile: 18; sh: 5
file content (28 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
""" Defines the base class for controllers.
"""
# Enthought library imports
from enable.api import Component, Interactor
from traits.api import Instance


class AbstractController(Interactor):
    """
    Abstract class for tools that manipulate PlotComponents. By default, a
    controller attaches to a single PlotComponent.
    """

    component = Instance(Component)

    def __init__(self, component, *args, **kw):
        self.component = component
        super(AbstractController, self).__init__(*args, **kw)
        return

    def deactivate(self, component):
        """ This method is called by the component when this controller is no
        longer the active tool.
        """
        pass


# EOF