tuned signature: more operations;
authorwenzelm
Sat, 25 Oct 2025 19:52:22 +0200
changeset 83387 65d22b27471a
parent 83386 5294055465d3
child 83388 8d90bd0e4f39
tuned signature: more operations;
src/Pure/Tools/doc.scala
--- a/src/Pure/Tools/doc.scala	Sat Oct 25 19:20:37 2025 +0200
+++ b/src/Pure/Tools/doc.scala	Sat Oct 25 19:52:22 2025 +0200
@@ -18,12 +18,15 @@
   }
   case class Entry(name: String, path: Path, title: String = "") {
     def view(): Unit = Doc.view(path)
-    override def toString: String =  // GUI label
-      if (title.nonEmpty) {
-        val style = GUI.Style_HTML
-        style.enclose(style.make_bold(name) + style.make_text(": " + title))
-      }
-      else name
+
+    def print_html: String = {
+      val style = GUI.Style_HTML
+      if (title.nonEmpty) style.make_bold(name) + style.make_text(": " + title)
+      else style.make_text(name)
+    }
+
+    override def toString: String =  // Swing GUI label
+      if (title.nonEmpty) GUI.Style_HTML.enclose(print_html) else name
   }
 
   def plain_file(path0: Path,