/usr/lib/python2.7/dist-packages/chaco/overlays/text_grid_overlay.py is in python-chaco 4.4.1-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 29 30 | """ An overlay containing a TextGrid
"""
from traits.api import Instance
from enable.text_grid import TextGrid
from aligned_container_overlay import AlignedContainerOverlay
class TextGridOverlay(AlignedContainerOverlay):
""" Overlay for plots containing a TextGrid
This subclass of AlignedContainerOverlay has a TextGrid which it
displays. Subclasses or users are responsible for the content and
formatting of the TextGrid.
"""
# The text grid component we contain.
text_grid = Instance(TextGrid)
# XXX put some delegated traits for the text_grid here?
def _text_grid_changed(self, old, new):
if old is not None:
self.remove(old)
if new is not None:
self.add(new)
def _text_grid_default(self):
text_grid = TextGrid(font='modern 12', cell_border_width=0)
self.add(text_grid)
return text_grid
|