From 9894a5fe273aead4940e1b2e697503aa613f43d7 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 2 Jan 2005 18:10:12 +0000
Subject: [PATCH] add option to specify the size of the small axes

---
 Common/Context.h             | 2 +-
 Common/DefaultOptions.h      | 2 ++
 Common/Options.cpp           | 9 ++++++++-
 Common/Options.h             | 1 +
 Graphics/Axes.cpp            | 4 ++--
 doc/texinfo/opt_general.texi | 5 +++++
 doc/texinfo/opt_plugin.texi  | 8 +++++---
 doc/texinfo/opt_solver.texi  | 2 +-
 8 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/Common/Context.h b/Common/Context.h
index 01e8d53049..63e91f0889 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -113,7 +113,7 @@ public :
   int draw_bbox;              // always draw the bounding boxes?
   int fast_redraw;            // only draw the bbox when rotating/panning the model?
   int axes, small_axes;       // draw axes? 
-  int small_axes_pos[2];      // small axes position 
+  int small_axes_pos[2], small_axes_size; // small axes position and size
   int threads, threads_lock;  // threads?, lock (should be a mutex...) 
   int alpha;                  // enable alpha blending 
   double zoom_factor;         // mouse2 zoom coefficient
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 2ccab8877c..d601bc028a 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -639,6 +639,8 @@ StringXNumber GeneralOptions_Number[] = {
     "X position of small axes (use negative values for right alignment)" },
   { F|O, "SmallAxesPositionY" , opt_general_small_axes_position1 , -40. ,
     "Y position of small axes (use negative values for bottom alignment)" },
+  { F|O, "SmallAxesSize" , opt_general_small_axes_size , 30. ,
+    "Size (in pixels) of small axes" },
   { F|S, "SolverPositionX" , opt_general_solver_position0 , 650. , 
     "Horizontal position (in pixels) of the upper left corner of the solver windows" }, 
   { F|S, "SolverPositionY" , opt_general_solver_position1 , 150. ,
diff --git a/Common/Options.cpp b/Common/Options.cpp
index a068212bad..a047d8fe44 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.223 2005-01-01 19:35:27 geuzaine Exp $
+// $Id: Options.cpp,v 1.224 2005-01-02 18:10:12 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -2499,6 +2499,13 @@ double opt_general_small_axes_position1(OPT_ARGS_NUM)
   return CTX.small_axes_pos[1];
 }
 
+double opt_general_small_axes_size(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.small_axes_size = (int)val;
+  return CTX.small_axes_size;
+}
+
 double opt_general_quadric_subdivisions(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
diff --git a/Common/Options.h b/Common/Options.h
index 5ce0d5a092..514d9750ce 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -271,6 +271,7 @@ double opt_general_axes(OPT_ARGS_NUM);
 double opt_general_small_axes(OPT_ARGS_NUM);
 double opt_general_small_axes_position0(OPT_ARGS_NUM);
 double opt_general_small_axes_position1(OPT_ARGS_NUM);
+double opt_general_small_axes_size(OPT_ARGS_NUM);
 double opt_general_quadric_subdivisions(OPT_ARGS_NUM);
 double opt_general_double_buffer(OPT_ARGS_NUM);
 double opt_general_alpha_blending(OPT_ARGS_NUM);
diff --git a/Graphics/Axes.cpp b/Graphics/Axes.cpp
index 63e83d2957..7bf404925c 100644
--- a/Graphics/Axes.cpp
+++ b/Graphics/Axes.cpp
@@ -1,4 +1,4 @@
-// $Id: Axes.cpp,v 1.24 2005-01-01 19:35:29 geuzaine Exp $
+// $Id: Axes.cpp,v 1.25 2005-01-02 18:10:12 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -123,7 +123,7 @@ void Draw_SmallAxes(void)
 {
   double l, o, xx, xy, yx, yy, zx, zy, cx, cy;
 
-  l = 30;
+  l = CTX.small_axes_size;
   o = 2;
 
   if(CTX.small_axes_pos[0] > 0)
diff --git a/doc/texinfo/opt_general.texi b/doc/texinfo/opt_general.texi
index e153576cf9..16b36af3fc 100644
--- a/doc/texinfo/opt_general.texi
+++ b/doc/texinfo/opt_general.texi
@@ -634,6 +634,11 @@ Y position of small axes (use negative values for bottom alignment)@*
 Default value: @code{-40}@*
 Saved in: @code{General.OptionsFileName}
 
+@item General.SmallAxesSize
+Size (in pixels) of small axes@*
+Default value: @code{30}@*
+Saved in: @code{General.OptionsFileName}
+
 @item General.SolverPositionX
 Horizontal position (in pixels) of the upper left corner of the solver windows@*
 Default value: @code{650}@*
diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi
index 2fa5419b7e..a0003b9a85 100644
--- a/doc/texinfo/opt_plugin.texi
+++ b/doc/texinfo/opt_plugin.texi
@@ -259,9 +259,11 @@ in the view `iView' to the expression
 mathematical functions (Exp, Log, Sqrt, Sin,
 Cos, Fabs, etc.) and operators (+, -, *, /, ^),
 `Expression' can contain the symbols x, y, z
-and v, which represent the three spatial
-coordinates and the value of the `TimeStep'-th
-component of the field, respectively. If
+(which represent the current position), v (which
+represents the `Component'-th component of
+the field at the `TimeStep'-th time step), and v0,
+v1, v2, ..., vn (which represent the n components
+of the field at the `TimeStep'-th time step). If
 `iView' < 0, the plugin is run on the current
 view.
 
diff --git a/doc/texinfo/opt_solver.texi b/doc/texinfo/opt_solver.texi
index 1d2218dafb..7743c53ab2 100644
--- a/doc/texinfo/opt_solver.texi
+++ b/doc/texinfo/opt_solver.texi
@@ -13,7 +13,7 @@ Saved in: @code{General.OptionsFileName}
 Help string for solver 0@*
 Default value: @code{"A General environment for the treatment of
 Discrete Problems.
-Copyright (C) 1997-2004
+Copyright (C) 1997-2005
 Patrick Dular and Christophe Geuzaine.
 Visit http://www.geuz.org/getdp/ for more info"}@*
 Saved in: @code{General.OptionsFileName}
-- 
GitLab