MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / make

Method make

src/main/java/fieldcef/plugins/OutputBox.kt:47–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 13

bothFunction · 0.85
BrowserClass · 0.85
RectClass · 0.85
logMethod · 0.80
pauseForBootMethod · 0.80
TextEditorExecutionClass · 0.70
applyMethod · 0.65
getMethod · 0.65
loadedMethod · 0.65
findFunction · 0.50
mapMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected