From 0696f6451fe947b16f702d3ac64d64ff7417bff7 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 29 Oct 2012 22:04:58 +0000 Subject: [PATCH] new attributes in PViewOptions --- Common/DefaultOptions.h | 3 +++ Common/Options.cpp | 12 ++++++++++++ Common/Options.h | 1 + Post/PViewOptions.h | 1 + 4 files changed, 17 insertions(+) diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 268f1e0fef..ae36bcf15b 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -163,6 +163,9 @@ StringXString PostProcessingOptions_String[] = { } ; StringXString ViewOptions_String[] = { + { F|O, "Attributes" , opt_view_attributes , "" , + "Optional string attributes" }, + { F|O, "AxesFormatX" , opt_view_axes_format0 , "%.3g" , "Number format for X-axis (in standard C form)" }, { F|O, "AxesFormatY" , opt_view_axes_format1 , "%.3g" , diff --git a/Common/Options.cpp b/Common/Options.cpp index 2e0c89481d..bb2259f97f 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1632,6 +1632,18 @@ std::string opt_view_stipple9(OPT_ARGS_STR) #endif } +std::string opt_view_attributes(OPT_ARGS_STR) +{ +#if defined(HAVE_POST) + GET_VIEW(""); + if(action & GMSH_SET) + opt->attributes = val; + return opt->attributes; +#else + return ""; +#endif +} + // Numeric option routines double opt_general_initial_context(OPT_ARGS_NUM) diff --git a/Common/Options.h b/Common/Options.h index 7ae91f9465..2d16e401e8 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -91,6 +91,7 @@ std::string opt_view_stipple6(OPT_ARGS_STR); std::string opt_view_stipple7(OPT_ARGS_STR); std::string opt_view_stipple8(OPT_ARGS_STR); std::string opt_view_stipple9(OPT_ARGS_STR); +std::string opt_view_attributes(OPT_ARGS_STR); // NUMBERS diff --git a/Post/PViewOptions.h b/Post/PViewOptions.h index d28c2c95e4..4a67447b27 100644 --- a/Post/PViewOptions.h +++ b/Post/PViewOptions.h @@ -98,6 +98,7 @@ class PViewOptions { int clip; // status of clip planes (bit array) int forceNumComponents, componentMap[9]; int sampling; + std::string attributes; struct{ unsigned int point, line, triangle, quadrangle; unsigned int tetrahedron, hexahedron, prism, pyramid; -- GitLab