]> git.mdlowis.com Git - archive/tide-ocaml.git/commitdiff
Added functions for drawing the regions. stubs currently but will be filled out later
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 24 Oct 2017 20:18:04 +0000 (16:18 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 24 Oct 2017 20:18:04 +0000 (16:18 -0400)
Makefile
edit.ml
lib/draw.ml
lib/draw.mli
tests.ml

index 68f86daec9839e2aca43dacd0c3cfaa119f3073e..3057d3b93be773a3f1c92848bafacbd0e12cf3a1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,9 +29,9 @@ LIBOBJS = \
     lib/misc.$(OBJEXT) \
     lib/x11.$(OBJEXT) \
     lib/cfg.$(OBJEXT) \
-    lib/draw.$(OBJEXT) \
     lib/rope.$(OBJEXT) \
     lib/buf.$(OBJEXT) \
+    lib/draw.$(OBJEXT) \
     lib/scrollmap.$(OBJEXT) \
     lib/x11_prims.o \
     lib/misc_prims.o \
diff --git a/edit.ml b/edit.ml
index 541e11106d2d15d580458cd6937dbe5bfec53847..c3f1250e4f7cc4e0008e01b93c617c38d809335d 100644 (file)
--- a/edit.ml
+++ b/edit.ml
@@ -85,6 +85,13 @@ let onmousebtn mods btn x y pressed = ()
 let onmousemove mods x y = ()
 
 let onupdate width height =
+  let csr = Draw.Cursor.make (width, height) 0 0 in
+  (*
+  Draw.status csr "UNSI> *scratch*";
+  Draw.tags csr !tags_buf;
+  Draw.scroll csr;
+  Draw.edit csr !edit_buf
+  *)
   let (pos : drawpos) = { x = 0; y = 0 } in
   let pos = draw_status pos width "UNSI> *scratch*" in
   let pos = draw_tags pos width (height / font.height / 4) "Sample tags data" in
index 26484ef7b9ec7aacbaf347954869cc39a4f9ecc1..81e4e206f78da537f10da502660f6aaa8da79613 100644 (file)
@@ -38,8 +38,12 @@ let vrule height csr =
   rule_bkg 1 (height - csr.y) csr;
   csr.x <- csr.x + 1
 
+let status csr str = ()
+let tags csr buf = ()
+let scroll csr = ()
+let edit csr buf = ()
+
 (*
-type drawpos = { x: int; y: int }
 
 let draw_status pos width text =
   let height = (4 + font.height) in
index 028d186753f42ef9ea1dd6a387f86efe75120ec8..9a0f7f8382644d192cd1eece11804d8f055d2918 100644 (file)
@@ -13,3 +13,8 @@ val rule_bkg : int -> int -> Cursor.t -> unit
 val string : string -> Cursor.t -> unit
 val hrule : int -> Cursor.t -> unit
 val vrule : int -> Cursor.t -> unit
+
+val status : Cursor.t -> string -> unit
+val tags : Cursor.t -> Buf.t -> unit
+val scroll : Cursor.t -> unit
+val edit : Cursor.t -> Buf.t -> unit
index c58c2f13735507726f47b89e8c27f82e663f6174..def58ab7beb46602b3ab37220bcda1b6313bd55b 100644 (file)
--- a/tests.ml
+++ b/tests.ml
@@ -1,3 +1,4 @@
 let () =
   Rope.run_unit_tests ();
+  Scrollmap.run_unit_tests ();
   Test.report_results ()