Added an option to load/save print settings from current directory using "shift"...
authorGary Macbook <gsteele13@gmail.com>
Fri, 23 Aug 2013 08:25:26 +0000 (10:25 +0200)
committerGary Macbook <gsteele13@gmail.com>
Fri, 23 Aug 2013 08:25:26 +0000 (10:25 +0200)
spyview/ImagePrinter_Control.C
spyview/ImagePrinter_Control.fl
spyview/ImagePrinter_Control.h

index 514ba2f697fe4c99c6b60b39e115c351e960659c..e1869b6d3277bf03e693bb00f2bb9350f6ccfae5 100644 (file)
@@ -1,4 +1,4 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0110
+// generated by Fast Light User Interface Designer (fluid) version 1.0107
 
 #include "ImagePrinter_Control.h"
 #include "ImageWindow.H"
@@ -755,16 +755,49 @@ void Image_Printer_Control::cb_Save(Fl_Button* o, void* v) {
 }
 
 void Image_Printer_Control::cb_Load1_i(Fl_Button*, void*) {
-  char *fname = fl_file_chooser("Load Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
-if(fname != NULL)
-  ip->loadPrintSettings(fname);
+  if (Fl::event_state() & FL_SHIFT)
+{
+       Fl_File_Chooser chooser(".", 
+                       "(*.set)\t",
+                       Fl_File_Chooser::CREATE,
+                       "Select files");
+       chooser.preview(0);
+       chooser.show();
+       while (chooser.shown()) Fl::wait();
+       if (chooser.value() == NULL) return;
+       ip->loadPrintSettings(chooser.value(1));
+}
+else
+{
+       char *fname = fl_file_chooser("Load Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
+       if(fname != NULL)
+               ip->loadPrintSettings(fname);
+};
 }
 void Image_Printer_Control::cb_Load1(Fl_Button* o, void* v) {
   ((Image_Printer_Control*)(o->parent()->parent()->user_data()))->cb_Load1_i(o,v);
 }
 
 void Image_Printer_Control::cb_Save1_i(Fl_Button*, void*) {
-  char *fname = fl_file_chooser("Save Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
+  if (Fl::event_state() & FL_SHIFT)
+{
+       Fl_File_Chooser chooser(".", 
+                       "(*.set)\t",
+                       Fl_File_Chooser::CREATE,
+                       "Select files");
+       chooser.preview(0);
+       chooser.show();
+       while (chooser.shown()) Fl::wait();
+       if (chooser.value() == NULL) return;
+       ip->savePrintSettings(chooser.value(1));
+}
+else
+{
+       char *fname = fl_file_chooser("Load Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
+       if(fname != NULL)
+               ip->savePrintSettings(fname);
+}
+char *fname = fl_file_chooser("Save Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
 if(fname != NULL)
   ip->savePrintSettings(fname);
 }
@@ -1021,568 +1054,574 @@ void Image_Printer_Control::cb_zoombox_color(Fl_Color_Chooser* o, void* v) {
 }
 
 Image_Printer_Control::Image_Printer_Control(ImageWindow *iwp) {
+  Fl_Double_Window* w;
   iw=iwp;
-  { win = new Fl_Double_Window(415, 730, "Spyview Postscript Controls");
-    win->user_data((void*)(this));
+  { Fl_Double_Window* o = win = new Fl_Double_Window(415, 730, "Spyview Postscript Controls");
+    w = o;
+    o->user_data((void*)(this));
     { Fl_Group* o = new Fl_Group(10, 25, 190, 120, "Text");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { yaxis_label = new Fl_Check_Button(20, 48, 105, 15, "Y axis label");
-        yaxis_label->down_box(FL_DOWN_BOX);
-        yaxis_label->callback((Fl_Callback*)cb_yaxis_label);
-      } // Fl_Check_Button* yaxis_label
-      { xaxis_label = new Fl_Check_Button(20, 28, 105, 15, "X axis label");
-        xaxis_label->down_box(FL_DOWN_BOX);
-        xaxis_label->callback((Fl_Callback*)cb_xaxis_label);
-      } // Fl_Check_Button* xaxis_label
-      { dir_stamp = new Fl_Check_Button(20, 88, 135, 15, "Directory stamp");
-        dir_stamp->down_box(FL_DOWN_BOX);
-        dir_stamp->callback((Fl_Callback*)cb_dir_stamp);
-      } // Fl_Check_Button* dir_stamp
-      { title = new Fl_Input(75, 123, 120, 20);
-        title->tooltip("Can include %s specifiers: first will become filename and second the Z axis u\
+      { Fl_Check_Button* o = yaxis_label = new Fl_Check_Button(20, 48, 105, 15, "Y axis label");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_yaxis_label);
+      }
+      { Fl_Check_Button* o = xaxis_label = new Fl_Check_Button(20, 28, 105, 15, "X axis label");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_xaxis_label);
+      }
+      { Fl_Check_Button* o = dir_stamp = new Fl_Check_Button(20, 88, 135, 15, "Directory stamp");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_dir_stamp);
+      }
+      { Fl_Input* o = title = new Fl_Input(75, 123, 120, 20);
+        o->tooltip("Can include %s specifiers: first will become filename and second the Z axis u\
 nit");
-      } // Fl_Input* title
-      { do_title = new Fl_Check_Button(20, 124, 55, 20, "Title:");
-        do_title->down_box(FL_DOWN_BOX);
-        do_title->callback((Fl_Callback*)cb_do_title);
-      } // Fl_Check_Button* do_title
-      { caxis_label = new Fl_Check_Button(20, 68, 150, 15, "Colobar axis label");
-        caxis_label->down_box(FL_DOWN_BOX);
-        caxis_label->callback((Fl_Callback*)cb_caxis_label);
-      } // Fl_Check_Button* caxis_label
-      { watermark = new Fl_Check_Button(20, 107, 135, 15, "Watermark");
-        watermark->down_box(FL_DOWN_BOX);
-      } // Fl_Check_Button* watermark
+      }
+      { Fl_Check_Button* o = do_title = new Fl_Check_Button(20, 124, 55, 20, "Title:");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_do_title);
+      }
+      { Fl_Check_Button* o = caxis_label = new Fl_Check_Button(20, 68, 150, 15, "Colobar axis label");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_caxis_label);
+      }
+      { Fl_Check_Button* o = watermark = new Fl_Check_Button(20, 107, 135, 15, "Watermark");
+        o->down_box(FL_DOWN_BOX);
+      }
       o->end();
       Fl_Group::current()->resizable(o);
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(215, 25, 190, 120, "Page Settings");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
       { Fl_Group* o = new Fl_Group(220, 30, 160, 85);
-        { paper_eps = new Fl_Round_Button(225, 35, 130, 15, "EPS");
-          paper_eps->type(102);
-          paper_eps->down_box(FL_ROUND_DOWN_BOX);
-          paper_eps->value(1);
-          paper_eps->callback((Fl_Callback*)cb_paper_eps);
-        } // Fl_Round_Button* paper_eps
-        { paper_letter = new Fl_Round_Button(225, 55, 130, 15, "Letter (8.5x11)");
-          paper_letter->type(102);
-          paper_letter->down_box(FL_ROUND_DOWN_BOX);
-          paper_letter->callback((Fl_Callback*)cb_paper_letter);
-        } // Fl_Round_Button* paper_letter
-        { paper_a4 = new Fl_Round_Button(225, 75, 130, 15, "A4 (8.3x11.7)");
-          paper_a4->type(102);
-          paper_a4->down_box(FL_ROUND_DOWN_BOX);
-          paper_a4->callback((Fl_Callback*)cb_paper_a4);
-        } // Fl_Round_Button* paper_a4
+        { Fl_Round_Button* o = paper_eps = new Fl_Round_Button(225, 35, 130, 15, "EPS");
+          o->type(102);
+          o->down_box(FL_ROUND_DOWN_BOX);
+          o->value(1);
+          o->callback((Fl_Callback*)cb_paper_eps);
+        }
+        { Fl_Round_Button* o = paper_letter = new Fl_Round_Button(225, 55, 130, 15, "Letter (8.5x11)");
+          o->type(102);
+          o->down_box(FL_ROUND_DOWN_BOX);
+          o->callback((Fl_Callback*)cb_paper_letter);
+        }
+        { Fl_Round_Button* o = paper_a4 = new Fl_Round_Button(225, 75, 130, 15, "A4 (8.3x11.7)");
+          o->type(102);
+          o->down_box(FL_ROUND_DOWN_BOX);
+          o->callback((Fl_Callback*)cb_paper_a4);
+        }
         o->end();
-      } // Fl_Group* o
-      { landscape = new Fl_Check_Button(225, 95, 130, 15, "Landscape");
-        landscape->down_box(FL_DOWN_BOX);
-        landscape->value(1);
-        landscape->callback((Fl_Callback*)cb_landscape);
-      } // Fl_Check_Button* landscape
-      { plotLineCut = new Fl_Check_Button(220, 115, 75, 25, "Linecut");
-        plotLineCut->tooltip("Draw the location of the linecut");
-        plotLineCut->down_box(FL_DOWN_BOX);
-        plotLineCut->callback((Fl_Callback*)cb_plotLineCut);
-      } // Fl_Check_Button* plotLineCut
-      { plotLines = new Fl_Check_Button(295, 115, 75, 25, "Lines");
-        plotLines->tooltip("Plot the lines drawn with the linedraw extension");
-        plotLines->down_box(FL_DOWN_BOX);
-        plotLines->callback((Fl_Callback*)cb_plotLines);
-      } // Fl_Check_Button* plotLines
-      { plotZoomBox = new Fl_Check_Button(355, 115, 40, 25, "ZB");
-        plotZoomBox->tooltip("Plot the lines drawn with the linedraw extension");
-        plotZoomBox->down_box(FL_DOWN_BOX);
-        plotZoomBox->callback((Fl_Callback*)cb_plotZoomBox);
-      } // Fl_Check_Button* plotZoomBox
+      }
+      { Fl_Check_Button* o = landscape = new Fl_Check_Button(225, 95, 130, 15, "Landscape");
+        o->down_box(FL_DOWN_BOX);
+        o->value(1);
+        o->callback((Fl_Callback*)cb_landscape);
+      }
+      { Fl_Check_Button* o = plotLineCut = new Fl_Check_Button(220, 115, 75, 25, "Linecut");
+        o->tooltip("Draw the location of the linecut");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_plotLineCut);
+      }
+      { Fl_Check_Button* o = plotLines = new Fl_Check_Button(295, 115, 75, 25, "Lines");
+        o->tooltip("Plot the lines drawn with the linedraw extension");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_plotLines);
+      }
+      { Fl_Check_Button* o = plotZoomBox = new Fl_Check_Button(355, 115, 40, 25, "ZB");
+        o->tooltip("Plot the lines drawn with the linedraw extension");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_plotZoomBox);
+      }
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(10, 170, 190, 160, "Position (inches)");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { width = new Fl_Input(85, 180, 105, 20, "Width");
-        width->type(1);
-        width->callback((Fl_Callback*)cb_width);
-      } // Fl_Input* width
-      { height = new Fl_Input(85, 205, 105, 20, "Height");
-        height->type(1);
-        height->callback((Fl_Callback*)cb_height);
-      } // Fl_Input* height
-      { xoff = new Fl_Input(85, 230, 105, 20, "X Offset");
-        xoff->type(1);
-        xoff->callback((Fl_Callback*)cb_xoff);
-      } // Fl_Input* xoff
-      { yoff = new Fl_Input(85, 255, 105, 20, "Y Offset");
-        yoff->type(1);
-        yoff->callback((Fl_Callback*)cb_yoff);
-      } // Fl_Input* yoff
-      { center_x = new Fl_Button(25, 280, 75, 20, "Center X");
-        center_x->callback((Fl_Callback*)cb_center_x);
-      } // Fl_Button* center_x
+      { Fl_Input* o = width = new Fl_Input(85, 180, 105, 20, "Width");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_width);
+      }
+      { Fl_Input* o = height = new Fl_Input(85, 205, 105, 20, "Height");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_height);
+      }
+      { Fl_Input* o = xoff = new Fl_Input(85, 230, 105, 20, "X Offset");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_xoff);
+      }
+      { Fl_Input* o = yoff = new Fl_Input(85, 255, 105, 20, "Y Offset");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_yoff);
+      }
+      { Fl_Button* o = center_x = new Fl_Button(25, 280, 75, 20, "Center X");
+        o->callback((Fl_Callback*)cb_center_x);
+      }
       { Fl_Button* o = new Fl_Button(116, 303, 22, 22);
         o->tooltip("Set the size give same AR as the current spyview window by changing width");
         o->image(image_up);
         o->labelsize(10);
         o->callback((Fl_Callback*)cb_);
-      } // Fl_Button* o
-      { center_y = new Fl_Button(115, 280, 75, 20, "Center Y");
-        center_y->callback((Fl_Callback*)cb_center_y);
-      } // Fl_Button* center_y
+      }
+      { Fl_Button* o = center_y = new Fl_Button(115, 280, 75, 20, "Center Y");
+        o->callback((Fl_Callback*)cb_center_y);
+      }
       { Fl_Button* o = new Fl_Button(142, 303, 22, 22);
         o->tooltip("Set the size give same AR as the current spyview window by changing width");
         o->image(image_vertical);
         o->labelsize(10);
         o->callback((Fl_Callback*)cb_1);
-      } // Fl_Button* o
+      }
       { Fl_Button* o = new Fl_Button(168, 303, 22, 22);
         o->tooltip("Set the size give same AR as the current spyview window by changing width");
         o->image(image_down);
         o->labelsize(10);
         o->callback((Fl_Callback*)cb_2);
-      } // Fl_Button* o
+      }
       { Fl_Button* o = new Fl_Button(78, 303, 22, 22);
         o->tooltip("Set the size give same AR as the current spyview window by changing width");
         o->image(image_right);
         o->labelsize(10);
         o->callback((Fl_Callback*)cb_3);
-      } // Fl_Button* o
+      }
       { Fl_Button* o = new Fl_Button(52, 303, 22, 22);
         o->tooltip("Set the size give same AR as the current spyview window by changing width");
         o->image(image_horizontal);
         o->labelsize(10);
         o->callback((Fl_Callback*)cb_4);
-      } // Fl_Button* o
+      }
       { Fl_Button* o = new Fl_Button(26, 303, 22, 22);
         o->tooltip("Set the size give same AR as the current spyview window by changing width");
         o->image(image_left);
         o->labelsize(10);
         o->callback((Fl_Callback*)cb_5);
-      } // Fl_Button* o
+      }
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(215, 170, 190, 160, "Ticks");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { ticklength = new Fl_Input(295, 180, 105, 20, "Tick Len(\")");
-        ticklength->tooltip("Tick length, in inches.  Set to zero for no ticks.");
-        ticklength->type(1);
-        ticklength->callback((Fl_Callback*)cb_ticklength);
-      } // Fl_Input* ticklength
-      { xspacing = new Fl_Input(295, 205, 105, 20, "X Spacing");
-        xspacing->tooltip("X Tickmark spacing.  Set to 0 for auto.");
-        xspacing->type(1);
-        xspacing->callback((Fl_Callback*)cb_xspacing);
-      } // Fl_Input* xspacing
-      { yspacing = new Fl_Input(295, 230, 105, 20, "Y Spacing");
-        yspacing->tooltip("Y Tickmark Spacing.  Set to 0 for auto.");
-        yspacing->type(1);
-        yspacing->callback((Fl_Callback*)cb_yspacing);
-      } // Fl_Input* yspacing
-      { xscale = new Fl_Input(295, 255, 105, 20, "X Scale");
-        xscale->tooltip("Scale factor for X Axis");
-        xscale->type(1);
-        xscale->callback((Fl_Callback*)cb_xscale);
-      } // Fl_Input* xscale
-      { yscale = new Fl_Input(295, 280, 105, 20, "Y Scale");
-        yscale->tooltip("Scale factor for Y Axis");
-        yscale->type(1);
-        yscale->callback((Fl_Callback*)cb_yscale);
-      } // Fl_Input* yscale
-      { precise_ticks = new Fl_Check_Button(225, 305, 70, 15, "Precise");
-        precise_ticks->tooltip("Align tick marks precisely to the pixels rather than aligning them to the fra\
+      { Fl_Input* o = ticklength = new Fl_Input(295, 180, 105, 20, "Tick Len(\")");
+        o->tooltip("Tick length, in inches.  Set to zero for no ticks.");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_ticklength);
+      }
+      { Fl_Input* o = xspacing = new Fl_Input(295, 205, 105, 20, "X Spacing");
+        o->tooltip("X Tickmark spacing.  Set to 0 for auto.");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_xspacing);
+      }
+      { Fl_Input* o = yspacing = new Fl_Input(295, 230, 105, 20, "Y Spacing");
+        o->tooltip("Y Tickmark Spacing.  Set to 0 for auto.");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_yspacing);
+      }
+      { Fl_Input* o = xscale = new Fl_Input(295, 255, 105, 20, "X Scale");
+        o->tooltip("Scale factor for X Axis");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_xscale);
+      }
+      { Fl_Input* o = yscale = new Fl_Input(295, 280, 105, 20, "Y Scale");
+        o->tooltip("Scale factor for Y Axis");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_yscale);
+      }
+      { Fl_Check_Button* o = precise_ticks = new Fl_Check_Button(225, 305, 70, 15, "Precise");
+        o->tooltip("Align tick marks precisely to the pixels rather than aligning them to the fra\
 me");
-        precise_ticks->down_box(FL_DOWN_BOX);
-        precise_ticks->value(1);
-        precise_ticks->callback((Fl_Callback*)cb_precise_ticks);
-      } // Fl_Check_Button* precise_ticks
-      { fancy_ticks = new Fl_Check_Button(300, 305, 70, 15, "Fancy");
-        fancy_ticks->tooltip("Align tick marks precisely to the pixels rather than aligning them to the fra\
+        o->down_box(FL_DOWN_BOX);
+        o->value(1);
+        o->callback((Fl_Callback*)cb_precise_ticks);
+      }
+      { Fl_Check_Button* o = fancy_ticks = new Fl_Check_Button(300, 305, 70, 15, "Fancy");
+        o->tooltip("Align tick marks precisely to the pixels rather than aligning them to the fra\
 me");
-        fancy_ticks->down_box(FL_DOWN_BOX);
-        fancy_ticks->callback((Fl_Callback*)cb_fancy_ticks);
-      } // Fl_Check_Button* fancy_ticks
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_fancy_ticks);
+      }
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(10, 355, 190, 65, "Font");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { face = new Fl_Input(85, 365, 105, 20, "Face");
-        face->callback((Fl_Callback*)cb_face);
-      } // Fl_Input* face
-      { fontsize = new Fl_Input(85, 390, 105, 20, "Size (pts)");
-        fontsize->type(1);
-        fontsize->callback((Fl_Callback*)cb_fontsize);
-      } // Fl_Input* fontsize
+      { Fl_Input* o = face = new Fl_Input(85, 365, 105, 20, "Face");
+        o->callback((Fl_Callback*)cb_face);
+      }
+      { Fl_Input* o = fontsize = new Fl_Input(85, 390, 105, 20, "Size (pts)");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_fontsize);
+      }
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(215, 355, 190, 65, "Lines Widths (pts)");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { boxwidth = new Fl_Input(295, 365, 105, 20, "Box");
-        boxwidth->tooltip("Set the line width, in points, for the box around the plot");
-        boxwidth->type(1);
-        boxwidth->callback((Fl_Callback*)cb_boxwidth);
-      } // Fl_Input* boxwidth
-      { tickwidth = new Fl_Input(295, 390, 105, 20, "Ticks");
-        tickwidth->tooltip("Set the line width, in points, for the tick marks on the plot.");
-        tickwidth->type(1);
-        tickwidth->callback((Fl_Callback*)cb_tickwidth);
-      } // Fl_Input* tickwidth
+      { Fl_Input* o = boxwidth = new Fl_Input(295, 365, 105, 20, "Box");
+        o->tooltip("Set the line width, in points, for the box around the plot");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_boxwidth);
+      }
+      { Fl_Input* o = tickwidth = new Fl_Input(295, 390, 105, 20, "Ticks");
+        o->tooltip("Set the line width, in points, for the tick marks on the plot.");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_tickwidth);
+      }
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(10, 445, 190, 105, "Tick Formats");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { xticfmt = new Fl_Input(110, 455, 80, 20, "X Format");
-        xticfmt->tooltip("X Tick format, as for printf.\neN = engineering, N digits\nsN = scientific, N\
+      { Fl_Input* o = xticfmt = new Fl_Input(110, 455, 80, 20, "X Format");
+        o->tooltip("X Tick format, as for printf.\neN = engineering, N digits\nsN = scientific, N\
  digits\n0 = no tic labels\nblank = no tics or labels.");
-        xticfmt->callback((Fl_Callback*)cb_xticfmt);
-      } // Fl_Input* xticfmt
-      { yticfmt = new Fl_Input(110, 480, 80, 20, "Y Format");
-        yticfmt->tooltip("Y Tick format, as for printf.\neN = engineering, N digits\nsN = scientific, N\
+        o->callback((Fl_Callback*)cb_xticfmt);
+      }
+      { Fl_Input* o = yticfmt = new Fl_Input(110, 480, 80, 20, "Y Format");
+        o->tooltip("Y Tick format, as for printf.\neN = engineering, N digits\nsN = scientific, N\
  digits\n0 = no tic labels\nblank = no tics or labels.");
-        yticfmt->callback((Fl_Callback*)cb_yticfmt);
-      } // Fl_Input* yticfmt
-      { cticfmt = new Fl_Input(110, 505, 80, 20, "CBar Format");
-        cticfmt->tooltip("Colorbar tic format, as for printf.\neN = engineering, N digits\nsN = scienti\
+        o->callback((Fl_Callback*)cb_yticfmt);
+      }
+      { Fl_Input* o = cticfmt = new Fl_Input(110, 505, 80, 20, "CBar Format");
+        o->tooltip("Colorbar tic format, as for printf.\neN = engineering, N digits\nsN = scienti\
 fic, N digits\n0 = no tic labels\nblank = no tics or labels.");
-        cticfmt->callback((Fl_Callback*)cb_cticfmt);
-      } // Fl_Input* cticfmt
+        o->callback((Fl_Callback*)cb_cticfmt);
+      }
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(215, 445, 190, 105, "Colorbar");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { colorbar = new Fl_Check_Button(225, 505, 70, 15, "Draw");
-        colorbar->tooltip("Enable drawing the colorbar on the output plot.");
-        colorbar->down_box(FL_DOWN_BOX);
-        colorbar->callback((Fl_Callback*)cb_colorbar);
-      } // Fl_Check_Button* colorbar
-      { cbar_height_per = new Fl_Value_Input(295, 480, 105, 20, "Height (%)");
-        cbar_height_per->tooltip("Height in percent of the plot");
-        cbar_height_per->maximum(100);
-        cbar_height_per->value(75);
-        cbar_height_per->callback((Fl_Callback*)cb_cbar_height_per);
-      } // Fl_Value_Input* cbar_height_per
-      { cbar_width = new Fl_Value_Input(295, 455, 105, 20, "Width (\")");
-        cbar_width->tooltip("Width of colobar in inches");
-        cbar_width->maximum(0);
-        cbar_width->value(0.4);
-        cbar_width->callback((Fl_Callback*)cb_cbar_width);
-      } // Fl_Value_Input* cbar_width
+      { Fl_Check_Button* o = colorbar = new Fl_Check_Button(225, 505, 70, 15, "Draw");
+        o->tooltip("Enable drawing the colorbar on the output plot.");
+        o->down_box(FL_DOWN_BOX);
+        o->callback((Fl_Callback*)cb_colorbar);
+      }
+      { Fl_Value_Input* o = cbar_height_per = new Fl_Value_Input(295, 480, 105, 20, "Height (%)");
+        o->tooltip("Height in percent of the plot");
+        o->maximum(100);
+        o->value(75);
+        o->callback((Fl_Callback*)cb_cbar_height_per);
+      }
+      { Fl_Value_Input* o = cbar_width = new Fl_Value_Input(295, 455, 105, 20, "Width (\")");
+        o->tooltip("Width of colobar in inches");
+        o->maximum(0);
+        o->value(0.4);
+        o->callback((Fl_Callback*)cb_cbar_width);
+      }
       { Fl_Button* o = new Fl_Button(265, 525, 130, 20, "More Options...");
         o->callback((Fl_Callback*)cb_More);
-      } // Fl_Button* o
-      { rotate_cbar = new Fl_Check_Button(295, 505, 70, 15, "Rotated");
-        rotate_cbar->down_box(FL_DOWN_BOX);
-        rotate_cbar->deactivate();
-      } // Fl_Check_Button* rotate_cbar
+      }
+      { Fl_Check_Button* o = rotate_cbar = new Fl_Check_Button(295, 505, 70, 15, "Rotated");
+        o->down_box(FL_DOWN_BOX);
+        o->deactivate();
+      }
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(10, 575, 190, 85, "Settings");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
       { Fl_Button* o = new Fl_Button(20, 582, 85, 20, "Load Default");
         o->labelsize(11);
         o->callback((Fl_Callback*)cb_Load);
-      } // Fl_Button* o
+      }
       { Fl_Button* o = new Fl_Button(20, 609, 85, 20, "Save Default");
         o->labelsize(11);
         o->callback((Fl_Callback*)cb_Save);
-      } // Fl_Button* o
+      }
       { Fl_Button* o = new Fl_Button(110, 582, 80, 20, "Load...");
+        o->tooltip("Hold down shift to load from current directory");
         o->labelsize(11);
         o->callback((Fl_Callback*)cb_Load1);
-      } // Fl_Button* o
+      }
       { Fl_Button* o = new Fl_Button(110, 609, 80, 20, "Save...");
+        o->tooltip("Hold down shift to load from current directory");
         o->labelsize(11);
         o->callback((Fl_Callback*)cb_Save1);
-      } // Fl_Button* o
+      }
       { Fl_Button* o = new Fl_Button(20, 635, 170, 20, "Preview && Formats....");
         o->labelsize(12);
         o->callback((Fl_Callback*)cb_Preview);
-      } // Fl_Button* o
+      }
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Button* o = new Fl_Button(10, 695, 85, 25, "Generate");
       o->tooltip("Generate the PS output file");
       o->callback((Fl_Callback*)cb_Generate);
       o->when(FL_WHEN_RELEASE_ALWAYS);
-    } // Fl_Button* o
-    { preview_button = new Fl_Button(100, 695, 105, 25, "Open Preview");
-      preview_button->tooltip("Preview the generated PS file");
-      preview_button->callback((Fl_Callback*)cb_preview_button);
-      preview_button->when(FL_WHEN_RELEASE_ALWAYS);
-    } // Fl_Button* preview_button
-    { live = new Fl_Button(210, 695, 95, 25, "Live Preview");
-      live->tooltip("Open up a \"Live Preview\" window");
-      live->callback((Fl_Callback*)cb_live);
-    } // Fl_Button* live
+    }
+    { Fl_Button* o = preview_button = new Fl_Button(100, 695, 105, 25, "Open Preview");
+      o->tooltip("Preview the generated PS file");
+      o->callback((Fl_Callback*)cb_preview_button);
+      o->when(FL_WHEN_RELEASE_ALWAYS);
+    }
+    { Fl_Button* o = live = new Fl_Button(210, 695, 95, 25, "Live Preview");
+      o->tooltip("Open up a \"Live Preview\" window");
+      o->callback((Fl_Callback*)cb_live);
+    }
     { Fl_Button* o = new Fl_Button(310, 695, 95, 25, "Dismiss");
       o->callback((Fl_Callback*)cb_Dismiss);
-    } // Fl_Button* o
+    }
     { Fl_Group* o = new Fl_Group(215, 575, 190, 85, "Plot Range");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { xrange = new Fl_Input(240, 612, 160, 20, "X");
-        xrange->tooltip("xleft,xright (note: will not flip data!)");
-        xrange->callback((Fl_Callback*)cb_xrange);
-      } // Fl_Input* xrange
-      { yrange = new Fl_Input(240, 632, 160, 20, "Y");
-        yrange->tooltip("ybottom,ytop (note: will not flip data!)");
-        yrange->callback((Fl_Callback*)cb_yrange);
-      } // Fl_Input* yrange
-      { plotRange = new Fl_Choice(280, 582, 120, 25, "Range");
-        plotRange->tooltip("Select how data range is chosen");
-        plotRange->down_box(FL_BORDER_BOX);
-        plotRange->callback((Fl_Callback*)cb_plotRange);
-        plotRange->menu(menu_plotRange);
-      } // Fl_Choice* plotRange
+      { Fl_Input* o = xrange = new Fl_Input(240, 612, 160, 20, "X");
+        o->tooltip("xleft,xright (note: will not flip data!)");
+        o->callback((Fl_Callback*)cb_xrange);
+      }
+      { Fl_Input* o = yrange = new Fl_Input(240, 632, 160, 20, "Y");
+        o->tooltip("ybottom,ytop (note: will not flip data!)");
+        o->callback((Fl_Callback*)cb_yrange);
+      }
+      { Fl_Choice* o = plotRange = new Fl_Choice(280, 582, 120, 25, "Range");
+        o->tooltip("Select how data range is chosen");
+        o->down_box(FL_BORDER_BOX);
+        o->callback((Fl_Callback*)cb_plotRange);
+        o->menu(menu_plotRange);
+      }
       o->end();
-    } // Fl_Group* o
-    { increment = new Fl_Check_Button(142, 667, 45, 22, "Inc");
-      increment->tooltip("Increment number after each print");
-      increment->down_box(FL_DOWN_BOX);
-    } // Fl_Check_Button* increment
+    }
+    { Fl_Check_Button* o = increment = new Fl_Check_Button(142, 667, 45, 22, "Inc");
+      o->tooltip("Increment number after each print");
+      o->down_box(FL_DOWN_BOX);
+    }
     { Fl_Button* o = new Fl_Button(330, 665, 74, 25, "Colors");
       o->callback((Fl_Callback*)cb_Colors);
-    } // Fl_Button* o
-    { auto_inc = new Fl_Check_Button(182, 671, 55, 15, "Auto");
-      auto_inc->tooltip("Automatically pick next number so as not to overwrite an existing file");
-      auto_inc->down_box(FL_DOWN_BOX);
-      auto_inc->callback((Fl_Callback*)cb_auto_inc);
-    } // Fl_Check_Button* auto_inc
-    { incnum = new Fl_Counter(94, 670, 40, 18);
-      incnum->tooltip("Number used for next file");
-      incnum->type(1);
-      incnum->box(FL_THIN_UP_BOX);
-      incnum->step(1);
-      incnum->align(FL_ALIGN_LEFT);
-    } // Fl_Counter* incnum
-    { format = new Fl_Choice(255, 665, 65, 25, "Format");
-      format->down_box(FL_BORDER_BOX);
-      format->hide();
-      format->menu(menu_format);
-    } // Fl_Choice* format
-    { do_number = new Fl_Check_Button(10, 667, 80, 22, "Number:");
-      do_number->tooltip("Append a number to each file name when printing");
-      do_number->down_box(FL_DOWN_BOX);
-    } // Fl_Check_Button* do_number
-    win->end();
-  } // Fl_Double_Window* win
-  { win2 = new Fl_Double_Window(375, 225, "Preview and formats");
-    win2->user_data((void*)(this));
+    }
+    { Fl_Check_Button* o = auto_inc = new Fl_Check_Button(182, 671, 55, 15, "Auto");
+      o->tooltip("Automatically pick next number so as not to overwrite an existing file");
+      o->down_box(FL_DOWN_BOX);
+      o->callback((Fl_Callback*)cb_auto_inc);
+    }
+    { Fl_Counter* o = incnum = new Fl_Counter(94, 670, 40, 18);
+      o->tooltip("Number used for next file");
+      o->type(1);
+      o->box(FL_THIN_UP_BOX);
+      o->step(1);
+      o->align(FL_ALIGN_LEFT);
+    }
+    { Fl_Choice* o = format = new Fl_Choice(255, 665, 65, 25, "Format");
+      o->down_box(FL_BORDER_BOX);
+      o->hide();
+      o->menu(menu_format);
+    }
+    { Fl_Check_Button* o = do_number = new Fl_Check_Button(10, 667, 80, 22, "Number:");
+      o->tooltip("Append a number to each file name when printing");
+      o->down_box(FL_DOWN_BOX);
+    }
+    o->end();
+  }
+  { Fl_Double_Window* o = win2 = new Fl_Double_Window(375, 225, "Preview and formats");
+    w = o;
+    o->user_data((void*)(this));
     { Fl_Button* o = new Fl_Button(270, 198, 95, 22, "dismiss");
       o->callback((Fl_Callback*)cb_dismiss);
-    } // Fl_Button* o
-    { preview_cmd = new Fl_Input(10, 30, 285, 20, "Postscript preview command (eg. gv or gsview)");
-      preview_cmd->tooltip("postscript filename will be given as an argument");
-      preview_cmd->textsize(12);
-      preview_cmd->align(FL_ALIGN_TOP_LEFT);
-    } // Fl_Input* preview_cmd
-    { gs_cmd = new Fl_Input(10, 75, 285, 20, "Ghostscript program:");
-      gs_cmd->tooltip("how to execute ghostscript (needed for PDF and PNG formats)");
-      gs_cmd->textsize(12);
-      gs_cmd->align(FL_ALIGN_TOP_LEFT);
-    } // Fl_Input* gs_cmd
+    }
+    { Fl_Input* o = preview_cmd = new Fl_Input(10, 30, 285, 20, "Postscript preview command (eg. gv or gsview)");
+      o->tooltip("postscript filename will be given as an argument");
+      o->textsize(12);
+      o->align(FL_ALIGN_TOP_LEFT);
+    }
+    { Fl_Input* o = gs_cmd = new Fl_Input(10, 75, 285, 20, "Ghostscript program:");
+      o->tooltip("how to execute ghostscript (needed for PDF and PNG formats)");
+      o->textsize(12);
+      o->align(FL_ALIGN_TOP_LEFT);
+    }
     { Fl_Button* o = new Fl_Button(295, 75, 70, 20, "Browse...");
       o->labelsize(12);
       o->callback((Fl_Callback*)cb_Browse);
-    } // Fl_Button* o
-    { extra_png = new Fl_Check_Button(21, 157, 70, 15, "PNG ");
-      extra_png->down_box(FL_DOWN_BOX);
-    } // Fl_Check_Button* extra_png
-    { extra_pdf = new Fl_Check_Button(21, 135, 70, 15, "PDF");
-      extra_pdf->down_box(FL_DOWN_BOX);
-    } // Fl_Check_Button* extra_pdf
-    { png_dpi = new Fl_Input(102, 155, 77, 20, "dpi");
-      png_dpi->tooltip("[basename].ps will be given as an argument");
-      png_dpi->labelsize(12);
-      png_dpi->textsize(12);
-      Fl_Group::current()->resizable(png_dpi);
-    } // Fl_Input* png_dpi
+    }
+    { Fl_Check_Button* o = extra_png = new Fl_Check_Button(21, 157, 70, 15, "PNG ");
+      o->down_box(FL_DOWN_BOX);
+    }
+    { Fl_Check_Button* o = extra_pdf = new Fl_Check_Button(21, 135, 70, 15, "PDF");
+      o->down_box(FL_DOWN_BOX);
+    }
+    { Fl_Input* o = png_dpi = new Fl_Input(102, 155, 77, 20, "dpi");
+      o->tooltip("[basename].ps will be given as an argument");
+      o->labelsize(12);
+      o->textsize(12);
+      Fl_Group::current()->resizable(o);
+    }
     { Fl_Box* o = new Fl_Box(10, 108, 31, 17, "Also generate the following formats:");
       o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
-    } // Fl_Box* o
+    }
     { Fl_Button* o = new Fl_Button(295, 30, 70, 20, "Browse...");
       o->labelsize(12);
       o->callback((Fl_Callback*)cb_Browse1);
-    } // Fl_Button* o
+    }
     { Fl_Button* o = new Fl_Button(270, 174, 45, 20, "save");
       o->tooltip("Save default preview & format settings");
       o->callback((Fl_Callback*)cb_save);
-    } // Fl_Button* o
+    }
     { Fl_Button* o = new Fl_Button(320, 174, 45, 20, "load");
       o->tooltip("Load default preview & format settings");
       o->callback((Fl_Callback*)cb_load);
-    } // Fl_Button* o
-    { cmyk = new Fl_Check_Button(78, 135, 70, 15, "use CMYK in PDF");
-      cmyk->down_box(FL_DOWN_BOX);
-    } // Fl_Check_Button* cmyk
-    { extra_svs = new Fl_Check_Button(21, 179, 70, 15, "Spyview Settings");
-      extra_svs->down_box(FL_DOWN_BOX);
-      extra_svs->value(1);
-    } // Fl_Check_Button* extra_svs
-    { extra_set = new Fl_Check_Button(21, 199, 70, 15, "Print Settings");
-      extra_set->down_box(FL_DOWN_BOX);
-      extra_set->value(1);
-    } // Fl_Check_Button* extra_set
-    win2->end();
-  } // Fl_Double_Window* win2
+    }
+    { Fl_Check_Button* o = cmyk = new Fl_Check_Button(78, 135, 70, 15, "use CMYK in PDF");
+      o->down_box(FL_DOWN_BOX);
+    }
+    { Fl_Check_Button* o = extra_svs = new Fl_Check_Button(21, 179, 70, 15, "Spyview Settings");
+      o->down_box(FL_DOWN_BOX);
+      o->value(1);
+    }
+    { Fl_Check_Button* o = extra_set = new Fl_Check_Button(21, 199, 70, 15, "Print Settings");
+      o->down_box(FL_DOWN_BOX);
+      o->value(1);
+    }
+    o->end();
+  }
   #ifdef WIN32
 live->deactivate();
 #endif
-  { win3 = new Fl_Double_Window(235, 310, "Colorbar options");
-    win3->user_data((void*)(this));
+  { Fl_Double_Window* o = win3 = new Fl_Double_Window(235, 310, "Colorbar options");
+    w = o;
+    o->user_data((void*)(this));
     { Fl_Group* o = new Fl_Group(10, 25, 215, 65, "Extra Colorbar Options");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { zscale = new Fl_Input(110, 35, 105, 20, "Z Scale");
-        zscale->tooltip("Scale factor for Z Axis");
-        zscale->type(1);
-        zscale->callback((Fl_Callback*)cb_zscale);
-      } // Fl_Input* zscale
-      { cspacing = new Fl_Value_Input(110, 60, 105, 20, "Z spacing");
-      } // Fl_Value_Input* cspacing
+      { Fl_Input* o = zscale = new Fl_Input(110, 35, 105, 20, "Z Scale");
+        o->tooltip("Scale factor for Z Axis");
+        o->type(1);
+        o->callback((Fl_Callback*)cb_zscale);
+      }
+      cspacing = new Fl_Value_Input(110, 60, 105, 20, "Z spacing");
       o->end();
-    } // Fl_Group* o
+    }
     { Fl_Group* o = new Fl_Group(10, 120, 215, 150, "Linear Colormap");
       o->box(FL_DOWN_BOX);
       o->align(FL_ALIGN_TOP_LEFT);
-      { linear_cmap = new Fl_Check_Button(20, 135, 70, 15, "Enable linear colorscale");
-        linear_cmap->tooltip("Plot the color on a linear scale with a non-linear data value spacing");
-        linear_cmap->down_box(FL_DOWN_BOX);
-      } // Fl_Check_Button* linear_cmap
+      { Fl_Check_Button* o = linear_cmap = new Fl_Check_Button(20, 135, 70, 15, "Enable linear colorscale");
+        o->tooltip("Plot the color on a linear scale with a non-linear data value spacing");
+        o->down_box(FL_DOWN_BOX);
+      }
       o->end();
-    } // Fl_Group* o
-    { cmin = new Fl_Value_Input(115, 160, 100, 20, "Color min:");
-      cmin->tooltip("Color index to start at (0.0 to 1.0)");
-    } // Fl_Value_Input* cmin
-    { cmax = new Fl_Value_Input(115, 185, 100, 20, "Color max:");
-      cmax->tooltip("Color index to end at (0.0 to 1.0)");
-      cmax->value(1);
-    } // Fl_Value_Input* cmax
-    { cbegin = new Fl_Value_Input(115, 210, 100, 20, "Definitive label:");
-      cbegin->tooltip("Pick one data value that we should try to have on the labels for sure (for ex\
+    }
+    { Fl_Value_Input* o = cmin = new Fl_Value_Input(115, 160, 100, 20, "Color min:");
+      o->tooltip("Color index to start at (0.0 to 1.0)");
+    }
+    { Fl_Value_Input* o = cmax = new Fl_Value_Input(115, 185, 100, 20, "Color max:");
+      o->tooltip("Color index to end at (0.0 to 1.0)");
+      o->value(1);
+    }
+    { Fl_Value_Input* o = cbegin = new Fl_Value_Input(115, 210, 100, 20, "Definitive label:");
+      o->tooltip("Pick one data value that we should try to have on the labels for sure (for ex\
 ample, 0)");
-      cbegin->labelsize(12);
-    } // Fl_Value_Input* cbegin
-    { clabelspacing = new Fl_Value_Input(115, 235, 100, 20, "LabelSpacing:");
-      clabelspacing->labelsize(12);
-      clabelspacing->value(0.1);
-    } // Fl_Value_Input* clabelspacing
+      o->labelsize(12);
+    }
+    { Fl_Value_Input* o = clabelspacing = new Fl_Value_Input(115, 235, 100, 20, "LabelSpacing:");
+      o->labelsize(12);
+      o->value(0.1);
+    }
     { Fl_Button* o = new Fl_Button(10, 280, 215, 20, "Dismiss");
       o->callback((Fl_Callback*)cb_Dismiss1);
-    } // Fl_Button* o
-    win3->end();
-  } // Fl_Double_Window* win3
-  { pc = new Fl_Double_Window(415, 530, "Print Colors");
-    pc->user_data((void*)(this));
+    }
+    o->end();
+  }
+  { Fl_Double_Window* o = pc = new Fl_Double_Window(415, 530, "Print Colors");
+    w = o;
+    o->user_data((void*)(this));
     { Fl_Color_Chooser* o = text_color = new Fl_Color_Chooser(0, 20, 200, 95, "Text");
-      text_color->box(FL_DOWN_BOX);
-      text_color->color((Fl_Color)FL_BACKGROUND_COLOR);
-      text_color->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
-      text_color->labeltype(FL_NORMAL_LABEL);
-      text_color->labelfont(0);
-      text_color->labelsize(14);
-      text_color->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
-      text_color->callback((Fl_Callback*)cb_text_color);
-      text_color->align(FL_ALIGN_TOP);
-      text_color->when(FL_WHEN_RELEASE);
+      o->box(FL_DOWN_BOX);
+      o->color(FL_BACKGROUND_COLOR);
+      o->selection_color(FL_BACKGROUND_COLOR);
+      o->labeltype(FL_NORMAL_LABEL);
+      o->labelfont(0);
+      o->labelsize(14);
+      o->labelcolor(FL_FOREGROUND_COLOR);
+      o->callback((Fl_Callback*)cb_text_color);
+      o->align(FL_ALIGN_TOP);
+      o->when(FL_WHEN_RELEASE);
       o->rgb(0,0,0);
-      text_color->end();
-    } // Fl_Color_Chooser* text_color
+      o->end();
+    }
     { Fl_Color_Chooser* o = border_color = new Fl_Color_Chooser(210, 20, 200, 95, "Border");
-      border_color->box(FL_DOWN_BOX);
-      border_color->color((Fl_Color)FL_BACKGROUND_COLOR);
-      border_color->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
-      border_color->labeltype(FL_NORMAL_LABEL);
-      border_color->labelfont(0);
-      border_color->labelsize(14);
-      border_color->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
-      border_color->callback((Fl_Callback*)cb_border_color);
-      border_color->align(FL_ALIGN_TOP);
-      border_color->when(FL_WHEN_RELEASE);
+      o->box(FL_DOWN_BOX);
+      o->color(FL_BACKGROUND_COLOR);
+      o->selection_color(FL_BACKGROUND_COLOR);
+      o->labeltype(FL_NORMAL_LABEL);
+      o->labelfont(0);
+      o->labelsize(14);
+      o->labelcolor(FL_FOREGROUND_COLOR);
+      o->callback((Fl_Callback*)cb_border_color);
+      o->align(FL_ALIGN_TOP);
+      o->when(FL_WHEN_RELEASE);
       o->rgb(0,0,0);
-      border_color->end();
-    } // Fl_Color_Chooser* border_color
+      o->end();
+    }
     { Fl_Color_Chooser* o = large_tick_color = new Fl_Color_Chooser(0, 140, 200, 95, "Large Tick");
-      large_tick_color->box(FL_DOWN_BOX);
-      large_tick_color->color((Fl_Color)FL_BACKGROUND_COLOR);
-      large_tick_color->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
-      large_tick_color->labeltype(FL_NORMAL_LABEL);
-      large_tick_color->labelfont(0);
-      large_tick_color->labelsize(14);
-      large_tick_color->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
-      large_tick_color->callback((Fl_Callback*)cb_large_tick_color);
-      large_tick_color->align(FL_ALIGN_TOP);
-      large_tick_color->when(FL_WHEN_RELEASE);
+      o->box(FL_DOWN_BOX);
+      o->color(FL_BACKGROUND_COLOR);
+      o->selection_color(FL_BACKGROUND_COLOR);
+      o->labeltype(FL_NORMAL_LABEL);
+      o->labelfont(0);
+      o->labelsize(14);
+      o->labelcolor(FL_FOREGROUND_COLOR);
+      o->callback((Fl_Callback*)cb_large_tick_color);
+      o->align(FL_ALIGN_TOP);
+      o->when(FL_WHEN_RELEASE);
       o->rgb(1,1,1);
-      large_tick_color->end();
-    } // Fl_Color_Chooser* large_tick_color
+      o->end();
+    }
     { Fl_Color_Chooser* o = small_tick_color = new Fl_Color_Chooser(210, 140, 200, 95, "Small Tick");
-      small_tick_color->box(FL_DOWN_BOX);
-      small_tick_color->color((Fl_Color)FL_BACKGROUND_COLOR);
-      small_tick_color->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
-      small_tick_color->labeltype(FL_NORMAL_LABEL);
-      small_tick_color->labelfont(0);
-      small_tick_color->labelsize(14);
-      small_tick_color->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
-      small_tick_color->callback((Fl_Callback*)cb_small_tick_color);
-      small_tick_color->align(FL_ALIGN_TOP);
-      small_tick_color->when(FL_WHEN_RELEASE);
+      o->box(FL_DOWN_BOX);
+      o->color(FL_BACKGROUND_COLOR);
+      o->selection_color(FL_BACKGROUND_COLOR);
+      o->labeltype(FL_NORMAL_LABEL);
+      o->labelfont(0);
+      o->labelsize(14);
+      o->labelcolor(FL_FOREGROUND_COLOR);
+      o->callback((Fl_Callback*)cb_small_tick_color);
+      o->align(FL_ALIGN_TOP);
+      o->when(FL_WHEN_RELEASE);
       o->rgb(0,0,0);
-      small_tick_color->end();
-    } // Fl_Color_Chooser* small_tick_color
+      o->end();
+    }
     { Fl_Color_Chooser* o = linecut_color = new Fl_Color_Chooser(0, 265, 200, 95, "Linecut");
-      linecut_color->box(FL_DOWN_BOX);
-      linecut_color->color((Fl_Color)FL_BACKGROUND_COLOR);
-      linecut_color->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
-      linecut_color->labeltype(FL_NORMAL_LABEL);
-      linecut_color->labelfont(0);
-      linecut_color->labelsize(14);
-      linecut_color->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
-      linecut_color->callback((Fl_Callback*)cb_linecut_color);
-      linecut_color->align(FL_ALIGN_TOP);
-      linecut_color->when(FL_WHEN_RELEASE);
+      o->box(FL_DOWN_BOX);
+      o->color(FL_BACKGROUND_COLOR);
+      o->selection_color(FL_BACKGROUND_COLOR);
+      o->labeltype(FL_NORMAL_LABEL);
+      o->labelfont(0);
+      o->labelsize(14);
+      o->labelcolor(FL_FOREGROUND_COLOR);
+      o->callback((Fl_Callback*)cb_linecut_color);
+      o->align(FL_ALIGN_TOP);
+      o->when(FL_WHEN_RELEASE);
       o->rgb(1,0,0);
-      linecut_color->end();
-    } // Fl_Color_Chooser* linecut_color
+      o->end();
+    }
     { Fl_Color_Chooser* o = overlay_color = new Fl_Color_Chooser(215, 265, 200, 95, "Overlay Lines");
-      overlay_color->box(FL_DOWN_BOX);
-      overlay_color->color((Fl_Color)FL_BACKGROUND_COLOR);
-      overlay_color->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
-      overlay_color->labeltype(FL_NORMAL_LABEL);
-      overlay_color->labelfont(0);
-      overlay_color->labelsize(14);
-      overlay_color->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
-      overlay_color->callback((Fl_Callback*)cb_overlay_color);
-      overlay_color->align(FL_ALIGN_TOP);
-      overlay_color->when(FL_WHEN_RELEASE);
+      o->box(FL_DOWN_BOX);
+      o->color(FL_BACKGROUND_COLOR);
+      o->selection_color(FL_BACKGROUND_COLOR);
+      o->labeltype(FL_NORMAL_LABEL);
+      o->labelfont(0);
+      o->labelsize(14);
+      o->labelcolor(FL_FOREGROUND_COLOR);
+      o->callback((Fl_Callback*)cb_overlay_color);
+      o->align(FL_ALIGN_TOP);
+      o->when(FL_WHEN_RELEASE);
       o->rgb(0,0,1);
-      overlay_color->end();
-    } // Fl_Color_Chooser* overlay_color
+      o->end();
+    }
     { Fl_Button* o = new Fl_Button(0, 500, 415, 25, "Dismiss");
       o->callback((Fl_Callback*)cb_Dismiss2);
-    } // Fl_Button* o
+    }
     { Fl_Color_Chooser* o = zoombox_color = new Fl_Color_Chooser(0, 400, 200, 95, "Zoombox");
-      zoombox_color->box(FL_DOWN_BOX);
-      zoombox_color->color((Fl_Color)FL_BACKGROUND_COLOR);
-      zoombox_color->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
-      zoombox_color->labeltype(FL_NORMAL_LABEL);
-      zoombox_color->labelfont(0);
-      zoombox_color->labelsize(14);
-      zoombox_color->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
-      zoombox_color->callback((Fl_Callback*)cb_zoombox_color);
-      zoombox_color->align(FL_ALIGN_TOP);
-      zoombox_color->when(FL_WHEN_RELEASE);
+      o->box(FL_DOWN_BOX);
+      o->color(FL_BACKGROUND_COLOR);
+      o->selection_color(FL_BACKGROUND_COLOR);
+      o->labeltype(FL_NORMAL_LABEL);
+      o->labelfont(0);
+      o->labelsize(14);
+      o->labelcolor(FL_FOREGROUND_COLOR);
+      o->callback((Fl_Callback*)cb_zoombox_color);
+      o->align(FL_ALIGN_TOP);
+      o->when(FL_WHEN_RELEASE);
       o->rgb(0,1,0);
-      zoombox_color->end();
-    } // Fl_Color_Chooser* zoombox_color
-    pc->end();
-  } // Fl_Double_Window* pc
+      o->end();
+    }
+    o->end();
+  }
 }
index 51c9792105b3493c808085b56e3cc4b6673a73ff..34122d657d70b909115c9604df0cd9e65d4acc5c 100644 (file)
@@ -1,5 +1,5 @@
 # data file for the Fltk User Interface Designer (fluid)
-version 1.0109 
+version 1.0107 
 header_name {.h} 
 code_name {.cxx}
 decl {\#include "ImageWindow.H"} {} 
@@ -28,7 +28,7 @@ class Image_Printer_Control {open
     code {iw=iwp;} {}
     Fl_Window win {
       label {Spyview Postscript Controls}
-      xywh {795 166 415 730} type Double resizable visible
+      xywh {795 47 415 730} type Double resizable visible
     } {
       Fl_Group {} {
         label Text
@@ -339,17 +339,50 @@ else
         }
         Fl_Button {} {
           label {Load...}
-          callback {char *fname = fl_file_chooser("Load Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
-if(fname != NULL)
-  ip->loadPrintSettings(fname);}
-          xywh {110 582 80 20} labelsize 11
+          callback {if (Fl::event_state() & FL_SHIFT)
+{
+       Fl_File_Chooser chooser(".", 
+                       "(*.set)\\t",
+                       Fl_File_Chooser::CREATE,
+                       "Select files");
+       chooser.preview(0);
+       chooser.show();
+       while (chooser.shown()) Fl::wait();
+       if (chooser.value() == NULL) return;
+       ip->loadPrintSettings(chooser.value(1));
+}
+else
+{
+       char *fname = fl_file_chooser("Load Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
+       if(fname != NULL)
+               ip->loadPrintSettings(fname);
+}}
+          tooltip {Hold down shift to load from current directory} xywh {110 582 80 20} labelsize 11
         }
         Fl_Button {} {
           label {Save...}
-          callback {char *fname = fl_file_chooser("Save Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
+          callback {if (Fl::event_state() & FL_SHIFT)
+{
+       Fl_File_Chooser chooser(".", 
+                       "(*.set)\\t",
+                       Fl_File_Chooser::CREATE,
+                       "Select files");
+       chooser.preview(0);
+       chooser.show();
+       while (chooser.shown()) Fl::wait();
+       if (chooser.value() == NULL) return;
+       ip->savePrintSettings(chooser.value(1));
+}
+else
+{
+       char *fname = fl_file_chooser("Load Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
+       if(fname != NULL)
+               ip->savePrintSettings(fname);
+}
+char *fname = fl_file_chooser("Save Printer Settings","Printer Settings (*.set)",Image_Printer::settingsDir.c_str());
 if(fname != NULL)
-  ip->savePrintSettings(fname);}
-          xywh {110 609 80 20} labelsize 11
+  ip->savePrintSettings(fname);} selected
+          tooltip {Hold down shift to load from current directory} xywh {110 609 80 20} labelsize 11
         }
         Fl_Button {} {
           label {Preview && Formats....}
@@ -479,8 +512,8 @@ else
       }
     }
     Fl_Window win2 {
-      label {Preview and formats} open selected
-      xywh {282 581 375 225} type Double resizable visible
+      label {Preview and formats} open
+      xywh {200 395 375 225} type Double resizable visible
     } {
       Fl_Button {} {
         label dismiss
index 2103bea2056b001761e0393e4d0956bd821761f7..8d3c2557bd843d5a801830fb2987c9628d6a848a 100644 (file)
@@ -1,4 +1,4 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0110
+// generated by Fast Light User Interface Designer (fluid) version 1.0107
 
 #ifndef ImagePrinter_Control_h
 #define ImagePrinter_Control_h
@@ -19,8 +19,8 @@ class Image_Printer;
 
 class Image_Printer_Control {
 public:
-  ImageWindow *iw; 
-  Image_Printer *ip; 
+  ImageWindow *iw;
+  Image_Printer *ip;
   Image_Printer_Control(ImageWindow *iwp);
   Fl_Double_Window *win;
   Fl_Check_Button *yaxis_label;