Improved and beautified the rich text display of the documentation viewer.

Thu, 19 Oct 2017 19:39:59 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 19 Oct 2017 19:39:59 +0200
changeset 5914
e44c04a89dbc
parent 5913
7ab2293917f8
child 5915
4bdac859df60
child 5916
26a37798aa75

Improved and beautified the rich text display of the documentation viewer.

DebugClients/Python/ThreadExtension.py file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
UI/CodeDocumentationViewer.py file | annotate | diff | comparison | revisions
UI/CodeDocumentationViewerTemplate.py file | annotate | diff | comparison | revisions
UI/data/codeDocumentationViewer.qrc file | annotate | diff | comparison | revisions
UI/data/codeDocumentationViewer_rc.py file | annotate | diff | comparison | revisions
UI/data/documentViewerStyle.css file | annotate | diff | comparison | revisions
eric6.e4p file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/ThreadExtension.py	Wed Oct 18 19:16:28 2017 +0200
+++ b/DebugClients/Python/ThreadExtension.py	Thu Oct 19 19:39:59 2017 +0200
@@ -291,8 +291,6 @@
             if hasattr(module, 'settrace'):
                 self.greenlet = True
                 DebugBase.pollTimerEnabled = False
-            
-            # TODO: Implement the debugger extension for greenlets
         
         # Add hook for threading.run()
         elif (fullname == "threading" and self.threadingAttached is False):
--- a/Preferences/__init__.py	Wed Oct 18 19:16:28 2017 +0200
+++ b/Preferences/__init__.py	Thu Oct 19 19:39:59 2017 +0200
@@ -1470,7 +1470,6 @@
         "ShowInfoAsMarkdown": False,
         "Provider": "disabled",
     }
-    # TODO: add to new configuration page to editor section
 
 
 def readToolGroups(prefClass=Prefs):
--- a/UI/CodeDocumentationViewer.py	Wed Oct 18 19:16:28 2017 +0200
+++ b/UI/CodeDocumentationViewer.py	Thu Oct 19 19:39:59 2017 +0200
@@ -22,6 +22,12 @@
 import Preferences
 import UI.PixmapCache
 
+from .CodeDocumentationViewerTemplate import \
+    prepareDocumentationViewerHtmlDocument, \
+    prepareDocumentationViewerHtmlWarningDocument
+
+from .data import codeDocumentationViewer_rc    # __IGNORE_WARNING__
+
 
 class PlainTextDocumentationViewer(QWidget):
     """
@@ -44,6 +50,7 @@
         self.__contents = QTextEdit(self)
         self.__contents.setTabChangesFocus(True)
         self.__contents.setReadOnly(True)
+        self.__contents.setLineWrapMode(QTextEdit.NoWrap)
         self.__contents.setObjectName("contents")
         self.__verticalLayout.addWidget(self.__contents)
         
@@ -99,9 +106,16 @@
         self.__verticalLayout.setContentsMargins(0, 0, 0, 0)
         
         try:
-            from PyQt5.QtWebEngineWidgets import QWebEngineView
+            from PyQt5.QtWebEngineWidgets import QWebEngineView, \
+                QWebEngineSettings
             self.__contents = QWebEngineView(self)
             self.__contents.page().linkHovered.connect(self.__showLink)
+            try:
+                self.__contents.settings().setAttribute(
+                    QWebEngineSettings.FocusOnNavigationEnabled, False)
+            except AttributeError:
+                # pre Qt 5.8
+                pass
             self.__usesWebKit = False
         except ImportError:
             from PyQt5.QtWebKitWidgets import QWebPage, QWebView
@@ -147,7 +161,9 @@
         @param html HTML text to be shown
         @type str
         """
+        self.__contents.setEnabled(False)
         self.__contents.setHtml(html)
+        self.__contents.setEnabled(True)
     
     def clear(self):
         """
@@ -188,6 +204,7 @@
         self.__startingUp = True
         
         self.__lastDocumentation = None
+        self.__requestingEditor = None
         
         self.__noDocumentationString = self.tr("No documentation available")
         self.__disabledString = self.tr(
@@ -390,7 +407,7 @@
             self.__providers[self.__selectedProvider][0](editor)
     
     # TODO: document this hook in the plug-in document
-    def documentationReady(self, documentationInfo):
+    def documentationReady(self, documentationInfo, isWarning=False):
         """
         Public method to provide the documentation info to the viewer.
         
@@ -405,6 +422,8 @@
         
         @param documentationInfo dictionary containing the source docu data
         @type dict or str
+        @param isWarning flag indicating a warning page
+        @type bool
         """
         self.__ui.activateCodeDocumentationViewer(switchFocus=False)
         
@@ -413,13 +432,29 @@
         if documentationInfo is not None:
             if not documentationInfo:
                 if self.__selectedProvider == self.__disabledProvider:
-                    fullText = self.__disabledString
+                    self.documentationReady(self.__disabledString,
+                                            isWarning=True)
                 else:
-                    fullText = self.__noDocumentationString
-            elif isinstance(documentationInfo, str):
+                    self.documentationReady(self.__noDocumentationString,
+                                            isWarning=True)
+                return
+            
+            if self.__showMarkdown:
+                if isWarning:
+                    html = prepareDocumentationViewerHtmlWarningDocument(
+                        documentationInfo)
+                elif isinstance(documentationInfo, dict):
+                    html = prepareDocumentationViewerHtmlDocument(
+                        documentationInfo)
+                else:
+                    html = ""
+                if html:
+                    self.__setHtml(html)
+                    return
+            
+            if isinstance(documentationInfo, str):
                 fullText = documentationInfo
             elif isinstance(documentationInfo, dict):
-                # format the text with markdown syntax
                 name = documentationInfo["name"]
                 if name:
                     title = "".join([name, "\n",
@@ -428,30 +463,14 @@
                     title = ""
 
                 if documentationInfo["argspec"]:
-                    if self.__showMarkdown:
-                        definition = self.tr(
-                            "**Definition**: {0}{1}\n",
-                            "string with markdown syntax").format(
-                            name, documentationInfo["argspec"])
-                    else:
-                        definition = self.tr(
-                            "Definition: {0}{1}\n",
-                            "string as plain text").format(
-                            name, documentationInfo["argspec"])
+                    definition = self.tr("Definition: {0}{1}\n").format(
+                        name, documentationInfo["argspec"])
                 else:
                     definition = ''
 
                 if documentationInfo["note"]:
-                    if self.__showMarkdown:
-                        note = self.tr(
-                            "**Info**: {0}\n\n----\n\n",
-                            "string with markdown syntax").format(
-                            documentationInfo["note"])
-                    else:
-                        note = self.tr(
-                            "Info: {0}\n\n----\n\n",
-                            "string as plain text").format(
-                            documentationInfo["note"])
+                    note = self.tr("Info: {0}\n\n----\n\n").format(
+                        documentationInfo["note"])
                 else:
                     note = ""
                 
@@ -491,7 +510,7 @@
             
             provider = self.providerComboBox.itemData(index)
             if provider == self.__disabledProvider:
-                self.documentationReady(self.__disabledString)
+                self.documentationReady(self.__disabledString, isWarning=True)
             else:
                 self.__lastDocumentation = None
             
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UI/CodeDocumentationViewerTemplate.py	Thu Oct 19 19:39:59 2017 +0200
@@ -0,0 +1,130 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2017 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing functions to prepare an HTML documentation view.
+"""
+
+from __future__ import unicode_literals
+
+def prepareDocumentationViewerHtmlDocument(documentationInfo):
+    """
+    Public function to prepare the HTML document.
+    
+    @param documentationInfo dictionary containing the various documentation
+        parts
+    @type dict
+    @return prepared HTML document
+    @rtype str
+    """
+    mainTemplate = """
+        <!DOCTYPE html>
+        <html>
+        <head>
+        <meta http-equiv="content-type" content="text/html; charset=utf-8">
+        <link rel="stylesheet" href="qrc:documentViewerStyle.css"
+            type="text/css" />
+        </head>
+        <body>
+            @HEADER@
+            @DOCSTRING@
+        </body>
+        </html>
+    """
+    
+    headerTemplate = """
+        @TITLE@
+        @METADATA@
+    """
+    
+    titleTemplate = """
+        <div class="title"><h1>@NAME@</h1></div>
+    """
+    
+    metadataTemplate = """
+        <div class="metadata">
+        @ARGSPEC@
+        @NOTE@
+        </div>
+    """
+    
+    argspecTemplate = """
+        <p><b>Definition:</b> <span class="def">@NAME@@ARGSPEC@</span></p>
+    """
+    
+    noteTemplate = """
+        <p><b>Type:</b> @NOTE@</p>
+    """
+    
+    docstringTemplate = """
+        <div class="docstring">
+        @DOCSTRING@
+        </div>
+    """
+    
+    name = documentationInfo["name"]
+    if name:
+        title = titleTemplate.replace("@NAME@", name)
+        if documentationInfo["argspec"] or documentationInfo["note"]:
+            if documentationInfo["argspec"]:
+                argspec = argspecTemplate\
+                    .replace("@NAME@", name)\
+                    .replace("@ARGSPEC@", documentationInfo["argspec"])
+            else:
+                argspec = ""
+            if documentationInfo["note"]:
+                note = noteTemplate.replace("@NOTE@",
+                                            documentationInfo["note"])
+            else:
+                note = ""
+            metaData = metadataTemplate\
+                .replace("@ARGSPEC@", argspec)\
+                .replace("@NOTE@", note)
+        else:
+            metaData = ""
+        
+        header = headerTemplate\
+            .replace("@TITLE@", title)\
+            .replace("@METADATA@", metaData)
+    else:
+        header = ""
+    
+    if documentationInfo["docstring"]:
+        docstring = documentationInfo["docstring"]\
+            .replace("\r\n", "<br/>")\
+            .replace("\n", "<br/>")\
+            .replace("\r", "<br/>")
+        docstring = docstringTemplate.replace("@DOCSTRING@", docstring)
+    else:
+        docstring = ""
+    
+    return mainTemplate\
+        .replace("@HEADER@", header)\
+        .replace("@DOCSTRING@", docstring)
+
+def prepareDocumentationViewerHtmlWarningDocument(text):
+    """
+    Public function to prepare a HTML warning document.
+    
+    @param text warning text to be shown
+    @type str
+    @return prepared HTML document
+    @rtype str
+    """
+    mainTemplate = """
+        <!DOCTYPE html>
+        <html>
+        <head>
+        <meta http-equiv="content-type" content="text/html; charset=utf-8">
+        <link rel="stylesheet" href="qrc:documentViewerStyle.css"
+            type="text/css" />
+        </head>
+        <body>
+            <div id="doc-warning">@TEXT@</div>
+        </body>
+        </html>
+    """
+    
+    return mainTemplate.replace("@TEXT@", text)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UI/data/codeDocumentationViewer.qrc	Thu Oct 19 19:39:59 2017 +0200
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+<qresource>
+  <file>documentViewerStyle.css</file>
+</qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UI/data/codeDocumentationViewer_rc.py	Thu Oct 19 19:39:59 2017 +0200
@@ -0,0 +1,358 @@
+# -*- coding: utf-8 -*-
+
+# Resource object code
+#
+# Created by: The Resource Compiler for PyQt5 (Qt v5.9.1)
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt5 import QtCore
+
+qt_resource_data = b"\
+\x00\x00\x13\x3e\
+\x62\
+\x6f\x64\x79\x20\x7b\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\x67\x72\
+\x6f\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x77\x68\x69\x74\
+\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\x3a\x20\x72\x67\
+\x62\x28\x35\x31\x2c\x20\x35\x31\x2c\x20\x35\x31\x29\x3b\x0a\x20\
+\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x3a\x20\x30\x70\x78\x20\x32\
+\x35\x70\x78\x20\x31\x35\x70\x78\x20\x32\x35\x70\x78\x3b\x0a\x7d\
+\x0a\x0a\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x54\x69\x74\x6c\x65\x20\
+\x73\x74\x79\x6c\x65\x20\x2d\x2d\x2d\x20\x2a\x2f\x0a\x64\x69\x76\
+\x2e\x74\x69\x74\x6c\x65\x20\x68\x31\x20\x7b\x0a\x20\x20\x20\x20\
+\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x31\x33\x30\x25\x3b\
+\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x66\x61\x6d\x69\x6c\x79\
+\x3a\x20\x27\x54\x72\x65\x62\x75\x63\x68\x65\x74\x20\x4d\x53\x27\
+\x2c\x20\x73\x61\x6e\x73\x2d\x73\x65\x72\x69\x66\x3b\x0a\x20\x20\
+\x20\x20\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x2d\x63\x6f\x6c\
+\x6f\x72\x3a\x20\x23\x38\x35\x37\x37\x34\x41\x3b\x0a\x20\x20\x20\
+\x20\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x2d\x69\x6d\x61\x67\
+\x65\x3a\x20\x2d\x77\x65\x62\x6b\x69\x74\x2d\x67\x72\x61\x64\x69\
+\x65\x6e\x74\x28\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x6c\x69\x6e\
+\x65\x61\x72\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x30\x20\x30\
+\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x30\x20\x31\x30\x30\x25\
+\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x66\x72\x6f\x6d\x28\x23\
+\x38\x35\x37\x37\x34\x41\x29\x2c\x0a\x20\x20\x20\x20\x20\x20\x20\
+\x20\x63\x6f\x6c\x6f\x72\x2d\x73\x74\x6f\x70\x28\x36\x30\x25\x2c\
+\x20\x23\x62\x39\x61\x35\x36\x37\x29\x2c\x0a\x20\x20\x20\x20\x20\
+\x20\x20\x20\x74\x6f\x28\x23\x65\x31\x63\x38\x37\x64\x29\x0a\x20\
+\x20\x20\x20\x29\x3b\x0a\x20\x20\x20\x20\x74\x65\x78\x74\x2d\x73\
+\x68\x61\x64\x6f\x77\x3a\x20\x30\x70\x78\x20\x31\x70\x78\x20\x31\
+\x70\x78\x20\x72\x67\x62\x61\x28\x30\x2c\x20\x30\x2c\x20\x30\x2c\
+\x20\x30\x2e\x32\x29\x3b\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\
+\x77\x65\x69\x67\x68\x74\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x3b\x0a\
+\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\x20\x36\x70\x78\
+\x20\x30\x70\x78\x20\x36\x70\x78\x20\x32\x30\x70\x78\x3b\x0a\x20\
+\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x3a\x20\x30\x70\x78\x20\x2d\
+\x32\x35\x70\x78\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\x3a\
+\x20\x23\x46\x46\x46\x46\x46\x46\x3b\x0a\x7d\x0a\x0a\x2f\x2a\x0a\
+\x20\x2a\x20\x54\x68\x65\x20\x6e\x65\x78\x74\x20\x74\x77\x6f\x20\
+\x73\x74\x79\x6c\x65\x73\x20\x61\x72\x65\x20\x6e\x65\x65\x64\x65\
+\x64\x20\x74\x6f\x0a\x20\x2a\x20\x6d\x6f\x64\x69\x66\x79\x20\x74\
+\x68\x65\x20\x61\x6e\x63\x68\x6f\x72\x73\x20\x70\x72\x65\x73\x65\
+\x6e\x74\x20\x6f\x6e\x20\x74\x68\x65\x0a\x20\x2a\x20\x74\x69\x74\
+\x6c\x65\x20\x6f\x66\x20\x70\x61\x67\x65\x73\x20\x6c\x69\x6b\x65\
+\x20\x73\x63\x69\x70\x79\x2e\x73\x74\x61\x74\x73\x20\x6f\x72\x0a\
+\x20\x2a\x20\x73\x63\x69\x70\x79\x2e\x69\x6f\x0a\x20\x2a\x2f\x0a\
+\x64\x69\x76\x2e\x74\x69\x74\x6c\x65\x20\x68\x31\x20\x61\x20\x7b\
+\x0a\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\x3a\x20\x74\x72\x61\x6e\
+\x73\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x63\x75\x72\
+\x73\x6f\x72\x3a\x20\x64\x65\x66\x61\x75\x6c\x74\x3b\x0a\x7d\x0a\
+\x0a\x64\x69\x76\x2e\x74\x69\x74\x6c\x65\x20\x68\x31\x20\x74\x74\
+\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\
+\x3a\x20\x39\x35\x25\x3b\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\x67\
+\x72\x6f\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x74\x72\x61\
+\x6e\x73\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x63\x6f\
+\x6c\x6f\x72\x3a\x20\x23\x46\x46\x46\x46\x46\x46\x3b\x0a\x7d\x0a\
+\x0a\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x4d\x65\x74\x61\x64\x61\x74\
+\x61\x20\x73\x74\x79\x6c\x65\x20\x2d\x2d\x2d\x20\x2a\x2f\x0a\x64\
+\x69\x76\x2e\x6d\x65\x74\x61\x64\x61\x74\x61\x20\x7b\x0a\x20\x20\
+\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x74\x6f\x70\x3a\x20\x31\x30\
+\x70\x78\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x62\
+\x6f\x74\x74\x6f\x6d\x3a\x20\x31\x35\x70\x78\x3b\x0a\x20\x20\x20\
+\x20\x6d\x61\x72\x67\x69\x6e\x2d\x72\x69\x67\x68\x74\x3a\x20\x31\
+\x70\x78\x3b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\
+\x20\x31\x70\x78\x3b\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\x67\x72\
+\x6f\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x23\x66\x66\x66\
+\x34\x63\x35\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x3a\
+\x20\x31\x70\x78\x20\x73\x6f\x6c\x69\x64\x20\x23\x43\x39\x43\x39\
+\x43\x39\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\x72\
+\x61\x64\x69\x75\x73\x3a\x20\x36\x70\x78\x20\x36\x70\x78\x20\x36\
+\x70\x78\x20\x36\x70\x78\x3b\x0a\x20\x20\x20\x20\x62\x6f\x78\x2d\
+\x73\x68\x61\x64\x6f\x77\x3a\x20\x31\x70\x78\x20\x31\x70\x78\x20\
+\x37\x70\x78\x20\x23\x43\x41\x43\x41\x43\x41\x3b\x0a\x7d\x0a\x0a\
+\x64\x69\x76\x2e\x6d\x65\x74\x61\x64\x61\x74\x61\x20\x70\x20\x7b\
+\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x3a\x20\x37\x70\x78\
+\x20\x30\x70\x78\x20\x37\x70\x78\x20\x31\x30\x70\x78\x3b\x0a\x7d\
+\x0a\x0a\x73\x70\x61\x6e\x2e\x64\x65\x66\x20\x7b\x0a\x20\x20\x20\
+\x20\x66\x6f\x6e\x74\x2d\x66\x61\x6d\x69\x6c\x79\x3a\x20\x6d\x6f\
+\x6e\x6f\x73\x70\x61\x63\x65\x3b\x0a\x20\x20\x20\x20\x66\x6f\x6e\
+\x74\x2d\x73\x69\x7a\x65\x3a\x20\x39\x30\x25\x3b\x0a\x7d\x0a\x0a\
+\x73\x70\x61\x6e\x2e\x61\x72\x67\x73\x70\x65\x63\x2d\x68\x69\x67\
+\x68\x6c\x69\x67\x68\x74\x20\x7b\x0a\x20\x20\x20\x20\x63\x6f\x6c\
+\x6f\x72\x3a\x20\x72\x65\x64\x3b\x0a\x20\x20\x20\x20\x66\x6f\x6e\
+\x74\x2d\x73\x69\x7a\x65\x3a\x20\x31\x31\x30\x25\x3b\x0a\x20\x20\
+\x20\x20\x66\x6f\x6e\x74\x2d\x77\x65\x69\x67\x68\x74\x3a\x20\x39\
+\x30\x30\x3b\x0a\x7d\x0a\x0a\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x44\
+\x6f\x63\x73\x74\x72\x69\x6e\x67\x20\x64\x69\x76\x20\x73\x74\x79\
+\x6c\x65\x20\x2d\x2d\x2d\x20\x2a\x2f\x0a\x64\x69\x76\x2e\x64\x6f\
+\x63\x73\x74\x72\x69\x6e\x67\x20\x7b\x0a\x20\x20\x20\x20\x6d\x61\
+\x72\x67\x69\x6e\x2d\x74\x6f\x70\x3a\x20\x2d\x31\x70\x78\x3b\x0a\
+\x7d\x0a\x0a\x64\x69\x76\x2e\x64\x6f\x63\x73\x74\x72\x69\x6e\x67\
+\x20\x70\x20\x7b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\
+\x3a\x20\x30\x70\x78\x20\x32\x70\x78\x20\x30\x70\x78\x3b\x0a\x7d\
+\x0a\x0a\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x48\x65\x61\x64\x65\x72\
+\x73\x20\x73\x74\x79\x6c\x65\x20\x2d\x2d\x2d\x20\x2a\x2f\x0a\x68\
+\x32\x2c\x20\x68\x33\x2c\x20\x68\x34\x20\x7b\x0a\x20\x20\x20\x20\
+\x66\x6f\x6e\x74\x2d\x66\x61\x6d\x69\x6c\x79\x3a\x20\x27\x48\x65\
+\x6c\x76\x65\x74\x69\x63\x61\x27\x2c\x20\x73\x61\x6e\x73\x2d\x73\
+\x65\x72\x69\x66\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\x3a\
+\x20\x72\x67\x62\x28\x34\x39\x2c\x20\x31\x32\x36\x2c\x20\x31\x37\
+\x32\x29\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x74\
+\x6f\x70\x3a\x20\x32\x30\x70\x78\x3b\x0a\x20\x20\x20\x20\x6d\x61\
+\x72\x67\x69\x6e\x2d\x62\x6f\x74\x74\x6f\x6d\x3a\x20\x31\x30\x70\
+\x78\x3b\x0a\x7d\x0a\x0a\x68\x32\x20\x7b\x0a\x20\x20\x20\x20\x66\
+\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x31\x34\x30\x25\x3b\x0a\
+\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x77\x65\x69\x67\x68\x74\x3a\
+\x20\x6e\x6f\x72\x6d\x61\x6c\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\
+\x64\x65\x72\x2d\x62\x6f\x74\x74\x6f\x6d\x3a\x20\x31\x70\x78\x20\
+\x73\x6f\x6c\x69\x64\x20\x72\x67\x62\x28\x32\x32\x30\x2c\x20\x32\
+\x32\x30\x2c\x20\x32\x32\x30\x29\x3b\x0a\x20\x20\x20\x20\x70\x61\
+\x64\x64\x69\x6e\x67\x3a\x20\x34\x70\x78\x20\x30\x70\x78\x20\x34\
+\x70\x78\x20\x30\x70\x78\x3b\x0a\x7d\x0a\x0a\x68\x33\x20\x7b\x0a\
+\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x31\
+\x31\x35\x25\x3b\x0a\x7d\x0a\x0a\x68\x34\x20\x7b\x0a\x20\x20\x20\
+\x20\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x31\x30\x30\x25\
+\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x74\x6f\x70\
+\x3a\x20\x31\x34\x70\x78\x3b\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\
+\x2d\x77\x65\x69\x67\x68\x74\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x3b\
+\x0a\x7d\x0a\x0a\x64\x6c\x2e\x64\x6f\x63\x75\x74\x69\x6c\x73\x20\
+\x7b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\x20\x30\
+\x70\x78\x20\x31\x30\x70\x78\x20\x30\x70\x78\x3b\x0a\x7d\x0a\x0a\
+\x64\x69\x76\x2e\x73\x65\x63\x74\x69\x6f\x6e\x20\x70\x20\x7b\x0a\
+\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\x20\x30\x70\x78\
+\x20\x32\x70\x78\x20\x30\x70\x78\x3b\x0a\x7d\x0a\x0a\x23\x77\x61\
+\x72\x6e\x69\x6e\x67\x20\x7b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\
+\x69\x6e\x2d\x74\x6f\x70\x3a\x20\x35\x70\x78\x3b\x0a\x20\x20\x20\
+\x20\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\
+\x72\x3a\x20\x23\x46\x46\x45\x34\x45\x34\x3b\x0a\x20\x20\x20\x20\
+\x62\x6f\x72\x64\x65\x72\x3a\x20\x31\x70\x78\x20\x73\x6f\x6c\x69\
+\x64\x20\x23\x46\x36\x36\x3b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\
+\x69\x6e\x67\x3a\x20\x34\x70\x78\x20\x38\x70\x78\x20\x34\x70\x78\
+\x20\x38\x70\x78\x3b\x0a\x20\x20\x20\x20\x74\x65\x78\x74\x2d\x61\
+\x6c\x69\x67\x6e\x3a\x20\x63\x65\x6e\x74\x65\x72\x3b\x0a\x7d\x0a\
+\x0a\x23\x64\x6f\x63\x2d\x77\x61\x72\x6e\x69\x6e\x67\x20\x7b\x0a\
+\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x74\x6f\x70\x3a\x20\
+\x31\x36\x70\x78\x3b\x0a\x20\x20\x20\x20\x77\x69\x64\x74\x68\x3a\
+\x20\x34\x35\x25\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\
+\x2d\x6c\x65\x66\x74\x3a\x20\x61\x75\x74\x6f\x3b\x0a\x20\x20\x20\
+\x20\x6d\x61\x72\x67\x69\x6e\x2d\x72\x69\x67\x68\x74\x3a\x20\x61\
+\x75\x74\x6f\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\x3a\x20\
+\x72\x67\x62\x28\x31\x38\x35\x2c\x20\x37\x34\x2c\x20\x37\x32\x29\
+\x3b\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
+\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x72\x67\x62\x28\x32\x34\x32\x2c\
+\x20\x32\x32\x32\x2c\x20\x32\x32\x32\x29\x3b\x0a\x20\x20\x20\x20\
+\x62\x6f\x72\x64\x65\x72\x3a\x20\x31\x70\x78\x20\x73\x6f\x6c\x69\
+\x64\x20\x72\x67\x62\x28\x32\x33\x38\x2c\x20\x32\x31\x31\x2c\x20\
+\x32\x31\x35\x29\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\
+\x2d\x72\x61\x64\x69\x75\x73\x3a\x20\x34\x70\x78\x20\x34\x70\x78\
+\x20\x34\x70\x78\x20\x34\x70\x78\x3b\x0a\x20\x20\x20\x20\x70\x61\
+\x64\x64\x69\x6e\x67\x3a\x20\x31\x35\x70\x78\x3b\x0a\x20\x20\x20\
+\x20\x74\x65\x78\x74\x2d\x61\x6c\x69\x67\x6e\x3a\x20\x63\x65\x6e\
+\x74\x65\x72\x3b\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x77\x65\
+\x69\x67\x68\x74\x3a\x20\x62\x6f\x6c\x64\x3b\x0a\x20\x20\x20\x20\
+\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x31\x30\x35\x25\x3b\
+\x0a\x7d\x0a\x0a\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x4c\x69\x6e\x6b\
+\x73\x20\x2d\x2d\x2d\x20\x2a\x2f\x0a\x61\x20\x7b\x0a\x20\x20\x20\
+\x20\x74\x65\x78\x74\x2d\x64\x65\x63\x6f\x72\x61\x74\x69\x6f\x6e\
+\x3a\x20\x6e\x6f\x6e\x65\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6c\x6f\
+\x72\x3a\x20\x72\x67\x62\x61\x28\x34\x30\x2c\x20\x31\x33\x30\x2c\
+\x20\x31\x38\x30\x2c\x20\x31\x29\x3b\x0a\x7d\x0a\x0a\x61\x3a\x68\
+\x6f\x76\x65\x72\x20\x7b\x0a\x20\x20\x20\x20\x74\x65\x78\x74\x2d\
+\x64\x65\x63\x6f\x72\x61\x74\x69\x6f\x6e\x3a\x20\x75\x6e\x64\x65\
+\x72\x6c\x69\x6e\x65\x3b\x0a\x7d\x0a\x0a\x0a\x2f\x2a\x20\x2d\x2d\
+\x2d\x20\x49\x6d\x61\x67\x65\x73\x20\x2d\x2d\x2d\x20\x2a\x2f\x0a\
+\x69\x6d\x67\x20\x7b\x0a\x20\x20\x20\x20\x62\x6f\x78\x2d\x73\x68\
+\x61\x64\x6f\x77\x3a\x20\x30\x70\x78\x20\x32\x70\x78\x20\x36\x70\
+\x78\x20\x23\x63\x61\x63\x61\x63\x61\x3b\x0a\x20\x20\x20\x20\x62\
+\x6f\x72\x64\x65\x72\x3a\x20\x31\x70\x78\x20\x73\x6f\x6c\x69\x64\
+\x20\x23\x63\x39\x63\x39\x63\x39\x3b\x0a\x7d\x0a\x0a\x69\x6d\x67\
+\x2e\x61\x6c\x69\x67\x6e\x2d\x63\x65\x6e\x74\x65\x72\x20\x7b\x0a\
+\x20\x20\x20\x20\x64\x69\x73\x70\x6c\x61\x79\x3a\x20\x62\x6c\x6f\
+\x63\x6b\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x6c\
+\x65\x66\x74\x3a\x20\x61\x75\x74\x6f\x3b\x0a\x20\x20\x20\x20\x6d\
+\x61\x72\x67\x69\x6e\x2d\x72\x69\x67\x68\x74\x3a\x20\x61\x75\x74\
+\x6f\x3b\x0a\x7d\x0a\x0a\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x4c\x69\
+\x73\x74\x73\x20\x73\x74\x79\x6c\x65\x20\x2d\x2d\x2d\x20\x2a\x2f\
+\x0a\x6f\x6c\x2e\x61\x72\x61\x62\x69\x63\x20\x7b\x0a\x20\x20\x20\
+\x20\x6d\x61\x72\x67\x69\x6e\x2d\x6c\x65\x66\x74\x3a\x20\x2d\x31\
+\x30\x70\x78\x3b\x0a\x7d\x0a\x0a\x75\x6c\x20\x7b\x0a\x20\x20\x20\
+\x20\x6d\x61\x72\x67\x69\x6e\x2d\x6c\x65\x66\x74\x3a\x20\x2d\x35\
+\x70\x78\x3b\x0a\x7d\x0a\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x4c\x69\
+\x74\x65\x72\x61\x6c\x20\x62\x6c\x6f\x63\x6b\x73\x20\x73\x74\x79\
+\x6c\x65\x20\x2d\x2d\x2d\x20\x2a\x2f\x0a\x70\x72\x65\x2e\x6c\x69\
+\x74\x65\x72\x61\x6c\x2d\x62\x6c\x6f\x63\x6b\x20\x7b\x0a\x20\x20\
+\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x2d\x6c\x65\x66\x74\x3a\x20\
+\x33\x35\x70\x78\x3b\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x73\
+\x69\x7a\x65\x3a\x20\x39\x35\x25\x3b\x0a\x7d\x0a\x0a\x0a\x2f\x2a\
+\x20\x2d\x2d\x2d\x20\x44\x6f\x63\x75\x74\x69\x6c\x73\x20\x74\x61\
+\x62\x6c\x65\x20\x73\x74\x79\x6c\x65\x20\x2d\x2d\x2d\x20\x2a\x2f\
+\x0a\x74\x61\x62\x6c\x65\x2e\x64\x6f\x63\x75\x74\x69\x6c\x73\x20\
+\x7b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\x63\x6f\x6c\
+\x6c\x61\x70\x73\x65\x3a\x20\x63\x6f\x6c\x6c\x61\x70\x73\x65\x3b\
+\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\x73\x70\x61\x63\
+\x69\x6e\x67\x3a\x20\x30\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\
+\x65\x72\x3a\x20\x23\x44\x44\x44\x44\x44\x44\x3b\x0a\x20\x20\x20\
+\x20\x6d\x61\x72\x67\x69\x6e\x2d\x6c\x65\x66\x74\x3a\x20\x61\x75\
+\x74\x6f\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x72\
+\x69\x67\x68\x74\x3a\x20\x61\x75\x74\x6f\x3b\x0a\x20\x20\x20\x20\
+\x6d\x61\x72\x67\x69\x6e\x2d\x74\x6f\x70\x3a\x20\x31\x37\x70\x78\
+\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x62\x6f\x74\
+\x74\x6f\x6d\x3a\x20\x31\x37\x70\x78\x3b\x0a\x20\x20\x20\x20\x77\
+\x69\x64\x74\x68\x3a\x20\x39\x30\x25\x3b\x0a\x7d\x0a\x0a\x74\x61\
+\x62\x6c\x65\x2e\x64\x6f\x63\x75\x74\x69\x6c\x73\x20\x74\x64\x20\
+\x7b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\x20\x35\
+\x70\x78\x3b\x0a\x7d\x0a\x0a\x74\x61\x62\x6c\x65\x2e\x64\x6f\x63\
+\x75\x74\x69\x6c\x73\x20\x74\x72\x2e\x72\x6f\x77\x2d\x6f\x64\x64\
+\x20\x7b\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\
+\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x72\x67\x62\x28\x32\x34\x39\
+\x2c\x20\x32\x34\x39\x2c\x20\x32\x34\x39\x29\x3b\x0a\x7d\x0a\x0a\
+\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x44\x6f\x63\x75\x74\x69\x6c\x73\
+\x20\x74\x61\x62\x6c\x65\x20\x68\x65\x61\x64\x65\x72\x73\x20\x2d\
+\x2d\x2d\x20\x2a\x2f\x0a\x74\x61\x62\x6c\x65\x2e\x64\x6f\x63\x75\
+\x74\x69\x6c\x73\x20\x74\x68\x20\x7b\x0a\x20\x20\x20\x20\x62\x61\
+\x63\x6b\x67\x72\x6f\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\
+\x23\x45\x45\x45\x45\x45\x45\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\
+\x64\x65\x72\x2d\x62\x6f\x74\x74\x6f\x6d\x2d\x63\x6f\x6c\x6f\x72\
+\x3a\x20\x23\x44\x44\x44\x44\x44\x44\x3b\x0a\x20\x20\x20\x20\x62\
+\x6f\x72\x64\x65\x72\x2d\x62\x6f\x74\x74\x6f\x6d\x2d\x73\x74\x79\
+\x6c\x65\x3a\x20\x73\x6f\x6c\x69\x64\x3b\x0a\x20\x20\x20\x20\x62\
+\x6f\x72\x64\x65\x72\x2d\x62\x6f\x74\x74\x6f\x6d\x2d\x77\x69\x64\
+\x74\x68\x3a\x20\x31\x70\x78\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\
+\x64\x65\x72\x2d\x74\x6f\x70\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x23\
+\x44\x44\x44\x44\x44\x44\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\
+\x65\x72\x2d\x74\x6f\x70\x2d\x73\x74\x79\x6c\x65\x3a\x20\x73\x6f\
+\x6c\x69\x64\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\
+\x74\x6f\x70\x2d\x77\x69\x64\x74\x68\x3a\x20\x31\x70\x78\x3b\x0a\
+\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x77\x65\x69\x67\x68\x74\x3a\
+\x20\x62\x6f\x6c\x64\x3b\x0a\x20\x20\x20\x20\x74\x65\x78\x74\x2d\
+\x61\x6c\x69\x67\x6e\x3a\x20\x63\x65\x6e\x74\x65\x72\x3b\x0a\x20\
+\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\x20\x36\x70\x78\x20\
+\x30\x70\x78\x20\x36\x70\x78\x20\x38\x70\x78\x3b\x0a\x20\x20\x20\
+\x20\x63\x6f\x6c\x6f\x72\x3a\x20\x72\x67\x62\x28\x36\x35\x2c\x20\
+\x36\x35\x2c\x20\x36\x35\x29\x3b\x0a\x7d\x0a\x0a\x0a\x2f\x2a\x20\
+\x2d\x2d\x2d\x20\x46\x69\x65\x6c\x64\x2d\x6c\x69\x73\x74\x20\x74\
+\x61\x62\x6c\x65\x20\x73\x74\x79\x6c\x65\x20\x2d\x2d\x2d\x20\x2a\
+\x2f\x0a\x74\x61\x62\x6c\x65\x2e\x64\x6f\x63\x75\x74\x69\x6c\x73\
+\x2e\x66\x69\x65\x6c\x64\x2d\x6c\x69\x73\x74\x20\x7b\x0a\x20\x20\
+\x20\x20\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x38\x30\x25\
+\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\x63\x6f\x6c\
+\x6c\x61\x70\x73\x65\x3a\x20\x63\x6f\x6c\x6c\x61\x70\x73\x65\x3b\
+\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\x6c\x65\x66\x74\
+\x3a\x20\x74\x72\x61\x6e\x73\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\
+\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\x72\x69\x67\x68\x74\x3a\
+\x20\x74\x72\x61\x6e\x73\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\
+\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x74\x6f\x70\x3a\x20\x31\x35\
+\x70\x78\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x6c\
+\x65\x66\x74\x3a\x20\x34\x30\x70\x78\x3b\x0a\x20\x20\x20\x20\x77\
+\x69\x64\x74\x68\x3a\x20\x38\x33\x25\x3b\x0a\x7d\x0a\x0a\x0a\x2f\
+\x2a\x20\x2d\x2d\x2d\x20\x46\x69\x65\x6c\x64\x2d\x6c\x69\x73\x74\
+\x20\x74\x61\x62\x6c\x65\x20\x68\x65\x61\x64\x65\x72\x73\x20\x2d\
+\x2d\x2d\x20\x2a\x2f\x0a\x74\x61\x62\x6c\x65\x2e\x64\x6f\x63\x75\
+\x74\x69\x6c\x73\x2e\x66\x69\x65\x6c\x64\x2d\x6c\x69\x73\x74\x20\
+\x74\x68\x20\x7b\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\x67\x72\x6f\
+\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x74\x72\x61\x6e\x73\
+\x70\x61\x72\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\
+\x65\x72\x2d\x74\x6f\x70\x3a\x20\x74\x72\x61\x6e\x73\x70\x61\x72\
+\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\
+\x62\x6f\x74\x74\x6f\x6d\x3a\x20\x74\x72\x61\x6e\x73\x70\x61\x72\
+\x65\x6e\x74\x3b\x0a\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\x3a\x20\
+\x62\x6c\x61\x63\x6b\x3b\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\
+\x77\x65\x69\x67\x68\x74\x3a\x20\x62\x6f\x6c\x64\x3b\x0a\x20\x20\
+\x20\x20\x74\x65\x78\x74\x2d\x61\x6c\x69\x67\x6e\x3a\x20\x6c\x65\
+\x66\x74\x3b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\
+\x20\x34\x70\x78\x20\x30\x70\x78\x20\x34\x70\x78\x20\x38\x70\x78\
+\x3b\x0a\x7d\x0a\x0a\x0a\x2f\x2a\x20\x2d\x2d\x2d\x20\x53\x70\x61\
+\x63\x69\x6e\x67\x20\x61\x72\x6f\x75\x6e\x64\x20\x65\x78\x61\x6d\
+\x70\x6c\x65\x20\x63\x6f\x64\x65\x20\x2d\x2d\x2d\x20\x2a\x2f\x0a\
+\x64\x69\x76\x2e\x68\x69\x67\x68\x6c\x69\x67\x68\x74\x20\x70\x72\
+\x65\x20\x7b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\
+\x20\x39\x70\x78\x20\x31\x34\x70\x78\x3b\x0a\x20\x20\x20\x20\x62\
+\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\
+\x20\x72\x67\x62\x28\x32\x34\x37\x2c\x20\x32\x34\x37\x2c\x20\x32\
+\x34\x39\x29\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\x2d\
+\x72\x61\x64\x69\x75\x73\x3a\x20\x34\x70\x78\x20\x34\x70\x78\x20\
+\x34\x70\x78\x20\x34\x70\x78\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\
+\x64\x65\x72\x3a\x20\x31\x70\x78\x20\x73\x6f\x6c\x69\x64\x20\x72\
+\x67\x62\x28\x32\x32\x35\x2c\x20\x32\x32\x35\x2c\x20\x32\x33\x32\
+\x29\x3b\x0a\x7d\x0a\x0a\x64\x69\x76\x2e\x68\x69\x67\x68\x6c\x69\
+\x67\x68\x74\x20\x7b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\
+\x67\x3a\x20\x30\x70\x78\x20\x31\x30\x70\x78\x20\x30\x70\x78\x3b\
+\x0a\x7d\x0a\x0a\x64\x74\x20\x7b\x0a\x20\x20\x20\x20\x66\x6f\x6e\
+\x74\x2d\x77\x65\x69\x67\x68\x74\x3a\x20\x62\x6f\x6c\x64\x3b\x0a\
+\x20\x20\x20\x20\x2f\x2a\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\
+\x20\x31\x36\x70\x78\x3b\x2a\x2f\x0a\x7d\x0a\x0a\x2e\x63\x6c\x61\
+\x73\x73\x69\x66\x69\x65\x72\x20\x7b\x0a\x20\x20\x20\x20\x2f\x2a\
+\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x31\x30\x70\x74\x3b\
+\x2a\x2f\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x77\x65\x69\x67\
+\x68\x74\x3a\x20\x6e\x6f\x72\x6d\x61\x6c\x3b\x0a\x7d\x0a\x0a\x74\
+\x74\x20\x7b\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\x67\x72\x6f\x75\
+\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x23\x45\x43\x46\x30\x46\
+\x33\x3b\x0a\x20\x20\x20\x20\x2f\x2a\x66\x6f\x6e\x74\x2d\x73\x69\
+\x7a\x65\x3a\x20\x39\x35\x25\x3b\x2a\x2f\x0a\x20\x20\x20\x20\x70\
+\x61\x64\x64\x69\x6e\x67\x3a\x20\x30\x70\x78\x20\x31\x70\x78\x3b\
+\x0a\x7d\x0a\x0a\x0a\x0a\x64\x69\x76\x2e\x61\x64\x6d\x6f\x6e\x69\
+\x74\x69\x6f\x6e\x2e\x6e\x6f\x74\x65\x20\x7b\x0a\x20\x20\x20\x20\
+\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x30\x2e\x39\x35\x65\
+\x6d\x3b\x0a\x20\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x3a\x20\x31\
+\x2e\x33\x65\x6d\x3b\x0a\x20\x20\x20\x20\x62\x6f\x72\x64\x65\x72\
+\x3a\x20\x31\x70\x78\x20\x73\x6f\x6c\x69\x64\x20\x23\x42\x43\x45\
+\x38\x46\x31\x3b\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\x67\x72\x6f\
+\x75\x6e\x64\x2d\x63\x6f\x6c\x6f\x72\x3a\x20\x23\x44\x39\x45\x44\
+\x46\x37\x3b\x0a\x20\x20\x20\x20\x70\x61\x64\x64\x69\x6e\x67\x3a\
+\x20\x30\x70\x78\x20\x35\x70\x78\x20\x30\x20\x35\x70\x78\x3b\x0a\
+\x20\x20\x20\x20\x63\x6f\x6c\x6f\x72\x3a\x20\x23\x33\x41\x38\x37\
+\x41\x44\x3b\x0a\x7d\x0a\x0a\x64\x69\x76\x2e\x61\x64\x6d\x6f\x6e\
+\x69\x74\x69\x6f\x6e\x20\x70\x2e\x61\x64\x6d\x6f\x6e\x69\x74\x69\
+\x6f\x6e\x2d\x74\x69\x74\x6c\x65\x20\x7b\x0a\x20\x20\x20\x20\x66\
+\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x20\x31\x65\x6d\x3b\x0a\x20\
+\x20\x20\x20\x6d\x61\x72\x67\x69\x6e\x2d\x74\x6f\x70\x3a\x20\x37\
+\x70\x78\x3b\x0a\x20\x20\x20\x20\x66\x6f\x6e\x74\x2d\x77\x65\x69\
+\x67\x68\x74\x3a\x20\x62\x6f\x6c\x64\x3b\x0a\x7d\x0a\
+"
+
+qt_resource_name = b"\
+\x00\x17\
+\x0b\xd4\x1a\x23\
+\x00\x64\
+\x00\x6f\x00\x63\x00\x75\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x56\x00\x69\x00\x65\x00\x77\x00\x65\x00\x72\x00\x53\x00\x74\x00\x79\
+\x00\x6c\x00\x65\x00\x2e\x00\x63\x00\x73\x00\x73\
+"
+
+qt_resource_struct_v1 = b"\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+"
+
+qt_resource_struct_v2 = b"\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+\x00\x00\x01\x5f\x34\x43\xab\x1e\
+"
+
+qt_version = QtCore.qVersion().split('.')
+if qt_version < ['5', '8', '0']:
+    rcc_version = 1
+    qt_resource_struct = qt_resource_struct_v1
+else:
+    rcc_version = 2
+    qt_resource_struct = qt_resource_struct_v2
+
+def qInitResources():
+    QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+def qCleanupResources():
+    QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+qInitResources()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UI/data/documentViewerStyle.css	Thu Oct 19 19:39:59 2017 +0200
@@ -0,0 +1,285 @@
+body {
+    background-color: white;
+    color: rgb(51, 51, 51);
+    margin: 0px 25px 15px 25px;
+}
+
+
+/* --- Title style --- */
+div.title h1 {
+    font-size: 130%;
+    font-family: 'Trebuchet MS', sans-serif;
+    background-color: #85774A;
+    background-image: -webkit-gradient(
+        linear,
+        0 0,
+        0 100%,
+        from(#85774A),
+        color-stop(60%, #b9a567),
+        to(#e1c87d)
+    );
+    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
+    font-weight: normal;
+    padding: 6px 0px 6px 20px;
+    margin: 0px -25px;
+    color: #FFFFFF;
+}
+
+/*
+ * The next two styles are needed to
+ * modify the anchors present on the
+ * title of pages like scipy.stats or
+ * scipy.io
+ */
+div.title h1 a {
+    color: transparent;
+    cursor: default;
+}
+
+div.title h1 tt {
+    font-size: 95%;
+    background-color: transparent;
+    color: #FFFFFF;
+}
+
+
+/* --- Metadata style --- */
+div.metadata {
+    margin-top: 10px;
+    margin-bottom: 15px;
+    margin-right: 1px;
+    padding: 1px;
+    background-color: #fff4c5;
+    border: 1px solid #C9C9C9;
+    border-radius: 6px 6px 6px 6px;
+    box-shadow: 1px 1px 7px #CACACA;
+}
+
+div.metadata p {
+    margin: 7px 0px 7px 10px;
+}
+
+span.def {
+    font-family: monospace;
+    font-size: 90%;
+}
+
+span.argspec-highlight {
+    color: red;
+    font-size: 110%;
+    font-weight: 900;
+}
+
+
+/* --- Docstring div style --- */
+div.docstring {
+    margin-top: -1px;
+}
+
+div.docstring p {
+    padding: 0px 2px 0px;
+}
+
+
+/* --- Headers style --- */
+h2, h3, h4 {
+    font-family: 'Helvetica', sans-serif;
+    color: rgb(49, 126, 172);
+    margin-top: 20px;
+    margin-bottom: 10px;
+}
+
+h2 {
+    font-size: 140%;
+    font-weight: normal;
+    border-bottom: 1px solid rgb(220, 220, 220);
+    padding: 4px 0px 4px 0px;
+}
+
+h3 {
+    font-size: 115%;
+}
+
+h4 {
+    font-size: 100%;
+    margin-top: 14px;
+    font-weight: normal;
+}
+
+dl.docutils {
+    padding: 0px 10px 0px;
+}
+
+div.section p {
+    padding: 0px 2px 0px;
+}
+
+#warning {
+    margin-top: 5px;
+    background-color: #FFE4E4;
+    border: 1px solid #F66;
+    padding: 4px 8px 4px 8px;
+    text-align: center;
+}
+
+#doc-warning {
+    margin-top: 16px;
+    width: 45%;
+    margin-left: auto;
+    margin-right: auto;
+    color: rgb(185, 74, 72);
+    background-color: rgb(242, 222, 222);
+    border: 1px solid rgb(238, 211, 215);
+    border-radius: 4px 4px 4px 4px;
+    padding: 15px;
+    text-align: center;
+    font-weight: bold;
+    font-size: 105%;
+}
+
+
+/* --- Links --- */
+a {
+    text-decoration: none;
+    color: rgba(40, 130, 180, 1);
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+
+/* --- Images --- */
+img {
+    box-shadow: 0px 2px 6px #cacaca;
+    border: 1px solid #c9c9c9;
+}
+
+img.align-center {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+
+/* --- Lists style --- */
+ol.arabic {
+    margin-left: -10px;
+}
+
+ul {
+    margin-left: -5px;
+}
+
+/* --- Literal blocks style --- */
+pre.literal-block {
+    padding-left: 35px;
+    font-size: 95%;
+}
+
+
+/* --- Docutils table style --- */
+table.docutils {
+    border-collapse: collapse;
+    border-spacing: 0;
+    border: #DDDDDD;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 17px;
+    margin-bottom: 17px;
+    width: 90%;
+}
+
+table.docutils td {
+    padding: 5px;
+}
+
+table.docutils tr.row-odd {
+    background-color: rgb(249, 249, 249);
+}
+
+
+/* --- Docutils table headers --- */
+table.docutils th {
+    background-color: #EEEEEE;
+    border-bottom-color: #DDDDDD;
+    border-bottom-style: solid;
+    border-bottom-width: 1px;
+    border-top-color: #DDDDDD;
+    border-top-style: solid;
+    border-top-width: 1px;
+    font-weight: bold;
+    text-align: center;
+    padding: 6px 0px 6px 8px;
+    color: rgb(65, 65, 65);
+}
+
+
+/* --- Field-list table style --- */
+table.docutils.field-list {
+    font-size: 80%;
+    border-collapse: collapse;
+    border-left: transparent;
+    border-right: transparent;
+    margin-top: 15px;
+    margin-left: 40px;
+    width: 83%;
+}
+
+
+/* --- Field-list table headers --- */
+table.docutils.field-list th {
+    background-color: transparent;
+    border-top: transparent;
+    border-bottom: transparent;
+    color: black;
+    font-weight: bold;
+    text-align: left;
+    padding: 4px 0px 4px 8px;
+}
+
+
+/* --- Spacing around example code --- */
+div.highlight pre {
+    padding: 9px 14px;
+    background-color: rgb(247, 247, 249);
+    border-radius: 4px 4px 4px 4px;
+    border: 1px solid rgb(225, 225, 232);
+}
+
+div.highlight {
+    padding: 0px 10px 0px;
+}
+
+dt {
+    font-weight: bold;
+    /*font-size: 16px;*/
+}
+
+.classifier {
+    /*font-size: 10pt;*/
+    font-weight: normal;
+}
+
+tt {
+    background-color: #ECF0F3;
+    /*font-size: 95%;*/
+    padding: 0px 1px;
+}
+
+
+
+div.admonition.note {
+    font-size: 0.95em;
+    margin: 1.3em;
+    border: 1px solid #BCE8F1;
+    background-color: #D9EDF7;
+    padding: 0px 5px 0 5px;
+    color: #3A87AD;
+}
+
+div.admonition p.admonition-title {
+    font-size: 1em;
+    margin-top: 7px;
+    font-weight: bold;
+}
--- a/eric6.e4p	Wed Oct 18 19:16:28 2017 +0200
+++ b/eric6.e4p	Thu Oct 19 19:39:59 2017 +0200
@@ -1223,6 +1223,7 @@
     <Source>UI/BrowserSortFilterProxyModel.py</Source>
     <Source>UI/ClearPrivateDataDialog.py</Source>
     <Source>UI/CodeDocumentationViewer.py</Source>
+    <Source>UI/CodeDocumentationViewerTemplate.py</Source>
     <Source>UI/CompareDialog.py</Source>
     <Source>UI/Config.py</Source>
     <Source>UI/DeleteFilesConfirmationDialog.py</Source>
@@ -1246,6 +1247,7 @@
     <Source>UI/SymbolsWidget.py</Source>
     <Source>UI/UserInterface.py</Source>
     <Source>UI/__init__.py</Source>
+    <Source>UI/data/codeDocumentationViewer_rc.py</Source>
     <Source>Utilities/AutoSaver.py</Source>
     <Source>Utilities/BackgroundClient.py</Source>
     <Source>Utilities/BackgroundService.py</Source>
@@ -2008,6 +2010,7 @@
     <Resource>Helpviewer/data/icons.qrc</Resource>
     <Resource>Helpviewer/data/javascript.qrc</Resource>
     <Resource>IconEditor/cursors/cursors.qrc</Resource>
+    <Resource>UI/data/codeDocumentationViewer.qrc</Resource>
     <Resource>WebBrowser/Bookmarks/DefaultBookmarks.qrc</Resource>
     <Resource>WebBrowser/OpenSearch/DefaultSearchEngines/DefaultSearchEngines.qrc</Resource>
     <Resource>WebBrowser/UserAgent/UserAgentDefaults.qrc</Resource>
@@ -2114,6 +2117,7 @@
     <Other>ThirdParty/Pygments/pygments/PKG-INFO</Other>
     <Other>ThirdParty/Send2Trash/LICENSE</Other>
     <Other>ThirdParty/enum/LICENSE</Other>
+    <Other>UI/data/documentViewerStyle.css</Other>
     <Other>WebBrowser/Bookmarks/DefaultBookmarks.xbel</Other>
     <Other>WebBrowser/OpenSearch/DefaultSearchEngines/Amazoncom.xml</Other>
     <Other>WebBrowser/OpenSearch/DefaultSearchEngines/Bing.xml</Other>

eric ide

mercurial