Esempio n. 1
0
    def view(self, event=None):
        """view event handler

        View the original text in a separate text viewer window.
        """
        view_text(self.text,
                  "Squeezed Output Viewer",
                  self.s,
                  modal=False,
                  wrap='none')
Esempio n. 2
0
    def display_printer_text(self, title, printer):
        """Create textview for built-in constants.

        Built-in constants have type _sitebuiltins._Printer.  The
        text is extracted from the built-in and then sent to a text
        viewer with self as the parent and title as the title of
        the popup.
        """
        printer._Printer__setup()
        text = '\n'.join(printer._Printer__lines)
        self._current_textview = textview.view_text(self,
                                                    title,
                                                    text,
                                                    _utest=self._utest)
Esempio n. 3
0
 def _command():
     self.called = True
     self.view = tv.view_text(root,
                              'TITLE_TEXT',
                              'COMMAND',
                              _utest=True)
Esempio n. 4
0
 def test_nowrap(self):
     view = tv.view_text(root, 'Title', 'test', modal=False, wrap='none')
     text_widget = view.viewframe.textframe.text
     self.assertEqual(text_widget.cget('wrap'), 'none')
Esempio n. 5
0
 def test_view_text(self):
     view = tv.view_text(root, 'Title', 'test text', modal=False)
     self.assertIsInstance(view, tv.ViewWindow)
     self.assertIsInstance(view.viewframe, tv.ViewFrame)
     view.viewframe.ok()