| 45 | private fun toHTML(param: Any): String { |
| 46 | return if (out == null) "" + param else out!!.convert(param) |
| 47 | } |
| 48 | |
| 49 | var tick = 0 |
| 50 | override fun loaded() { |
| 51 | out = find(Out.__out, both()).findAny().orElseGet { null } |
| 52 | } |
| 53 | |
| 54 | protected fun make(w: Int, h: Int, b: Box): Browser { |
| 55 | Log.log("OutputBox.debug") { "initializing browser" } |
| 56 | val browser = find(Templates.templateChild, both()).findFirst() |
| 57 | .map { x: BiFunctionOfBoxAnd<String, Box> -> x.apply(b, "html output") } |
| 58 | .orElseGet { Browser() } as Browser |
| 59 | val f = b.properties.get(frame) |
| 60 | val inset = 10f |
| 61 | browser.properties.put( |
| 62 | frame, |
| 63 | Rect((f.x + f.w - inset).toDouble(), (f.y + f.h - inset).toDouble(), w.toDouble(), h.toDouble()) |
| 64 | ) |
| 65 | browser.properties.put(Boxes.dontSave, true) |
| 66 | b.connect(browser) |
| 67 | browser.loaded() |
| 68 | properties.put(Boxes.dontSave, true) |
| 69 | browser.properties.put(name, "outputbox") |
| 70 | styles = findAndLoad(styleSheet, false) |
| 71 | val t = longArrayOf(0) |
| 72 | boot(browser) |
| 73 | browser.pauseForBoot() |
nothing calls this directly
no test coverage detected