Author: matt
Date: 2010-04-30 13:26:07 -0700 (Fri, 30 Apr 2010)
New Revision: 7569
Log:
Oversimplification of line drawing in order to find the time wasters and 
insanely expensive text expanders.

Modified:
   branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx
   branches/branch-1.3-STR2158-matt/test/editor.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-04-30 
19:39:18 UTC (rev 7568)
+++ branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx    2010-04-30 
20:26:07 UTC (rev 7569)
@@ -1450,6 +1450,14 @@
 
   dispIndexOffset = 0;
 
+  // FIXME: quick out to avoid insane calculations of line width
+  X = text_area.x - mHorizOffset;
+  startX = X;
+  draw_string( 0, startX, Y, text_area.x+text_area.w, lineStr, lineLen );
+  return;
+  
+  
+  
   /* Step through character positions from the beginning of the line (even if
      that's off the left edge of the displayed area) to find the first
      character position that's not clipped, and the X coordinate for drawing

Modified: branches/branch-1.3-STR2158-matt/test/editor.cxx
===================================================================
--- branches/branch-1.3-STR2158-matt/test/editor.cxx    2010-04-30 19:39:18 UTC 
(rev 7568)
+++ branches/branch-1.3-STR2158-matt/test/editor.cxx    2010-04-30 20:26:07 UTC 
(rev 7569)
@@ -792,6 +792,15 @@
 int main(int argc, char **argv) {
   textbuf = new Fl_Text_Buffer;
   textbuf->text(
+#if 1
+                "void saveas_cb() {\n"
+                "  Fl_Native_File_Chooser fnfc;\n"
+                "  fnfc.title(\"Save File As?\");\n"
+                "  fnfc.type(Fl_Native_File_Chooser::BROWSE_SAVE_FILE);\n"
+                "  if ( fnfc.show() ) return;\n"
+                "  save_file(fnfc.filename());\n"
+                "}\n\n"
+#else                
                 "Falsches Üben von Xylophonmusik quält jeden größeren Zwerg\n"
                 "(= Wrongful practicing of xylophone music tortures every 
larger dwarf)\n"
                 "\n"
@@ -819,6 +828,7 @@
                 "たれそ つねならむ うゐのおくやま\n"
                 "けふこえて あさきゆめみし ゑひも\n"
                 "せす\n"
+#endif
                 "Even colours and sweet perfume / Will eventually fade /\n"
                 "Even our world / Is not eternal /\n"
                 "The deep mountains of vanity / Cross them today /\n"

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

Reply via email to