Author: matt
Date: 2010-05-05 13:24:41 -0700 (Wed, 05 May 2010)
New Revision: 7591
Log:
Fixed horizontal scrolling.

Modified:
   branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx

Modified: branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx    2010-05-05 
08:05:35 UTC (rev 7590)
+++ branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx    2010-05-05 
20:24:41 UTC (rev 7591)
@@ -230,6 +230,7 @@
   int longest = 0;
   for (int i = 0; i < mNVisibleLines; i++)
     longest = max(longest, measure_vline(i));
+  printf("== %d 
=============================================================\n", longest);
   return longest;
 }
 
@@ -1397,7 +1398,10 @@
     lineStr = mBuffer->text_range( lineStartPos, lineStartPos + lineLen );
   }
   
-  X = text_area.x - mHorizOffset;
+  if (mode==GET_WIDTH)
+    X = 0;
+  else 
+    X = text_area.x - mHorizOffset;
   startX = X;
   startIndex = 0;
   if (!lineStr) {
@@ -2229,6 +2233,10 @@
   int lineStartPos = mLineStarts[ visLineNum ];
   if (lineStartPos < 0 || lineLen == 0) return 0;
   
+  char *s = mBuffer->text_range(lineStartPos, lineStartPos+lineLen);
+  printf("%s\n", s);
+  free(s);
+  
   return handle_vline(GET_WIDTH, lineStartPos, lineLen, 0, 0, 0, 0, 0, 0);
 }
 

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

Reply via email to