Exemplo 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')
Exemplo n.º 2
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')
Exemplo n.º 3
0
 def display_printer_text(self, title, printer):
     printer._Printer__setup()
     text = '\n'.join(printer._Printer__lines)
     self._current_textview = textview.view_text(self,
                                                 title,
                                                 text,
                                                 _utest=self._utest)
Exemplo n.º 4
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)
Exemplo n.º 5
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)
Exemplo n.º 6
0
 def show(help_label=help_label, help_file=help_file):
     view_text(self.root, help_label, help_file)
Exemplo n.º 7
0
 def display_printer_text(self, title, printer):
     printer._Printer__setup()
     text = '\n'.join(printer._Printer__lines)
     textview.view_text(self, title, text)
Exemplo n.º 8
0
 def display_printer_text(self, title, printer):
     printer._Printer__setup()
     text = '\n'.join(printer._Printer__lines)
     textview.view_text(self, title, text)
Exemplo n.º 9
0
 def _command():
     self.called = True
     self.view = tv.view_text(root,
                              'TITLE_TEXT',
                              'COMMAND',
                              _utest=True)
Exemplo n.º 10
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.ok()
Exemplo n.º 11
0
 def test_view_text(self):
     view = tv.view_text(root, 'Title', 'test text', modal=False)
     self.assertIsInstance(view, tv.TextViewer)
     view.Ok()
 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')
Exemplo n.º 13
0
 def test_view_text(self):
     view = tv.view_text(root, 'Title', 'test text', modal=False)
     self.assertIsInstance(view, tv.TextViewer)
     view.ok()
Exemplo n.º 14
0
 def test_view_text(self):
     # If modal True, get tk error 'can't invoke "event" command'.
     view = tv.view_text(root, 'Title', 'test text', modal=False)
     self.assertIsInstance(view, tv.TextViewer)
     view.Ok()
Exemplo n.º 15
0
 def test_view_text(self):
     # If modal True, tkinter will error with 'can't invoke "event" command'
     view = tv.view_text(root, 'Title', 'test text', modal=False)
     self.assertIsInstance(view, tv.TextViewer)
Exemplo n.º 16
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()
Exemplo n.º 17
0
 def _command():
     self.called = True
     self.view = tv.view_text(root, 'TITLE_TEXT', 'COMMAND', _utest=True)
Exemplo n.º 18
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')
Exemplo n.º 19
0
 def show(help_label=help_label, help_file=help_file):
     view_text(self.root, help_label, help_file)
Exemplo n.º 20
0
 def test_view_text(self):
     # If modal True, get tk error 'can't invoke "event" command'.
     view = tv.view_text(root, 'Title', 'test text', modal=False)
     self.assertIsInstance(view, tv.TextViewer)
     view.Ok()