From 239bd649b3f057d7b46f0ba50c22c6e950029ce8 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 12 Jan 2008 18:40:14 +0000
Subject: [PATCH] *** empty log message ***

---
 Common/Options.cpp  | 19 ++++++++-----------
 Fltk/Callbacks.cpp  |  8 +++++++-
 Fltk/GUI.cpp        | 11 ++++++++++-
 Fltk/GUI_Extras.cpp |  4 ++--
 4 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/Common/Options.cpp b/Common/Options.cpp
index 90ea3c502e..0c64aa4d90 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.373 2008-01-11 13:56:21 remacle Exp $
+// $Id: Options.cpp,v 1.374 2008-01-12 18:40:14 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -2937,12 +2937,10 @@ double opt_general_axes_mikado(OPT_ARGS_NUM){
   if(action & GMSH_SET) {
     CTX.axes_mikado = (int)val;
   }
-/*#if defined(HAVE_FLTK)
-  if(_gui_action_valid(action, num)) {
-    WID->view_butt[25]->value(opt->AxesAutoPosition);
-    activate_cb(NULL, (void*)"view_axes_auto_3d");
-  }
-#endif*/
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_butt[16]->value(CTX.axes_mikado);
+#endif
   return CTX.axes_mikado;
 }
 
@@ -6078,12 +6076,11 @@ double opt_view_axes_mikado(OPT_ARGS_NUM){
   if(action & GMSH_SET) {
     opt->AxesMikado = (int)val;
   }
-/*#if defined(HAVE_FLTK)
+#if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_butt[25]->value(opt->AxesAutoPosition);
-    activate_cb(NULL, (void*)"view_axes_auto_3d");
+    WID->view_butt[3]->value(opt->AxesMikado);
   }
-#endif*/
+#endif
   return opt->AxesMikado;
 }
 
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 6de05405e4..32f1b67047 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.557 2008-01-08 12:05:45 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.558 2008-01-12 18:40:14 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -963,6 +963,7 @@ void general_options_ok_cb(CALLBACK_ARGS)
   opt_general_rotation_center_cg(0, GMSH_SET, WID->gen_butt[15]->value());
   opt_general_draw_bounding_box(0, GMSH_SET, WID->gen_butt[6]->value());
   opt_general_polygon_offset_always(0, GMSH_SET, WID->gen_butt[4]->value());
+  opt_general_axes_mikado(0, GMSH_SET, WID->gen_butt[16]->value());
 
   opt_general_shine_exponent(0, GMSH_SET, WID->gen_value[0]->value());  
   opt_general_shine(0, GMSH_SET, WID->gen_value[1]->value());
@@ -1309,6 +1310,7 @@ void view_options_ok_cb(CALLBACK_ARGS)
   double tensor_type = opt_view_tensor_type(current, GMSH_GET, 0);
   double range_type = opt_view_range_type(current, GMSH_GET, 0);
   double axes = opt_view_axes(current, GMSH_GET, 0);
+  double mikado = opt_view_axes_mikado(current, GMSH_GET, 0);
   double boundary = opt_view_boundary(current, GMSH_GET, 0);
   double external_view = opt_view_external_view(current, GMSH_GET, 0);
   double gen_raise_view = opt_view_gen_raise_view(current, GMSH_GET, 0);
@@ -1491,6 +1493,10 @@ void view_options_ok_cb(CALLBACK_ARGS)
       if(force || (val != show_scale))
         opt_view_show_scale(i, GMSH_SET, val);
 
+      val = WID->view_butt[3]->value();
+      if(force || (val != mikado))
+        opt_view_axes_mikado(i, GMSH_SET, val);
+
       val = WID->view_butt[7]->value();
       if(force || (val != auto_position))
         opt_view_auto_position(i, GMSH_SET, val);
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 7afdcdd95f..2a10928305 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.647 2008-01-08 12:05:45 geuzaine Exp $
+// $Id: GUI.cpp,v 1.648 2008-01-12 18:40:14 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -1889,6 +1889,10 @@ void GUI::create_option_window()
       gen_choice[4]->tooltip("(Alt+a)");
       gen_choice[4]->callback(general_options_ok_cb, (void*)"general_axes");
 
+      gen_butt[16] = new Fl_Check_Button(L + width / 2 + 4 * WB, 2 * WB + 1 * BH, IW, BH, "Mikado style");
+      gen_butt[16]->type(FL_TOGGLE_BUTTON);
+      gen_butt[16]->callback(general_options_ok_cb);
+
       gen_value[17] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 2 * BH, IW/3, BH);
       gen_value[17]->minimum(0.);
       gen_value[17]->step(1);
@@ -2975,6 +2979,10 @@ void GUI::create_option_window()
       view_choice[8]->tooltip("(Alt+a)");
       view_choice[8]->callback(view_options_ok_cb, (void*)"view_axes");
 
+      view_butt[3] = new Fl_Check_Button(L + width / 2 + 4 * WB, 2 * WB + 1 * BH, IW, BH, "Mikado style");
+      view_butt[3]->type(FL_TOGGLE_BUTTON);
+      view_butt[3]->callback(view_options_ok_cb);
+
       view_value[3] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 2 * BH, IW/3, BH);
       view_value[3]->minimum(0.);
       view_value[3]->step(1);
@@ -3469,6 +3477,7 @@ void GUI::update_view_window(int num)
   opt_view_size1(num, GMSH_GUI, 0);
 
   opt_view_axes(num, GMSH_GUI, 0);
+  opt_view_axes_mikado(num, GMSH_GUI, 0);
   opt_view_axes_format0(num, GMSH_GUI, NULL);
   opt_view_axes_format1(num, GMSH_GUI, NULL);
   opt_view_axes_format2(num, GMSH_GUI, NULL);
diff --git a/Fltk/GUI_Extras.cpp b/Fltk/GUI_Extras.cpp
index 92f1aa5451..fe71344107 100644
--- a/Fltk/GUI_Extras.cpp
+++ b/Fltk/GUI_Extras.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI_Extras.cpp,v 1.41 2008-01-08 12:05:45 geuzaine Exp $
+// $Id: GUI_Extras.cpp,v 1.42 2008-01-12 18:40:14 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -34,7 +34,7 @@
 #include <errno.h>
 
 #if defined(HAVE_NATIVE_FILE_CHOOSER)
-#  include <FL/Fl_Native_File_Chooser.H>
+#include <FL/Fl_Native_File_Chooser.H>
 static Fl_Native_File_Chooser *fc = 0;
 #else
 #include "File_Picker.h"
-- 
GitLab