diff mde/gui/content/Content.d @ 100:0ea4a3e651ae

There is now a position marker for text editing. Changed the way fonts are configured. Actually, not much of the new way exists yet.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sat, 15 Nov 2008 17:39:14 +0000
parents 5de5810e3516
children 71f0f1f83620
line wrap: on
line diff
--- a/mde/gui/content/Content.d	Fri Nov 14 12:44:32 2008 +0000
+++ b/mde/gui/content/Content.d	Sat Nov 15 17:39:14 2008 +0000
@@ -225,6 +225,14 @@
 	return v;
     }
     
+    size_t getEditIndex () {
+	size_t i = 0;
+	for (size_t p = 0; p < pos; ++p)
+	    if (!(v[p] & 0x80) || v[p] & 0x40)
+		++i;
+	return i;
+    }
+    
     /// Gives all callbacks the modified value
     void endEdit () {
 	foreach (cb; cngCb)