Author: matt
Date: 2011-09-28 13:09:15 -0700 (Wed, 28 Sep 2011)
New Revision: 9079
Log:
STR 2677: new cursor shape for TextDisplay

Modified:
   branches/branch-3.0/include/fltk3/TextDisplay.h
   branches/branch-3.0/src/fltk3/TextDisplay.cxx

Modified: branches/branch-3.0/include/fltk3/TextDisplay.h
===================================================================
--- branches/branch-3.0/include/fltk3/TextDisplay.h     2011-09-28 20:08:48 UTC 
(rev 9078)
+++ branches/branch-3.0/include/fltk3/TextDisplay.h     2011-09-28 20:09:15 UTC 
(rev 9079)
@@ -62,7 +62,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 */
   };
   
   /**

Modified: branches/branch-3.0/src/fltk3/TextDisplay.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/TextDisplay.cxx       2011-09-28 20:08:48 UTC 
(rev 9078)
+++ branches/branch-3.0/src/fltk3/TextDisplay.cxx       2011-09-28 20:09:15 UTC 
(rev 9079)
@@ -2097,6 +2097,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;
   }
   fltk3::color( mCursor_color );
   

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to