DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2677
Version: 1.3-feature


Attached file "simple_cursor_for_Fl_Text_Display.patch"...


Link: http://www.fltk.org/str.php?L2677
Version: 1.3-feature
diff -U 3 -H -d -r -N -- FL/Fl_Text_Display.H FL/Fl_Text_Display.H
--- FL/Fl_Text_Display.H        2011-01-24 22:04:22.000000000 +0500
+++ FL/Fl_Text_Display.H        2011-07-10 20:47:04.441000002 +0600
@@ -59,7 +59,8 @@
     CARET_CURSOR,     /**< caret under the text */
     DIM_CURSOR,       /**< dim I-beam */
     BLOCK_CURSOR,     /**< unfille box under the current character */
-    HEAVY_CURSOR      /**< thick I-beam */
+    HEAVY_CURSOR,   /**< thick I-beam */
+    SIMPLE_CURSOR    /**< as cursor as Fl_Input cursor */
   };
   
   /**
diff -U 3 -H -d -r -N -- src/Fl_Text_Display.cxx src/Fl_Text_Display.cxx
--- src/Fl_Text_Display.cxx     2011-05-13 13:58:26.000000000 +0600
+++ src/Fl_Text_Display.cxx     2011-07-10 20:35:26.207000001 +0600
@@ -2095,6 +2095,10 @@
     segs[ 2 ].x1 = right; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = 
bot;
     segs[ 3 ].x1 = X; segs[ 3 ].y1 = bot; segs[ 3 ].x2 = X; segs[ 3 ].y2 = Y;
     nSegs = 4;
+  } else if ( mCursorStyle == SIMPLE_CURSOR ){
+    segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X; segs[ 0 ].y2 = bot;
+    segs[ 1 ].x1 = X+1; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X+1; segs[ 1 ].y2 = 
bot;
+    nSegs = 2;
   }
   fl_color( mCursor_color );
   
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to