about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--edit.mu32
1 files changed, 27 insertions, 5 deletions
diff --git a/edit.mu b/edit.mu
index 3c206bbd..6bf00cd9 100644
--- a/edit.mu
+++ b/edit.mu
@@ -5,16 +5,28 @@ recipe main [
   open-console
   width:number <- display-width
   height:number <- display-height
-  # draw a line
+  # draw a dotted line down the middle
   divider:number, _ <- divide-with-remainder width:number, 2:literal
-  draw-vertical 0:literal/screen, divider:number, 0:literal/top, height:number
+  draw-vertical 0:literal/screen, divider:number, 0:literal/top, height:number, 9482:literal/vertical-dotted
+  # left column consists of multiple recipes
+  draw-horizontal 0:literal/screen, 10:literal, 0:literal/left, divider:number, 9480:literal/horizontal-dotted
+  draw-horizontal 0:literal/screen, 20:literal, 0:literal/left, divider:number, 9480:literal/horizontal-dotted
+  draw-horizontal 0:literal/screen, 30:literal, 0:literal/left, divider:number, 9480:literal/horizontal-dotted
+  # right column consists of multiple sandboxes isolated from each other, but
+  # with access to the recipes on the left
+  column2:number <- add divider:number, 1:literal
+  draw-horizontal 0:literal/screen, 3:literal, column2:number, width:number, 9480:literal/horizontal-dotted
+  draw-horizontal 0:literal/screen, 12:literal, column2:number, width:number, 9480:literal/horizontal-dotted
+  draw-horizontal 0:literal/screen, 15:literal, column2:number, width:number, 9473:literal/horizontal-double
+  draw-horizontal 0:literal/screen, 25:literal, column2:number, width:number, 9473:literal/horizontal-double
+  draw-horizontal 0:literal/screen, 35:literal, column2:number, width:number, 9473:literal/horizontal-double
   # editor on the left
   left:address:array:character <- new [abcde]
   left-editor:address:editor-data <- new-editor left:address:array:character, 0:literal/screen, 0:literal/top, 0:literal/left, 5:literal/right #divider:number/right
   # editor on the right
   right:address:array:character <- new [def]
   new-left:number <- add divider:number/right, 1:literal
-  right-editor:address:editor-data <- new-editor right:address:array:character, 0:literal/screen, 0:literal/top, new-left:number, width:number
+  right-editor:address:editor-data <- new-editor right:address:array:character, 0:literal/screen, 4:literal/top, new-left:number, width:number
   # chain
   x:address:address:editor-data <- get-address left-editor:address:editor-data/deref, next-editor:offset
   x:address:address:editor-data/deref <- copy right-editor:address:editor-data
@@ -1749,6 +1761,11 @@ recipe draw-horizontal [
   row:number <- next-ingredient
   x:number <- next-ingredient
   right:number <- next-ingredient
+  style:character, style-found?:boolean <- next-ingredient
+  {
+    break-if style-found?:boolean
+    style:character <- copy 9472:literal/horizontal
+  }
   color:number, color-found?:boolean <- next-ingredient
   {
     # default color to white
@@ -1759,7 +1776,7 @@ recipe draw-horizontal [
   {
     continue?:boolean <- lesser-than x:number, right:number
     break-unless continue?:boolean
-    print-character screen:address, 9472:literal/horizontal, color:number
+    print-character screen:address, style:character, color:number
     x:number <- add x:number, 1:literal
     loop
   }
@@ -1771,6 +1788,11 @@ recipe draw-vertical [
   col:number <- next-ingredient
   x:number <- next-ingredient
   bottom:number <- next-ingredient
+  style:character, style-found?:boolean <- next-ingredient
+  {
+    break-if style-found?:boolean
+    style:character <- copy 9474:literal/vertical
+  }
   color:number, color-found?:boolean <- next-ingredient
   {
     # default color to white
@@ -1781,7 +1803,7 @@ recipe draw-vertical [
     continue?:boolean <- lesser-than x:number, bottom:number
     break-unless continue?:boolean
     move-cursor screen:address, x:number, col:number
-    print-character screen:address, 9474:literal/vertical, color:number
+    print-character screen:address, style:character, color:number
     x:number <- add x:number, 1:literal
     loop
   }