(String filename)
| 81 | |
| 82 | public boolean experimental = Options.dict().isTrue(new Dict.Prop<Boolean>("experimental"), false); |
| 83 | |
| 84 | public Open(String filename) { |
| 85 | |
| 86 | DefaultMenus.safeToSave = false; |
| 87 | |
| 88 | ServiceLoader<GuardingDynamicLinkerExporter> ll = ServiceLoader.load(GuardingDynamicLinkerExporter.class); |
| 89 | |
| 90 | this.filename = filename; |
| 91 | Log.log("startup", () -> " -- Initializing window -- "); |
| 92 | |
| 93 | try { |
| 94 | pluginList = new PluginList(); |
| 95 | plugins = pluginList.read(System.getProperty("user.home") + "/.field/plugins.edn", true); |
| 96 | |
| 97 | if (plugins != null) pluginList.interpretClassPathAndOptions(plugins); |
| 98 | |
| 99 | FieldBox.fieldBox.io.setPluginList(pluginList); |
| 100 | |
| 101 | } catch (IOException e) { |
| 102 | e.printStackTrace(); |
| 103 | pluginList = null; |
| 104 | } |
| 105 | |
| 106 | |
| 107 | Rect bounds = ScreenGeometry.primaryMonitorBounds(); |
| 108 | int inset = 15; |
| 109 | window = new FieldBoxWindow((int) bounds.x + inset, (int) bounds.y + inset, (int) bounds.w - inset * 2, (int) bounds.h - inset * 2, filename); |
| 110 | |
| 111 | window.scene.attach(-5, this::defaultGLPreambleBackground); |
| 112 | window.mainLayer() |
| 113 | .attach(-5, this::defaultGLPreamble); |
| 114 | |
| 115 | boxes = new Boxes(); |
| 116 | boxes.root().properties.put(Boxes.window, window); |
| 117 | |
| 118 | window.getCompositor() |
| 119 | .newLayer("glass"); |
| 120 | window.getCompositor() |
| 121 | .getLayer("glass") |
| 122 | .getScene() |
| 123 | .attach(-5, this::defaultGLPreambleTransparent); |
| 124 | |
| 125 | window.getCompositor() |
| 126 | .newLayer("glass2"); |
| 127 | window.getCompositor() |
| 128 | .getLayer("glass2") |
| 129 | .getScene() |
| 130 | .attach(-5, this::defaultGLPreambleTransparent); |
| 131 | |
| 132 | Watches watches = new Watches(); |
| 133 | watches.connect(boxes.root()); |
| 134 | |
| 135 | drawing = new Drawing(); |
| 136 | // add the default layer to the box graph |
| 137 | drawing.install(boxes.root()); |
| 138 | // add the glass layer to the box graph |
| 139 | drawing.install(boxes.root(), "glass"); |
| 140 | drawing.install(boxes.root(), "glass2"); |
nothing calls this directly
no test coverage detected