"Fossies" - the Fresh Open Source Software Archive

Member "gfsview-snapshot-121130/view/glade/mangled_interface.c" (30 Nov 2012, 139823 Bytes) of package /linux/privat/gfsview-snapshot-121130.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "mangled_interface.c" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * DO NOT EDIT THIS FILE - it is generated by Glade.
    3  */
    4 
    5 #ifdef HAVE_CONFIG_H
    6 #  include <config.h>
    7 #endif
    8 
    9 #include <sys/types.h>
   10 #include <sys/stat.h>
   11 #include <unistd.h>
   12 #include <string.h>
   13 #include <stdio.h>
   14 
   15 #include <gdk/gdkkeysyms.h>
   16 #include <gtk/gtk.h>
   17 
   18 #include "callbacks.h"
   19 #include "interface.h"
   20 #include "support.h"
   21 
   22 #define GLADE_HOOKUP_OBJECT(component,widget,name) \
   23   g_object_set_data_full (G_OBJECT (component), name, \
   24     gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
   25 
   26 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
   27   g_object_set_data (G_OBJECT (component), name, widget)
   28 
   29 GtkWidget*
   30 create_scalar_params (void)
   31 {
   32   GtkWidget *scalar_params;
   33   GtkWidget *table1;
   34   GtkWidget *label1;
   35   GtkWidget *label2;
   36   GtkWidget *label3;
   37   GtkWidget *amin;
   38   GtkWidget *amax;
   39   GtkObject *spinbuttonmin_adj;
   40   GtkWidget *spinbuttonmin;
   41   GtkObject *spinbuttonmax_adj;
   42   GtkWidget *spinbuttonmax;
   43   GtkWidget *label4;
   44   GtkWidget *colormap;
   45   GtkWidget *convertwidget2;
   46   GtkWidget *hbox3;
   47   GtkWidget *entry1;
   48   GtkWidget *button3;
   49   GtkWidget *label116;
   50   GtkWidget *show;
   51 
   52   scalar_params = gtk_vbox_new (FALSE, 0);
   53   gtk_container_set_border_width (GTK_CONTAINER (scalar_params), 4);
   54 
   55 
   56   table1 = gtk_table_new (5, 3, FALSE);
   57   gtk_widget_show (table1);
   58   gtk_container_add (GTK_CONTAINER (scalar_params), table1);
   59   gtk_table_set_row_spacings (GTK_TABLE (table1), 4);
   60   gtk_table_set_col_spacings (GTK_TABLE (table1), 4);
   61 
   62   label1 = gtk_label_new ("Scalar");
   63   gtk_widget_show (label1);
   64   gtk_table_attach (GTK_TABLE (table1), label1, 0, 1, 0, 1,
   65                     (GtkAttachOptions) (GTK_FILL),
   66                     (GtkAttachOptions) (0), 0, 0);
   67   gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5);
   68 
   69   label2 = gtk_label_new ("Minimum");
   70   gtk_widget_show (label2);
   71   gtk_table_attach (GTK_TABLE (table1), label2, 0, 1, 1, 2,
   72                     (GtkAttachOptions) (GTK_FILL),
   73                     (GtkAttachOptions) (0), 0, 0);
   74   gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
   75 
   76   label3 = gtk_label_new ("Maximum");
   77   gtk_widget_show (label3);
   78   gtk_table_attach (GTK_TABLE (table1), label3, 0, 1, 2, 3,
   79                     (GtkAttachOptions) (GTK_FILL),
   80                     (GtkAttachOptions) (0), 0, 0);
   81   gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5);
   82 
   83   amin = gtk_check_button_new_with_mnemonic ("Auto");
   84   gtk_widget_show (amin);
   85   gtk_table_attach (GTK_TABLE (table1), amin, 1, 2, 1, 2,
   86                     (GtkAttachOptions) (GTK_FILL),
   87                     (GtkAttachOptions) (0), 0, 0);
   88   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (amin), TRUE);
   89 
   90   amax = gtk_check_button_new_with_mnemonic ("Auto");
   91   gtk_widget_show (amax);
   92   gtk_table_attach (GTK_TABLE (table1), amax, 1, 2, 2, 3,
   93                     (GtkAttachOptions) (GTK_FILL),
   94                     (GtkAttachOptions) (0), 0, 0);
   95   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (amax), TRUE);
   96 
   97   spinbuttonmin_adj = gtk_adjustment_new (0, -1.00000001505e+30, 1.00000001505e+30, 1, 10, 0);
   98   spinbuttonmin = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonmin_adj), 1, 5);
   99   gtk_widget_show (spinbuttonmin);
  100   gtk_table_attach (GTK_TABLE (table1), spinbuttonmin, 2, 3, 1, 2,
  101                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  102                     (GtkAttachOptions) (0), 0, 0);
  103   gtk_widget_set_sensitive (spinbuttonmin, FALSE);
  104   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonmin), TRUE);
  105   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonmin), GTK_UPDATE_IF_VALID);
  106 
  107   spinbuttonmax_adj = gtk_adjustment_new (0, -1.00000001505e+30, 1.00000001505e+30, 1, 10, 0);
  108   spinbuttonmax = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonmax_adj), 1, 5);
  109   gtk_widget_show (spinbuttonmax);
  110   gtk_table_attach (GTK_TABLE (table1), spinbuttonmax, 2, 3, 2, 3,
  111                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  112                     (GtkAttachOptions) (0), 0, 0);
  113   gtk_widget_set_sensitive (spinbuttonmax, FALSE);
  114   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonmax), TRUE);
  115   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonmax), GTK_UPDATE_IF_VALID);
  116 
  117   label4 = gtk_label_new ("Colormap");
  118   gtk_widget_show (label4);
  119   gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 3, 4,
  120                     (GtkAttachOptions) (GTK_FILL),
  121                     (GtkAttachOptions) (0), 0, 0);
  122   gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_CENTER);
  123   gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
  124 
  125   colormap = gtk_option_menu_new ();
  126   gtk_widget_show (colormap);
  127   gtk_table_attach (GTK_TABLE (table1), colormap, 1, 2, 3, 4,
  128                     (GtkAttachOptions) (GTK_FILL),
  129                     (GtkAttachOptions) (0), 0, 0);
  130 
  131   convertwidget2 = gtk_menu_new ();
  132 
  133   gtk_option_menu_set_menu (GTK_OPTION_MENU (colormap), convertwidget2);
  134 
  135   hbox3 = gtk_hbox_new (FALSE, 0);
  136   gtk_widget_show (hbox3);
  137   gtk_table_attach (GTK_TABLE (table1), hbox3, 2, 3, 3, 4,
  138                     (GtkAttachOptions) (GTK_FILL),
  139                     (GtkAttachOptions) (GTK_FILL), 0, 0);
  140 
  141   entry1 = gtk_entry_new ();
  142   gtk_widget_show (entry1);
  143   gtk_box_pack_start (GTK_BOX (hbox3), entry1, TRUE, TRUE, 0);
  144   gtk_widget_set_sensitive (entry1, FALSE);
  145 
  146   button3 = gtk_button_new_with_mnemonic ("Browse");
  147   gtk_widget_show (button3);
  148   gtk_box_pack_start (GTK_BOX (hbox3), button3, FALSE, FALSE, 0);
  149   gtk_widget_set_sensitive (button3, FALSE);
  150 
  151   label116 = gtk_label_new ("Colorscale");
  152   gtk_widget_show (label116);
  153   gtk_table_attach (GTK_TABLE (table1), label116, 0, 1, 4, 5,
  154                     (GtkAttachOptions) (GTK_FILL),
  155                     (GtkAttachOptions) (0), 0, 0);
  156   gtk_misc_set_alignment (GTK_MISC (label116), 0, 0.5);
  157 
  158   show = gtk_check_button_new_with_mnemonic ("show");
  159   gtk_widget_show (show);
  160   gtk_table_attach (GTK_TABLE (table1), show, 1, 2, 4, 5,
  161                     (GtkAttachOptions) (GTK_FILL),
  162                     (GtkAttachOptions) (0), 0, 0);
  163 
  164   g_signal_connect ((gpointer) amin, "toggled",
  165                     G_CALLBACK (on_amin_toggled),
  166                     NULL);
  167   g_signal_connect ((gpointer) amin, "toggled",
  168                     G_CALLBACK (expose_gl),
  169                     NULL);
  170   g_signal_connect ((gpointer) amax, "toggled",
  171                     G_CALLBACK (on_amax_toggled),
  172                     NULL);
  173   g_signal_connect ((gpointer) amax, "toggled",
  174                     G_CALLBACK (expose_gl),
  175                     NULL);
  176   g_signal_connect ((gpointer) spinbuttonmin, "value_changed",
  177                     G_CALLBACK (on_spinbuttonmin_changed),
  178                     NULL);
  179   g_signal_connect ((gpointer) spinbuttonmin, "changed",
  180                     G_CALLBACK (mark_edited),
  181                     NULL);
  182   g_signal_connect ((gpointer) spinbuttonmin, "value_changed",
  183                     G_CALLBACK (unmark_edited),
  184                     NULL);
  185   g_signal_connect ((gpointer) spinbuttonmin, "move_cursor",
  186                     G_CALLBACK (mark_edited),
  187                     NULL);
  188   g_signal_connect ((gpointer) spinbuttonmax, "value_changed",
  189                     G_CALLBACK (on_spinbuttonmax_changed),
  190                     NULL);
  191   g_signal_connect ((gpointer) spinbuttonmax, "changed",
  192                     G_CALLBACK (mark_edited),
  193                     NULL);
  194   g_signal_connect ((gpointer) spinbuttonmax, "value_changed",
  195                     G_CALLBACK (unmark_edited),
  196                     NULL);
  197   g_signal_connect ((gpointer) spinbuttonmax, "move_cursor",
  198                     G_CALLBACK (mark_edited),
  199                     NULL);
  200   g_signal_connect ((gpointer) show, "toggled",
  201                     G_CALLBACK (on_showscale_toggled),
  202                     NULL);
  203 
  204   /* Store pointers to all widgets, for use by lookup_widget(). */
  205   GLADE_HOOKUP_OBJECT_NO_REF (scalar_params, scalar_params, "scalar_params");
  206   GLADE_HOOKUP_OBJECT (scalar_params, table1, "table1");
  207   GLADE_HOOKUP_OBJECT (scalar_params, label1, "label1");
  208   GLADE_HOOKUP_OBJECT (scalar_params, label2, "label2");
  209   GLADE_HOOKUP_OBJECT (scalar_params, label3, "label3");
  210   GLADE_HOOKUP_OBJECT (scalar_params, amin, "amin");
  211   GLADE_HOOKUP_OBJECT (scalar_params, amax, "amax");
  212   GLADE_HOOKUP_OBJECT (scalar_params, spinbuttonmin, "spinbuttonmin");
  213   GLADE_HOOKUP_OBJECT (scalar_params, spinbuttonmax, "spinbuttonmax");
  214   GLADE_HOOKUP_OBJECT (scalar_params, label4, "label4");
  215   GLADE_HOOKUP_OBJECT (scalar_params, colormap, "colormap");
  216   GLADE_HOOKUP_OBJECT (scalar_params, convertwidget2, "convertwidget2");
  217   GLADE_HOOKUP_OBJECT (scalar_params, hbox3, "hbox3");
  218   GLADE_HOOKUP_OBJECT (scalar_params, entry1, "entry1");
  219   GLADE_HOOKUP_OBJECT (scalar_params, button3, "button3");
  220   GLADE_HOOKUP_OBJECT (scalar_params, label116, "label116");
  221   GLADE_HOOKUP_OBJECT (scalar_params, show, "show");
  222 
  223   return scalar_params;
  224 }
  225 
  226 GtkWidget*
  227 create_view (void)
  228 {
  229   GtkWidget *view;
  230   GtkWidget *vbox1;
  231   GtkWidget *menubar1;
  232   GtkWidget *file1;
  233   GtkWidget *file1_menu;
  234   GtkWidget *open1;
  235   GtkWidget *save1;
  236   GtkWidget *separator5;
  237   GtkWidget *exit1;
  238   GtkWidget *edit1;
  239   GtkWidget *edit1_menu;
  240   GtkWidget *properties1;
  241   GtkWidget *separator1;
  242   GtkWidget *delete3;
  243   GtkWidget *image2;
  244   GtkWidget *clear1;
  245   GtkWidget *objects1;
  246   GtkWidget *objects1_menu;
  247   GtkWidget *vector1;
  248   GtkWidget *scalar1;
  249   GtkWidget *mesh1;
  250   GtkWidget *special1;
  251   GtkWidget *view1;
  252   GtkWidget *view1_menu;
  253   GtkWidget *front1;
  254   GtkWidget *back1;
  255   GtkWidget *top1;
  256   GtkWidget *bottom1;
  257   GtkWidget *left1;
  258   GtkWidget *right1;
  259   GtkWidget *separator3;
  260   GtkWidget *preferences1;
  261   GtkWidget *tools1;
  262   GtkWidget *tools1_menu;
  263   GtkWidget *substract1;
  264   GtkWidget *help1;
  265   GtkWidget *help1_menu;
  266   GtkWidget *about1;
  267   GtkWidget *toolbar;
  268   GtkIconSize tmp_toolbar_icon_size;
  269   GtkWidget *hpaned1;
  270   GtkWidget *scrolledwindow2;
  271   GtkWidget *gl_list;
  272   GtkWidget *vbox2;
  273   GtkWidget *frame1;
  274   GtkWidget *statusbar1;
  275   GtkAccelGroup *accel_group;
  276 
  277   accel_group = gtk_accel_group_new ();
  278 
  279   view = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  280   gtk_container_set_border_width (GTK_CONTAINER (view), 4);
  281   gtk_window_set_title (GTK_WINDOW (view), "GfsView");
  282   gtk_window_set_default_size (GTK_WINDOW (view), 700, 490);
  283 
  284   vbox1 = gtk_vbox_new (FALSE, 0);
  285   gtk_widget_show (vbox1);
  286   gtk_container_add (GTK_CONTAINER (view), vbox1);
  287 
  288   menubar1 = gtk_menu_bar_new ();
  289   gtk_widget_show (menubar1);
  290   gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0);
  291 
  292   file1 = gtk_menu_item_new_with_mnemonic ("File");
  293   gtk_widget_show (file1);
  294   gtk_container_add (GTK_CONTAINER (menubar1), file1);
  295 
  296   file1_menu = gtk_menu_new ();
  297   gtk_menu_item_set_submenu (GTK_MENU_ITEM (file1), file1_menu);
  298 
  299   open1 = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
  300   gtk_widget_show (open1);
  301   gtk_container_add (GTK_CONTAINER (file1_menu), open1);
  302 
  303   save1 = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
  304   gtk_widget_show (save1);
  305   gtk_container_add (GTK_CONTAINER (file1_menu), save1);
  306 
  307   separator5 = gtk_separator_menu_item_new ();
  308   gtk_widget_show (separator5);
  309   gtk_container_add (GTK_CONTAINER (file1_menu), separator5);
  310   gtk_widget_set_sensitive (separator5, FALSE);
  311 
  312   exit1 = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
  313   gtk_widget_show (exit1);
  314   gtk_container_add (GTK_CONTAINER (file1_menu), exit1);
  315 
  316   edit1 = gtk_menu_item_new_with_mnemonic ("Edit");
  317   gtk_widget_show (edit1);
  318   gtk_container_add (GTK_CONTAINER (menubar1), edit1);
  319 
  320   edit1_menu = gtk_menu_new ();
  321   gtk_menu_item_set_submenu (GTK_MENU_ITEM (edit1), edit1_menu);
  322 
  323   properties1 = gtk_image_menu_item_new_from_stock ("gtk-properties", accel_group);
  324   gtk_widget_show (properties1);
  325   gtk_container_add (GTK_CONTAINER (edit1_menu), properties1);
  326 
  327   separator1 = gtk_separator_menu_item_new ();
  328   gtk_widget_show (separator1);
  329   gtk_container_add (GTK_CONTAINER (edit1_menu), separator1);
  330   gtk_widget_set_sensitive (separator1, FALSE);
  331 
  332   delete3 = gtk_image_menu_item_new_with_mnemonic ("Delete");
  333   gtk_widget_show (delete3);
  334   gtk_container_add (GTK_CONTAINER (edit1_menu), delete3);
  335   gtk_widget_add_accelerator (delete3, "activate", accel_group,
  336                               GDK_Delete, (GdkModifierType) 0,
  337                               GTK_ACCEL_VISIBLE);
  338 
  339   image2 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU);
  340   gtk_widget_show (image2);
  341   gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (delete3), image2);
  342 
  343   clear1 = gtk_image_menu_item_new_from_stock ("gtk-clear", accel_group);
  344   gtk_widget_show (clear1);
  345   gtk_container_add (GTK_CONTAINER (edit1_menu), clear1);
  346 
  347   objects1 = gtk_menu_item_new_with_mnemonic ("Objects");
  348   gtk_widget_show (objects1);
  349   gtk_container_add (GTK_CONTAINER (menubar1), objects1);
  350 
  351   objects1_menu = gtk_menu_new ();
  352   gtk_menu_item_set_submenu (GTK_MENU_ITEM (objects1), objects1_menu);
  353 
  354   vector1 = gtk_menu_item_new_with_mnemonic ("Vector");
  355   gtk_widget_show (vector1);
  356   gtk_container_add (GTK_CONTAINER (objects1_menu), vector1);
  357 
  358   scalar1 = gtk_menu_item_new_with_mnemonic ("Scalar");
  359   gtk_widget_show (scalar1);
  360   gtk_container_add (GTK_CONTAINER (objects1_menu), scalar1);
  361 
  362   mesh1 = gtk_menu_item_new_with_mnemonic ("Mesh");
  363   gtk_widget_show (mesh1);
  364   gtk_container_add (GTK_CONTAINER (objects1_menu), mesh1);
  365 
  366   special1 = gtk_menu_item_new_with_mnemonic ("Special");
  367   gtk_widget_show (special1);
  368   gtk_container_add (GTK_CONTAINER (objects1_menu), special1);
  369 
  370   view1 = gtk_menu_item_new_with_mnemonic ("View");
  371   gtk_widget_show (view1);
  372   gtk_container_add (GTK_CONTAINER (menubar1), view1);
  373 
  374   view1_menu = gtk_menu_new ();
  375   gtk_menu_item_set_submenu (GTK_MENU_ITEM (view1), view1_menu);
  376 
  377   front1 = gtk_menu_item_new_with_mnemonic ("Front");
  378   gtk_widget_show (front1);
  379   gtk_container_add (GTK_CONTAINER (view1_menu), front1);
  380   gtk_widget_add_accelerator (front1, "activate", accel_group,
  381                               GDK_F, (GdkModifierType) GDK_CONTROL_MASK,
  382                               GTK_ACCEL_VISIBLE);
  383 
  384   back1 = gtk_menu_item_new_with_mnemonic ("Back");
  385   gtk_widget_show (back1);
  386   gtk_container_add (GTK_CONTAINER (view1_menu), back1);
  387   gtk_widget_add_accelerator (back1, "activate", accel_group,
  388                               GDK_B, (GdkModifierType) GDK_CONTROL_MASK,
  389                               GTK_ACCEL_VISIBLE);
  390 
  391   top1 = gtk_menu_item_new_with_mnemonic ("Top");
  392   gtk_widget_show (top1);
  393   gtk_container_add (GTK_CONTAINER (view1_menu), top1);
  394   gtk_widget_add_accelerator (top1, "activate", accel_group,
  395                               GDK_T, (GdkModifierType) GDK_CONTROL_MASK,
  396                               GTK_ACCEL_VISIBLE);
  397 
  398   bottom1 = gtk_menu_item_new_with_mnemonic ("Bottom");
  399   gtk_widget_show (bottom1);
  400   gtk_container_add (GTK_CONTAINER (view1_menu), bottom1);
  401   gtk_widget_add_accelerator (bottom1, "activate", accel_group,
  402                               GDK_M, (GdkModifierType) GDK_CONTROL_MASK,
  403                               GTK_ACCEL_VISIBLE);
  404 
  405   left1 = gtk_menu_item_new_with_mnemonic ("Left");
  406   gtk_widget_show (left1);
  407   gtk_container_add (GTK_CONTAINER (view1_menu), left1);
  408   gtk_widget_add_accelerator (left1, "activate", accel_group,
  409                               GDK_L, (GdkModifierType) GDK_CONTROL_MASK,
  410                               GTK_ACCEL_VISIBLE);
  411 
  412   right1 = gtk_menu_item_new_with_mnemonic ("Right");
  413   gtk_widget_show (right1);
  414   gtk_container_add (GTK_CONTAINER (view1_menu), right1);
  415   gtk_widget_add_accelerator (right1, "activate", accel_group,
  416                               GDK_R, (GdkModifierType) GDK_CONTROL_MASK,
  417                               GTK_ACCEL_VISIBLE);
  418 
  419   separator3 = gtk_separator_menu_item_new ();
  420   gtk_widget_show (separator3);
  421   gtk_container_add (GTK_CONTAINER (view1_menu), separator3);
  422   gtk_widget_set_sensitive (separator3, FALSE);
  423 
  424   preferences1 = gtk_image_menu_item_new_from_stock ("gtk-preferences", accel_group);
  425   gtk_widget_show (preferences1);
  426   gtk_container_add (GTK_CONTAINER (view1_menu), preferences1);
  427 
  428   tools1 = gtk_menu_item_new_with_mnemonic ("Tools");
  429   gtk_widget_show (tools1);
  430   gtk_container_add (GTK_CONTAINER (menubar1), tools1);
  431 
  432   tools1_menu = gtk_menu_new ();
  433   gtk_menu_item_set_submenu (GTK_MENU_ITEM (tools1), tools1_menu);
  434 
  435   substract1 = gtk_menu_item_new_with_mnemonic ("Substract...");
  436   gtk_widget_show (substract1);
  437   gtk_container_add (GTK_CONTAINER (tools1_menu), substract1);
  438 
  439   help1 = gtk_menu_item_new_with_mnemonic ("Help");
  440   gtk_widget_show (help1);
  441   gtk_container_add (GTK_CONTAINER (menubar1), help1);
  442 
  443   help1_menu = gtk_menu_new ();
  444   gtk_menu_item_set_submenu (GTK_MENU_ITEM (help1), help1_menu);
  445 
  446   about1 = gtk_menu_item_new_with_mnemonic ("About...");
  447   gtk_widget_show (about1);
  448   gtk_container_add (GTK_CONTAINER (help1_menu), about1);
  449 
  450   toolbar = gtk_toolbar_new ();
  451   gtk_widget_show (toolbar);
  452   gtk_box_pack_start (GTK_BOX (vbox1), toolbar, FALSE, FALSE, 0);
  453   gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH);
  454   tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar));
  455 
  456   hpaned1 = gtk_hpaned_new ();
  457   gtk_widget_show (hpaned1);
  458   gtk_box_pack_start (GTK_BOX (vbox1), hpaned1, TRUE, TRUE, 0);
  459 
  460   scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
  461   gtk_widget_show (scrolledwindow2);
  462   gtk_paned_pack1 (GTK_PANED (hpaned1), scrolledwindow2, FALSE, TRUE);
  463   gtk_widget_set_size_request (scrolledwindow2, 120, -1);
  464   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
  465 
  466   gl_list = gtk_tree_view_new ();
  467   gtk_widget_show (gl_list);
  468   gtk_container_add (GTK_CONTAINER (scrolledwindow2), gl_list);
  469   gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (gl_list), FALSE);
  470 
  471   vbox2 = gtk_vbox_new (FALSE, 0);
  472   gtk_widget_show (vbox2);
  473   gtk_paned_pack2 (GTK_PANED (hpaned1), vbox2, TRUE, TRUE);
  474 
  475   frame1 = gtk_frame_new (NULL);
  476   gtk_widget_show (frame1);
  477   gtk_box_pack_start (GTK_BOX (vbox2), frame1, TRUE, TRUE, 0);
  478   gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
  479 
  480   statusbar1 = gtk_statusbar_new ();
  481   gtk_widget_show (statusbar1);
  482   gtk_box_pack_start (GTK_BOX (vbox2), statusbar1, FALSE, FALSE, 0);
  483   gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar1), FALSE);
  484 
  485   g_signal_connect ((gpointer) view, "delete_event",
  486                     G_CALLBACK (main_quit),
  487                     NULL);
  488   g_signal_connect ((gpointer) open1, "activate",
  489                     G_CALLBACK (on_open1_activate),
  490                     NULL);
  491   g_signal_connect ((gpointer) save1, "activate",
  492                     G_CALLBACK (on_save1_activate),
  493                     NULL);
  494   g_signal_connect ((gpointer) exit1, "activate",
  495                     G_CALLBACK (main_quit),
  496                     NULL);
  497   g_signal_connect ((gpointer) properties1, "activate",
  498                     G_CALLBACK (on_properties1_activate),
  499                     NULL);
  500   g_signal_connect ((gpointer) delete3, "activate",
  501                     G_CALLBACK (on_delete_activate),
  502                     NULL);
  503   g_signal_connect ((gpointer) clear1, "activate",
  504                     G_CALLBACK (on_clear1_activate),
  505                     NULL);
  506   g_signal_connect ((gpointer) front1, "activate",
  507                     G_CALLBACK (on_front1_activate),
  508                     NULL);
  509   g_signal_connect ((gpointer) back1, "activate",
  510                     G_CALLBACK (on_back1_activate),
  511                     NULL);
  512   g_signal_connect ((gpointer) top1, "activate",
  513                     G_CALLBACK (on_top1_activate),
  514                     NULL);
  515   g_signal_connect ((gpointer) bottom1, "activate",
  516                     G_CALLBACK (on_bottom1_activate),
  517                     NULL);
  518   g_signal_connect ((gpointer) left1, "activate",
  519                     G_CALLBACK (on_left1_activate),
  520                     NULL);
  521   g_signal_connect ((gpointer) right1, "activate",
  522                     G_CALLBACK (on_right1_activate),
  523                     NULL);
  524   g_signal_connect ((gpointer) preferences1, "activate",
  525                     G_CALLBACK (on_preferences1_activate),
  526                     NULL);
  527   g_signal_connect ((gpointer) substract1, "activate",
  528                     G_CALLBACK (on_substract1_activate),
  529                     NULL);
  530   g_signal_connect ((gpointer) about1, "activate",
  531                     G_CALLBACK (on_about1_activate),
  532                     NULL);
  533 
  534   /* Store pointers to all widgets, for use by lookup_widget(). */
  535   GLADE_HOOKUP_OBJECT_NO_REF (view, view, "view");
  536   GLADE_HOOKUP_OBJECT (view, vbox1, "vbox1");
  537   GLADE_HOOKUP_OBJECT (view, menubar1, "menubar1");
  538   GLADE_HOOKUP_OBJECT (view, file1, "file1");
  539   GLADE_HOOKUP_OBJECT (view, file1_menu, "file1_menu");
  540   GLADE_HOOKUP_OBJECT (view, open1, "open1");
  541   GLADE_HOOKUP_OBJECT (view, save1, "save1");
  542   GLADE_HOOKUP_OBJECT (view, separator5, "separator5");
  543   GLADE_HOOKUP_OBJECT (view, exit1, "exit1");
  544   GLADE_HOOKUP_OBJECT (view, edit1, "edit1");
  545   GLADE_HOOKUP_OBJECT (view, edit1_menu, "edit1_menu");
  546   GLADE_HOOKUP_OBJECT (view, properties1, "properties1");
  547   GLADE_HOOKUP_OBJECT (view, separator1, "separator1");
  548   GLADE_HOOKUP_OBJECT (view, delete3, "delete3");
  549   GLADE_HOOKUP_OBJECT (view, image2, "image2");
  550   GLADE_HOOKUP_OBJECT (view, clear1, "clear1");
  551   GLADE_HOOKUP_OBJECT (view, objects1, "objects1");
  552   GLADE_HOOKUP_OBJECT (view, objects1_menu, "objects1_menu");
  553   GLADE_HOOKUP_OBJECT (view, vector1, "vector1");
  554   GLADE_HOOKUP_OBJECT (view, scalar1, "scalar1");
  555   GLADE_HOOKUP_OBJECT (view, mesh1, "mesh1");
  556   GLADE_HOOKUP_OBJECT (view, special1, "special1");
  557   GLADE_HOOKUP_OBJECT (view, view1, "view1");
  558   GLADE_HOOKUP_OBJECT (view, view1_menu, "view1_menu");
  559   GLADE_HOOKUP_OBJECT (view, front1, "front1");
  560   GLADE_HOOKUP_OBJECT (view, back1, "back1");
  561   GLADE_HOOKUP_OBJECT (view, top1, "top1");
  562   GLADE_HOOKUP_OBJECT (view, bottom1, "bottom1");
  563   GLADE_HOOKUP_OBJECT (view, left1, "left1");
  564   GLADE_HOOKUP_OBJECT (view, right1, "right1");
  565   GLADE_HOOKUP_OBJECT (view, separator3, "separator3");
  566   GLADE_HOOKUP_OBJECT (view, preferences1, "preferences1");
  567   GLADE_HOOKUP_OBJECT (view, tools1, "tools1");
  568   GLADE_HOOKUP_OBJECT (view, tools1_menu, "tools1_menu");
  569   GLADE_HOOKUP_OBJECT (view, substract1, "substract1");
  570   GLADE_HOOKUP_OBJECT (view, help1, "help1");
  571   GLADE_HOOKUP_OBJECT (view, help1_menu, "help1_menu");
  572   GLADE_HOOKUP_OBJECT (view, about1, "about1");
  573   GLADE_HOOKUP_OBJECT (view, toolbar, "toolbar");
  574   GLADE_HOOKUP_OBJECT (view, hpaned1, "hpaned1");
  575   GLADE_HOOKUP_OBJECT (view, scrolledwindow2, "scrolledwindow2");
  576   GLADE_HOOKUP_OBJECT (view, gl_list, "gl_list");
  577   GLADE_HOOKUP_OBJECT (view, vbox2, "vbox2");
  578   GLADE_HOOKUP_OBJECT (view, frame1, "frame1");
  579   GLADE_HOOKUP_OBJECT (view, statusbar1, "statusbar1");
  580 
  581   gtk_window_add_accel_group (GTK_WINDOW (view), accel_group);
  582 
  583   return view;
  584 }
  585 
  586 GtkWidget*
  587 create_vector_params (void)
  588 {
  589   GtkWidget *vector_params;
  590   GtkWidget *table2;
  591   GtkObject *scale_adj;
  592   GtkWidget *scale;
  593   GtkWidget *label11;
  594   GtkWidget *label12;
  595   GtkWidget *color;
  596   GtkWidget *convertwidget6;
  597 
  598   vector_params = gtk_vbox_new (FALSE, 0);
  599   gtk_container_set_border_width (GTK_CONTAINER (vector_params), 4);
  600 
  601 
  602   table2 = gtk_table_new (5, 2, FALSE);
  603   gtk_widget_show (table2);
  604   gtk_container_add (GTK_CONTAINER (vector_params), table2);
  605   gtk_table_set_row_spacings (GTK_TABLE (table2), 4);
  606   gtk_table_set_col_spacings (GTK_TABLE (table2), 4);
  607 
  608   scale_adj = gtk_adjustment_new (1, 0, 10000, 0.10000000149, 1, 0);
  609   scale = gtk_spin_button_new (GTK_ADJUSTMENT (scale_adj), 0.10000000149, 1);
  610   gtk_widget_show (scale);
  611   gtk_table_attach (GTK_TABLE (table2), scale, 1, 2, 3, 4,
  612                     (GtkAttachOptions) (GTK_FILL),
  613                     (GtkAttachOptions) (0), 0, 0);
  614   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale), TRUE);
  615 
  616   label11 = gtk_label_new ("Scale");
  617   gtk_widget_show (label11);
  618   gtk_table_attach (GTK_TABLE (table2), label11, 0, 1, 3, 4,
  619                     (GtkAttachOptions) (GTK_FILL),
  620                     (GtkAttachOptions) (0), 0, 0);
  621   gtk_label_set_justify (GTK_LABEL (label11), GTK_JUSTIFY_CENTER);
  622   gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);
  623 
  624   label12 = gtk_label_new ("Color");
  625   gtk_widget_show (label12);
  626   gtk_table_attach (GTK_TABLE (table2), label12, 0, 1, 4, 5,
  627                     (GtkAttachOptions) (GTK_FILL),
  628                     (GtkAttachOptions) (0), 0, 0);
  629   gtk_label_set_justify (GTK_LABEL (label12), GTK_JUSTIFY_CENTER);
  630   gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);
  631 
  632   color = gtk_option_menu_new ();
  633   gtk_widget_show (color);
  634   gtk_table_attach (GTK_TABLE (table2), color, 1, 2, 4, 5,
  635                     (GtkAttachOptions) (GTK_FILL),
  636                     (GtkAttachOptions) (0), 0, 0);
  637 
  638   convertwidget6 = gtk_menu_new ();
  639 
  640   gtk_option_menu_set_menu (GTK_OPTION_MENU (color), convertwidget6);
  641 
  642   g_signal_connect ((gpointer) scale, "value_changed",
  643                     G_CALLBACK (on_scale_changed),
  644                     NULL);
  645   g_signal_connect ((gpointer) scale, "changed",
  646                     G_CALLBACK (mark_edited),
  647                     NULL);
  648   g_signal_connect ((gpointer) scale, "move_cursor",
  649                     G_CALLBACK (mark_edited),
  650                     NULL);
  651   g_signal_connect ((gpointer) scale, "value_changed",
  652                     G_CALLBACK (unmark_edited),
  653                     NULL);
  654 
  655   /* Store pointers to all widgets, for use by lookup_widget(). */
  656   GLADE_HOOKUP_OBJECT_NO_REF (vector_params, vector_params, "vector_params");
  657   GLADE_HOOKUP_OBJECT (vector_params, table2, "table2");
  658   GLADE_HOOKUP_OBJECT (vector_params, scale, "scale");
  659   GLADE_HOOKUP_OBJECT (vector_params, label11, "label11");
  660   GLADE_HOOKUP_OBJECT (vector_params, label12, "label12");
  661   GLADE_HOOKUP_OBJECT (vector_params, color, "color");
  662   GLADE_HOOKUP_OBJECT (vector_params, convertwidget6, "convertwidget6");
  663 
  664   return vector_params;
  665 }
  666 
  667 GtkWidget*
  668 create_gl_params (void)
  669 {
  670   GtkWidget *gl_params;
  671   GtkWidget *table;
  672   GtkWidget *default_color_label;
  673   GtkWidget *default_color;
  674   GtkWidget *maxlevel_label;
  675   GtkObject *maxlevel_adj;
  676   GtkWidget *maxlevel;
  677   GtkWidget *finest;
  678   GtkWidget *shading_label;
  679   GtkWidget *shading;
  680   GtkWidget *menu1;
  681   GtkWidget *constant1;
  682   GtkWidget *flat1;
  683   GtkWidget *smooth1;
  684   GtkWidget *csmooth1;
  685   GtkWidget *label117;
  686   GtkObject *linewidth_adj;
  687   GtkWidget *linewidth;
  688 
  689   gl_params = gtk_vbox_new (FALSE, 0);
  690   gtk_container_set_border_width (GTK_CONTAINER (gl_params), 4);
  691 
  692 
  693   table = gtk_table_new (4, 3, FALSE);
  694   gtk_widget_show (table);
  695   gtk_container_add (GTK_CONTAINER (gl_params), table);
  696   gtk_table_set_row_spacings (GTK_TABLE (table), 4);
  697   gtk_table_set_col_spacings (GTK_TABLE (table), 4);
  698 
  699   default_color_label = gtk_label_new ("Default color");
  700   gtk_widget_show (default_color_label);
  701   gtk_table_attach (GTK_TABLE (table), default_color_label, 0, 1, 0, 1,
  702                     (GtkAttachOptions) (GTK_FILL),
  703                     (GtkAttachOptions) (0), 0, 0);
  704   gtk_misc_set_alignment (GTK_MISC (default_color_label), 0, 0.5);
  705 
  706   default_color = gtk_button_new ();
  707   gtk_widget_show (default_color);
  708   gtk_table_attach (GTK_TABLE (table), default_color, 1, 2, 0, 1,
  709                     (GtkAttachOptions) (GTK_FILL),
  710                     (GtkAttachOptions) (0), 0, 0);
  711   gtk_widget_set_size_request (default_color, -1, 26);
  712 
  713   maxlevel_label = gtk_label_new ("Maximum level");
  714   gtk_widget_show (maxlevel_label);
  715   gtk_table_attach (GTK_TABLE (table), maxlevel_label, 0, 1, 3, 4,
  716                     (GtkAttachOptions) (GTK_FILL),
  717                     (GtkAttachOptions) (0), 0, 0);
  718   gtk_misc_set_alignment (GTK_MISC (maxlevel_label), 0, 0.5);
  719 
  720   maxlevel_adj = gtk_adjustment_new (100, 0, 100, 1, 10, 0);
  721   maxlevel = gtk_spin_button_new (GTK_ADJUSTMENT (maxlevel_adj), 1, 0);
  722   gtk_widget_show (maxlevel);
  723   gtk_table_attach (GTK_TABLE (table), maxlevel, 1, 2, 3, 4,
  724                     (GtkAttachOptions) (GTK_FILL),
  725                     (GtkAttachOptions) (0), 0, 0);
  726   gtk_widget_set_sensitive (maxlevel, FALSE);
  727   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (maxlevel), TRUE);
  728   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (maxlevel), GTK_UPDATE_IF_VALID);
  729 
  730   finest = gtk_check_button_new_with_mnemonic ("Finest");
  731   gtk_widget_show (finest);
  732   gtk_table_attach (GTK_TABLE (table), finest, 2, 3, 3, 4,
  733                     (GtkAttachOptions) (GTK_FILL),
  734                     (GtkAttachOptions) (0), 0, 0);
  735   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (finest), TRUE);
  736 
  737   shading_label = gtk_label_new ("Shading");
  738   gtk_widget_show (shading_label);
  739   gtk_table_attach (GTK_TABLE (table), shading_label, 0, 1, 2, 3,
  740                     (GtkAttachOptions) (GTK_FILL),
  741                     (GtkAttachOptions) (0), 0, 0);
  742   gtk_misc_set_alignment (GTK_MISC (shading_label), 0, 0.5);
  743 
  744   shading = gtk_option_menu_new ();
  745   gtk_widget_show (shading);
  746   gtk_table_attach (GTK_TABLE (table), shading, 1, 2, 2, 3,
  747                     (GtkAttachOptions) (GTK_FILL),
  748                     (GtkAttachOptions) (0), 0, 0);
  749 
  750   menu1 = gtk_menu_new ();
  751 
  752   constant1 = gtk_menu_item_new_with_mnemonic ("Constant");
  753   gtk_widget_show (constant1);
  754   gtk_container_add (GTK_CONTAINER (menu1), constant1);
  755 
  756   flat1 = gtk_menu_item_new_with_mnemonic ("Flat");
  757   gtk_widget_show (flat1);
  758   gtk_container_add (GTK_CONTAINER (menu1), flat1);
  759 
  760   smooth1 = gtk_menu_item_new_with_mnemonic ("Smooth");
  761   gtk_widget_show (smooth1);
  762   gtk_container_add (GTK_CONTAINER (menu1), smooth1);
  763 
  764   csmooth1 = gtk_menu_item_new_with_mnemonic ("CSmooth");
  765   gtk_widget_show (csmooth1);
  766   gtk_container_add (GTK_CONTAINER (menu1), csmooth1);
  767 
  768   gtk_option_menu_set_menu (GTK_OPTION_MENU (shading), menu1);
  769 
  770   label117 = gtk_label_new ("Line width");
  771   gtk_widget_show (label117);
  772   gtk_table_attach (GTK_TABLE (table), label117, 0, 1, 1, 2,
  773                     (GtkAttachOptions) (GTK_FILL),
  774                     (GtkAttachOptions) (0), 0, 0);
  775   gtk_misc_set_alignment (GTK_MISC (label117), 0, 0.5);
  776 
  777   linewidth_adj = gtk_adjustment_new (1, 1, 10, 1, 10, 0);
  778   linewidth = gtk_spin_button_new (GTK_ADJUSTMENT (linewidth_adj), 1, 0);
  779   gtk_widget_show (linewidth);
  780   gtk_table_attach (GTK_TABLE (table), linewidth, 1, 2, 1, 2,
  781                     (GtkAttachOptions) (GTK_FILL),
  782                     (GtkAttachOptions) (0), 0, 0);
  783   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (linewidth), TRUE);
  784   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (linewidth), GTK_UPDATE_IF_VALID);
  785 
  786   g_signal_connect ((gpointer) default_color, "clicked",
  787                     G_CALLBACK (on_color_clicked),
  788                     NULL);
  789   g_signal_connect ((gpointer) maxlevel, "value_changed",
  790                     G_CALLBACK (on_maxlevel_changed),
  791                     NULL);
  792   g_signal_connect ((gpointer) finest, "toggled",
  793                     G_CALLBACK (on_finest_toggled),
  794                     NULL);
  795   g_signal_connect ((gpointer) constant1, "activate",
  796                     G_CALLBACK (on_constant1_activate),
  797                     NULL);
  798   g_signal_connect ((gpointer) flat1, "activate",
  799                     G_CALLBACK (on_flat1_activate),
  800                     NULL);
  801   g_signal_connect ((gpointer) smooth1, "activate",
  802                     G_CALLBACK (on_smooth1_activate),
  803                     NULL);
  804   g_signal_connect ((gpointer) csmooth1, "activate",
  805                     G_CALLBACK (on_csmooth1_activate),
  806                     NULL);
  807   g_signal_connect ((gpointer) linewidth, "value_changed",
  808                     G_CALLBACK (on_linewidth_value_changed),
  809                     NULL);
  810 
  811   /* Store pointers to all widgets, for use by lookup_widget(). */
  812   GLADE_HOOKUP_OBJECT_NO_REF (gl_params, gl_params, "gl_params");
  813   GLADE_HOOKUP_OBJECT (gl_params, table, "table");
  814   GLADE_HOOKUP_OBJECT (gl_params, default_color_label, "default_color_label");
  815   GLADE_HOOKUP_OBJECT (gl_params, default_color, "default_color");
  816   GLADE_HOOKUP_OBJECT (gl_params, maxlevel_label, "maxlevel_label");
  817   GLADE_HOOKUP_OBJECT (gl_params, maxlevel, "maxlevel");
  818   GLADE_HOOKUP_OBJECT (gl_params, finest, "finest");
  819   GLADE_HOOKUP_OBJECT (gl_params, shading_label, "shading_label");
  820   GLADE_HOOKUP_OBJECT (gl_params, shading, "shading");
  821   GLADE_HOOKUP_OBJECT (gl_params, menu1, "menu1");
  822   GLADE_HOOKUP_OBJECT (gl_params, constant1, "constant1");
  823   GLADE_HOOKUP_OBJECT (gl_params, flat1, "flat1");
  824   GLADE_HOOKUP_OBJECT (gl_params, smooth1, "smooth1");
  825   GLADE_HOOKUP_OBJECT (gl_params, csmooth1, "csmooth1");
  826   GLADE_HOOKUP_OBJECT (gl_params, label117, "label117");
  827   GLADE_HOOKUP_OBJECT (gl_params, linewidth, "linewidth");
  828 
  829   return gl_params;
  830 }
  831 
  832 GtkWidget*
  833 create_color_selector (void)
  834 {
  835   GtkWidget *color_selector;
  836   GtkWidget *vbox4;
  837   GtkWidget *colorselection1;
  838   GtkWidget *hseparator1;
  839   GtkWidget *hbuttonbox1;
  840   GtkWidget *button6;
  841   GtkWidget *button7;
  842 
  843   color_selector = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  844   gtk_window_set_title (GTK_WINDOW (color_selector), "Color selector");
  845 
  846   vbox4 = gtk_vbox_new (FALSE, 0);
  847   gtk_widget_show (vbox4);
  848   gtk_container_add (GTK_CONTAINER (color_selector), vbox4);
  849 
  850   colorselection1 = gtk_color_selection_new ();
  851   gtk_widget_show (colorselection1);
  852   gtk_box_pack_start (GTK_BOX (vbox4), colorselection1, FALSE, FALSE, 0);
  853   gtk_container_set_border_width (GTK_CONTAINER (colorselection1), 4);
  854   gtk_color_selection_set_has_opacity_control (GTK_COLOR_SELECTION (colorselection1), TRUE);
  855 
  856   hseparator1 = gtk_hseparator_new ();
  857   gtk_widget_show (hseparator1);
  858   gtk_box_pack_start (GTK_BOX (vbox4), hseparator1, TRUE, TRUE, 0);
  859 
  860   hbuttonbox1 = gtk_hbutton_box_new ();
  861   gtk_widget_show (hbuttonbox1);
  862   gtk_box_pack_start (GTK_BOX (vbox4), hbuttonbox1, FALSE, FALSE, 0);
  863   gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox1), 4);
  864   gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_SPREAD);
  865 
  866   button6 = gtk_button_new_from_stock ("gtk-ok");
  867   gtk_widget_show (button6);
  868   gtk_container_add (GTK_CONTAINER (hbuttonbox1), button6);
  869   GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT);
  870 
  871   button7 = gtk_button_new_from_stock ("gtk-cancel");
  872   gtk_widget_show (button7);
  873   gtk_container_add (GTK_CONTAINER (hbuttonbox1), button7);
  874   GTK_WIDGET_SET_FLAGS (button7, GTK_CAN_DEFAULT);
  875 
  876   g_signal_connect ((gpointer) button6, "clicked",
  877                     G_CALLBACK (on_color_selector_clicked),
  878                     NULL);
  879   g_signal_connect_swapped ((gpointer) button7, "clicked",
  880                             G_CALLBACK (gtk_widget_hide),
  881                             GTK_OBJECT (color_selector));
  882 
  883   /* Store pointers to all widgets, for use by lookup_widget(). */
  884   GLADE_HOOKUP_OBJECT_NO_REF (color_selector, color_selector, "color_selector");
  885   GLADE_HOOKUP_OBJECT (color_selector, vbox4, "vbox4");
  886   GLADE_HOOKUP_OBJECT (color_selector, colorselection1, "colorselection1");
  887   GLADE_HOOKUP_OBJECT (color_selector, hseparator1, "hseparator1");
  888   GLADE_HOOKUP_OBJECT (color_selector, hbuttonbox1, "hbuttonbox1");
  889   GLADE_HOOKUP_OBJECT (color_selector, button6, "button6");
  890   GLADE_HOOKUP_OBJECT (color_selector, button7, "button7");
  891 
  892   return color_selector;
  893 }
  894 
  895 GtkWidget*
  896 create_preferences (void)
  897 {
  898   GtkWidget *preferences;
  899   GtkWidget *notebook1;
  900   GtkWidget *table3;
  901   GtkWidget *label17;
  902   GtkWidget *bgcolor;
  903   GtkWidget *label98;
  904   GtkWidget *label99;
  905   GtkWidget *sz_label;
  906   GtkObject *sx_adj;
  907   GtkWidget *sx;
  908   GtkObject *sy_adj;
  909   GtkWidget *sy;
  910   GtkObject *sz_adj;
  911   GtkWidget *sz;
  912   GtkWidget *label16;
  913   GtkWidget *table20;
  914   GtkWidget *label33;
  915   GtkObject *reactivity_adj;
  916   GtkWidget *reactivity;
  917   GtkWidget *label26;
  918   GtkObject *lc_adj;
  919   GtkWidget *lc;
  920   GtkWidget *label18;
  921   GtkObject *resolution_adj;
  922   GtkWidget *resolution;
  923   GtkWidget *scripting_label;
  924   GtkWidget *scripting;
  925   GtkWidget *scripting_on;
  926   GSList *scripting_on_group = NULL;
  927   GtkWidget *scripting_off;
  928   GtkWidget *label53;
  929   GtkTooltips *tooltips;
  930 
  931   tooltips = gtk_tooltips_new ();
  932 
  933   preferences = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  934   gtk_container_set_border_width (GTK_CONTAINER (preferences), 4);
  935   gtk_window_set_title (GTK_WINDOW (preferences), "Preferences");
  936 
  937   notebook1 = gtk_notebook_new ();
  938   gtk_widget_show (notebook1);
  939   gtk_container_add (GTK_CONTAINER (preferences), notebook1);
  940 
  941   table3 = gtk_table_new (4, 2, FALSE);
  942   gtk_widget_show (table3);
  943   gtk_container_add (GTK_CONTAINER (notebook1), table3);
  944   gtk_container_set_border_width (GTK_CONTAINER (table3), 4);
  945   gtk_table_set_row_spacings (GTK_TABLE (table3), 4);
  946   gtk_table_set_col_spacings (GTK_TABLE (table3), 4);
  947 
  948   label17 = gtk_label_new ("Background color");
  949   gtk_widget_show (label17);
  950   gtk_table_attach (GTK_TABLE (table3), label17, 0, 1, 0, 1,
  951                     (GtkAttachOptions) (GTK_FILL),
  952                     (GtkAttachOptions) (0), 0, 0);
  953   gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);
  954 
  955   bgcolor = gtk_button_new ();
  956   gtk_widget_show (bgcolor);
  957   gtk_table_attach (GTK_TABLE (table3), bgcolor, 1, 2, 0, 1,
  958                     (GtkAttachOptions) (GTK_FILL),
  959                     (GtkAttachOptions) (0), 0, 0);
  960   gtk_widget_set_size_request (bgcolor, -1, 26);
  961 
  962   label98 = gtk_label_new ("X scaling");
  963   gtk_widget_show (label98);
  964   gtk_table_attach (GTK_TABLE (table3), label98, 0, 1, 1, 2,
  965                     (GtkAttachOptions) (GTK_FILL),
  966                     (GtkAttachOptions) (0), 0, 0);
  967   gtk_misc_set_alignment (GTK_MISC (label98), 0, 0.5);
  968 
  969   label99 = gtk_label_new ("Y scaling");
  970   gtk_widget_show (label99);
  971   gtk_table_attach (GTK_TABLE (table3), label99, 0, 1, 2, 3,
  972                     (GtkAttachOptions) (GTK_FILL),
  973                     (GtkAttachOptions) (0), 0, 0);
  974   gtk_misc_set_alignment (GTK_MISC (label99), 0, 0.5);
  975 
  976   sz_label = gtk_label_new ("Z scaling");
  977   gtk_widget_show (sz_label);
  978   gtk_table_attach (GTK_TABLE (table3), sz_label, 0, 1, 3, 4,
  979                     (GtkAttachOptions) (GTK_FILL),
  980                     (GtkAttachOptions) (0), 0, 0);
  981   gtk_misc_set_alignment (GTK_MISC (sz_label), 0, 0.5);
  982 
  983   sx_adj = gtk_adjustment_new (1, 0.00999999977648, 100, 0.10000000149, 1, 0);
  984   sx = gtk_spin_button_new (GTK_ADJUSTMENT (sx_adj), 1, 2);
  985   gtk_widget_show (sx);
  986   gtk_table_attach (GTK_TABLE (table3), sx, 1, 2, 1, 2,
  987                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  988                     (GtkAttachOptions) (0), 0, 0);
  989   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sx), TRUE);
  990   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (sx), GTK_UPDATE_IF_VALID);
  991 
  992   sy_adj = gtk_adjustment_new (1, 0.00999999977648, 100, 0.10000000149, 1, 0);
  993   sy = gtk_spin_button_new (GTK_ADJUSTMENT (sy_adj), 1, 2);
  994   gtk_widget_show (sy);
  995   gtk_table_attach (GTK_TABLE (table3), sy, 1, 2, 2, 3,
  996                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
  997                     (GtkAttachOptions) (0), 0, 0);
  998   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sy), TRUE);
  999   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (sy), GTK_UPDATE_IF_VALID);
 1000 
 1001   sz_adj = gtk_adjustment_new (1, 0.00999999977648, 100, 0.10000000149, 1, 0);
 1002   sz = gtk_spin_button_new (GTK_ADJUSTMENT (sz_adj), 1, 2);
 1003   gtk_widget_show (sz);
 1004   gtk_table_attach (GTK_TABLE (table3), sz, 1, 2, 3, 4,
 1005                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1006                     (GtkAttachOptions) (0), 0, 0);
 1007   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sz), TRUE);
 1008   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (sz), GTK_UPDATE_IF_VALID);
 1009 
 1010   label16 = gtk_label_new ("Basic");
 1011   gtk_widget_show (label16);
 1012   gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label16);
 1013 
 1014   table20 = gtk_table_new (4, 2, FALSE);
 1015   gtk_widget_show (table20);
 1016   gtk_container_add (GTK_CONTAINER (notebook1), table20);
 1017   gtk_container_set_border_width (GTK_CONTAINER (table20), 4);
 1018   gtk_table_set_row_spacings (GTK_TABLE (table20), 4);
 1019   gtk_table_set_col_spacings (GTK_TABLE (table20), 4);
 1020 
 1021   label33 = gtk_label_new ("Reactivity");
 1022   gtk_widget_show (label33);
 1023   gtk_table_attach (GTK_TABLE (table20), label33, 0, 1, 3, 4,
 1024                     (GtkAttachOptions) (GTK_FILL),
 1025                     (GtkAttachOptions) (0), 0, 0);
 1026   gtk_misc_set_alignment (GTK_MISC (label33), 0, 0.5);
 1027 
 1028   reactivity_adj = gtk_adjustment_new (0.10000000149, 0.00999999977648, 1, 0.00999999977648, 0.10000000149, 0);
 1029   reactivity = gtk_spin_button_new (GTK_ADJUSTMENT (reactivity_adj), 1, 2);
 1030   gtk_widget_show (reactivity);
 1031   gtk_table_attach (GTK_TABLE (table20), reactivity, 1, 2, 3, 4,
 1032                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1033                     (GtkAttachOptions) (0), 0, 0);
 1034   gtk_tooltips_set_tip (tooltips, reactivity, "Maximum update time (sec)", NULL);
 1035   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (reactivity), TRUE);
 1036 
 1037   label26 = gtk_label_new ("Lines closer");
 1038   gtk_widget_show (label26);
 1039   gtk_table_attach (GTK_TABLE (table20), label26, 0, 1, 2, 3,
 1040                     (GtkAttachOptions) (GTK_FILL),
 1041                     (GtkAttachOptions) (0), 0, 0);
 1042   gtk_misc_set_alignment (GTK_MISC (label26), 0, 0.5);
 1043 
 1044   lc_adj = gtk_adjustment_new (0.001, 0, 0.1, 0.001, 0.01, 0);
 1045   lc = gtk_spin_button_new (GTK_ADJUSTMENT (lc_adj), 0.00999999977648, 3);
 1046   gtk_widget_show (lc);
 1047   gtk_table_attach (GTK_TABLE (table20), lc, 1, 2, 2, 3,
 1048                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1049                     (GtkAttachOptions) (0), 0, 0);
 1050   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lc), TRUE);
 1051   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (lc), GTK_UPDATE_IF_VALID);
 1052 
 1053   label18 = gtk_label_new ("Resolution");
 1054   gtk_widget_show (label18);
 1055   gtk_table_attach (GTK_TABLE (table20), label18, 0, 1, 1, 2,
 1056                     (GtkAttachOptions) (GTK_FILL),
 1057                     (GtkAttachOptions) (0), 0, 0);
 1058   gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);
 1059 
 1060   resolution_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 0);
 1061   resolution = gtk_spin_button_new (GTK_ADJUSTMENT (resolution_adj), 1, 0);
 1062   gtk_widget_show (resolution);
 1063   gtk_table_attach (GTK_TABLE (table20), resolution, 1, 2, 1, 2,
 1064                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1065                     (GtkAttachOptions) (0), 0, 0);
 1066   gtk_tooltips_set_tip (tooltips, resolution, "Resolution in pixels", NULL);
 1067   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (resolution), TRUE);
 1068   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (resolution), GTK_UPDATE_IF_VALID);
 1069 
 1070   scripting_label = gtk_label_new ("Scripting");
 1071   gtk_widget_show (scripting_label);
 1072   gtk_table_attach (GTK_TABLE (table20), scripting_label, 0, 1, 0, 1,
 1073                     (GtkAttachOptions) (GTK_FILL),
 1074                     (GtkAttachOptions) (0), 0, 0);
 1075   gtk_misc_set_alignment (GTK_MISC (scripting_label), 0, 0.5);
 1076 
 1077   scripting = gtk_hbox_new (FALSE, 4);
 1078   gtk_widget_show (scripting);
 1079   gtk_table_attach (GTK_TABLE (table20), scripting, 1, 2, 0, 1,
 1080                     (GtkAttachOptions) (GTK_FILL),
 1081                     (GtkAttachOptions) (GTK_FILL), 0, 0);
 1082 
 1083   scripting_on = gtk_radio_button_new_with_mnemonic (NULL, "on");
 1084   gtk_widget_show (scripting_on);
 1085   gtk_box_pack_start (GTK_BOX (scripting), scripting_on, FALSE, FALSE, 0);
 1086   gtk_radio_button_set_group (GTK_RADIO_BUTTON (scripting_on), scripting_on_group);
 1087   scripting_on_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (scripting_on));
 1088 
 1089   scripting_off = gtk_radio_button_new_with_mnemonic (NULL, "off");
 1090   gtk_widget_show (scripting_off);
 1091   gtk_box_pack_start (GTK_BOX (scripting), scripting_off, FALSE, FALSE, 0);
 1092   gtk_radio_button_set_group (GTK_RADIO_BUTTON (scripting_off), scripting_on_group);
 1093   scripting_on_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (scripting_off));
 1094 
 1095   label53 = gtk_label_new ("Advanced");
 1096   gtk_widget_show (label53);
 1097   gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label53);
 1098 
 1099   g_signal_connect ((gpointer) bgcolor, "clicked",
 1100                     G_CALLBACK (on_bgcolor_clicked),
 1101                     NULL);
 1102   g_signal_connect ((gpointer) sx, "value_changed",
 1103                     G_CALLBACK (on_x_scaling_changed),
 1104                     NULL);
 1105   g_signal_connect ((gpointer) sy, "value_changed",
 1106                     G_CALLBACK (on_y_scaling_changed),
 1107                     NULL);
 1108   g_signal_connect ((gpointer) sz, "value_changed",
 1109                     G_CALLBACK (on_z_scaling_changed),
 1110                     NULL);
 1111   g_signal_connect ((gpointer) reactivity, "value_changed",
 1112                     G_CALLBACK (on_reactivity_changed),
 1113                     NULL);
 1114   g_signal_connect ((gpointer) lc, "value_changed",
 1115                     G_CALLBACK (on_lines_closer_changed),
 1116                     NULL);
 1117   g_signal_connect ((gpointer) resolution, "value_changed",
 1118                     G_CALLBACK (on_resolution_changed),
 1119                     NULL);
 1120   g_signal_connect ((gpointer) scripting_on, "toggled",
 1121                     G_CALLBACK (on_scripting_toggled),
 1122                     NULL);
 1123 
 1124   /* Store pointers to all widgets, for use by lookup_widget(). */
 1125   GLADE_HOOKUP_OBJECT_NO_REF (preferences, preferences, "preferences");
 1126   GLADE_HOOKUP_OBJECT (preferences, notebook1, "notebook1");
 1127   GLADE_HOOKUP_OBJECT (preferences, table3, "table3");
 1128   GLADE_HOOKUP_OBJECT (preferences, label17, "label17");
 1129   GLADE_HOOKUP_OBJECT (preferences, bgcolor, "bgcolor");
 1130   GLADE_HOOKUP_OBJECT (preferences, label98, "label98");
 1131   GLADE_HOOKUP_OBJECT (preferences, label99, "label99");
 1132   GLADE_HOOKUP_OBJECT (preferences, sz_label, "sz_label");
 1133   GLADE_HOOKUP_OBJECT (preferences, sx, "sx");
 1134   GLADE_HOOKUP_OBJECT (preferences, sy, "sy");
 1135   GLADE_HOOKUP_OBJECT (preferences, sz, "sz");
 1136   GLADE_HOOKUP_OBJECT (preferences, label16, "label16");
 1137   GLADE_HOOKUP_OBJECT (preferences, table20, "table20");
 1138   GLADE_HOOKUP_OBJECT (preferences, label33, "label33");
 1139   GLADE_HOOKUP_OBJECT (preferences, reactivity, "reactivity");
 1140   GLADE_HOOKUP_OBJECT (preferences, label26, "label26");
 1141   GLADE_HOOKUP_OBJECT (preferences, lc, "lc");
 1142   GLADE_HOOKUP_OBJECT (preferences, label18, "label18");
 1143   GLADE_HOOKUP_OBJECT (preferences, resolution, "resolution");
 1144   GLADE_HOOKUP_OBJECT (preferences, scripting_label, "scripting_label");
 1145   GLADE_HOOKUP_OBJECT (preferences, scripting, "scripting");
 1146   GLADE_HOOKUP_OBJECT (preferences, scripting_on, "scripting_on");
 1147   GLADE_HOOKUP_OBJECT (preferences, scripting_off, "scripting_off");
 1148   GLADE_HOOKUP_OBJECT (preferences, label53, "label53");
 1149   GLADE_HOOKUP_OBJECT_NO_REF (preferences, tooltips, "tooltips");
 1150 
 1151   return preferences;
 1152 }
 1153 
 1154 GtkWidget*
 1155 create_bg_color_selector (void)
 1156 {
 1157   GtkWidget *bg_color_selector;
 1158   GtkWidget *vbox5;
 1159   GtkWidget *colorselection2;
 1160   GtkWidget *hseparator2;
 1161   GtkWidget *hbuttonbox2;
 1162   GtkWidget *button9;
 1163   GtkWidget *button10;
 1164 
 1165   bg_color_selector = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 1166   gtk_window_set_title (GTK_WINDOW (bg_color_selector), "Color selector");
 1167 
 1168   vbox5 = gtk_vbox_new (FALSE, 0);
 1169   gtk_widget_show (vbox5);
 1170   gtk_container_add (GTK_CONTAINER (bg_color_selector), vbox5);
 1171 
 1172   colorselection2 = gtk_color_selection_new ();
 1173   gtk_widget_show (colorselection2);
 1174   gtk_box_pack_start (GTK_BOX (vbox5), colorselection2, FALSE, FALSE, 0);
 1175   gtk_container_set_border_width (GTK_CONTAINER (colorselection2), 4);
 1176   gtk_color_selection_set_has_opacity_control (GTK_COLOR_SELECTION (colorselection2), TRUE);
 1177 
 1178   hseparator2 = gtk_hseparator_new ();
 1179   gtk_widget_show (hseparator2);
 1180   gtk_box_pack_start (GTK_BOX (vbox5), hseparator2, TRUE, TRUE, 0);
 1181 
 1182   hbuttonbox2 = gtk_hbutton_box_new ();
 1183   gtk_widget_show (hbuttonbox2);
 1184   gtk_box_pack_start (GTK_BOX (vbox5), hbuttonbox2, FALSE, FALSE, 0);
 1185   gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox2), 4);
 1186   gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_SPREAD);
 1187 
 1188   button9 = gtk_button_new_from_stock ("gtk-ok");
 1189   gtk_widget_show (button9);
 1190   gtk_container_add (GTK_CONTAINER (hbuttonbox2), button9);
 1191   GTK_WIDGET_SET_FLAGS (button9, GTK_CAN_DEFAULT);
 1192 
 1193   button10 = gtk_button_new_from_stock ("gtk-cancel");
 1194   gtk_widget_show (button10);
 1195   gtk_container_add (GTK_CONTAINER (hbuttonbox2), button10);
 1196   GTK_WIDGET_SET_FLAGS (button10, GTK_CAN_DEFAULT);
 1197 
 1198   g_signal_connect ((gpointer) button9, "clicked",
 1199                     G_CALLBACK (on_bg_color_selector_clicked),
 1200                     NULL);
 1201   g_signal_connect_swapped ((gpointer) button10, "clicked",
 1202                             G_CALLBACK (gtk_widget_hide),
 1203                             GTK_OBJECT (bg_color_selector));
 1204 
 1205   /* Store pointers to all widgets, for use by lookup_widget(). */
 1206   GLADE_HOOKUP_OBJECT_NO_REF (bg_color_selector, bg_color_selector, "bg_color_selector");
 1207   GLADE_HOOKUP_OBJECT (bg_color_selector, vbox5, "vbox5");
 1208   GLADE_HOOKUP_OBJECT (bg_color_selector, colorselection2, "colorselection2");
 1209   GLADE_HOOKUP_OBJECT (bg_color_selector, hseparator2, "hseparator2");
 1210   GLADE_HOOKUP_OBJECT (bg_color_selector, hbuttonbox2, "hbuttonbox2");
 1211   GLADE_HOOKUP_OBJECT (bg_color_selector, button9, "button9");
 1212   GLADE_HOOKUP_OBJECT (bg_color_selector, button10, "button10");
 1213 
 1214   return bg_color_selector;
 1215 }
 1216 
 1217 GtkWidget*
 1218 create_gl2ps (void)
 1219 {
 1220   GtkWidget *gl2ps;
 1221   GtkWidget *vbox6;
 1222   GtkWidget *notebook2;
 1223   GtkWidget *table5;
 1224   GtkWidget *label22;
 1225   GtkWidget *entry2;
 1226   GtkWidget *button14;
 1227   GtkWidget *label23;
 1228   GtkWidget *format;
 1229   GtkWidget *menu2;
 1230   GtkWidget *portable_pixmap1;
 1231   GtkWidget *postscript1;
 1232   GtkWidget *encapsulated_postscript1;
 1233   GtkWidget *portable_document_format1;
 1234   GtkWidget *scalable_vector_graphics;
 1235   GtkWidget *gnuplot1;
 1236   GtkWidget *wavefront_obj1;
 1237   GtkWidget *kml_obj;
 1238   GtkWidget *latex1;
 1239   GtkWidget *gfsview;
 1240   GtkWidget *gerris;
 1241   GtkWidget *orientationlabel;
 1242   GtkWidget *orientationmenu;
 1243   GtkWidget *menu4;
 1244   GtkWidget *portrait1;
 1245   GtkWidget *landscape1;
 1246   GtkWidget *label25;
 1247   GtkObject *spinbutton1_adj;
 1248   GtkWidget *spinbutton1;
 1249   GtkWidget *label20;
 1250   GtkWidget *vbox11;
 1251   GtkWidget *ppm_options;
 1252   GtkWidget *label74;
 1253   GtkWidget *screen;
 1254   GtkWidget *size;
 1255   GtkWidget *label76;
 1256   GtkObject *width_adj;
 1257   GtkWidget *width;
 1258   GtkWidget *label73;
 1259   GtkObject *height_adj;
 1260   GtkWidget *height;
 1261   GtkWidget *keep_ratio;
 1262   GtkWidget *gl2ps_options;
 1263   GtkWidget *label24;
 1264   GtkWidget *sort;
 1265   GtkWidget *menu3;
 1266   GtkWidget *none1;
 1267   GtkWidget *barycenter1;
 1268   GtkWidget *bsp_tree1;
 1269   GtkWidget *checkbutton1;
 1270   GtkWidget *checkbutton2;
 1271   GtkWidget *checkbutton3;
 1272   GtkWidget *checkbutton4;
 1273   GtkWidget *checkbutton5;
 1274   GtkWidget *label21;
 1275   GtkWidget *hseparator3;
 1276   GtkWidget *hbuttonbox3;
 1277   GtkWidget *button12;
 1278   GtkWidget *button13;
 1279   GtkTooltips *tooltips;
 1280 
 1281   tooltips = gtk_tooltips_new ();
 1282 
 1283   gl2ps = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 1284   gtk_container_set_border_width (GTK_CONTAINER (gl2ps), 4);
 1285   gtk_window_set_title (GTK_WINDOW (gl2ps), "Save as");
 1286 
 1287   vbox6 = gtk_vbox_new (FALSE, 0);
 1288   gtk_widget_show (vbox6);
 1289   gtk_container_add (GTK_CONTAINER (gl2ps), vbox6);
 1290 
 1291   notebook2 = gtk_notebook_new ();
 1292   gtk_widget_show (notebook2);
 1293   gtk_box_pack_start (GTK_BOX (vbox6), notebook2, TRUE, TRUE, 0);
 1294 
 1295   table5 = gtk_table_new (4, 3, FALSE);
 1296   gtk_widget_show (table5);
 1297   gtk_container_add (GTK_CONTAINER (notebook2), table5);
 1298   gtk_container_set_border_width (GTK_CONTAINER (table5), 4);
 1299   gtk_table_set_row_spacings (GTK_TABLE (table5), 4);
 1300   gtk_table_set_col_spacings (GTK_TABLE (table5), 4);
 1301 
 1302   label22 = gtk_label_new ("Path");
 1303   gtk_widget_show (label22);
 1304   gtk_table_attach (GTK_TABLE (table5), label22, 0, 1, 0, 1,
 1305                     (GtkAttachOptions) (GTK_FILL),
 1306                     (GtkAttachOptions) (0), 0, 0);
 1307   gtk_misc_set_alignment (GTK_MISC (label22), 0, 0.5);
 1308 
 1309   entry2 = gtk_entry_new ();
 1310   gtk_widget_show (entry2);
 1311   gtk_table_attach (GTK_TABLE (table5), entry2, 1, 2, 0, 1,
 1312                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1313                     (GtkAttachOptions) (0), 0, 0);
 1314 
 1315   button14 = gtk_button_new_with_mnemonic ("Browse...");
 1316   gtk_widget_show (button14);
 1317   gtk_table_attach (GTK_TABLE (table5), button14, 2, 3, 0, 1,
 1318                     (GtkAttachOptions) (GTK_FILL),
 1319                     (GtkAttachOptions) (0), 0, 0);
 1320 
 1321   label23 = gtk_label_new ("Format");
 1322   gtk_widget_show (label23);
 1323   gtk_table_attach (GTK_TABLE (table5), label23, 0, 1, 1, 2,
 1324                     (GtkAttachOptions) (GTK_FILL),
 1325                     (GtkAttachOptions) (0), 0, 0);
 1326   gtk_misc_set_alignment (GTK_MISC (label23), 0, 0.5);
 1327 
 1328   format = gtk_option_menu_new ();
 1329   gtk_widget_show (format);
 1330   gtk_table_attach (GTK_TABLE (table5), format, 1, 2, 1, 2,
 1331                     (GtkAttachOptions) (GTK_FILL),
 1332                     (GtkAttachOptions) (0), 0, 0);
 1333 
 1334   menu2 = gtk_menu_new ();
 1335 
 1336   portable_pixmap1 = gtk_menu_item_new_with_mnemonic ("Portable PixMap (PPM)");
 1337   gtk_widget_show (portable_pixmap1);
 1338   gtk_container_add (GTK_CONTAINER (menu2), portable_pixmap1);
 1339 
 1340   postscript1 = gtk_menu_item_new_with_mnemonic ("Postscript (PS)");
 1341   gtk_widget_show (postscript1);
 1342   gtk_container_add (GTK_CONTAINER (menu2), postscript1);
 1343 
 1344   encapsulated_postscript1 = gtk_menu_item_new_with_mnemonic ("Encapsulated Postscript (EPS)");
 1345   gtk_widget_show (encapsulated_postscript1);
 1346   gtk_container_add (GTK_CONTAINER (menu2), encapsulated_postscript1);
 1347 
 1348   portable_document_format1 = gtk_menu_item_new_with_mnemonic ("Portable Document Format (PDF)");
 1349   gtk_widget_show (portable_document_format1);
 1350   gtk_container_add (GTK_CONTAINER (menu2), portable_document_format1);
 1351 
 1352   scalable_vector_graphics = gtk_menu_item_new_with_mnemonic ("Scalable Vector Graphics (SVG)");
 1353   gtk_widget_show (scalable_vector_graphics);
 1354   gtk_container_add (GTK_CONTAINER (menu2), scalable_vector_graphics);
 1355 
 1356   gnuplot1 = gtk_menu_item_new_with_mnemonic ("Gnuplot");
 1357   gtk_widget_show (gnuplot1);
 1358   gtk_container_add (GTK_CONTAINER (menu2), gnuplot1);
 1359 
 1360   wavefront_obj1 = gtk_menu_item_new_with_mnemonic ("Wavefront OBJ");
 1361   gtk_widget_show (wavefront_obj1);
 1362   gtk_container_add (GTK_CONTAINER (menu2), wavefront_obj1);
 1363 
 1364   kml_obj = gtk_menu_item_new_with_mnemonic ("Google Earth KML");
 1365   gtk_widget_show (kml_obj);
 1366   gtk_container_add (GTK_CONTAINER (menu2), kml_obj);
 1367 
 1368   latex1 = gtk_menu_item_new_with_mnemonic ("Latex (Text only)");
 1369   gtk_widget_show (latex1);
 1370   gtk_container_add (GTK_CONTAINER (menu2), latex1);
 1371 
 1372   gfsview = gtk_menu_item_new_with_mnemonic ("GfsView (GFV)");
 1373   gtk_widget_show (gfsview);
 1374   gtk_container_add (GTK_CONTAINER (menu2), gfsview);
 1375 
 1376   gerris = gtk_menu_item_new_with_mnemonic ("Gerris (GFS)");
 1377   gtk_widget_show (gerris);
 1378   gtk_container_add (GTK_CONTAINER (menu2), gerris);
 1379 
 1380   gtk_option_menu_set_menu (GTK_OPTION_MENU (format), menu2);
 1381 
 1382   orientationlabel = gtk_label_new ("Orientation");
 1383   gtk_widget_show (orientationlabel);
 1384   gtk_table_attach (GTK_TABLE (table5), orientationlabel, 0, 1, 2, 3,
 1385                     (GtkAttachOptions) (GTK_FILL),
 1386                     (GtkAttachOptions) (0), 0, 0);
 1387   gtk_misc_set_alignment (GTK_MISC (orientationlabel), 0, 0.5);
 1388 
 1389   orientationmenu = gtk_option_menu_new ();
 1390   gtk_widget_show (orientationmenu);
 1391   gtk_table_attach (GTK_TABLE (table5), orientationmenu, 1, 2, 2, 3,
 1392                     (GtkAttachOptions) (GTK_FILL),
 1393                     (GtkAttachOptions) (0), 0, 0);
 1394 
 1395   menu4 = gtk_menu_new ();
 1396 
 1397   portrait1 = gtk_menu_item_new_with_mnemonic ("Portrait");
 1398   gtk_widget_show (portrait1);
 1399   gtk_container_add (GTK_CONTAINER (menu4), portrait1);
 1400 
 1401   landscape1 = gtk_menu_item_new_with_mnemonic ("Landscape");
 1402   gtk_widget_show (landscape1);
 1403   gtk_container_add (GTK_CONTAINER (menu4), landscape1);
 1404 
 1405   gtk_option_menu_set_menu (GTK_OPTION_MENU (orientationmenu), menu4);
 1406 
 1407   label25 = gtk_label_new ("Line width");
 1408   gtk_widget_show (label25);
 1409   gtk_table_attach (GTK_TABLE (table5), label25, 0, 1, 3, 4,
 1410                     (GtkAttachOptions) (GTK_FILL),
 1411                     (GtkAttachOptions) (0), 0, 0);
 1412   gtk_misc_set_alignment (GTK_MISC (label25), 0, 0.5);
 1413 
 1414   spinbutton1_adj = gtk_adjustment_new (1, 0.10000000149, 100, 0.10000000149, 1, 0);
 1415   spinbutton1 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton1_adj), 1, 1);
 1416   gtk_widget_show (spinbutton1);
 1417   gtk_table_attach (GTK_TABLE (table5), spinbutton1, 1, 2, 3, 4,
 1418                     (GtkAttachOptions) (GTK_FILL),
 1419                     (GtkAttachOptions) (0), 0, 0);
 1420   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton1), TRUE);
 1421 
 1422   label20 = gtk_label_new ("Basic");
 1423   gtk_widget_show (label20);
 1424   gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), label20);
 1425 
 1426   vbox11 = gtk_vbox_new (FALSE, 0);
 1427   gtk_widget_show (vbox11);
 1428   gtk_container_add (GTK_CONTAINER (notebook2), vbox11);
 1429 
 1430   ppm_options = gtk_table_new (2, 2, FALSE);
 1431   gtk_widget_show (ppm_options);
 1432   gtk_box_pack_start (GTK_BOX (vbox11), ppm_options, FALSE, TRUE, 0);
 1433   gtk_container_set_border_width (GTK_CONTAINER (ppm_options), 4);
 1434   gtk_table_set_row_spacings (GTK_TABLE (ppm_options), 4);
 1435   gtk_table_set_col_spacings (GTK_TABLE (ppm_options), 4);
 1436 
 1437   label74 = gtk_label_new ("Size");
 1438   gtk_widget_show (label74);
 1439   gtk_table_attach (GTK_TABLE (ppm_options), label74, 0, 1, 0, 1,
 1440                     (GtkAttachOptions) (GTK_FILL),
 1441                     (GtkAttachOptions) (0), 0, 0);
 1442   gtk_misc_set_alignment (GTK_MISC (label74), 0, 0.5);
 1443 
 1444   screen = gtk_check_button_new_with_mnemonic ("Screen");
 1445   gtk_widget_show (screen);
 1446   gtk_table_attach (GTK_TABLE (ppm_options), screen, 1, 2, 0, 1,
 1447                     (GtkAttachOptions) (GTK_FILL),
 1448                     (GtkAttachOptions) (0), 0, 0);
 1449   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (screen), TRUE);
 1450 
 1451   size = gtk_hbox_new (FALSE, 4);
 1452   gtk_widget_show (size);
 1453   gtk_table_attach (GTK_TABLE (ppm_options), size, 1, 2, 1, 2,
 1454                     (GtkAttachOptions) (GTK_FILL),
 1455                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
 1456 
 1457   label76 = gtk_label_new ("Width");
 1458   gtk_widget_show (label76);
 1459   gtk_box_pack_start (GTK_BOX (size), label76, FALSE, FALSE, 0);
 1460 
 1461   width_adj = gtk_adjustment_new (1280, 2, 2048, 2, 10, 0);
 1462   width = gtk_spin_button_new (GTK_ADJUSTMENT (width_adj), 1, 0);
 1463   gtk_widget_show (width);
 1464   gtk_box_pack_start (GTK_BOX (size), width, TRUE, TRUE, 0);
 1465   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (width), TRUE);
 1466   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (width), GTK_UPDATE_IF_VALID);
 1467   gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (width), TRUE);
 1468 
 1469   label73 = gtk_label_new ("Height");
 1470   gtk_widget_show (label73);
 1471   gtk_box_pack_start (GTK_BOX (size), label73, FALSE, FALSE, 0);
 1472 
 1473   height_adj = gtk_adjustment_new (1024, 2, 2048, 2, 10, 0);
 1474   height = gtk_spin_button_new (GTK_ADJUSTMENT (height_adj), 1, 0);
 1475   gtk_widget_show (height);
 1476   gtk_box_pack_start (GTK_BOX (size), height, TRUE, TRUE, 0);
 1477   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (height), TRUE);
 1478   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (height), GTK_UPDATE_IF_VALID);
 1479   gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (height), TRUE);
 1480 
 1481   keep_ratio = gtk_check_button_new_with_mnemonic ("Keep ratio");
 1482   gtk_widget_show (keep_ratio);
 1483   gtk_box_pack_start (GTK_BOX (size), keep_ratio, FALSE, FALSE, 0);
 1484   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (keep_ratio), TRUE);
 1485 
 1486   gl2ps_options = gtk_table_new (6, 2, FALSE);
 1487   gtk_widget_show (gl2ps_options);
 1488   gtk_box_pack_start (GTK_BOX (vbox11), gl2ps_options, TRUE, TRUE, 0);
 1489   gtk_container_set_border_width (GTK_CONTAINER (gl2ps_options), 4);
 1490   gtk_table_set_row_spacings (GTK_TABLE (gl2ps_options), 4);
 1491   gtk_table_set_col_spacings (GTK_TABLE (gl2ps_options), 4);
 1492 
 1493   label24 = gtk_label_new ("Depth-sorting");
 1494   gtk_widget_show (label24);
 1495   gtk_table_attach (GTK_TABLE (gl2ps_options), label24, 0, 1, 0, 1,
 1496                     (GtkAttachOptions) (GTK_FILL),
 1497                     (GtkAttachOptions) (0), 0, 0);
 1498   gtk_misc_set_alignment (GTK_MISC (label24), 0, 0.5);
 1499 
 1500   sort = gtk_option_menu_new ();
 1501   gtk_widget_show (sort);
 1502   gtk_table_attach (GTK_TABLE (gl2ps_options), sort, 1, 2, 0, 1,
 1503                     (GtkAttachOptions) (GTK_FILL),
 1504                     (GtkAttachOptions) (0), 0, 0);
 1505 
 1506   menu3 = gtk_menu_new ();
 1507 
 1508   none1 = gtk_menu_item_new_with_mnemonic ("None");
 1509   gtk_widget_show (none1);
 1510   gtk_container_add (GTK_CONTAINER (menu3), none1);
 1511 
 1512   barycenter1 = gtk_menu_item_new_with_mnemonic ("Barycenter");
 1513   gtk_widget_show (barycenter1);
 1514   gtk_container_add (GTK_CONTAINER (menu3), barycenter1);
 1515 
 1516   bsp_tree1 = gtk_menu_item_new_with_mnemonic ("BSP tree");
 1517   gtk_widget_show (bsp_tree1);
 1518   gtk_container_add (GTK_CONTAINER (menu3), bsp_tree1);
 1519 
 1520   gtk_option_menu_set_menu (GTK_OPTION_MENU (sort), menu3);
 1521 
 1522   checkbutton1 = gtk_check_button_new_with_mnemonic ("Line offset");
 1523   gtk_widget_show (checkbutton1);
 1524   gtk_table_attach (GTK_TABLE (gl2ps_options), checkbutton1, 0, 1, 1, 2,
 1525                     (GtkAttachOptions) (GTK_FILL),
 1526                     (GtkAttachOptions) (0), 0, 0);
 1527   gtk_tooltips_set_tip (tooltips, checkbutton1, "Simple line offset", NULL);
 1528   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton1), TRUE);
 1529 
 1530   checkbutton2 = gtk_check_button_new_with_mnemonic ("Best root");
 1531   gtk_widget_show (checkbutton2);
 1532   gtk_table_attach (GTK_TABLE (gl2ps_options), checkbutton2, 0, 1, 2, 3,
 1533                     (GtkAttachOptions) (GTK_FILL),
 1534                     (GtkAttachOptions) (0), 0, 0);
 1535   gtk_tooltips_set_tip (tooltips, checkbutton2, "Optimizes BSP tree", NULL);
 1536   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton2), TRUE);
 1537 
 1538   checkbutton3 = gtk_check_button_new_with_mnemonic ("No text");
 1539   gtk_widget_show (checkbutton3);
 1540   gtk_table_attach (GTK_TABLE (gl2ps_options), checkbutton3, 0, 1, 3, 4,
 1541                     (GtkAttachOptions) (GTK_FILL),
 1542                     (GtkAttachOptions) (0), 0, 0);
 1543   gtk_tooltips_set_tip (tooltips, checkbutton3, "Suppresses text strings", NULL);
 1544 
 1545   checkbutton4 = gtk_check_button_new_with_mnemonic ("No pixmap");
 1546   gtk_widget_show (checkbutton4);
 1547   gtk_table_attach (GTK_TABLE (gl2ps_options), checkbutton4, 0, 1, 4, 5,
 1548                     (GtkAttachOptions) (GTK_FILL),
 1549                     (GtkAttachOptions) (0), 0, 0);
 1550   gtk_tooltips_set_tip (tooltips, checkbutton4, "Suppresses pixmaps", NULL);
 1551 
 1552   checkbutton5 = gtk_check_button_new_with_mnemonic ("No PS3 shading");
 1553   gtk_widget_show (checkbutton5);
 1554   gtk_table_attach (GTK_TABLE (gl2ps_options), checkbutton5, 0, 1, 5, 6,
 1555                     (GtkAttachOptions) (GTK_FILL),
 1556                     (GtkAttachOptions) (0), 0, 0);
 1557   gtk_tooltips_set_tip (tooltips, checkbutton5, "Do not use PS Level 3 shfill operator", NULL);
 1558 
 1559   label21 = gtk_label_new ("Options");
 1560   gtk_widget_show (label21);
 1561   gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 1), label21);
 1562 
 1563   hseparator3 = gtk_hseparator_new ();
 1564   gtk_widget_show (hseparator3);
 1565   gtk_box_pack_start (GTK_BOX (vbox6), hseparator3, FALSE, FALSE, 0);
 1566 
 1567   hbuttonbox3 = gtk_hbutton_box_new ();
 1568   gtk_widget_show (hbuttonbox3);
 1569   gtk_box_pack_start (GTK_BOX (vbox6), hbuttonbox3, FALSE, FALSE, 0);
 1570   gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox3), 4);
 1571   gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_SPREAD);
 1572 
 1573   button12 = gtk_button_new_from_stock ("gtk-save");
 1574   gtk_widget_show (button12);
 1575   gtk_container_add (GTK_CONTAINER (hbuttonbox3), button12);
 1576   GTK_WIDGET_SET_FLAGS (button12, GTK_CAN_DEFAULT);
 1577 
 1578   button13 = gtk_button_new_from_stock ("gtk-cancel");
 1579   gtk_widget_show (button13);
 1580   gtk_container_add (GTK_CONTAINER (hbuttonbox3), button13);
 1581   GTK_WIDGET_SET_FLAGS (button13, GTK_CAN_DEFAULT);
 1582 
 1583   g_signal_connect ((gpointer) entry2, "changed",
 1584                     G_CALLBACK (on_entry2_changed),
 1585                     NULL);
 1586   g_signal_connect ((gpointer) button14, "clicked",
 1587                     G_CALLBACK (on_browse_clicked),
 1588                     NULL);
 1589   g_signal_connect ((gpointer) portable_pixmap1, "activate",
 1590                     G_CALLBACK (on_portable_pixmap1_activate),
 1591                     NULL);
 1592   g_signal_connect ((gpointer) postscript1, "activate",
 1593                     G_CALLBACK (on_postscript1_activate),
 1594                     NULL);
 1595   g_signal_connect ((gpointer) encapsulated_postscript1, "activate",
 1596                     G_CALLBACK (on_encapsulated_postscript1_activate),
 1597                     NULL);
 1598   g_signal_connect ((gpointer) portable_document_format1, "activate",
 1599                     G_CALLBACK (on_portable_document_format1_activate),
 1600                     NULL);
 1601   g_signal_connect ((gpointer) scalable_vector_graphics, "activate",
 1602                     G_CALLBACK (on_scalable_vector_graphics_activate),
 1603                     NULL);
 1604   g_signal_connect ((gpointer) gnuplot1, "activate",
 1605                     G_CALLBACK (on_gnuplot1_activate),
 1606                     NULL);
 1607   g_signal_connect ((gpointer) wavefront_obj1, "activate",
 1608                     G_CALLBACK (on_wavefront_obj1_activate),
 1609                     NULL);
 1610   g_signal_connect ((gpointer) kml_obj, "activate",
 1611                     G_CALLBACK (on_kml_obj_activate),
 1612                     NULL);
 1613   g_signal_connect ((gpointer) latex1, "activate",
 1614                     G_CALLBACK (on_latex1_activate),
 1615                     NULL);
 1616   g_signal_connect ((gpointer) gfsview, "activate",
 1617                     G_CALLBACK (on_gfsview_activate),
 1618                     NULL);
 1619   g_signal_connect ((gpointer) gerris, "activate",
 1620                     G_CALLBACK (on_gerris_activate),
 1621                     NULL);
 1622   g_signal_connect ((gpointer) portrait1, "activate",
 1623                     G_CALLBACK (on_portrait1_activate),
 1624                     NULL);
 1625   g_signal_connect ((gpointer) landscape1, "activate",
 1626                     G_CALLBACK (on_landscape1_activate),
 1627                     NULL);
 1628   g_signal_connect ((gpointer) spinbutton1, "value_changed",
 1629                     G_CALLBACK (on_line_width_changed),
 1630                     NULL);
 1631   g_signal_connect ((gpointer) screen, "toggled",
 1632                     G_CALLBACK (on_screen_ppm_toggled),
 1633                     NULL);
 1634   g_signal_connect ((gpointer) width, "value_changed",
 1635                     G_CALLBACK (on_width_value_changed),
 1636                     NULL);
 1637   g_signal_connect ((gpointer) height, "value_changed",
 1638                     G_CALLBACK (on_height_value_changed),
 1639                     NULL);
 1640   g_signal_connect ((gpointer) keep_ratio, "toggled",
 1641                     G_CALLBACK (on_keep_ratio_toggled),
 1642                     NULL);
 1643   g_signal_connect ((gpointer) none1, "activate",
 1644                     G_CALLBACK (on_none1_activate),
 1645                     NULL);
 1646   g_signal_connect ((gpointer) barycenter1, "activate",
 1647                     G_CALLBACK (on_barycenter1_activate),
 1648                     NULL);
 1649   g_signal_connect ((gpointer) bsp_tree1, "activate",
 1650                     G_CALLBACK (on_bsp_tree1_activate),
 1651                     NULL);
 1652   g_signal_connect ((gpointer) checkbutton1, "toggled",
 1653                     G_CALLBACK (on_line_offset_toggled),
 1654                     NULL);
 1655   g_signal_connect ((gpointer) checkbutton2, "toggled",
 1656                     G_CALLBACK (on_best_root_toggled),
 1657                     NULL);
 1658   g_signal_connect ((gpointer) checkbutton3, "toggled",
 1659                     G_CALLBACK (on_no_text_toggled),
 1660                     NULL);
 1661   g_signal_connect ((gpointer) checkbutton4, "toggled",
 1662                     G_CALLBACK (on_no_pixmap_toggled),
 1663                     NULL);
 1664   g_signal_connect ((gpointer) checkbutton5, "toggled",
 1665                     G_CALLBACK (on_no_ps3_toggled),
 1666                     NULL);
 1667   g_signal_connect ((gpointer) button12, "clicked",
 1668                     G_CALLBACK (on_save_as_button_clicked),
 1669                     NULL);
 1670   g_signal_connect_swapped ((gpointer) button13, "clicked",
 1671                             G_CALLBACK (gtk_widget_hide),
 1672                             GTK_OBJECT (gl2ps));
 1673 
 1674   /* Store pointers to all widgets, for use by lookup_widget(). */
 1675   GLADE_HOOKUP_OBJECT_NO_REF (gl2ps, gl2ps, "gl2ps");
 1676   GLADE_HOOKUP_OBJECT (gl2ps, vbox6, "vbox6");
 1677   GLADE_HOOKUP_OBJECT (gl2ps, notebook2, "notebook2");
 1678   GLADE_HOOKUP_OBJECT (gl2ps, table5, "table5");
 1679   GLADE_HOOKUP_OBJECT (gl2ps, label22, "label22");
 1680   GLADE_HOOKUP_OBJECT (gl2ps, entry2, "entry2");
 1681   GLADE_HOOKUP_OBJECT (gl2ps, button14, "button14");
 1682   GLADE_HOOKUP_OBJECT (gl2ps, label23, "label23");
 1683   GLADE_HOOKUP_OBJECT (gl2ps, format, "format");
 1684   GLADE_HOOKUP_OBJECT (gl2ps, menu2, "menu2");
 1685   GLADE_HOOKUP_OBJECT (gl2ps, portable_pixmap1, "portable_pixmap1");
 1686   GLADE_HOOKUP_OBJECT (gl2ps, postscript1, "postscript1");
 1687   GLADE_HOOKUP_OBJECT (gl2ps, encapsulated_postscript1, "encapsulated_postscript1");
 1688   GLADE_HOOKUP_OBJECT (gl2ps, portable_document_format1, "portable_document_format1");
 1689   GLADE_HOOKUP_OBJECT (gl2ps, scalable_vector_graphics, "scalable_vector_graphics");
 1690   GLADE_HOOKUP_OBJECT (gl2ps, gnuplot1, "gnuplot1");
 1691   GLADE_HOOKUP_OBJECT (gl2ps, wavefront_obj1, "wavefront_obj1");
 1692   GLADE_HOOKUP_OBJECT (gl2ps, latex1, "latex1");
 1693   GLADE_HOOKUP_OBJECT (gl2ps, gfsview, "gfsview");
 1694   GLADE_HOOKUP_OBJECT (gl2ps, gerris, "gerris");
 1695   GLADE_HOOKUP_OBJECT (gl2ps, orientationlabel, "orientationlabel");
 1696   GLADE_HOOKUP_OBJECT (gl2ps, orientationmenu, "orientationmenu");
 1697   GLADE_HOOKUP_OBJECT (gl2ps, menu4, "menu4");
 1698   GLADE_HOOKUP_OBJECT (gl2ps, portrait1, "portrait1");
 1699   GLADE_HOOKUP_OBJECT (gl2ps, landscape1, "landscape1");
 1700   GLADE_HOOKUP_OBJECT (gl2ps, label25, "label25");
 1701   GLADE_HOOKUP_OBJECT (gl2ps, spinbutton1, "spinbutton1");
 1702   GLADE_HOOKUP_OBJECT (gl2ps, label20, "label20");
 1703   GLADE_HOOKUP_OBJECT (gl2ps, vbox11, "vbox11");
 1704   GLADE_HOOKUP_OBJECT (gl2ps, ppm_options, "ppm_options");
 1705   GLADE_HOOKUP_OBJECT (gl2ps, label74, "label74");
 1706   GLADE_HOOKUP_OBJECT (gl2ps, screen, "screen");
 1707   GLADE_HOOKUP_OBJECT (gl2ps, size, "size");
 1708   GLADE_HOOKUP_OBJECT (gl2ps, label76, "label76");
 1709   GLADE_HOOKUP_OBJECT (gl2ps, width, "width");
 1710   GLADE_HOOKUP_OBJECT (gl2ps, label73, "label73");
 1711   GLADE_HOOKUP_OBJECT (gl2ps, height, "height");
 1712   GLADE_HOOKUP_OBJECT (gl2ps, keep_ratio, "keep_ratio");
 1713   GLADE_HOOKUP_OBJECT (gl2ps, gl2ps_options, "gl2ps_options");
 1714   GLADE_HOOKUP_OBJECT (gl2ps, label24, "label24");
 1715   GLADE_HOOKUP_OBJECT (gl2ps, sort, "sort");
 1716   GLADE_HOOKUP_OBJECT (gl2ps, menu3, "menu3");
 1717   GLADE_HOOKUP_OBJECT (gl2ps, none1, "none1");
 1718   GLADE_HOOKUP_OBJECT (gl2ps, barycenter1, "barycenter1");
 1719   GLADE_HOOKUP_OBJECT (gl2ps, bsp_tree1, "bsp_tree1");
 1720   GLADE_HOOKUP_OBJECT (gl2ps, checkbutton1, "checkbutton1");
 1721   GLADE_HOOKUP_OBJECT (gl2ps, checkbutton2, "checkbutton2");
 1722   GLADE_HOOKUP_OBJECT (gl2ps, checkbutton3, "checkbutton3");
 1723   GLADE_HOOKUP_OBJECT (gl2ps, checkbutton4, "checkbutton4");
 1724   GLADE_HOOKUP_OBJECT (gl2ps, checkbutton5, "checkbutton5");
 1725   GLADE_HOOKUP_OBJECT (gl2ps, label21, "label21");
 1726   GLADE_HOOKUP_OBJECT (gl2ps, hseparator3, "hseparator3");
 1727   GLADE_HOOKUP_OBJECT (gl2ps, hbuttonbox3, "hbuttonbox3");
 1728   GLADE_HOOKUP_OBJECT (gl2ps, button12, "button12");
 1729   GLADE_HOOKUP_OBJECT (gl2ps, button13, "button13");
 1730   GLADE_HOOKUP_OBJECT_NO_REF (gl2ps, tooltips, "tooltips");
 1731 
 1732   gtk_widget_grab_default (button12);
 1733   return gl2ps;
 1734 }
 1735 
 1736 GtkWidget*
 1737 create_about (void)
 1738 {
 1739   GtkWidget *about;
 1740   GtkWidget *vbox7;
 1741   GtkWidget *vbox8;
 1742   GtkWidget *image1;
 1743   GtkWidget *label28;
 1744   GtkWidget *label27;
 1745   GtkWidget *hseparator4;
 1746   GtkWidget *hbuttonbox4;
 1747   GtkWidget *button15;
 1748 
 1749   about = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 1750   gtk_container_set_border_width (GTK_CONTAINER (about), 4);
 1751   gtk_window_set_title (GTK_WINDOW (about), "About GfsView");
 1752 
 1753   vbox7 = gtk_vbox_new (FALSE, 4);
 1754   gtk_widget_show (vbox7);
 1755   gtk_container_add (GTK_CONTAINER (about), vbox7);
 1756 
 1757   vbox8 = gtk_vbox_new (FALSE, 16);
 1758   gtk_widget_show (vbox8);
 1759   gtk_box_pack_start (GTK_BOX (vbox7), vbox8, TRUE, TRUE, 0);
 1760   gtk_container_set_border_width (GTK_CONTAINER (vbox8), 8);
 1761 
 1762   image1 = create_pixmap (about, "gerris_small.png");
 1763   gtk_widget_show (image1);
 1764   gtk_box_pack_start (GTK_BOX (vbox8), image1, FALSE, FALSE, 0);
 1765 
 1766   label28 = gtk_label_new ("GfsView is a viewer for Gerris simulation files");
 1767   gtk_widget_show (label28);
 1768   gtk_box_pack_start (GTK_BOX (vbox8), label28, FALSE, FALSE, 0);
 1769 
 1770   label27 = gtk_label_new ("<small>(C) 2004-2010 St\303\251phane Popinet, NIWA</small>");
 1771   gtk_widget_show (label27);
 1772   gtk_box_pack_start (GTK_BOX (vbox8), label27, FALSE, FALSE, 0);
 1773   gtk_label_set_use_markup (GTK_LABEL (label27), TRUE);
 1774 
 1775   hseparator4 = gtk_hseparator_new ();
 1776   gtk_widget_show (hseparator4);
 1777   gtk_box_pack_start (GTK_BOX (vbox7), hseparator4, FALSE, FALSE, 0);
 1778 
 1779   hbuttonbox4 = gtk_hbutton_box_new ();
 1780   gtk_widget_show (hbuttonbox4);
 1781   gtk_box_pack_start (GTK_BOX (vbox7), hbuttonbox4, FALSE, FALSE, 0);
 1782   gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_END);
 1783 
 1784   button15 = gtk_button_new_from_stock ("gtk-ok");
 1785   gtk_widget_show (button15);
 1786   gtk_container_add (GTK_CONTAINER (hbuttonbox4), button15);
 1787   GTK_WIDGET_SET_FLAGS (button15, GTK_CAN_DEFAULT);
 1788 
 1789   g_signal_connect_swapped ((gpointer) button15, "clicked",
 1790                             G_CALLBACK (gtk_widget_hide),
 1791                             GTK_OBJECT (about));
 1792 
 1793   /* Store pointers to all widgets, for use by lookup_widget(). */
 1794   GLADE_HOOKUP_OBJECT_NO_REF (about, about, "about");
 1795   GLADE_HOOKUP_OBJECT (about, vbox7, "vbox7");
 1796   GLADE_HOOKUP_OBJECT (about, vbox8, "vbox8");
 1797   GLADE_HOOKUP_OBJECT (about, image1, "image1");
 1798   GLADE_HOOKUP_OBJECT (about, label28, "label28");
 1799   GLADE_HOOKUP_OBJECT (about, label27, "label27");
 1800   GLADE_HOOKUP_OBJECT (about, hseparator4, "hseparator4");
 1801   GLADE_HOOKUP_OBJECT (about, hbuttonbox4, "hbuttonbox4");
 1802   GLADE_HOOKUP_OBJECT (about, button15, "button15");
 1803 
 1804   return about;
 1805 }
 1806 
 1807 GtkWidget*
 1808 create_isoline_params (void)
 1809 {
 1810   GtkWidget *isoline_params;
 1811   GtkWidget *table1;
 1812   GtkWidget *label29;
 1813   GtkWidget *label30;
 1814   GtkWidget *label31;
 1815   GtkWidget *amin;
 1816   GtkWidget *amax;
 1817   GtkObject *spinbuttonmin_adj;
 1818   GtkWidget *spinbuttonmin;
 1819   GtkObject *spinbuttonmax_adj;
 1820   GtkWidget *spinbuttonmax;
 1821   GtkWidget *label32;
 1822   GtkObject *spinbuttoniso_adj;
 1823   GtkWidget *spinbuttoniso;
 1824   GtkWidget *entryiso;
 1825 
 1826   isoline_params = gtk_vbox_new (FALSE, 0);
 1827   gtk_container_set_border_width (GTK_CONTAINER (isoline_params), 4);
 1828 
 1829 
 1830   table1 = gtk_table_new (4, 3, FALSE);
 1831   gtk_widget_show (table1);
 1832   gtk_container_add (GTK_CONTAINER (isoline_params), table1);
 1833   gtk_table_set_row_spacings (GTK_TABLE (table1), 4);
 1834   gtk_table_set_col_spacings (GTK_TABLE (table1), 4);
 1835 
 1836   label29 = gtk_label_new ("Scalar");
 1837   gtk_widget_show (label29);
 1838   gtk_table_attach (GTK_TABLE (table1), label29, 0, 1, 0, 1,
 1839                     (GtkAttachOptions) (GTK_FILL),
 1840                     (GtkAttachOptions) (0), 0, 0);
 1841   gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5);
 1842 
 1843   label30 = gtk_label_new ("Minimum");
 1844   gtk_widget_show (label30);
 1845   gtk_table_attach (GTK_TABLE (table1), label30, 0, 1, 1, 2,
 1846                     (GtkAttachOptions) (GTK_FILL),
 1847                     (GtkAttachOptions) (0), 0, 0);
 1848   gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5);
 1849 
 1850   label31 = gtk_label_new ("Maximum");
 1851   gtk_widget_show (label31);
 1852   gtk_table_attach (GTK_TABLE (table1), label31, 0, 1, 2, 3,
 1853                     (GtkAttachOptions) (GTK_FILL),
 1854                     (GtkAttachOptions) (0), 0, 0);
 1855   gtk_misc_set_alignment (GTK_MISC (label31), 0, 0.5);
 1856 
 1857   amin = gtk_check_button_new_with_mnemonic ("Auto");
 1858   gtk_widget_show (amin);
 1859   gtk_table_attach (GTK_TABLE (table1), amin, 1, 2, 1, 2,
 1860                     (GtkAttachOptions) (GTK_FILL),
 1861                     (GtkAttachOptions) (0), 0, 0);
 1862   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (amin), TRUE);
 1863 
 1864   amax = gtk_check_button_new_with_mnemonic ("Auto");
 1865   gtk_widget_show (amax);
 1866   gtk_table_attach (GTK_TABLE (table1), amax, 1, 2, 2, 3,
 1867                     (GtkAttachOptions) (GTK_FILL),
 1868                     (GtkAttachOptions) (0), 0, 0);
 1869   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (amax), TRUE);
 1870 
 1871   spinbuttonmin_adj = gtk_adjustment_new (0, -1.00000001505e+30, 1.00000001505e+30, 1, 10, 0);
 1872   spinbuttonmin = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonmin_adj), 1, 5);
 1873   gtk_widget_show (spinbuttonmin);
 1874   gtk_table_attach (GTK_TABLE (table1), spinbuttonmin, 2, 3, 1, 2,
 1875                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1876                     (GtkAttachOptions) (0), 0, 0);
 1877   gtk_widget_set_sensitive (spinbuttonmin, FALSE);
 1878   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonmin), TRUE);
 1879   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonmin), GTK_UPDATE_IF_VALID);
 1880 
 1881   spinbuttonmax_adj = gtk_adjustment_new (0, -1.00000001505e+30, 1.00000001505e+30, 1, 10, 0);
 1882   spinbuttonmax = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonmax_adj), 1, 5);
 1883   gtk_widget_show (spinbuttonmax);
 1884   gtk_table_attach (GTK_TABLE (table1), spinbuttonmax, 2, 3, 2, 3,
 1885                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1886                     (GtkAttachOptions) (0), 0, 0);
 1887   gtk_widget_set_sensitive (spinbuttonmax, FALSE);
 1888   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonmax), TRUE);
 1889   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonmax), GTK_UPDATE_IF_VALID);
 1890 
 1891   label32 = gtk_label_new ("Isolines");
 1892   gtk_widget_show (label32);
 1893   gtk_table_attach (GTK_TABLE (table1), label32, 0, 1, 3, 4,
 1894                     (GtkAttachOptions) (GTK_FILL),
 1895                     (GtkAttachOptions) (0), 0, 0);
 1896   gtk_misc_set_alignment (GTK_MISC (label32), 0, 0.5);
 1897 
 1898   spinbuttoniso_adj = gtk_adjustment_new (10, 0, 1000, 1, 10, 0);
 1899   spinbuttoniso = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttoniso_adj), 1, 0);
 1900   gtk_widget_show (spinbuttoniso);
 1901   gtk_table_attach (GTK_TABLE (table1), spinbuttoniso, 1, 2, 3, 4,
 1902                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1903                     (GtkAttachOptions) (0), 0, 0);
 1904   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttoniso), TRUE);
 1905   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttoniso), GTK_UPDATE_IF_VALID);
 1906 
 1907   entryiso = gtk_entry_new ();
 1908   gtk_widget_show (entryiso);
 1909   gtk_table_attach (GTK_TABLE (table1), entryiso, 2, 3, 3, 4,
 1910                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 1911                     (GtkAttachOptions) (0), 0, 0);
 1912 
 1913   g_signal_connect ((gpointer) amin, "toggled",
 1914                     G_CALLBACK (on_amin_toggled),
 1915                     NULL);
 1916   g_signal_connect ((gpointer) amin, "toggled",
 1917                     G_CALLBACK (expose_gl),
 1918                     NULL);
 1919   g_signal_connect ((gpointer) amax, "toggled",
 1920                     G_CALLBACK (on_amax_toggled),
 1921                     NULL);
 1922   g_signal_connect ((gpointer) amax, "toggled",
 1923                     G_CALLBACK (expose_gl),
 1924                     NULL);
 1925   g_signal_connect ((gpointer) spinbuttonmin, "value_changed",
 1926                     G_CALLBACK (on_spinbuttonmin_changed),
 1927                     NULL);
 1928   g_signal_connect ((gpointer) spinbuttonmin, "changed",
 1929                     G_CALLBACK (mark_edited),
 1930                     NULL);
 1931   g_signal_connect ((gpointer) spinbuttonmin, "move_cursor",
 1932                     G_CALLBACK (mark_edited),
 1933                     NULL);
 1934   g_signal_connect ((gpointer) spinbuttonmin, "value_changed",
 1935                     G_CALLBACK (unmark_edited),
 1936                     NULL);
 1937   g_signal_connect ((gpointer) spinbuttonmax, "value_changed",
 1938                     G_CALLBACK (on_spinbuttonmax_changed),
 1939                     NULL);
 1940   g_signal_connect ((gpointer) spinbuttonmax, "changed",
 1941                     G_CALLBACK (mark_edited),
 1942                     NULL);
 1943   g_signal_connect ((gpointer) spinbuttonmax, "move_cursor",
 1944                     G_CALLBACK (mark_edited),
 1945                     NULL);
 1946   g_signal_connect ((gpointer) spinbuttonmax, "value_changed",
 1947                     G_CALLBACK (unmark_edited),
 1948                     NULL);
 1949   g_signal_connect ((gpointer) spinbuttoniso, "value_changed",
 1950                     G_CALLBACK (on_spinbuttoniso_value_changed),
 1951                     NULL);
 1952   g_signal_connect ((gpointer) entryiso, "activate",
 1953                     G_CALLBACK (on_entryiso_activate),
 1954                     NULL);
 1955 
 1956   /* Store pointers to all widgets, for use by lookup_widget(). */
 1957   GLADE_HOOKUP_OBJECT_NO_REF (isoline_params, isoline_params, "isoline_params");
 1958   GLADE_HOOKUP_OBJECT (isoline_params, table1, "table1");
 1959   GLADE_HOOKUP_OBJECT (isoline_params, label29, "label29");
 1960   GLADE_HOOKUP_OBJECT (isoline_params, label30, "label30");
 1961   GLADE_HOOKUP_OBJECT (isoline_params, label31, "label31");
 1962   GLADE_HOOKUP_OBJECT (isoline_params, amin, "amin");
 1963   GLADE_HOOKUP_OBJECT (isoline_params, amax, "amax");
 1964   GLADE_HOOKUP_OBJECT (isoline_params, spinbuttonmin, "spinbuttonmin");
 1965   GLADE_HOOKUP_OBJECT (isoline_params, spinbuttonmax, "spinbuttonmax");
 1966   GLADE_HOOKUP_OBJECT (isoline_params, label32, "label32");
 1967   GLADE_HOOKUP_OBJECT (isoline_params, spinbuttoniso, "spinbuttoniso");
 1968   GLADE_HOOKUP_OBJECT (isoline_params, entryiso, "entryiso");
 1969 
 1970   return isoline_params;
 1971 }
 1972 
 1973 GtkWidget*
 1974 create_gl2D_params (void)
 1975 {
 1976   GtkWidget *gl2D_params;
 1977   GtkWidget *table8;
 1978   GtkWidget *label34;
 1979   GtkWidget *label35;
 1980   GtkWidget *hbox4;
 1981   GtkObject *spinbuttonx_adj;
 1982   GtkWidget *spinbuttonx;
 1983   GtkObject *spinbuttony_adj;
 1984   GtkWidget *spinbuttony;
 1985   GtkObject *spinbuttonz_adj;
 1986   GtkWidget *spinbuttonz;
 1987   GtkObject *spinbuttonpos_adj;
 1988   GtkWidget *spinbuttonpos;
 1989 
 1990   gl2D_params = gtk_vbox_new (FALSE, 0);
 1991   gtk_container_set_border_width (GTK_CONTAINER (gl2D_params), 4);
 1992 
 1993 
 1994   table8 = gtk_table_new (2, 2, FALSE);
 1995   gtk_widget_show (table8);
 1996   gtk_container_add (GTK_CONTAINER (gl2D_params), table8);
 1997   gtk_table_set_row_spacings (GTK_TABLE (table8), 4);
 1998   gtk_table_set_col_spacings (GTK_TABLE (table8), 4);
 1999 
 2000   label34 = gtk_label_new ("Plane normal");
 2001   gtk_widget_show (label34);
 2002   gtk_table_attach (GTK_TABLE (table8), label34, 0, 1, 0, 1,
 2003                     (GtkAttachOptions) (GTK_FILL),
 2004                     (GtkAttachOptions) (0), 0, 0);
 2005   gtk_misc_set_alignment (GTK_MISC (label34), 0, 0.5);
 2006 
 2007   label35 = gtk_label_new ("Plane position");
 2008   gtk_widget_show (label35);
 2009   gtk_table_attach (GTK_TABLE (table8), label35, 0, 1, 1, 2,
 2010                     (GtkAttachOptions) (GTK_FILL),
 2011                     (GtkAttachOptions) (0), 0, 0);
 2012   gtk_misc_set_alignment (GTK_MISC (label35), 0, 0.5);
 2013 
 2014   hbox4 = gtk_hbox_new (FALSE, 0);
 2015   gtk_widget_show (hbox4);
 2016   gtk_table_attach (GTK_TABLE (table8), hbox4, 1, 2, 0, 1,
 2017                     (GtkAttachOptions) (GTK_FILL),
 2018                     (GtkAttachOptions) (GTK_FILL), 0, 0);
 2019 
 2020   spinbuttonx_adj = gtk_adjustment_new (0, -1, 1, 0.00999999977648, 0.019999999553, 0);
 2021   spinbuttonx = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonx_adj), 0.019999999553, 2);
 2022   gtk_widget_show (spinbuttonx);
 2023   gtk_box_pack_start (GTK_BOX (hbox4), spinbuttonx, TRUE, TRUE, 0);
 2024   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonx), TRUE);
 2025   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonx), GTK_UPDATE_IF_VALID);
 2026 
 2027   spinbuttony_adj = gtk_adjustment_new (0, -1, 1, 0.01, 0.02, 0);
 2028   spinbuttony = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttony_adj), 0.019999999553, 2);
 2029   gtk_widget_show (spinbuttony);
 2030   gtk_box_pack_start (GTK_BOX (hbox4), spinbuttony, TRUE, TRUE, 0);
 2031   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttony), TRUE);
 2032   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttony), GTK_UPDATE_IF_VALID);
 2033 
 2034   spinbuttonz_adj = gtk_adjustment_new (1, -1, 1, 0.01, 0.02, 0);
 2035   spinbuttonz = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonz_adj), 0.019999999553, 2);
 2036   gtk_widget_show (spinbuttonz);
 2037   gtk_box_pack_start (GTK_BOX (hbox4), spinbuttonz, TRUE, TRUE, 0);
 2038   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonz), TRUE);
 2039   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonz), GTK_UPDATE_IF_VALID);
 2040 
 2041   spinbuttonpos_adj = gtk_adjustment_new (0, -100, 100, 0.001, 0.01, 0);
 2042   spinbuttonpos = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonpos_adj), 0.00999999977648, 4);
 2043   gtk_widget_show (spinbuttonpos);
 2044   gtk_table_attach (GTK_TABLE (table8), spinbuttonpos, 1, 2, 1, 2,
 2045                     (GtkAttachOptions) (GTK_FILL),
 2046                     (GtkAttachOptions) (0), 0, 0);
 2047   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonpos), TRUE);
 2048   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonpos), GTK_UPDATE_IF_VALID);
 2049 
 2050   g_signal_connect ((gpointer) spinbuttonx, "value_changed",
 2051                     G_CALLBACK (on_spinbuttonx_changed),
 2052                     NULL);
 2053   g_signal_connect ((gpointer) spinbuttony, "value_changed",
 2054                     G_CALLBACK (on_spinbuttony_changed),
 2055                     NULL);
 2056   g_signal_connect ((gpointer) spinbuttonz, "value_changed",
 2057                     G_CALLBACK (on_spinbuttonz_changed),
 2058                     NULL);
 2059   g_signal_connect ((gpointer) spinbuttonpos, "value_changed",
 2060                     G_CALLBACK (on_spinbuttonpos_changed),
 2061                     NULL);
 2062 
 2063   /* Store pointers to all widgets, for use by lookup_widget(). */
 2064   GLADE_HOOKUP_OBJECT_NO_REF (gl2D_params, gl2D_params, "gl2D_params");
 2065   GLADE_HOOKUP_OBJECT (gl2D_params, table8, "table8");
 2066   GLADE_HOOKUP_OBJECT (gl2D_params, label34, "label34");
 2067   GLADE_HOOKUP_OBJECT (gl2D_params, label35, "label35");
 2068   GLADE_HOOKUP_OBJECT (gl2D_params, hbox4, "hbox4");
 2069   GLADE_HOOKUP_OBJECT (gl2D_params, spinbuttonx, "spinbuttonx");
 2070   GLADE_HOOKUP_OBJECT (gl2D_params, spinbuttony, "spinbuttony");
 2071   GLADE_HOOKUP_OBJECT (gl2D_params, spinbuttonz, "spinbuttonz");
 2072   GLADE_HOOKUP_OBJECT (gl2D_params, spinbuttonpos, "spinbuttonpos");
 2073 
 2074   return gl2D_params;
 2075 }
 2076 
 2077 GtkWidget*
 2078 create_isosurface_params (void)
 2079 {
 2080   GtkWidget *isosurface_params;
 2081   GtkWidget *table1;
 2082   GtkWidget *label36;
 2083   GtkWidget *label37;
 2084   GtkObject *spinbuttonlevel_adj;
 2085   GtkWidget *spinbuttonlevel;
 2086   GtkWidget *label38;
 2087   GtkWidget *reversed;
 2088   GtkWidget *label52;
 2089   GtkWidget *color;
 2090 
 2091   isosurface_params = gtk_vbox_new (FALSE, 0);
 2092   gtk_container_set_border_width (GTK_CONTAINER (isosurface_params), 4);
 2093 
 2094 
 2095   table1 = gtk_table_new (4, 2, FALSE);
 2096   gtk_widget_show (table1);
 2097   gtk_container_add (GTK_CONTAINER (isosurface_params), table1);
 2098   gtk_table_set_row_spacings (GTK_TABLE (table1), 4);
 2099   gtk_table_set_col_spacings (GTK_TABLE (table1), 4);
 2100 
 2101   label36 = gtk_label_new ("Scalar");
 2102   gtk_widget_show (label36);
 2103   gtk_table_attach (GTK_TABLE (table1), label36, 0, 1, 0, 1,
 2104                     (GtkAttachOptions) (GTK_FILL),
 2105                     (GtkAttachOptions) (0), 0, 0);
 2106   gtk_misc_set_alignment (GTK_MISC (label36), 0, 0.5);
 2107 
 2108   label37 = gtk_label_new ("Isosurfaces");
 2109   gtk_widget_show (label37);
 2110   gtk_table_attach (GTK_TABLE (table1), label37, 0, 1, 1, 2,
 2111                     (GtkAttachOptions) (GTK_FILL),
 2112                     (GtkAttachOptions) (0), 0, 0);
 2113   gtk_misc_set_alignment (GTK_MISC (label37), 0, 0.5);
 2114 
 2115   spinbuttonlevel_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 0);
 2116   spinbuttonlevel = gtk_spin_button_new (GTK_ADJUSTMENT (spinbuttonlevel_adj), 1, 0);
 2117   gtk_widget_show (spinbuttonlevel);
 2118   gtk_table_attach (GTK_TABLE (table1), spinbuttonlevel, 1, 2, 1, 2,
 2119                     (GtkAttachOptions) (GTK_FILL),
 2120                     (GtkAttachOptions) (0), 0, 0);
 2121   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbuttonlevel), TRUE);
 2122   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinbuttonlevel), GTK_UPDATE_IF_VALID);
 2123 
 2124   label38 = gtk_label_new ("Normals");
 2125   gtk_widget_show (label38);
 2126   gtk_table_attach (GTK_TABLE (table1), label38, 0, 1, 2, 3,
 2127                     (GtkAttachOptions) (GTK_FILL),
 2128                     (GtkAttachOptions) (0), 0, 0);
 2129   gtk_misc_set_alignment (GTK_MISC (label38), 0, 0.5);
 2130 
 2131   reversed = gtk_check_button_new_with_mnemonic ("reversed");
 2132   gtk_widget_show (reversed);
 2133   gtk_table_attach (GTK_TABLE (table1), reversed, 1, 2, 2, 3,
 2134                     (GtkAttachOptions) (GTK_FILL),
 2135                     (GtkAttachOptions) (0), 0, 0);
 2136 
 2137   label52 = gtk_label_new ("Color");
 2138   gtk_widget_show (label52);
 2139   gtk_table_attach (GTK_TABLE (table1), label52, 0, 1, 3, 4,
 2140                     (GtkAttachOptions) (GTK_FILL),
 2141                     (GtkAttachOptions) (0), 0, 0);
 2142   gtk_misc_set_alignment (GTK_MISC (label52), 0, 0.5);
 2143 
 2144   color = gtk_option_menu_new ();
 2145   gtk_widget_show (color);
 2146   gtk_table_attach (GTK_TABLE (table1), color, 1, 2, 3, 4,
 2147                     (GtkAttachOptions) (GTK_FILL),
 2148                     (GtkAttachOptions) (0), 0, 0);
 2149 
 2150   g_signal_connect ((gpointer) spinbuttonlevel, "value_changed",
 2151                     G_CALLBACK (on_spinbuttonlevel_changed),
 2152                     NULL);
 2153   g_signal_connect ((gpointer) spinbuttonlevel, "changed",
 2154                     G_CALLBACK (mark_edited),
 2155                     NULL);
 2156   g_signal_connect ((gpointer) spinbuttonlevel, "move_cursor",
 2157                     G_CALLBACK (mark_edited),
 2158                     NULL);
 2159   g_signal_connect ((gpointer) spinbuttonlevel, "value_changed",
 2160                     G_CALLBACK (unmark_edited),
 2161                     NULL);
 2162   g_signal_connect ((gpointer) reversed, "toggled",
 2163                     G_CALLBACK (on_reversed_toggled),
 2164                     NULL);
 2165 
 2166   /* Store pointers to all widgets, for use by lookup_widget(). */
 2167   GLADE_HOOKUP_OBJECT_NO_REF (isosurface_params, isosurface_params, "isosurface_params");
 2168   GLADE_HOOKUP_OBJECT (isosurface_params, table1, "table1");
 2169   GLADE_HOOKUP_OBJECT (isosurface_params, label36, "label36");
 2170   GLADE_HOOKUP_OBJECT (isosurface_params, label37, "label37");
 2171   GLADE_HOOKUP_OBJECT (isosurface_params, spinbuttonlevel, "spinbuttonlevel");
 2172   GLADE_HOOKUP_OBJECT (isosurface_params, label38, "label38");
 2173   GLADE_HOOKUP_OBJECT (isosurface_params, reversed, "reversed");
 2174   GLADE_HOOKUP_OBJECT (isosurface_params, label52, "label52");
 2175   GLADE_HOOKUP_OBJECT (isosurface_params, color, "color");
 2176 
 2177   return isosurface_params;
 2178 }
 2179 
 2180 GtkWidget*
 2181 create_solid_params (void)
 2182 {
 2183   GtkWidget *solid_params;
 2184   GtkWidget *table10;
 2185   GtkWidget *label39;
 2186   GtkWidget *reversed;
 2187   GtkWidget *label51;
 2188   GtkWidget *color;
 2189 
 2190   solid_params = gtk_vbox_new (FALSE, 0);
 2191   gtk_container_set_border_width (GTK_CONTAINER (solid_params), 4);
 2192 
 2193 
 2194   table10 = gtk_table_new (2, 2, FALSE);
 2195   gtk_widget_show (table10);
 2196   gtk_container_add (GTK_CONTAINER (solid_params), table10);
 2197   gtk_table_set_row_spacings (GTK_TABLE (table10), 4);
 2198   gtk_table_set_col_spacings (GTK_TABLE (table10), 4);
 2199 
 2200   label39 = gtk_label_new ("Normals");
 2201   gtk_widget_show (label39);
 2202   gtk_table_attach (GTK_TABLE (table10), label39, 0, 1, 0, 1,
 2203                     (GtkAttachOptions) (GTK_FILL),
 2204                     (GtkAttachOptions) (0), 0, 0);
 2205   gtk_misc_set_alignment (GTK_MISC (label39), 0, 0.5);
 2206 
 2207   reversed = gtk_check_button_new_with_mnemonic ("reversed");
 2208   gtk_widget_show (reversed);
 2209   gtk_table_attach (GTK_TABLE (table10), reversed, 1, 2, 0, 1,
 2210                     (GtkAttachOptions) (GTK_FILL),
 2211                     (GtkAttachOptions) (0), 0, 0);
 2212 
 2213   label51 = gtk_label_new ("Color");
 2214   gtk_widget_show (label51);
 2215   gtk_table_attach (GTK_TABLE (table10), label51, 0, 1, 1, 2,
 2216                     (GtkAttachOptions) (GTK_FILL),
 2217                     (GtkAttachOptions) (0), 0, 0);
 2218   gtk_misc_set_alignment (GTK_MISC (label51), 0, 0.5);
 2219 
 2220   color = gtk_option_menu_new ();
 2221   gtk_widget_show (color);
 2222   gtk_table_attach (GTK_TABLE (table10), color, 1, 2, 1, 2,
 2223                     (GtkAttachOptions) (GTK_FILL),
 2224                     (GtkAttachOptions) (0), 0, 0);
 2225 
 2226   g_signal_connect ((gpointer) reversed, "toggled",
 2227                     G_CALLBACK (on_solid_reversed_toggled),
 2228                     NULL);
 2229 
 2230   /* Store pointers to all widgets, for use by lookup_widget(). */
 2231   GLADE_HOOKUP_OBJECT_NO_REF (solid_params, solid_params, "solid_params");
 2232   GLADE_HOOKUP_OBJECT (solid_params, table10, "table10");
 2233   GLADE_HOOKUP_OBJECT (solid_params, label39, "label39");
 2234   GLADE_HOOKUP_OBJECT (solid_params, reversed, "reversed");
 2235   GLADE_HOOKUP_OBJECT (solid_params, label51, "label51");
 2236   GLADE_HOOKUP_OBJECT (solid_params, color, "color");
 2237 
 2238   return solid_params;
 2239 }
 2240 
 2241 GtkWidget*
 2242 create_ellipse_params (void)
 2243 {
 2244   GtkWidget *ellipse_params;
 2245   GtkWidget *table12;
 2246   GtkWidget *label60;
 2247   GtkWidget *label61;
 2248   GtkWidget *label62;
 2249   GtkWidget *label63;
 2250   GtkWidget *label43;
 2251   GtkWidget *label44;
 2252   GtkObject *scale_adj;
 2253   GtkWidget *scale;
 2254   GtkWidget *color;
 2255   GtkWidget *menu8;
 2256 
 2257   ellipse_params = gtk_vbox_new (FALSE, 0);
 2258   gtk_container_set_border_width (GTK_CONTAINER (ellipse_params), 4);
 2259 
 2260 
 2261   table12 = gtk_table_new (6, 2, FALSE);
 2262   gtk_widget_show (table12);
 2263   gtk_container_add (GTK_CONTAINER (ellipse_params), table12);
 2264   gtk_table_set_row_spacings (GTK_TABLE (table12), 4);
 2265   gtk_table_set_col_spacings (GTK_TABLE (table12), 4);
 2266 
 2267   label60 = gtk_label_new ("Ax");
 2268   gtk_widget_show (label60);
 2269   gtk_table_attach (GTK_TABLE (table12), label60, 0, 1, 0, 1,
 2270                     (GtkAttachOptions) (GTK_FILL),
 2271                     (GtkAttachOptions) (0), 0, 0);
 2272   gtk_misc_set_alignment (GTK_MISC (label60), 0, 0.5);
 2273 
 2274   label61 = gtk_label_new ("Ay");
 2275   gtk_widget_show (label61);
 2276   gtk_table_attach (GTK_TABLE (table12), label61, 0, 1, 1, 2,
 2277                     (GtkAttachOptions) (GTK_FILL),
 2278                     (GtkAttachOptions) (0), 0, 0);
 2279   gtk_misc_set_alignment (GTK_MISC (label61), 0, 0.5);
 2280 
 2281   label62 = gtk_label_new ("Bx");
 2282   gtk_widget_show (label62);
 2283   gtk_table_attach (GTK_TABLE (table12), label62, 0, 1, 2, 3,
 2284                     (GtkAttachOptions) (GTK_FILL),
 2285                     (GtkAttachOptions) (0), 0, 0);
 2286   gtk_misc_set_alignment (GTK_MISC (label62), 0, 0.5);
 2287 
 2288   label63 = gtk_label_new ("By");
 2289   gtk_widget_show (label63);
 2290   gtk_table_attach (GTK_TABLE (table12), label63, 0, 1, 3, 4,
 2291                     (GtkAttachOptions) (GTK_FILL),
 2292                     (GtkAttachOptions) (0), 0, 0);
 2293   gtk_misc_set_alignment (GTK_MISC (label63), 0, 0.5);
 2294 
 2295   label43 = gtk_label_new ("Scale");
 2296   gtk_widget_show (label43);
 2297   gtk_table_attach (GTK_TABLE (table12), label43, 0, 1, 4, 5,
 2298                     (GtkAttachOptions) (GTK_FILL),
 2299                     (GtkAttachOptions) (0), 0, 0);
 2300   gtk_label_set_justify (GTK_LABEL (label43), GTK_JUSTIFY_CENTER);
 2301   gtk_misc_set_alignment (GTK_MISC (label43), 0, 0.5);
 2302 
 2303   label44 = gtk_label_new ("Color");
 2304   gtk_widget_show (label44);
 2305   gtk_table_attach (GTK_TABLE (table12), label44, 0, 1, 5, 6,
 2306                     (GtkAttachOptions) (GTK_FILL),
 2307                     (GtkAttachOptions) (0), 0, 0);
 2308   gtk_label_set_justify (GTK_LABEL (label44), GTK_JUSTIFY_CENTER);
 2309   gtk_misc_set_alignment (GTK_MISC (label44), 0, 0.5);
 2310 
 2311   scale_adj = gtk_adjustment_new (1, 0, 10000, 0.10000000149, 1, 0);
 2312   scale = gtk_spin_button_new (GTK_ADJUSTMENT (scale_adj), 0.10000000149, 1);
 2313   gtk_widget_show (scale);
 2314   gtk_table_attach (GTK_TABLE (table12), scale, 1, 2, 4, 5,
 2315                     (GtkAttachOptions) (GTK_FILL),
 2316                     (GtkAttachOptions) (0), 0, 0);
 2317   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale), TRUE);
 2318 
 2319   color = gtk_option_menu_new ();
 2320   gtk_widget_show (color);
 2321   gtk_table_attach (GTK_TABLE (table12), color, 1, 2, 5, 6,
 2322                     (GtkAttachOptions) (GTK_FILL),
 2323                     (GtkAttachOptions) (0), 0, 0);
 2324 
 2325   menu8 = gtk_menu_new ();
 2326 
 2327   gtk_option_menu_set_menu (GTK_OPTION_MENU (color), menu8);
 2328 
 2329   g_signal_connect ((gpointer) scale, "value_changed",
 2330                     G_CALLBACK (on_ellipse_scale_changed),
 2331                     NULL);
 2332   g_signal_connect ((gpointer) scale, "changed",
 2333                     G_CALLBACK (mark_edited),
 2334                     NULL);
 2335   g_signal_connect ((gpointer) scale, "move_cursor",
 2336                     G_CALLBACK (mark_edited),
 2337                     NULL);
 2338   g_signal_connect ((gpointer) scale, "value_changed",
 2339                     G_CALLBACK (unmark_edited),
 2340                     NULL);
 2341 
 2342   /* Store pointers to all widgets, for use by lookup_widget(). */
 2343   GLADE_HOOKUP_OBJECT_NO_REF (ellipse_params, ellipse_params, "ellipse_params");
 2344   GLADE_HOOKUP_OBJECT (ellipse_params, table12, "table12");
 2345   GLADE_HOOKUP_OBJECT (ellipse_params, label60, "label60");
 2346   GLADE_HOOKUP_OBJECT (ellipse_params, label61, "label61");
 2347   GLADE_HOOKUP_OBJECT (ellipse_params, label62, "label62");
 2348   GLADE_HOOKUP_OBJECT (ellipse_params, label63, "label63");
 2349   GLADE_HOOKUP_OBJECT (ellipse_params, label43, "label43");
 2350   GLADE_HOOKUP_OBJECT (ellipse_params, label44, "label44");
 2351   GLADE_HOOKUP_OBJECT (ellipse_params, scale, "scale");
 2352   GLADE_HOOKUP_OBJECT (ellipse_params, color, "color");
 2353   GLADE_HOOKUP_OBJECT (ellipse_params, menu8, "menu8");
 2354 
 2355   return ellipse_params;
 2356 }
 2357 
 2358 GtkWidget*
 2359 create_location_params (void)
 2360 {
 2361   GtkWidget *location_params;
 2362   GtkWidget *table14;
 2363   GtkWidget *label50;
 2364   GtkObject *size_adj;
 2365   GtkWidget *size;
 2366   GtkWidget *location_label;
 2367   GtkWidget *location_label_check;
 2368 
 2369   location_params = gtk_vbox_new (FALSE, 0);
 2370   gtk_container_set_border_width (GTK_CONTAINER (location_params), 4);
 2371 
 2372 
 2373   table14 = gtk_table_new (2, 2, FALSE);
 2374   gtk_widget_show (table14);
 2375   gtk_container_add (GTK_CONTAINER (location_params), table14);
 2376   gtk_table_set_row_spacings (GTK_TABLE (table14), 4);
 2377   gtk_table_set_col_spacings (GTK_TABLE (table14), 4);
 2378 
 2379   label50 = gtk_label_new ("Symbol size");
 2380   gtk_widget_show (label50);
 2381   gtk_table_attach (GTK_TABLE (table14), label50, 0, 1, 0, 1,
 2382                     (GtkAttachOptions) (GTK_FILL),
 2383                     (GtkAttachOptions) (0), 0, 0);
 2384   gtk_misc_set_alignment (GTK_MISC (label50), 0, 0.5);
 2385 
 2386   size_adj = gtk_adjustment_new (1, 0.1, 100, 0.1, 1, 0);
 2387   size = gtk_spin_button_new (GTK_ADJUSTMENT (size_adj), 0.10000000149, 1);
 2388   gtk_widget_show (size);
 2389   gtk_table_attach (GTK_TABLE (table14), size, 1, 2, 0, 1,
 2390                     (GtkAttachOptions) (GTK_FILL),
 2391                     (GtkAttachOptions) (0), 0, 0);
 2392   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (size), GTK_UPDATE_IF_VALID);
 2393 
 2394   location_label = gtk_label_new ("Label");
 2395   gtk_widget_show (location_label);
 2396   gtk_table_attach (GTK_TABLE (table14), location_label, 0, 1, 1, 2,
 2397                     (GtkAttachOptions) (GTK_FILL),
 2398                     (GtkAttachOptions) (0), 0, 0);
 2399   gtk_misc_set_alignment (GTK_MISC (location_label), 0, 0.5);
 2400 
 2401   location_label_check = gtk_check_button_new_with_mnemonic ("");
 2402   gtk_widget_show (location_label_check);
 2403   gtk_table_attach (GTK_TABLE (table14), location_label_check, 1, 2, 1, 2,
 2404                     (GtkAttachOptions) (GTK_FILL),
 2405                     (GtkAttachOptions) (0), 0, 0);
 2406   GTK_WIDGET_UNSET_FLAGS (location_label_check, GTK_CAN_FOCUS);
 2407 
 2408   g_signal_connect ((gpointer) size, "value_changed",
 2409                     G_CALLBACK (on_symbol_size_value_changed),
 2410                     NULL);
 2411   g_signal_connect ((gpointer) location_label_check, "toggled",
 2412                     G_CALLBACK (on_location_label_toggled),
 2413                     NULL);
 2414 
 2415   /* Store pointers to all widgets, for use by lookup_widget(). */
 2416   GLADE_HOOKUP_OBJECT_NO_REF (location_params, location_params, "location_params");
 2417   GLADE_HOOKUP_OBJECT (location_params, table14, "table14");
 2418   GLADE_HOOKUP_OBJECT (location_params, label50, "label50");
 2419   GLADE_HOOKUP_OBJECT (location_params, size, "size");
 2420   GLADE_HOOKUP_OBJECT (location_params, location_label, "location_label");
 2421   GLADE_HOOKUP_OBJECT (location_params, location_label_check, "location_label_check");
 2422 
 2423   return location_params;
 2424 }
 2425 
 2426 GtkWidget*
 2427 create_play (void)
 2428 {
 2429   GtkWidget *play;
 2430   GtkWidget *hbuttonbox6;
 2431   GtkWidget *back;
 2432   GtkWidget *forward;
 2433 
 2434   play = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 2435   gtk_container_set_border_width (GTK_CONTAINER (play), 4);
 2436   gtk_window_set_title (GTK_WINDOW (play), "Play");
 2437 
 2438   hbuttonbox6 = gtk_hbutton_box_new ();
 2439   gtk_widget_show (hbuttonbox6);
 2440   gtk_container_add (GTK_CONTAINER (play), hbuttonbox6);
 2441   gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox6), GTK_BUTTONBOX_SPREAD);
 2442 
 2443   back = gtk_button_new_from_stock ("gtk-go-back");
 2444   gtk_widget_show (back);
 2445   gtk_container_add (GTK_CONTAINER (hbuttonbox6), back);
 2446   gtk_widget_set_sensitive (back, FALSE);
 2447   GTK_WIDGET_UNSET_FLAGS (back, GTK_CAN_FOCUS);
 2448 
 2449   forward = gtk_button_new_from_stock ("gtk-go-forward");
 2450   gtk_widget_show (forward);
 2451   gtk_container_add (GTK_CONTAINER (hbuttonbox6), forward);
 2452   GTK_WIDGET_UNSET_FLAGS (forward, GTK_CAN_FOCUS);
 2453 
 2454   g_signal_connect ((gpointer) back, "clicked",
 2455                     G_CALLBACK (on_back_clicked),
 2456                     NULL);
 2457   g_signal_connect ((gpointer) forward, "clicked",
 2458                     G_CALLBACK (on_forward_clicked),
 2459                     NULL);
 2460 
 2461   /* Store pointers to all widgets, for use by lookup_widget(). */
 2462   GLADE_HOOKUP_OBJECT_NO_REF (play, play, "play");
 2463   GLADE_HOOKUP_OBJECT (play, hbuttonbox6, "hbuttonbox6");
 2464   GLADE_HOOKUP_OBJECT (play, back, "back");
 2465   GLADE_HOOKUP_OBJECT (play, forward, "forward");
 2466 
 2467   return play;
 2468 }
 2469 
 2470 GtkWidget*
 2471 create_linear_params (void)
 2472 {
 2473   GtkWidget *linear_params;
 2474   GtkWidget *table1;
 2475   GtkWidget *label104;
 2476   GtkWidget *normals;
 2477   GtkWidget *reversed;
 2478   GtkWidget *label107;
 2479   GtkWidget *color;
 2480 
 2481   linear_params = gtk_vbox_new (FALSE, 0);
 2482   gtk_container_set_border_width (GTK_CONTAINER (linear_params), 4);
 2483 
 2484 
 2485   table1 = gtk_table_new (3, 2, FALSE);
 2486   gtk_widget_show (table1);
 2487   gtk_container_add (GTK_CONTAINER (linear_params), table1);
 2488   gtk_table_set_row_spacings (GTK_TABLE (table1), 4);
 2489   gtk_table_set_col_spacings (GTK_TABLE (table1), 4);
 2490 
 2491   label104 = gtk_label_new ("Z scalar");
 2492   gtk_widget_show (label104);
 2493   gtk_table_attach (GTK_TABLE (table1), label104, 0, 1, 0, 1,
 2494                     (GtkAttachOptions) (GTK_FILL),
 2495                     (GtkAttachOptions) (0), 0, 0);
 2496   gtk_misc_set_alignment (GTK_MISC (label104), 0, 0.5);
 2497 
 2498   normals = gtk_label_new ("Normals");
 2499   gtk_widget_show (normals);
 2500   gtk_table_attach (GTK_TABLE (table1), normals, 0, 1, 1, 2,
 2501                     (GtkAttachOptions) (GTK_FILL),
 2502                     (GtkAttachOptions) (0), 0, 0);
 2503   gtk_misc_set_alignment (GTK_MISC (normals), 0, 0.5);
 2504 
 2505   reversed = gtk_check_button_new_with_mnemonic ("reversed");
 2506   gtk_widget_show (reversed);
 2507   gtk_table_attach (GTK_TABLE (table1), reversed, 1, 2, 1, 2,
 2508                     (GtkAttachOptions) (GTK_FILL),
 2509                     (GtkAttachOptions) (0), 0, 0);
 2510 
 2511   label107 = gtk_label_new ("Color");
 2512   gtk_widget_show (label107);
 2513   gtk_table_attach (GTK_TABLE (table1), label107, 0, 1, 2, 3,
 2514                     (GtkAttachOptions) (GTK_FILL),
 2515                     (GtkAttachOptions) (0), 0, 0);
 2516   gtk_misc_set_alignment (GTK_MISC (label107), 0, 0.5);
 2517 
 2518   color = gtk_option_menu_new ();
 2519   gtk_widget_show (color);
 2520   gtk_table_attach (GTK_TABLE (table1), color, 1, 2, 2, 3,
 2521                     (GtkAttachOptions) (GTK_FILL),
 2522                     (GtkAttachOptions) (0), 0, 0);
 2523 
 2524   g_signal_connect ((gpointer) reversed, "toggled",
 2525                     G_CALLBACK (on_linear_reversed_toggled),
 2526                     NULL);
 2527 
 2528   /* Store pointers to all widgets, for use by lookup_widget(). */
 2529   GLADE_HOOKUP_OBJECT_NO_REF (linear_params, linear_params, "linear_params");
 2530   GLADE_HOOKUP_OBJECT (linear_params, table1, "table1");
 2531   GLADE_HOOKUP_OBJECT (linear_params, label104, "label104");
 2532   GLADE_HOOKUP_OBJECT (linear_params, normals, "normals");
 2533   GLADE_HOOKUP_OBJECT (linear_params, reversed, "reversed");
 2534   GLADE_HOOKUP_OBJECT (linear_params, label107, "label107");
 2535   GLADE_HOOKUP_OBJECT (linear_params, color, "color");
 2536 
 2537   return linear_params;
 2538 }
 2539 
 2540 GtkWidget*
 2541 create_streamlines_params (void)
 2542 {
 2543   GtkWidget *streamlines_params;
 2544   GtkWidget *vbox9;
 2545   GtkWidget *showcells;
 2546   GtkWidget *hbox8;
 2547   GtkWidget *label68;
 2548   GtkWidget *radiobutton5;
 2549   GSList *radiobutton5_group = NULL;
 2550   GtkWidget *snapcenters;
 2551   GtkWidget *snapspacing;
 2552   GtkWidget *table18;
 2553   GtkWidget *label67;
 2554   GtkObject *dmin_adj;
 2555   GtkWidget *dmin;
 2556   GtkWidget *params_3D;
 2557   GtkWidget *hseparator9;
 2558   GtkWidget *hbox10;
 2559   GtkWidget *label70;
 2560   GtkObject *radius_adj;
 2561   GtkWidget *radius;
 2562   GtkWidget *hseparator8;
 2563   GtkWidget *hbox7;
 2564   GtkWidget *radiobutton1;
 2565   GSList *radiobutton1_group = NULL;
 2566   GtkWidget *radiobutton2;
 2567   GtkWidget *delete;
 2568   GtkWidget *hseparator7;
 2569   GtkWidget *evenly_spaced;
 2570   GtkWidget *label_evenly;
 2571   GtkWidget *execute_evenly;
 2572   GtkWidget *stop_evenly;
 2573   GtkWidget *show_execution;
 2574 
 2575   streamlines_params = gtk_vbox_new (FALSE, 0);
 2576   gtk_container_set_border_width (GTK_CONTAINER (streamlines_params), 4);
 2577 
 2578 
 2579   vbox9 = gtk_vbox_new (FALSE, 4);
 2580   gtk_widget_show (vbox9);
 2581   gtk_container_add (GTK_CONTAINER (streamlines_params), vbox9);
 2582 
 2583   showcells = gtk_check_button_new_with_mnemonic ("Show cells");
 2584   gtk_widget_show (showcells);
 2585   gtk_box_pack_start (GTK_BOX (vbox9), showcells, FALSE, FALSE, 0);
 2586   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (showcells), TRUE);
 2587 
 2588   hbox8 = gtk_hbox_new (FALSE, 4);
 2589   gtk_widget_show (hbox8);
 2590   gtk_box_pack_start (GTK_BOX (vbox9), hbox8, FALSE, FALSE, 0);
 2591 
 2592   label68 = gtk_label_new ("Snap");
 2593   gtk_widget_show (label68);
 2594   gtk_box_pack_start (GTK_BOX (hbox8), label68, FALSE, FALSE, 0);
 2595 
 2596   radiobutton5 = gtk_radio_button_new_with_mnemonic (NULL, "None");
 2597   gtk_widget_show (radiobutton5);
 2598   gtk_box_pack_start (GTK_BOX (hbox8), radiobutton5, FALSE, FALSE, 0);
 2599   gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton5), radiobutton5_group);
 2600   radiobutton5_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton5));
 2601   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton5), TRUE);
 2602 
 2603   snapcenters = gtk_radio_button_new_with_mnemonic (NULL, "Centers");
 2604   gtk_widget_show (snapcenters);
 2605   gtk_box_pack_start (GTK_BOX (hbox8), snapcenters, FALSE, FALSE, 0);
 2606   gtk_radio_button_set_group (GTK_RADIO_BUTTON (snapcenters), radiobutton5_group);
 2607   radiobutton5_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (snapcenters));
 2608 
 2609   snapspacing = gtk_radio_button_new_with_mnemonic (NULL, "Spacing");
 2610   gtk_widget_show (snapspacing);
 2611   gtk_box_pack_start (GTK_BOX (hbox8), snapspacing, FALSE, FALSE, 0);
 2612   gtk_radio_button_set_group (GTK_RADIO_BUTTON (snapspacing), radiobutton5_group);
 2613   radiobutton5_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (snapspacing));
 2614 
 2615   table18 = gtk_table_new (1, 2, FALSE);
 2616   gtk_widget_show (table18);
 2617   gtk_box_pack_start (GTK_BOX (vbox9), table18, FALSE, TRUE, 0);
 2618   gtk_table_set_row_spacings (GTK_TABLE (table18), 4);
 2619   gtk_table_set_col_spacings (GTK_TABLE (table18), 4);
 2620 
 2621   label67 = gtk_label_new ("Minimum spacing");
 2622   gtk_widget_show (label67);
 2623   gtk_table_attach (GTK_TABLE (table18), label67, 0, 1, 0, 1,
 2624                     (GtkAttachOptions) (GTK_FILL),
 2625                     (GtkAttachOptions) (0), 0, 0);
 2626   gtk_misc_set_alignment (GTK_MISC (label67), 0, 0.5);
 2627 
 2628   dmin_adj = gtk_adjustment_new (0, 0, 1, 9.99999974738e-05, 0.0010000000475, 0);
 2629   dmin = gtk_spin_button_new (GTK_ADJUSTMENT (dmin_adj), 0.0010000000475, 5);
 2630   gtk_widget_show (dmin);
 2631   gtk_table_attach (GTK_TABLE (table18), dmin, 1, 2, 0, 1,
 2632                     (GtkAttachOptions) (GTK_FILL),
 2633                     (GtkAttachOptions) (0), 0, 0);
 2634   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (dmin), TRUE);
 2635   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (dmin), GTK_UPDATE_IF_VALID);
 2636 
 2637   params_3D = gtk_vbox_new (FALSE, 4);
 2638   gtk_widget_show (params_3D);
 2639   gtk_box_pack_start (GTK_BOX (vbox9), params_3D, TRUE, TRUE, 0);
 2640 
 2641   hseparator9 = gtk_hseparator_new ();
 2642   gtk_widget_show (hseparator9);
 2643   gtk_box_pack_start (GTK_BOX (params_3D), hseparator9, TRUE, TRUE, 0);
 2644 
 2645   hbox10 = gtk_hbox_new (FALSE, 4);
 2646   gtk_widget_show (hbox10);
 2647   gtk_box_pack_start (GTK_BOX (params_3D), hbox10, TRUE, TRUE, 0);
 2648 
 2649   label70 = gtk_label_new ("Radius");
 2650   gtk_widget_show (label70);
 2651   gtk_box_pack_start (GTK_BOX (hbox10), label70, FALSE, FALSE, 0);
 2652 
 2653   radius_adj = gtk_adjustment_new (0, 0, 1, 9.99999974738e-05, 0.0010000000475, 0);
 2654   radius = gtk_spin_button_new (GTK_ADJUSTMENT (radius_adj), 9.99999974738e-05, 5);
 2655   gtk_widget_show (radius);
 2656   gtk_box_pack_start (GTK_BOX (hbox10), radius, FALSE, TRUE, 0);
 2657   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radius), TRUE);
 2658   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (radius), GTK_UPDATE_IF_VALID);
 2659 
 2660   hseparator8 = gtk_hseparator_new ();
 2661   gtk_widget_show (hseparator8);
 2662   gtk_box_pack_start (GTK_BOX (vbox9), hseparator8, TRUE, TRUE, 0);
 2663 
 2664   hbox7 = gtk_hbox_new (FALSE, 4);
 2665   gtk_widget_show (hbox7);
 2666   gtk_box_pack_start (GTK_BOX (vbox9), hbox7, FALSE, FALSE, 0);
 2667 
 2668   radiobutton1 = gtk_radio_button_new_with_mnemonic (NULL, "gtk-new");
 2669   gtk_button_set_use_stock (GTK_BUTTON (radiobutton1), TRUE);
 2670   gtk_widget_show (radiobutton1);
 2671   gtk_box_pack_start (GTK_BOX (hbox7), radiobutton1, FALSE, FALSE, 0);
 2672   gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton1), radiobutton1_group);
 2673   radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton1));
 2674 
 2675   radiobutton2 = gtk_radio_button_new_with_mnemonic (NULL, "gtk-edit");
 2676   gtk_button_set_use_stock (GTK_BUTTON (radiobutton2), TRUE);
 2677   gtk_widget_show (radiobutton2);
 2678   gtk_box_pack_start (GTK_BOX (hbox7), radiobutton2, FALSE, FALSE, 0);
 2679   gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton2), radiobutton1_group);
 2680   radiobutton1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton2));
 2681 
 2682   delete = gtk_button_new_from_stock ("gtk-delete");
 2683   gtk_widget_show (delete);
 2684   gtk_box_pack_start (GTK_BOX (hbox7), delete, FALSE, FALSE, 0);
 2685 
 2686   hseparator7 = gtk_hseparator_new ();
 2687   gtk_widget_show (hseparator7);
 2688   gtk_box_pack_start (GTK_BOX (vbox9), hseparator7, TRUE, TRUE, 0);
 2689 
 2690   evenly_spaced = gtk_hbox_new (FALSE, 4);
 2691   gtk_widget_show (evenly_spaced);
 2692   gtk_box_pack_start (GTK_BOX (vbox9), evenly_spaced, FALSE, FALSE, 0);
 2693 
 2694   label_evenly = gtk_label_new ("Evenly spaced");
 2695   gtk_widget_show (label_evenly);
 2696   gtk_box_pack_start (GTK_BOX (evenly_spaced), label_evenly, FALSE, FALSE, 0);
 2697 
 2698   execute_evenly = gtk_button_new_from_stock ("gtk-execute");
 2699   gtk_widget_show (execute_evenly);
 2700   gtk_box_pack_start (GTK_BOX (evenly_spaced), execute_evenly, FALSE, FALSE, 0);
 2701 
 2702   stop_evenly = gtk_button_new_from_stock ("gtk-stop");
 2703   gtk_widget_show (stop_evenly);
 2704   gtk_box_pack_start (GTK_BOX (evenly_spaced), stop_evenly, FALSE, FALSE, 0);
 2705   gtk_widget_set_sensitive (stop_evenly, FALSE);
 2706 
 2707   show_execution = gtk_check_button_new_with_mnemonic ("Show execution");
 2708   gtk_widget_show (show_execution);
 2709   gtk_box_pack_start (GTK_BOX (evenly_spaced), show_execution, FALSE, FALSE, 0);
 2710 
 2711   g_signal_connect ((gpointer) showcells, "toggled",
 2712                     G_CALLBACK (on_show_cells_toggled),
 2713                     NULL);
 2714   g_signal_connect ((gpointer) dmin, "value_changed",
 2715                     G_CALLBACK (on_dmin_changed),
 2716                     NULL);
 2717   g_signal_connect ((gpointer) radius, "value_changed",
 2718                     G_CALLBACK (on_radius_changed),
 2719                     NULL);
 2720   g_signal_connect ((gpointer) radiobutton1, "toggled",
 2721                     G_CALLBACK (on_new_streamline_toggled),
 2722                     NULL);
 2723   g_signal_connect ((gpointer) delete, "clicked",
 2724                     G_CALLBACK (on_delete_streamline_clicked),
 2725                     NULL);
 2726   g_signal_connect ((gpointer) execute_evenly, "clicked",
 2727                     G_CALLBACK (on_evenly_spaced_clicked),
 2728                     NULL);
 2729   g_signal_connect ((gpointer) stop_evenly, "clicked",
 2730                     G_CALLBACK (on_stop_evenly_clicked),
 2731                     NULL);
 2732 
 2733   /* Store pointers to all widgets, for use by lookup_widget(). */
 2734   GLADE_HOOKUP_OBJECT_NO_REF (streamlines_params, streamlines_params, "streamlines_params");
 2735   GLADE_HOOKUP_OBJECT (streamlines_params, vbox9, "vbox9");
 2736   GLADE_HOOKUP_OBJECT (streamlines_params, showcells, "showcells");
 2737   GLADE_HOOKUP_OBJECT (streamlines_params, hbox8, "hbox8");
 2738   GLADE_HOOKUP_OBJECT (streamlines_params, label68, "label68");
 2739   GLADE_HOOKUP_OBJECT (streamlines_params, radiobutton5, "radiobutton5");
 2740   GLADE_HOOKUP_OBJECT (streamlines_params, snapcenters, "snapcenters");
 2741   GLADE_HOOKUP_OBJECT (streamlines_params, snapspacing, "snapspacing");
 2742   GLADE_HOOKUP_OBJECT (streamlines_params, table18, "table18");
 2743   GLADE_HOOKUP_OBJECT (streamlines_params, label67, "label67");
 2744   GLADE_HOOKUP_OBJECT (streamlines_params, dmin, "dmin");
 2745   GLADE_HOOKUP_OBJECT (streamlines_params, params_3D, "params_3D");
 2746   GLADE_HOOKUP_OBJECT (streamlines_params, hseparator9, "hseparator9");
 2747   GLADE_HOOKUP_OBJECT (streamlines_params, hbox10, "hbox10");
 2748   GLADE_HOOKUP_OBJECT (streamlines_params, label70, "label70");
 2749   GLADE_HOOKUP_OBJECT (streamlines_params, radius, "radius");
 2750   GLADE_HOOKUP_OBJECT (streamlines_params, hseparator8, "hseparator8");
 2751   GLADE_HOOKUP_OBJECT (streamlines_params, hbox7, "hbox7");
 2752   GLADE_HOOKUP_OBJECT (streamlines_params, radiobutton1, "radiobutton1");
 2753   GLADE_HOOKUP_OBJECT (streamlines_params, radiobutton2, "radiobutton2");
 2754   GLADE_HOOKUP_OBJECT (streamlines_params, delete, "delete");
 2755   GLADE_HOOKUP_OBJECT (streamlines_params, hseparator7, "hseparator7");
 2756   GLADE_HOOKUP_OBJECT (streamlines_params, evenly_spaced, "evenly_spaced");
 2757   GLADE_HOOKUP_OBJECT (streamlines_params, label_evenly, "label_evenly");
 2758   GLADE_HOOKUP_OBJECT (streamlines_params, execute_evenly, "execute_evenly");
 2759   GLADE_HOOKUP_OBJECT (streamlines_params, stop_evenly, "stop_evenly");
 2760   GLADE_HOOKUP_OBJECT (streamlines_params, show_execution, "show_execution");
 2761 
 2762   return streamlines_params;
 2763 }
 2764 
 2765 GtkWidget*
 2766 create_variables (void)
 2767 {
 2768   GtkWidget *variables;
 2769   GtkWidget *vbox13;
 2770   GtkWidget *scrolledwindow3;
 2771   GtkWidget *tree;
 2772   GtkWidget *hbuttonbox7;
 2773   GtkWidget *cancel;
 2774   GtkWidget *OK;
 2775 
 2776   variables = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 2777   gtk_window_set_title (GTK_WINDOW (variables), "Variables");
 2778   gtk_window_set_position (GTK_WINDOW (variables), GTK_WIN_POS_MOUSE);
 2779 
 2780   vbox13 = gtk_vbox_new (FALSE, 4);
 2781   gtk_widget_show (vbox13);
 2782   gtk_container_add (GTK_CONTAINER (variables), vbox13);
 2783 
 2784   scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
 2785   gtk_widget_show (scrolledwindow3);
 2786   gtk_box_pack_start (GTK_BOX (vbox13), scrolledwindow3, TRUE, TRUE, 0);
 2787   gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow3), 4);
 2788   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 2789   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_ETCHED_IN);
 2790 
 2791   tree = gtk_tree_view_new ();
 2792   gtk_widget_show (tree);
 2793   gtk_container_add (GTK_CONTAINER (scrolledwindow3), tree);
 2794   gtk_widget_set_size_request (tree, 300, 180);
 2795 
 2796   hbuttonbox7 = gtk_hbutton_box_new ();
 2797   gtk_widget_show (hbuttonbox7);
 2798   gtk_box_pack_start (GTK_BOX (vbox13), hbuttonbox7, FALSE, TRUE, 0);
 2799   gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox7), 2);
 2800   gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox7), GTK_BUTTONBOX_END);
 2801   gtk_box_set_spacing (GTK_BOX (hbuttonbox7), 10);
 2802 
 2803   cancel = gtk_button_new_from_stock ("gtk-cancel");
 2804   gtk_widget_show (cancel);
 2805   gtk_container_add (GTK_CONTAINER (hbuttonbox7), cancel);
 2806   GTK_WIDGET_SET_FLAGS (cancel, GTK_CAN_DEFAULT);
 2807 
 2808   OK = gtk_button_new_from_stock ("gtk-ok");
 2809   gtk_widget_show (OK);
 2810   gtk_container_add (GTK_CONTAINER (hbuttonbox7), OK);
 2811   GTK_WIDGET_SET_FLAGS (OK, GTK_CAN_DEFAULT);
 2812 
 2813   /* Store pointers to all widgets, for use by lookup_widget(). */
 2814   GLADE_HOOKUP_OBJECT_NO_REF (variables, variables, "variables");
 2815   GLADE_HOOKUP_OBJECT (variables, vbox13, "vbox13");
 2816   GLADE_HOOKUP_OBJECT (variables, scrolledwindow3, "scrolledwindow3");
 2817   GLADE_HOOKUP_OBJECT (variables, tree, "tree");
 2818   GLADE_HOOKUP_OBJECT (variables, hbuttonbox7, "hbuttonbox7");
 2819   GLADE_HOOKUP_OBJECT (variables, cancel, "cancel");
 2820   GLADE_HOOKUP_OBJECT (variables, OK, "OK");
 2821 
 2822   gtk_widget_grab_default (OK);
 2823   return variables;
 2824 }
 2825 
 2826 GtkWidget*
 2827 create_info_params (void)
 2828 {
 2829   GtkWidget *info_params;
 2830   GtkWidget *scrolledwindow4;
 2831   GtkWidget *viewport1;
 2832   GtkWidget *vbox14;
 2833   GtkWidget *label78;
 2834   GtkWidget *mesh_stats_table;
 2835   GtkWidget *label83;
 2836   GtkWidget *label84;
 2837   GtkWidget *label85;
 2838   GtkWidget *number_of_levels;
 2839   GtkWidget *number_of_cells;
 2840   GtkWidget *number_of_leaf_cells;
 2841   GtkWidget *label86;
 2842   GtkWidget *leaf_cells_per_level;
 2843   GtkWidget *label91;
 2844   GtkWidget *label92;
 2845 
 2846   info_params = gtk_vbox_new (FALSE, 0);
 2847   gtk_container_set_border_width (GTK_CONTAINER (info_params), 4);
 2848 
 2849 
 2850   scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
 2851   gtk_widget_show (scrolledwindow4);
 2852   gtk_container_add (GTK_CONTAINER (info_params), scrolledwindow4);
 2853   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 2854 
 2855   viewport1 = gtk_viewport_new (NULL, NULL);
 2856   gtk_widget_show (viewport1);
 2857   gtk_container_add (GTK_CONTAINER (scrolledwindow4), viewport1);
 2858   gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport1), GTK_SHADOW_NONE);
 2859 
 2860   vbox14 = gtk_vbox_new (FALSE, 2);
 2861   gtk_widget_show (vbox14);
 2862   gtk_container_add (GTK_CONTAINER (viewport1), vbox14);
 2863 
 2864   label78 = gtk_label_new ("<b>Mesh Statistics</b>");
 2865   gtk_widget_show (label78);
 2866   gtk_box_pack_start (GTK_BOX (vbox14), label78, FALSE, FALSE, 0);
 2867   gtk_label_set_use_markup (GTK_LABEL (label78), TRUE);
 2868 
 2869   mesh_stats_table = gtk_table_new (5, 2, FALSE);
 2870   gtk_widget_show (mesh_stats_table);
 2871   gtk_box_pack_start (GTK_BOX (vbox14), mesh_stats_table, TRUE, TRUE, 0);
 2872   gtk_table_set_row_spacings (GTK_TABLE (mesh_stats_table), 4);
 2873   gtk_table_set_col_spacings (GTK_TABLE (mesh_stats_table), 16);
 2874 
 2875   label83 = gtk_label_new ("Number of levels");
 2876   gtk_widget_show (label83);
 2877   gtk_table_attach (GTK_TABLE (mesh_stats_table), label83, 0, 1, 0, 1,
 2878                     (GtkAttachOptions) (GTK_FILL),
 2879                     (GtkAttachOptions) (0), 0, 0);
 2880   gtk_misc_set_alignment (GTK_MISC (label83), 0, 0.5);
 2881 
 2882   label84 = gtk_label_new ("Number of cells");
 2883   gtk_widget_show (label84);
 2884   gtk_table_attach (GTK_TABLE (mesh_stats_table), label84, 0, 1, 1, 2,
 2885                     (GtkAttachOptions) (GTK_FILL),
 2886                     (GtkAttachOptions) (0), 0, 0);
 2887   gtk_misc_set_alignment (GTK_MISC (label84), 0, 0.5);
 2888 
 2889   label85 = gtk_label_new ("Number of leaf cells");
 2890   gtk_widget_show (label85);
 2891   gtk_table_attach (GTK_TABLE (mesh_stats_table), label85, 0, 1, 2, 3,
 2892                     (GtkAttachOptions) (GTK_FILL),
 2893                     (GtkAttachOptions) (0), 0, 0);
 2894   gtk_misc_set_alignment (GTK_MISC (label85), 0, 0.5);
 2895 
 2896   number_of_levels = gtk_label_new ("0");
 2897   gtk_widget_show (number_of_levels);
 2898   gtk_table_attach (GTK_TABLE (mesh_stats_table), number_of_levels, 1, 2, 0, 1,
 2899                     (GtkAttachOptions) (GTK_FILL),
 2900                     (GtkAttachOptions) (0), 0, 0);
 2901   gtk_label_set_justify (GTK_LABEL (number_of_levels), GTK_JUSTIFY_RIGHT);
 2902   gtk_misc_set_alignment (GTK_MISC (number_of_levels), 1, 0.5);
 2903 
 2904   number_of_cells = gtk_label_new ("0");
 2905   gtk_widget_show (number_of_cells);
 2906   gtk_table_attach (GTK_TABLE (mesh_stats_table), number_of_cells, 1, 2, 1, 2,
 2907                     (GtkAttachOptions) (GTK_FILL),
 2908                     (GtkAttachOptions) (0), 0, 0);
 2909   gtk_label_set_justify (GTK_LABEL (number_of_cells), GTK_JUSTIFY_RIGHT);
 2910   gtk_misc_set_alignment (GTK_MISC (number_of_cells), 1, 0.5);
 2911 
 2912   number_of_leaf_cells = gtk_label_new ("0");
 2913   gtk_widget_show (number_of_leaf_cells);
 2914   gtk_table_attach (GTK_TABLE (mesh_stats_table), number_of_leaf_cells, 1, 2, 2, 3,
 2915                     (GtkAttachOptions) (GTK_FILL),
 2916                     (GtkAttachOptions) (0), 0, 0);
 2917   gtk_label_set_justify (GTK_LABEL (number_of_leaf_cells), GTK_JUSTIFY_RIGHT);
 2918   gtk_misc_set_alignment (GTK_MISC (number_of_leaf_cells), 1, 0.5);
 2919 
 2920   label86 = gtk_label_new ("<b>Number of leaf cells per level</b>");
 2921   gtk_widget_show (label86);
 2922   gtk_table_attach (GTK_TABLE (mesh_stats_table), label86, 0, 2, 3, 4,
 2923                     (GtkAttachOptions) (GTK_FILL),
 2924                     (GtkAttachOptions) (0), 0, 0);
 2925   gtk_label_set_use_markup (GTK_LABEL (label86), TRUE);
 2926   gtk_misc_set_alignment (GTK_MISC (label86), 0, 0.5);
 2927 
 2928   leaf_cells_per_level = gtk_table_new (1, 2, FALSE);
 2929   gtk_widget_show (leaf_cells_per_level);
 2930   gtk_table_attach (GTK_TABLE (mesh_stats_table), leaf_cells_per_level, 0, 2, 4, 5,
 2931                     (GtkAttachOptions) (GTK_FILL),
 2932                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
 2933   gtk_table_set_row_spacings (GTK_TABLE (leaf_cells_per_level), 2);
 2934   gtk_table_set_col_spacings (GTK_TABLE (leaf_cells_per_level), 8);
 2935 
 2936   label91 = gtk_label_new ("Level 0");
 2937   gtk_widget_show (label91);
 2938   gtk_table_attach (GTK_TABLE (leaf_cells_per_level), label91, 0, 1, 0, 1,
 2939                     (GtkAttachOptions) (GTK_FILL),
 2940                     (GtkAttachOptions) (0), 16, 0);
 2941   gtk_misc_set_alignment (GTK_MISC (label91), 0, 0.5);
 2942 
 2943   label92 = gtk_label_new ("0");
 2944   gtk_widget_show (label92);
 2945   gtk_table_attach (GTK_TABLE (leaf_cells_per_level), label92, 1, 2, 0, 1,
 2946                     (GtkAttachOptions) (GTK_FILL),
 2947                     (GtkAttachOptions) (0), 0, 0);
 2948   gtk_label_set_justify (GTK_LABEL (label92), GTK_JUSTIFY_RIGHT);
 2949   gtk_misc_set_alignment (GTK_MISC (label92), 0, 0.5);
 2950 
 2951   /* Store pointers to all widgets, for use by lookup_widget(). */
 2952   GLADE_HOOKUP_OBJECT_NO_REF (info_params, info_params, "info_params");
 2953   GLADE_HOOKUP_OBJECT (info_params, scrolledwindow4, "scrolledwindow4");
 2954   GLADE_HOOKUP_OBJECT (info_params, viewport1, "viewport1");
 2955   GLADE_HOOKUP_OBJECT (info_params, vbox14, "vbox14");
 2956   GLADE_HOOKUP_OBJECT (info_params, label78, "label78");
 2957   GLADE_HOOKUP_OBJECT (info_params, mesh_stats_table, "mesh_stats_table");
 2958   GLADE_HOOKUP_OBJECT (info_params, label83, "label83");
 2959   GLADE_HOOKUP_OBJECT (info_params, label84, "label84");
 2960   GLADE_HOOKUP_OBJECT (info_params, label85, "label85");
 2961   GLADE_HOOKUP_OBJECT (info_params, number_of_levels, "number_of_levels");
 2962   GLADE_HOOKUP_OBJECT (info_params, number_of_cells, "number_of_cells");
 2963   GLADE_HOOKUP_OBJECT (info_params, number_of_leaf_cells, "number_of_leaf_cells");
 2964   GLADE_HOOKUP_OBJECT (info_params, label86, "label86");
 2965   GLADE_HOOKUP_OBJECT (info_params, leaf_cells_per_level, "leaf_cells_per_level");
 2966   GLADE_HOOKUP_OBJECT (info_params, label91, "label91");
 2967   GLADE_HOOKUP_OBJECT (info_params, label92, "label92");
 2968 
 2969   return info_params;
 2970 }
 2971 
 2972 GtkWidget*
 2973 create_cells_params (void)
 2974 {
 2975   GtkWidget *cells_params;
 2976   GtkWidget *vbox15;
 2977   GtkWidget *hbox11;
 2978   GtkWidget *radiobutton6;
 2979   GSList *radiobutton6_group = NULL;
 2980   GtkWidget *edit;
 2981   GtkWidget *vseparator1;
 2982   GtkWidget *edit_level;
 2983   GtkWidget *label93;
 2984   GtkObject *level_adj;
 2985   GtkWidget *level;
 2986 
 2987   cells_params = gtk_vbox_new (FALSE, 0);
 2988   gtk_container_set_border_width (GTK_CONTAINER (cells_params), 4);
 2989 
 2990 
 2991   vbox15 = gtk_vbox_new (FALSE, 4);
 2992   gtk_widget_show (vbox15);
 2993   gtk_container_add (GTK_CONTAINER (cells_params), vbox15);
 2994 
 2995   hbox11 = gtk_hbox_new (FALSE, 4);
 2996   gtk_widget_show (hbox11);
 2997   gtk_box_pack_start (GTK_BOX (vbox15), hbox11, FALSE, TRUE, 0);
 2998 
 2999   radiobutton6 = gtk_radio_button_new_with_mnemonic (NULL, "gtk-info");
 3000   gtk_button_set_use_stock (GTK_BUTTON (radiobutton6), TRUE);
 3001   gtk_widget_show (radiobutton6);
 3002   gtk_box_pack_start (GTK_BOX (hbox11), radiobutton6, FALSE, FALSE, 0);
 3003   gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton6), radiobutton6_group);
 3004   radiobutton6_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton6));
 3005   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton6), TRUE);
 3006 
 3007   edit = gtk_radio_button_new_with_mnemonic (NULL, "gtk-edit");
 3008   gtk_button_set_use_stock (GTK_BUTTON (edit), TRUE);
 3009   gtk_widget_show (edit);
 3010   gtk_box_pack_start (GTK_BOX (hbox11), edit, FALSE, FALSE, 0);
 3011   gtk_radio_button_set_group (GTK_RADIO_BUTTON (edit), radiobutton6_group);
 3012   radiobutton6_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (edit));
 3013 
 3014   vseparator1 = gtk_vseparator_new ();
 3015   gtk_widget_show (vseparator1);
 3016   gtk_box_pack_start (GTK_BOX (hbox11), vseparator1, FALSE, TRUE, 4);
 3017 
 3018   edit_level = gtk_hbox_new (FALSE, 4);
 3019   gtk_widget_show (edit_level);
 3020   gtk_box_pack_start (GTK_BOX (hbox11), edit_level, TRUE, TRUE, 0);
 3021   gtk_widget_set_sensitive (edit_level, FALSE);
 3022 
 3023   label93 = gtk_label_new ("Level");
 3024   gtk_widget_show (label93);
 3025   gtk_box_pack_start (GTK_BOX (edit_level), label93, FALSE, FALSE, 0);
 3026 
 3027   level_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 0);
 3028   level = gtk_spin_button_new (GTK_ADJUSTMENT (level_adj), 1, 0);
 3029   gtk_widget_show (level);
 3030   gtk_box_pack_start (GTK_BOX (edit_level), level, FALSE, TRUE, 0);
 3031 
 3032   g_signal_connect ((gpointer) radiobutton6, "toggled",
 3033                     G_CALLBACK (on_information_toggled),
 3034                     NULL);
 3035 
 3036   /* Store pointers to all widgets, for use by lookup_widget(). */
 3037   GLADE_HOOKUP_OBJECT_NO_REF (cells_params, cells_params, "cells_params");
 3038   GLADE_HOOKUP_OBJECT (cells_params, vbox15, "vbox15");
 3039   GLADE_HOOKUP_OBJECT (cells_params, hbox11, "hbox11");
 3040   GLADE_HOOKUP_OBJECT (cells_params, radiobutton6, "radiobutton6");
 3041   GLADE_HOOKUP_OBJECT (cells_params, edit, "edit");
 3042   GLADE_HOOKUP_OBJECT (cells_params, vseparator1, "vseparator1");
 3043   GLADE_HOOKUP_OBJECT (cells_params, edit_level, "edit_level");
 3044   GLADE_HOOKUP_OBJECT (cells_params, label93, "label93");
 3045   GLADE_HOOKUP_OBJECT (cells_params, level, "level");
 3046 
 3047   return cells_params;
 3048 }
 3049 
 3050 GtkWidget*
 3051 create_locate_params (void)
 3052 {
 3053   GtkWidget *locate_params;
 3054   GtkWidget *table19;
 3055   GtkWidget *label93;
 3056   GtkWidget *label94;
 3057   GtkWidget *label95;
 3058   GtkWidget *locate_x_entry;
 3059   GtkWidget *locate_y_entry;
 3060   GtkWidget *locate_z_entry;
 3061 
 3062   locate_params = gtk_vbox_new (FALSE, 0);
 3063   gtk_container_set_border_width (GTK_CONTAINER (locate_params), 4);
 3064 
 3065 
 3066   table19 = gtk_table_new (3, 2, FALSE);
 3067   gtk_widget_show (table19);
 3068   gtk_container_add (GTK_CONTAINER (locate_params), table19);
 3069   gtk_table_set_row_spacings (GTK_TABLE (table19), 4);
 3070   gtk_table_set_col_spacings (GTK_TABLE (table19), 4);
 3071 
 3072   label93 = gtk_label_new ("X");
 3073   gtk_widget_show (label93);
 3074   gtk_table_attach (GTK_TABLE (table19), label93, 0, 1, 0, 1,
 3075                     (GtkAttachOptions) (GTK_FILL),
 3076                     (GtkAttachOptions) (0), 0, 0);
 3077   gtk_misc_set_alignment (GTK_MISC (label93), 0, 0.5);
 3078 
 3079   label94 = gtk_label_new ("Y");
 3080   gtk_widget_show (label94);
 3081   gtk_table_attach (GTK_TABLE (table19), label94, 0, 1, 1, 2,
 3082                     (GtkAttachOptions) (GTK_FILL),
 3083                     (GtkAttachOptions) (0), 0, 0);
 3084   gtk_misc_set_alignment (GTK_MISC (label94), 0, 0.5);
 3085 
 3086   label95 = gtk_label_new ("Z");
 3087   gtk_widget_show (label95);
 3088   gtk_table_attach (GTK_TABLE (table19), label95, 0, 1, 2, 3,
 3089                     (GtkAttachOptions) (GTK_FILL),
 3090                     (GtkAttachOptions) (0), 0, 0);
 3091   gtk_misc_set_alignment (GTK_MISC (label95), 0, 0.5);
 3092 
 3093   locate_x_entry = gtk_entry_new ();
 3094   gtk_widget_show (locate_x_entry);
 3095   gtk_table_attach (GTK_TABLE (table19), locate_x_entry, 1, 2, 0, 1,
 3096                     (GtkAttachOptions) (GTK_FILL),
 3097                     (GtkAttachOptions) (0), 0, 0);
 3098 
 3099   locate_y_entry = gtk_entry_new ();
 3100   gtk_widget_show (locate_y_entry);
 3101   gtk_table_attach (GTK_TABLE (table19), locate_y_entry, 1, 2, 1, 2,
 3102                     (GtkAttachOptions) (GTK_FILL),
 3103                     (GtkAttachOptions) (0), 0, 0);
 3104 
 3105   locate_z_entry = gtk_entry_new ();
 3106   gtk_widget_show (locate_z_entry);
 3107   gtk_table_attach (GTK_TABLE (table19), locate_z_entry, 1, 2, 2, 3,
 3108                     (GtkAttachOptions) (GTK_FILL),
 3109                     (GtkAttachOptions) (0), 0, 0);
 3110 
 3111   g_signal_connect ((gpointer) locate_x_entry, "changed",
 3112                     G_CALLBACK (on_locate_x_entry_changed),
 3113                     NULL);
 3114   g_signal_connect ((gpointer) locate_y_entry, "changed",
 3115                     G_CALLBACK (on_locate_y_entry_changed),
 3116                     NULL);
 3117   g_signal_connect ((gpointer) locate_z_entry, "changed",
 3118                     G_CALLBACK (on_locate_z_entry_changed),
 3119                     NULL);
 3120 
 3121   /* Store pointers to all widgets, for use by lookup_widget(). */
 3122   GLADE_HOOKUP_OBJECT_NO_REF (locate_params, locate_params, "locate_params");
 3123   GLADE_HOOKUP_OBJECT (locate_params, table19, "table19");
 3124   GLADE_HOOKUP_OBJECT (locate_params, label93, "label93");
 3125   GLADE_HOOKUP_OBJECT (locate_params, label94, "label94");
 3126   GLADE_HOOKUP_OBJECT (locate_params, label95, "label95");
 3127   GLADE_HOOKUP_OBJECT (locate_params, locate_x_entry, "locate_x_entry");
 3128   GLADE_HOOKUP_OBJECT (locate_params, locate_y_entry, "locate_y_entry");
 3129   GLADE_HOOKUP_OBJECT (locate_params, locate_z_entry, "locate_z_entry");
 3130 
 3131   return locate_params;
 3132 }
 3133 
 3134 GtkWidget*
 3135 create_vof_params (void)
 3136 {
 3137   GtkWidget *vof_params;
 3138   GtkWidget *table1;
 3139   GtkWidget *label100;
 3140   GtkWidget *normals;
 3141   GtkWidget *reversed;
 3142   GtkWidget *label103;
 3143   GtkWidget *color;
 3144   GtkWidget *edges;
 3145   GtkWidget *visible;
 3146 
 3147   vof_params = gtk_vbox_new (FALSE, 0);
 3148   gtk_container_set_border_width (GTK_CONTAINER (vof_params), 4);
 3149 
 3150 
 3151   table1 = gtk_table_new (4, 2, FALSE);
 3152   gtk_widget_show (table1);
 3153   gtk_container_add (GTK_CONTAINER (vof_params), table1);
 3154   gtk_table_set_row_spacings (GTK_TABLE (table1), 4);
 3155   gtk_table_set_col_spacings (GTK_TABLE (table1), 4);
 3156 
 3157   label100 = gtk_label_new ("Scalar");
 3158   gtk_widget_show (label100);
 3159   gtk_table_attach (GTK_TABLE (table1), label100, 0, 1, 0, 1,
 3160                     (GtkAttachOptions) (GTK_FILL),
 3161                     (GtkAttachOptions) (0), 0, 0);
 3162   gtk_misc_set_alignment (GTK_MISC (label100), 0, 0.5);
 3163 
 3164   normals = gtk_label_new ("Normals");
 3165   gtk_widget_show (normals);
 3166   gtk_table_attach (GTK_TABLE (table1), normals, 0, 1, 1, 2,
 3167                     (GtkAttachOptions) (GTK_FILL),
 3168                     (GtkAttachOptions) (0), 0, 0);
 3169   gtk_misc_set_alignment (GTK_MISC (normals), 0, 0.5);
 3170 
 3171   reversed = gtk_check_button_new_with_mnemonic ("reversed");
 3172   gtk_widget_show (reversed);
 3173   gtk_table_attach (GTK_TABLE (table1), reversed, 1, 2, 1, 2,
 3174                     (GtkAttachOptions) (GTK_FILL),
 3175                     (GtkAttachOptions) (0), 0, 0);
 3176 
 3177   label103 = gtk_label_new ("Color");
 3178   gtk_widget_show (label103);
 3179   gtk_table_attach (GTK_TABLE (table1), label103, 0, 1, 3, 4,
 3180                     (GtkAttachOptions) (GTK_FILL),
 3181                     (GtkAttachOptions) (0), 0, 0);
 3182   gtk_misc_set_alignment (GTK_MISC (label103), 0, 0.5);
 3183 
 3184   color = gtk_option_menu_new ();
 3185   gtk_widget_show (color);
 3186   gtk_table_attach (GTK_TABLE (table1), color, 1, 2, 3, 4,
 3187                     (GtkAttachOptions) (GTK_FILL),
 3188                     (GtkAttachOptions) (0), 0, 0);
 3189 
 3190   edges = gtk_label_new ("Edges");
 3191   gtk_widget_show (edges);
 3192   gtk_table_attach (GTK_TABLE (table1), edges, 0, 1, 2, 3,
 3193                     (GtkAttachOptions) (GTK_FILL),
 3194                     (GtkAttachOptions) (0), 0, 0);
 3195   gtk_misc_set_alignment (GTK_MISC (edges), 0, 0.5);
 3196 
 3197   visible = gtk_check_button_new_with_mnemonic ("visible");
 3198   gtk_widget_show (visible);
 3199   gtk_table_attach (GTK_TABLE (table1), visible, 1, 2, 2, 3,
 3200                     (GtkAttachOptions) (GTK_FILL),
 3201                     (GtkAttachOptions) (0), 0, 0);
 3202 
 3203   g_signal_connect ((gpointer) reversed, "toggled",
 3204                     G_CALLBACK (on_vof_reversed_toggled),
 3205                     NULL);
 3206   g_signal_connect ((gpointer) visible, "toggled",
 3207                     G_CALLBACK (on_vof_visible_toggled),
 3208                     NULL);
 3209 
 3210   /* Store pointers to all widgets, for use by lookup_widget(). */
 3211   GLADE_HOOKUP_OBJECT_NO_REF (vof_params, vof_params, "vof_params");
 3212   GLADE_HOOKUP_OBJECT (vof_params, table1, "table1");
 3213   GLADE_HOOKUP_OBJECT (vof_params, label100, "label100");
 3214   GLADE_HOOKUP_OBJECT (vof_params, normals, "normals");
 3215   GLADE_HOOKUP_OBJECT (vof_params, reversed, "reversed");
 3216   GLADE_HOOKUP_OBJECT (vof_params, label103, "label103");
 3217   GLADE_HOOKUP_OBJECT (vof_params, color, "color");
 3218   GLADE_HOOKUP_OBJECT (vof_params, edges, "edges");
 3219   GLADE_HOOKUP_OBJECT (vof_params, visible, "visible");
 3220 
 3221   return vof_params;
 3222 }
 3223 
 3224 GtkWidget*
 3225 create_font_params (void)
 3226 {
 3227   GtkWidget *font_params;
 3228   GtkWidget *table22;
 3229   GtkWidget *label112;
 3230   GtkObject *font_size_adj;
 3231   GtkWidget *font_size;
 3232   GtkWidget *vector_font;
 3233   GSList *vector_font_group = NULL;
 3234   GtkWidget *raster_font;
 3235 
 3236   font_params = gtk_vbox_new (FALSE, 0);
 3237   gtk_container_set_border_width (GTK_CONTAINER (font_params), 4);
 3238 
 3239 
 3240   table22 = gtk_table_new (2, 2, FALSE);
 3241   gtk_widget_show (table22);
 3242   gtk_container_add (GTK_CONTAINER (font_params), table22);
 3243   gtk_table_set_row_spacings (GTK_TABLE (table22), 4);
 3244   gtk_table_set_col_spacings (GTK_TABLE (table22), 4);
 3245 
 3246   label112 = gtk_label_new ("Size");
 3247   gtk_widget_show (label112);
 3248   gtk_table_attach (GTK_TABLE (table22), label112, 0, 1, 1, 2,
 3249                     (GtkAttachOptions) (GTK_FILL),
 3250                     (GtkAttachOptions) (0), 0, 0);
 3251   gtk_misc_set_alignment (GTK_MISC (label112), 0, 0.5);
 3252 
 3253   font_size_adj = gtk_adjustment_new (1, 0.10000000149, 10, 0.10000000149, 1, 0);
 3254   font_size = gtk_spin_button_new (GTK_ADJUSTMENT (font_size_adj), 1, 1);
 3255   gtk_widget_show (font_size);
 3256   gtk_table_attach (GTK_TABLE (table22), font_size, 1, 2, 1, 2,
 3257                     (GtkAttachOptions) (GTK_FILL),
 3258                     (GtkAttachOptions) (0), 0, 0);
 3259   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (font_size), TRUE);
 3260   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (font_size), GTK_UPDATE_IF_VALID);
 3261 
 3262   vector_font = gtk_radio_button_new_with_mnemonic (NULL, "Vector");
 3263   gtk_widget_show (vector_font);
 3264   gtk_table_attach (GTK_TABLE (table22), vector_font, 0, 1, 0, 1,
 3265                     (GtkAttachOptions) (GTK_FILL),
 3266                     (GtkAttachOptions) (0), 0, 0);
 3267   gtk_radio_button_set_group (GTK_RADIO_BUTTON (vector_font), vector_font_group);
 3268   vector_font_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (vector_font));
 3269 
 3270   raster_font = gtk_radio_button_new_with_mnemonic (NULL, "Raster");
 3271   gtk_widget_show (raster_font);
 3272   gtk_table_attach (GTK_TABLE (table22), raster_font, 1, 2, 0, 1,
 3273                     (GtkAttachOptions) (GTK_FILL),
 3274                     (GtkAttachOptions) (0), 0, 0);
 3275   gtk_radio_button_set_group (GTK_RADIO_BUTTON (raster_font), vector_font_group);
 3276   vector_font_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (raster_font));
 3277   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (raster_font), TRUE);
 3278 
 3279   g_signal_connect ((gpointer) font_size, "value_changed",
 3280                     G_CALLBACK (on_font_size_changed),
 3281                     NULL);
 3282   g_signal_connect ((gpointer) vector_font, "toggled",
 3283                     G_CALLBACK (on_vector_font_toggled),
 3284                     NULL);
 3285   g_signal_connect ((gpointer) raster_font, "toggled",
 3286                     G_CALLBACK (on_raster_font_toggled),
 3287                     NULL);
 3288 
 3289   /* Store pointers to all widgets, for use by lookup_widget(). */
 3290   GLADE_HOOKUP_OBJECT_NO_REF (font_params, font_params, "font_params");
 3291   GLADE_HOOKUP_OBJECT (font_params, table22, "table22");
 3292   GLADE_HOOKUP_OBJECT (font_params, label112, "label112");
 3293   GLADE_HOOKUP_OBJECT (font_params, font_size, "font_size");
 3294   GLADE_HOOKUP_OBJECT (font_params, vector_font, "vector_font");
 3295   GLADE_HOOKUP_OBJECT (font_params, raster_font, "raster_font");
 3296 
 3297   return font_params;
 3298 }
 3299 
 3300 GtkWidget*
 3301 create_label_params (void)
 3302 {
 3303   GtkWidget *label_params;
 3304   GtkWidget *table23;
 3305   GtkWidget *label113;
 3306   GtkWidget *label114;
 3307   GtkWidget *hbox12;
 3308   GtkObject *labelx_adj;
 3309   GtkWidget *labelx;
 3310   GtkObject *labely_adj;
 3311   GtkWidget *labely;
 3312   GtkObject *labelz_adj;
 3313   GtkWidget *labelz;
 3314   GtkWidget *labelentry;
 3315   GtkWidget *label_symbol_check;
 3316   GtkWidget *label115;
 3317 
 3318   label_params = gtk_vbox_new (FALSE, 0);
 3319   gtk_container_set_border_width (GTK_CONTAINER (label_params), 4);
 3320 
 3321 
 3322   table23 = gtk_table_new (3, 2, FALSE);
 3323   gtk_widget_show (table23);
 3324   gtk_container_add (GTK_CONTAINER (label_params), table23);
 3325   gtk_table_set_row_spacings (GTK_TABLE (table23), 4);
 3326   gtk_table_set_col_spacings (GTK_TABLE (table23), 4);
 3327 
 3328   label113 = gtk_label_new ("Position");
 3329   gtk_widget_show (label113);
 3330   gtk_table_attach (GTK_TABLE (table23), label113, 0, 1, 0, 1,
 3331                     (GtkAttachOptions) (GTK_FILL),
 3332                     (GtkAttachOptions) (0), 0, 0);
 3333   gtk_misc_set_alignment (GTK_MISC (label113), 0, 0.5);
 3334 
 3335   label114 = gtk_label_new ("Text");
 3336   gtk_widget_show (label114);
 3337   gtk_table_attach (GTK_TABLE (table23), label114, 0, 1, 1, 2,
 3338                     (GtkAttachOptions) (GTK_FILL),
 3339                     (GtkAttachOptions) (0), 0, 0);
 3340   gtk_misc_set_alignment (GTK_MISC (label114), 0, 0.5);
 3341 
 3342   hbox12 = gtk_hbox_new (FALSE, 0);
 3343   gtk_widget_show (hbox12);
 3344   gtk_table_attach (GTK_TABLE (table23), hbox12, 1, 2, 0, 1,
 3345                     (GtkAttachOptions) (GTK_FILL),
 3346                     (GtkAttachOptions) (GTK_FILL), 0, 0);
 3347 
 3348   labelx_adj = gtk_adjustment_new (0, -1000000, 1000000, 0.00999999977648, 0.019999999553, 0);
 3349   labelx = gtk_spin_button_new (GTK_ADJUSTMENT (labelx_adj), 0.019999999553, 5);
 3350   gtk_widget_show (labelx);
 3351   gtk_box_pack_start (GTK_BOX (hbox12), labelx, TRUE, TRUE, 0);
 3352   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (labelx), TRUE);
 3353   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (labelx), GTK_UPDATE_IF_VALID);
 3354 
 3355   labely_adj = gtk_adjustment_new (0, -1000000, 1000000, 0.00999999977648, 0.019999999553, 0);
 3356   labely = gtk_spin_button_new (GTK_ADJUSTMENT (labely_adj), 0.019999999553, 5);
 3357   gtk_widget_show (labely);
 3358   gtk_box_pack_start (GTK_BOX (hbox12), labely, TRUE, TRUE, 0);
 3359   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (labely), TRUE);
 3360   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (labely), GTK_UPDATE_IF_VALID);
 3361 
 3362   labelz_adj = gtk_adjustment_new (0, -1000000, 1000000, 0.00999999977648, 0.019999999553, 0);
 3363   labelz = gtk_spin_button_new (GTK_ADJUSTMENT (labelz_adj), 0.019999999553, 5);
 3364   gtk_widget_show (labelz);
 3365   gtk_box_pack_start (GTK_BOX (hbox12), labelz, TRUE, TRUE, 0);
 3366   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (labelz), TRUE);
 3367   gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (labelz), GTK_UPDATE_IF_VALID);
 3368 
 3369   labelentry = gtk_entry_new ();
 3370   gtk_widget_show (labelentry);
 3371   gtk_table_attach (GTK_TABLE (table23), labelentry, 1, 2, 1, 2,
 3372                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 3373                     (GtkAttachOptions) (0), 0, 0);
 3374   gtk_entry_set_text (GTK_ENTRY (labelentry), "Label");
 3375   gtk_entry_set_invisible_char (GTK_ENTRY (labelentry), 9679);
 3376 
 3377   label_symbol_check = gtk_check_button_new_with_mnemonic ("");
 3378   gtk_widget_show (label_symbol_check);
 3379   gtk_table_attach (GTK_TABLE (table23), label_symbol_check, 1, 2, 2, 3,
 3380                     (GtkAttachOptions) (GTK_FILL),
 3381                     (GtkAttachOptions) (0), 0, 0);
 3382   GTK_WIDGET_UNSET_FLAGS (label_symbol_check, GTK_CAN_FOCUS);
 3383 
 3384   label115 = gtk_label_new ("Symbol");
 3385   gtk_widget_show (label115);
 3386   gtk_table_attach (GTK_TABLE (table23), label115, 0, 1, 2, 3,
 3387                     (GtkAttachOptions) (GTK_FILL),
 3388                     (GtkAttachOptions) (0), 0, 0);
 3389   gtk_misc_set_alignment (GTK_MISC (label115), 0, 0.5);
 3390 
 3391   g_signal_connect ((gpointer) labelx, "value_changed",
 3392                     G_CALLBACK (on_labelx_changed),
 3393                     NULL);
 3394   g_signal_connect ((gpointer) labely, "value_changed",
 3395                     G_CALLBACK (on_labely_changed),
 3396                     NULL);
 3397   g_signal_connect ((gpointer) labelz, "value_changed",
 3398                     G_CALLBACK (on_labelz_changed),
 3399                     NULL);
 3400   g_signal_connect ((gpointer) labelentry, "activate",
 3401                     G_CALLBACK (on_labelentry_activate),
 3402                     NULL);
 3403   g_signal_connect ((gpointer) label_symbol_check, "toggled",
 3404                     G_CALLBACK (on_label_symbol_check_toggled),
 3405                     NULL);
 3406 
 3407   /* Store pointers to all widgets, for use by lookup_widget(). */
 3408   GLADE_HOOKUP_OBJECT_NO_REF (label_params, label_params, "label_params");
 3409   GLADE_HOOKUP_OBJECT (label_params, table23, "table23");
 3410   GLADE_HOOKUP_OBJECT (label_params, label113, "label113");
 3411   GLADE_HOOKUP_OBJECT (label_params, label114, "label114");
 3412   GLADE_HOOKUP_OBJECT (label_params, hbox12, "hbox12");
 3413   GLADE_HOOKUP_OBJECT (label_params, labelx, "labelx");
 3414   GLADE_HOOKUP_OBJECT (label_params, labely, "labely");
 3415   GLADE_HOOKUP_OBJECT (label_params, labelz, "labelz");
 3416   GLADE_HOOKUP_OBJECT (label_params, labelentry, "labelentry");
 3417   GLADE_HOOKUP_OBJECT (label_params, label_symbol_check, "label_symbol_check");
 3418   GLADE_HOOKUP_OBJECT (label_params, label115, "label115");
 3419 
 3420   return label_params;
 3421 }
 3422