Index: Fl_Menu_Type.cxx
===================================================================
--- Fl_Menu_Type.cxx	(revision 10831)
+++ Fl_Menu_Type.cxx	(working copy)
@@ -190,6 +190,25 @@
     const char* ut = user_data_type() ? user_data_type() : "void*";
     write_c(", %s", ut);
     if (use_v) write_c(" v");
+#ifdef FLUID_STR_3210
+    // NEW
+    write_c(") \n{\n");
+    {
+      const char *scb = callback();
+      if (scb) {
+	const char *pch;
+	const char *ind = indent(indentation+1);
+	while ( (pch=strchr(scb, '\n')) ) {
+	  int line_len = pch - scb;
+	  write_c("%s%.*s\n", ind, line_len, scb);
+	  scb = pch+1;
+	}
+	write_c("%s%s\n", ind, scb);
+      }
+    }
+    write_c("}\n");
+#else
+    // OLD
     write_c(") {\n  %s", callback());
     if (*(d-1) != ';') {
       const char *p = strrchr(callback(), '\n');
@@ -200,9 +219,18 @@
       if (*p != '#' && *p) write_c(";");
     }
     write_c("\n}\n");
+#endif
+
     if (k) {
+#ifdef FLUID_STR_3210
+      // NEW
+      write_c("void %s::%s(Fl_Menu_* o, %s v) \n{\n", k, cn, ut);
+      write_c("%s((%s*)(o", indent(indentation+1), k);
+#else
+      // OLD
       write_c("void %s::%s(Fl_Menu_* o, %s v) {\n", k, cn, ut);
       write_c("  ((%s*)(o", k);
+#endif
       Fl_Type* t = parent; while (t->is_menu_item()) t = t->parent;
       Fl_Type *q = 0;
       // Go up one more level for Fl_Input_Choice, as these are groups themselves
@@ -228,11 +256,23 @@
   if (k) {
     int i; 
     if (i18n_type) write_c("\nunsigned char %s::%s_i18n_done = 0;", k, menu_name(i));
+#ifdef FLUID_STR_3210
+    // NEW
+    write_c("\nFl_Menu_Item %s::%s[] = \n{\n", k, menu_name(i));
+#else
+    // OLD
     write_c("\nFl_Menu_Item %s::%s[] = {\n", k, menu_name(i));
+#endif
   } else {
     int i; 
     if (i18n_type) write_c("\nunsigned char %s_i18n_done = 0;", menu_name(i));
+#ifdef FLUID_STR_3210
+    // NEW
+    write_c("\nFl_Menu_Item %s[] = \n{\n", menu_name(i));
+#else
+    // OLD
     write_c("\nFl_Menu_Item %s[] = {\n", menu_name(i));
+#endif
   }
   Fl_Type* t = prev; while (t && t->is_menu_item()) t = t->prev;
   for (Fl_Type* q = t->next; q && q->is_menu_item(); q = q->next) {
@@ -329,8 +369,15 @@
   if (!prev->is_menu_item()) {
     // for first menu item, declare the array
     if (class_name(1)) {
+#ifdef FLUID_STR_3210
+      // NEW
+      if (i18n_type) write_h("%sstatic unsigned char %s_i18n_done;\n", indent(1), mname);
+      write_h("%sstatic Fl_Menu_Item %s[];\n", indent(1), mname);
+#else
+      // OLD
       if (i18n_type) write_h("  static unsigned char %s_i18n_done;\n", mname);
       write_h("  static Fl_Menu_Item %s[];\n", mname);
+#endif
     } else {
       if (i18n_type) write_h("extern unsigned char %s_i18n_done;\n", mname);
       write_h("extern Fl_Menu_Item %s[];\n", mname);
@@ -341,7 +388,13 @@
   if (c) {
     if (class_name(1)) {
       write_public(public_);
+#ifdef FLUID_STR_3210
+      // NEW
+      write_h("%sstatic Fl_Menu_Item *%s;\n", indent(1), c);
+#else
+      // OLD
       write_h("  static Fl_Menu_Item *%s;\n", c);
+#endif
     } else {
       if (c==name())
         write_h("#define %s (%s+%d)\n", c, mname, i);
@@ -355,8 +408,15 @@
       const char* cn = callback_name();
       const char* ut = user_data_type() ? user_data_type() : "void*";
       write_public(0);
+#ifdef FLUID_STR_3210
+      // NEW
+      write_h("%sinline void %s_i(Fl_Menu_*, %s);\n", indent(1), cn, ut);
+      write_h("%sstatic void %s(Fl_Menu_*, %s);\n", indent(1), cn, ut);
+#else
+      // OLD
       write_h("  inline void %s_i(Fl_Menu_*, %s);\n", cn, ut);
       write_h("  static void %s(Fl_Menu_*, %s);\n", cn, ut);
+#endif
     }
   }
 
@@ -372,14 +432,27 @@
     }
     image->write_code("o");
   }
-  for (int n=0; n < NUM_EXTRA_CODE; n++)
+  for (int n=0; n < NUM_EXTRA_CODE; n++) {
     if (extra_code(n) && !isdeclare(extra_code(n))) {
       if (!init) {
 	init = 1;
+#ifdef FLUID_STR_3210
+        // NEW
+	write_c("%s{\n%sFl_Menu_Item* o = &%s[%d];\n", indent(), indent(indentation+1), mname, i);
+#else
+        // OLD
 	write_c("%s{ Fl_Menu_Item* o = &%s[%d];\n", indent(), mname, i);
+#endif
       }
+#ifdef FLUID_STR_3210
+      // NEW
+      write_c("%s%s\n", indent(indentation+1), extra_code(n));
+#else
+      // OLD
       write_c("%s  %s\n", indent(), extra_code(n));
+#endif
     }
+  }
   if (init) write_c("%s}\n",indent());
 }
 
@@ -472,22 +545,50 @@
 	nItem += 1 + ((thislevel > nextlevel) ? (thislevel-nextlevel) : 0);
       }
       if (nLabel) {
+#ifdef FLUID_STR_3210
+        write_c("%sif (!%s_i18n_done) \n%s{\n", indent(), indent(), mName);
+        write_c("%sint i=0;\n", indent(indentation+1));
+        write_c("%sfor ( ; i<%d; i++)\n", indent(indentation+1), nItem);
+        write_c("%sif (%s[i].label())\n", indent(indentation+2), mName);
+#else
         write_c("%sif (!%s_i18n_done) {\n", indent(), mName);
         write_c("%s  int i=0;\n", indent());
         write_c("%s  for ( ; i<%d; i++)\n", indent(), nItem);
         write_c("%s    if (%s[i].label())\n", indent(), mName);
+#endif
         switch (i18n_type) {
           case 1:
+#ifdef FLUID_STR_3210
+            // NEW
+            write_c("%s%s[i].label(%s(%s[i].label()));\n",
+                    indent(indentation+3), mName, i18n_function, mName);
+#else
+            // OLD
             write_c("%s      %s[i].label(%s(%s[i].label()));\n",
                     indent(), mName, i18n_function, mName);
+#endif
             break;
           case 2:
+#ifdef FLUID_STR_3210
+            // NEW
+            write_c("%s%s[i].label(catgets(%s,%s,i+%d,%s[i].label()));\n",
+                    indent(indentation+3), mName, i18n_file[0] ? i18n_file : "_catalog", 
+                    i18n_set, mi->msgnum(), mName);
+#else
+            // OLD
             write_c("%s      %s[i].label(catgets(%s,%s,i+%d,%s[i].label()));\n",
                     indent(), mName, i18n_file[0] ? i18n_file : "_catalog", 
                     i18n_set, mi->msgnum(), mName);
+#endif
             break;
         }
+#ifdef FLUID_STR_3210
+        // NEW
+        write_c("%s%s_i18n_done = 1;\n", indent(indentation+1), mName);
+#else
+        // OLD
         write_c("%s  %s_i18n_done = 1;\n", indent(), mName);
+#endif
         write_c("%s}\n", indent());
       }
     }
Index: Fl_Type.h
===================================================================
--- Fl_Type.h	(revision 10831)
+++ Fl_Type.h	(working copy)
@@ -825,6 +825,10 @@
 void write_public(int state); // writes pubic:/private: as needed
 extern int indentation;
 extern const char* indent();
+#ifdef FLUID_STR_3210
+// NEW
+extern const char* indent(int i);
+#endif
 
 int read_file(const char *, int merge);
 const char *read_word(int wantbrace = 0);
Index: Fl_Widget_Type.cxx
===================================================================
--- Fl_Widget_Type.cxx	(revision 10831)
+++ Fl_Widget_Type.cxx	(working copy)
@@ -2050,6 +2050,25 @@
     const char* ut = user_data_type() ? user_data_type() : "void*";
     write_c(", %s", ut);
     if (use_v) write_c(" v");
+#ifdef FLUID_STR_3210
+    // NEW
+    write_c(") \n{\n");
+    {
+      const char *cbs = callback();	// callback string
+      if (cbs) {
+	const char *cbs_eol;		// callback string end of line
+	const char *ind = indent(indentation+1);
+	while ( (cbs_eol=strchr(cbs, '\n')) ) {
+	  int line_len = cbs_eol - cbs;
+	  write_c("%s%.*s\n", ind, line_len, cbs);
+	  cbs = cbs_eol+1;
+	}
+	write_c("%s%s\n", ind, cbs);
+      }
+    }
+    write_c("}\n");
+#else
+    // OLD
     write_c(") {\n  %s", callback());
     if (*(d-1) != ';') {
       const char *p = strrchr(callback(), '\n');
@@ -2060,9 +2079,17 @@
       if (*p != '#' && *p) write_c(";");
     }
     write_c("\n}\n");
+#endif
     if (k) {
+#ifdef FLUID_STR_3210
+      // NEW
+      write_c("void %s::%s(%s* o, %s v) \n{\n", k, cn, t, ut);
+      write_c("%s((%s*)(o", indent(indentation+1), k);
+#else
+      // OLD
       write_c("void %s::%s(%s* o, %s v) {\n", k, cn, t, ut);
       write_c("  ((%s*)(o", k);
+#endif
       Fl_Type *q = 0;
       for (Fl_Type* p = parent; p && p->is_widget(); q = p, p = p->parent)
 	write_c("->parent()");
@@ -2098,7 +2125,13 @@
   if (c) {
     if (class_name(1)) {
       write_public(public_);
+#ifdef FLUID_STR_3210
+      // NEW
+      write_h("%s%s *%s;\n", indent(1), t, c);
+#else
+      // OLD
       write_h("  %s *%s;\n", t, c);
+#endif
     }
   }
   if (class_name(1) && callback() && !is_name(callback())) {
@@ -2105,8 +2138,15 @@
     const char* cn = callback_name();
     const char* ut = user_data_type() ? user_data_type() : "void*";
     write_public(0);
+#ifdef FLUID_STR_3210
+    // NEW
+    write_h("%sinline void %s_i(%s*, %s);\n", indent(1), cn, t, ut);
+    write_h("%sstatic void %s(%s*, %s);\n", indent(1), cn, t, ut);
+#else
+    // OLD
     write_h("  inline void %s_i(%s*, %s);\n", cn, t, ut);
     write_h("  static void %s(%s*, %s);\n", cn, t, ut);
+#endif
   }
   // figure out if local variable will be used (prevent compiler warnings):
   int wused = !name() && is_window();
@@ -2150,7 +2190,16 @@
       }
   }
 
+#ifdef FLUID_STR_3210
+  // NEW
+  write_c("%s{\n", indent());
+  indentation += 1;
+  write_c("%s", indent());
+#else
+  // OLD
   write_c("%s{ ", indent());
+#endif
+
   write_comment_inline_c();
   if (varused) write_c("%s* o = ", t);
   if (name()) write_c("%s = ", name());
@@ -2185,7 +2234,12 @@
   }
   write_c(");\n");
 
+#ifdef FLUID_STR_3210
+  // NEW -- THIS LINE REMOVED
+#else
+  // OLD
   indentation += 2;
+#endif
 
   if (wused) write_c("%sw = o; if (w) {/* empty */}\n", indent());
 
@@ -2397,7 +2451,13 @@
 }
 
 void Fl_Widget_Type::write_block_close() {
+#ifdef FLUID_STR_3210
+  // NEW
+  indentation -= 1;
+#else
+  // OLD
   indentation -= 2;
+#endif
   write_c("%s} // %s* %s\n", indent(), subclassname(this),
           name() ? name() : "o");
 }
Index: Fl_Function_Type.cxx
===================================================================
--- Fl_Function_Type.cxx	(revision 10831)
+++ Fl_Function_Type.cxx	(working copy)
@@ -254,8 +254,15 @@
   if (havechildren)
     write_c("\n");
   if (ismain()) {
-    if (havechildren)
+    if (havechildren) {
+#ifdef FLUID_STR_3210
+      // NEW
+      write_c("int main(int argc, char **argv) \n{\n");
+#else
+      // OLD
       write_c("int main(int argc, char **argv) {\n");
+#endif
+    }
   } else {
     const char* rtype = return_type;
     const char* star = "";
@@ -287,7 +294,13 @@
         size_t n = strlen(k);
         if (!strncmp(name(), k, n) && name()[n] == '(') constructor = 1;
       }
+#ifdef FLUID_STR_3210
+      // NEW
+      write_h("%s", indent(1));
+#else
+      // OLD
       write_h("  ");
+#endif
       if (is_static) write_h("static ");
       if (is_virtual) write_h("virtual ");
       if (!constructor) {
@@ -309,8 +322,19 @@
         *sptr++ = *nptr++;
       }
       *sptr = '\0';
-      
+
+#ifdef FLUID_STR_3210
+      // NEW
+      if (s[strlen(s)-1] == '}') {  // special case for inlined functions
+        write_h("%s\n", s);
+      } else {
+        write_h("%s;\n", s);
+      }
+#else 
+      // OLD
       write_h("%s;\n", s);
+#endif
+
       // skip all function default param. init in body:
       int skips=0,skipc=0;
       int nc=0,plevel=0;
@@ -336,8 +360,15 @@
       }
       *sptr = '\0';
       
-      if (havechildren)
+      if (havechildren) {
+#ifdef FLUID_STR_3210
+        // NEW
+        write_c("%s::%s \n{\n", k, s);
+#else
+        // OLD
         write_c("%s::%s {\n", k, s);
+#endif
+      }
     } else {
       if (havechildren)
         write_comment_c();
@@ -378,13 +409,27 @@
       }
       *sptr = '\0';
       
-      if (havechildren)
+      if (havechildren) {
+#ifdef FLUID_STR_3210
+        // NEW
+        write_c("%s%s %s \n{\n", rtype, star, s);
+#else
+        // OLD
         write_c("%s%s %s {\n", rtype, star, s);
+#endif
+      }
     }
   }
   
+#ifdef FLUID_STR_3210
+  // NEW
+  indentation += 1;
+  if (havewidgets && !child->name()) write_c("%s%s* w;\n", indent(), subclassname(child));
+#else
+  // OLD
   if (havewidgets && !child->name()) write_c("  %s* w;\n", subclassname(child));
   indentation += 2;
+#endif
 }
 
 void Fl_Function_Type::write_code2() {
@@ -397,10 +442,19 @@
   }
   
   if (ismain()) {
+#ifdef FLUID_STR_3210
+    // NEW
+    if (havewidgets) write_c("%s%s->show(argc, argv);\n", indent(), var);
+    if (havechildren) write_c("%sreturn Fl::run();\n", indent());
+  } else if (havewidgets && !constructor && !return_type) {
+    write_c("%sreturn %s;\n", indent(), var);
+#else
+    // OLD
     if (havewidgets) write_c("  %s->show(argc, argv);\n", var);
     if (havechildren) write_c("  return Fl::run();\n");
   } else if (havewidgets && !constructor && !return_type) {
     write_c("  return %s;\n", var);
+#endif
   }
   if (havechildren)
     write_c("}\n");
@@ -538,12 +592,25 @@
 
 void Fl_CodeBlock_Type::write_code1() {
   const char* c = name();
+#ifdef FLUID_STR_3210
+  // NEW
+  write_c("%s%s \n{\n", indent(), c ? c : "");
+  indentation += 1;
+#else
+  // OLD
   write_c("%s%s {\n", indent(), c ? c : "");
   indentation += 2;
+#endif
 }
 
 void Fl_CodeBlock_Type::write_code2() {
+#ifdef FLUID_STR_3210
+  // NEW
+  indentation -= 1;
+#else
+  // OLD
   indentation -= 2;
+#endif
   if (after) write_c("%s} %s\n", indent(), after);
   else write_c("%s}\n", indent());
 }
@@ -673,8 +740,15 @@
                         || (!strncmp(c,"struct",6) && isspace(c[6]))
                         ) ) {
     write_public(public_);
+#ifdef FLUID_STR_3210
+    // NEW
+    write_comment_h(indent(1));
+    write_h("%s%s\n", indent(1), c);
+#else
+    // OLD
     write_comment_h("  ");
     write_h("  %s\n", c);
+#endif
     return;
   }
   // handle putting #include, extern, using or typedef into decl:
@@ -704,8 +778,15 @@
   while (e>c && e[-1]==';') e--;
   if (class_name(1)) {
     write_public(public_);
+#ifdef FLUID_STR_3210
+    // NEW
+    write_comment_h(indent(1));
+    write_h("%s%.*s; %s\n", indent(1), (int)(e-c), c, csc);
+#else
+    // OLD
     write_comment_h("  ");
     write_h("  %.*s; %s\n", (int)(e-c), c, csc);
+#endif
   } else {
     if (public_) {
       if (static_) 
@@ -888,8 +969,15 @@
   }
   if (is_in_class()) {
     write_public(public_);
+#ifdef FLUID_STR_3210
+    // NEW
+    write_comment_h(indent(1));
+    write_h("%sstatic unsigned char %s[%d];\n", indent(1), c, nData);
+#else
+    // OLD
     write_comment_h("  ");
     write_h("  static unsigned char %s[%d];\n", c, nData);
+#endif
     write_c("unsigned char %s::%s[%d] = /* binary data included from %s */\n", class_name(1), c, nData, fn);
     if (message) write_c("#error %s %s\n", message, fn);
     write_cdata(data, nData);
@@ -1437,7 +1525,13 @@
   else
     write_h("class %s ", name());
   if (subclass_of) write_h(": %s ", subclass_of);
+#ifdef FLUID_STR_3210
+  // NEW
+  write_h("\n{\n");
+#else
+  // OLD
   write_h("{\n");
+#endif
 }
 
 void Fl_Class_Type::write_code2() {
Index: Fl_Window_Type.cxx
===================================================================
--- Fl_Window_Type.cxx	(revision 10831)
+++ Fl_Window_Type.cxx	(working copy)
@@ -1499,6 +1499,56 @@
   if (!c) c = "Fl_Group";
 
   write_comment_h();
+#ifdef FLUID_STR_3210
+  // NEW
+  write_h("\nclass %s : public %s \n{\n", name(), c);
+  if (strstr(c, "Window")) {
+    write_h("%svoid _%s();\n", indent(1), trimclassname(name()));
+    write_h("public:\n");
+    write_h("%s%s(int X, int Y, int W, int H, const char *L = 0);\n", indent(1), trimclassname(name()));
+    write_h("%s%s(int W, int H, const char *L = 0);\n", indent(1), trimclassname(name()));
+    write_h("%s%s();\n", indent(1), trimclassname(name()));
+
+    // a constructor with all four dimensions plus label
+    write_c("%s::%s(int X, int Y, int W, int H, const char *L)\n", name(), trimclassname(name()));
+    write_c("%s: %s(X, Y, W, H, L) \n{\n", indent(1), c);
+    write_c("%s_%s();\n", indent(1), trimclassname(name()));
+    write_c("}\n\n");
+
+    // a constructor with just the size and label. The window manager will position the window
+    write_c("%s::%s(int W, int H, const char *L)\n", name(), trimclassname(name()));
+    write_c("%s: %s(0, 0, W, H, L) \n{\n", indent(1), c);
+    write_c("%sclear_flag(16);\n", indent(1));
+    write_c("%s_%s();\n", indent(1), trimclassname(name()));
+    write_c("}\n\n");
+    
+    // a constructor that takes size and label from the Fluid database
+    write_c("%s::%s()\n", name(), trimclassname(name()));
+    write_c("%s: %s(0, 0, %d, %d, ", indent(1), c, o->w(), o->h());
+    const char *cstr = label();
+    if (cstr) write_cstring(cstr);
+    else write_c("0");
+    write_c(") \n{\n");
+    write_c("%sclear_flag(16);\n", indent(1));
+    write_c("%s_%s();\n", indent(1), trimclassname(name()));
+    write_c("}\n\n");
+    
+    write_c("void %s::_%s() \n{\n", name(), trimclassname(name()));
+//    write_c("%s%s *w = this;\n", indent(1), name());
+  } else {
+    write_h("public:\n");
+    write_h("%s%s(int X, int Y, int W, int H, const char *L = 0);\n", indent(1), trimclassname(name()));
+
+    write_c("%s::%s(int X, int Y, int W, int H, const char *L)\n", name(), trimclassname(name()));
+    if (wc_relative)
+      write_c("%s: %s(0, 0, W, H, L) \n{\n", indent(1), c);
+    else
+      write_c("%s: %s(X, Y, W, H, L) \n{\n", indent(1), c);
+  }
+
+//  write_c("%s%s *o = this;\n", indent(1), name());
+#else
+  // OLD
   write_h("\nclass %s : public %s {\n", name(), c);
   if (strstr(c, "Window")) {
     write_h("  void _%s();\n", trimclassname(name()));
@@ -1545,6 +1595,7 @@
   }
 
 //  write_c("  %s *o = this;\n", name());
+#endif
 
   write_widget_code();
 }
Index: Fluid_Image.cxx
===================================================================
--- Fluid_Image.cxx	(revision 10831)
+++ Fluid_Image.cxx	(working copy)
@@ -51,8 +51,15 @@
       write_c("#include <FL/Fl_Pixmap.H>\n");
       pixmap_header_written = write_number;
     }
+#ifdef FLUID_STR_3210
+    // NEW
+    write_c("static const char *%s[] = \n{\n",
+	    unique_id(this, "idata", fl_filename_name(name()), 0));
+#else
+    // OLD
     write_c("static const char *%s[] = {\n",
 	    unique_id(this, "idata", fl_filename_name(name()), 0));
+#endif
     write_cstring(img->data()[0], strlen(img->data()[0]));
 
     int i;
Index: code.cxx
===================================================================
--- code.cxx	(revision 10831)
+++ code.cxx	(working copy)
@@ -94,12 +94,54 @@
 ////////////////////////////////////////////////////////////////
 // return current indentation:
 
+#ifdef FLUID_STR_3210
+// NEW
+//#define USE_TAB_INDENT // comment this line for space indentation, uncomment for tab indentation (DEFAULT: OFF)
+                         // TODO: this should be a user preference in the GUI + cmd line (or removed as an option)
+const int indent_max_level = 8;
+
+#ifdef USE_TAB_INDENT
+const int indent_inc = 1;
+static const char spaces[indent_max_level*indent_inc+1] = "\t\t\t\t\t\t\t\t";
+#else
+const int indent_inc = 2;
+static const char spaces[indent_max_level*indent_inc+1] = "                ";
+#endif
+
+#else /*FLUID_STR_3210*/
+// OLD
 static const char* spaces = "                ";
-int indentation;
+#endif /*FLUID_STR_3210*/
+
+int indentation;		// global: current indent level
+#ifdef FLUID_STR_3210
+// NEW
+// Return current indent level chars for global indentation
 const char* indent() {
+  int i = indentation * indent_inc; 
+  if (i>indent_max_level*indent_inc) {
+    i = indent_max_level*indent_inc;
+  }
+  return spaces+(indent_max_level*indent_inc-i);
+}
+
+// Return indent level chars for specified indent level 'i'
+const char* indent(int i) {
+  i *= indent_inc;
+  if (i>indent_max_level*indent_inc) {
+    i = indent_max_level*indent_inc;
+  }
+  return spaces+(indent_max_level*indent_inc-i);
+}
+
+#else /*FLUID_STR_3210*/
+// OLD
+// Return current indent level chars for global indentation
+const char* indent() {
   int i = indentation; if (i>16) i = 16;
   return spaces+16-i;
 }
+#endif /*FLUID_STR_3210*/
 
 ////////////////////////////////////////////////////////////////
 // declarations/include files:
