10 #include "GmshConfig.h"
11 #include "GmshVersion.h"
24 #if defined(HAVE_MESH)
30 #if defined(HAVE_PARSER)
34 #if defined(HAVE_POST)
41 #if defined(HAVE_PLUGINS)
46 #if defined(HAVE_FLTK)
47 #include <FL/Fl_Tooltip.H>
49 #include "drawContextFltk.h"
50 #include "graphicWindow.h"
51 #include "optionWindow.h"
52 #include "manipWindow.h"
53 #include "contextWindow.h"
54 #include "clippingWindow.h"
55 #include "onelabGroup.h"
56 #include "viewButton.h"
57 #include "drawContextFltkCairo.h"
58 #include "drawContextFltkStringTexture.h"
63 bool StringOption(
int action,
const char *category,
int num,
const char *name,
64 std::string &val,
bool warnIfUnknown)
67 if(!strcmp(category,
"General"))
69 else if(!strcmp(category,
"Geometry"))
71 else if(!strcmp(category,
"Mesh"))
73 else if(!strcmp(category,
"Solver"))
75 else if(!strcmp(category,
"PostProcessing"))
77 else if(!strcmp(category,
"View"))
79 else if(!strcmp(category,
"Print"))
83 Msg::Error(
"Unknown string option category '%s'", category);
88 while(s[i].str && strcmp(s[i].str, name)) i++;
91 Msg::Error(
"Unknown string option '%s.%s'", category, name);
100 val = s[i].
function(num, action, val);
124 FILE *file, std::vector<std::string> *vec =
nullptr)
129 if(!diff || s[i].
function(num,
GMSH_GET,
"") != s[i].def) {
131 sprintf(tmp,
"%s%s = \"%s\";%s%s", prefix, s[i].str,
132 s[i].
function(num,
GMSH_GET,
"").c_str(), help ?
" // " :
"",
133 help ? s[i].help :
"");
135 fprintf(file,
"%s\n", tmp);
138 for(std::size_t i = 0; i < strlen(tmp); i++)
139 if(tmp[i] ==
'\n' || tmp[i] ==
'\t' || tmp[i] ==
'\r') tmp[i] =
' ';
141 vec->push_back(std::string(tmp) +
'\0' +
"string");
155 return "General.OptionsFileName";
168 fprintf(file,
"@item %s%s\n", prefix, s[i].str);
169 fprintf(file,
"%s@*\n", s[i].help);
173 for(std::size_t j = 1; j < val.size(); j++) {
174 if(val[j] ==
'\n' && val[j - 1] ==
'\n') val[j - 1] =
'.';
176 fprintf(file,
"Default value: @code{\"%s\"}@*\n", val.c_str());
185 bool NumberOption(
int action,
const char *category,
int num,
const char *name,
186 double &val,
bool warnIfUnknown)
189 if(!strcmp(category,
"General"))
191 else if(!strcmp(category,
"Geometry"))
193 else if(!strcmp(category,
"Mesh"))
195 else if(!strcmp(category,
"Solver"))
197 else if(!strcmp(category,
"PostProcessing"))
199 else if(!strcmp(category,
"View"))
201 else if(!strcmp(category,
"Print"))
205 Msg::Error(
"Unknown number option category '%s'", category);
210 while(s[i].str && strcmp(s[i].str, name)) i++;
213 Msg::Error(
"Unknown number option '%s.%s'", category, name);
222 val = s[i].
function(num, action, val);
247 FILE *file, std::vector<std::string> *vec =
nullptr)
253 if(!diff || (s[i].
function(num,
GMSH_GET, 0) != s[i].def)) {
254 sprintf(tmp,
"%s%s = %.16g;%s%s", prefix, s[i].str,
255 s[i].
function(num,
GMSH_GET, 0), help ?
" // " :
"",
256 help ? s[i].help :
"");
258 fprintf(file,
"%s\n", tmp);
260 vec->push_back(std::string(tmp) +
'\0' +
"number");
275 fprintf(file,
"@item %s%s\n", prefix, s[i].str);
276 fprintf(file,
"%s@*\n", s[i].help);
277 fprintf(file,
"Default value: @code{%g}@*\n",
287 bool ColorOption(
int action,
const char *category,
int num,
const char *name,
288 unsigned int &val,
bool warnIfUnknown)
291 if(!strcmp(category,
"General"))
293 else if(!strcmp(category,
"Geometry"))
295 else if(!strcmp(category,
"Mesh"))
297 else if(!strcmp(category,
"Solver"))
299 else if(!strcmp(category,
"PostProcessing"))
301 else if(!strcmp(category,
"View"))
303 else if(!strcmp(category,
"Print"))
307 Msg::Error(
"Unknown color option category '%s'", category);
312 while(s[i].str && strcmp(s[i].str, name)) i++;
315 Msg::Error(
"Unknown color option '%s.%s'", category, name);
325 s[i].def1[2], s[i].def1[3]));
327 val = s[i].
function(num, action, val);
367 s[i].def2[2], s[i].def2[3]));
375 s[i].def3[2], s[i].def3[3]));
383 s[i].def4[2], s[i].def4[3]));
391 s[i].def1[2], s[i].def1[3]));
409 std::vector<std::string> *vec)
419 s[i].def2[2], s[i].def2[3]);
423 s[i].def3[2], s[i].def3[3]);
427 s[i].def4[2], s[i].def4[3]);
431 s[i].def1[2], s[i].def1[3]);
434 if(!diff || (s[i].
function(num,
GMSH_GET, 0) != def)) {
435 sprintf(tmp,
"%sColor.%s = {%d,%d,%d};%s%s", prefix, s[i].str,
439 help ?
" // " :
"", help ? s[i].help :
"");
441 fprintf(file,
"%s\n", tmp);
443 vec->push_back(std::string(tmp) +
'\0' +
"color");
458 fprintf(file,
"@item %sColor.%s\n", prefix, s[i].str);
459 fprintf(file,
"%s@*\n", s[i].help);
460 fprintf(file,
"Default value: @code{@{%d,%d,%d@}}@*\n",
507 #if defined(HAVE_POST)
514 #if defined(HAVE_POST)
516 for(std::size_t i = 0; i <
PView::list.size(); i++)
546 FILE *file, std::vector<std::string> *vec =
nullptr)
548 if(diff || !help || !(level &
GMSH_FULLRC))
return;
550 fprintf(file,
"//\n");
551 fprintf(file,
"// %s\n", cat);
552 fprintf(file,
"//\n");
555 vec->push_back(
"//");
556 vec->push_back(std::string(
"// ") + cat);
557 vec->push_back(
"//");
568 #if defined(HAVE_POST)
584 std::vector<std::string> *vec)
586 #if defined(HAVE_POST)
607 sprintf(tmp,
"%s = {", prefix);
609 fprintf(file,
"%s\n", tmp);
617 fprintf(file,
"%s\n", tmp);
628 while((i = s.find(
'\n', i + 1)) >= 0) {
633 while((i = s.find_first_of(
"{}", i + 1)) >= 0) s.insert(i++,
"@");
636 void PrintOptions(
int num,
int level,
int diff,
int help,
const char *filename,
637 std::vector<std::string> *vec)
639 #if defined(HAVE_FLTK)
640 if(FlGui::available()) FlGui::instance()->storeCurrentWindowsInfo();
646 file =
Fopen(filename,
"w");
648 Msg::Error(
"Unable to open file '%s'", filename);
656 fprintf(file,
"// Gmsh Session File\n");
657 fprintf(file,
"//\n");
659 "// This file contains session specific info (that is info you\n");
662 "// want to keep between two Gmsh sessions). You are not supposed\n");
665 "// to edit it manually, but of course you can. This file will be\n");
667 "// entirely rewritten every time you quit Gmsh if the option \n");
668 fprintf(file,
"// 'General.SaveSession' is set.\n");
669 fprintf(file,
"//\n");
673 fprintf(file,
"// Gmsh Option File\n");
674 fprintf(file,
"//\n");
676 "// This file contains configuration options (preferences) that\n");
678 "// are loaded each time Gmsh is launched. You can create this\n");
679 fprintf(file,
"// file by hand, or let Gmsh generate it for you (with\n");
680 fprintf(file,
"// 'File->Save Default Options'). This file can also be\n");
682 "// automatically saved every time you quit Gmsh if the option\n");
683 fprintf(file,
"// 'General.SaveOptions' is set.\n");
684 fprintf(file,
"//\n");
702 "Geometry.", file, vec);
706 "Geometry.", file, vec);
735 "PostProcessing.", file, vec);
739 "PostProcessing.", file, vec);
743 "PostProcessing.", file, vec);
746 #if defined(HAVE_POST)
747 for(std::size_t i = 0; i <
PView::list.size(); i++) {
749 sprintf(tmp,
"View[%lu].", i);
762 strcat(tmp,
"ColorTable");
790 if(filename) fclose(file);
796 "@c This file was generated by \"gmsh -doc\": do not edit manually!\n\n";
799 FILE *file =
Fopen(
"opt_general.texi",
"w");
801 Msg::Error(
"Unable to open file 'opt_general.texi'");
804 fprintf(file,
"%s@ftable @code\n", warn);
808 fprintf(file,
"@end ftable\n");
812 FILE *file =
Fopen(
"opt_print.texi",
"w");
814 Msg::Error(
"Unable to open file 'opt_print.texi'");
817 fprintf(file,
"%s@ftable @code\n", warn);
821 fprintf(file,
"@end ftable\n");
825 FILE *file =
Fopen(
"opt_geometry.texi",
"w");
827 Msg::Error(
"Unable to open file 'opt_geometry.texi'");
830 fprintf(file,
"%s@ftable @code\n", warn);
834 fprintf(file,
"@end ftable\n");
838 FILE *file =
Fopen(
"opt_mesh.texi",
"w");
840 Msg::Error(
"Unable to open file 'opt_mesh.texi'");
843 fprintf(file,
"%s@ftable @code\n", warn);
847 fprintf(file,
"@end ftable\n");
851 FILE *file =
Fopen(
"opt_solver.texi",
"w");
853 Msg::Error(
"Unable to open file 'opt_solver.texi'");
856 fprintf(file,
"%s@ftable @code\n", warn);
860 fprintf(file,
"@end ftable\n");
864 FILE *file =
Fopen(
"opt_post.texi",
"w");
866 Msg::Error(
"Unable to open file 'opt_post.texi'");
869 fprintf(file,
"%s@ftable @code\n", warn);
875 fprintf(file,
"@end ftable\n");
879 #if defined(HAVE_POST)
880 FILE *file =
Fopen(
"opt_view.texi",
"w");
882 Msg::Error(
"Unable to open file 'opt_view.texi'");
885 fprintf(file,
"%s@ftable @code\n", warn);
889 fprintf(file,
"@item View.ColorTable\n");
890 fprintf(file,
"Color table used to draw the view@*\n");
891 fprintf(file,
"Saved in: @code{%s}\n\n",
893 fprintf(file,
"@end ftable\n");
898 #if defined(HAVE_PLUGINS)
899 FILE *file =
Fopen(
"plugins.texi",
"w");
901 Msg::Error(
"Unable to open file 'plugins.texi'");
904 fprintf(file,
"%s@ftable @code\n", warn);
909 fprintf(file,
"@item Plugin(%s)\n", p->
getName().c_str());
910 std::string help = p->
getHelp();
912 fprintf(file,
"%s\n", help.c_str());
915 fprintf(file,
"String options:\n");
916 fprintf(file,
"@table @code\n");
917 for(
int i = 0; i < m; i++) {
919 fprintf(file,
"@item %s\n", sxs->
str);
920 fprintf(file,
"Default value: @code{\"%s\"}\n", sxs->
def.c_str());
922 fprintf(file,
"@end table\n");
926 fprintf(file,
"Numeric options:\n");
927 fprintf(file,
"@table @code\n");
928 for(
int i = 0; i < n; i++) {
930 fprintf(file,
"@item %s\n", sxn->
str);
931 fprintf(file,
"Default value: @code{%g}\n", sxn->
def);
933 fprintf(file,
"@end table\n");
937 fprintf(file,
"@end ftable\n");
942 #if defined(HAVE_MESH)
944 FILE *file =
Fopen(
"fields.texi",
"w");
946 Msg::Error(
"Unable to open file 'fields.texi'");
949 fprintf(file,
"%s@ftable @code\n", warn);
953 if(it->first ==
"Attractor")
continue;
954 Field *
f = (*it->second)();
955 if(
f->isDeprecated())
continue;
956 fprintf(file,
"@item %s\n", it->first.c_str());
957 std::string field_description =
f->getDescription();
959 fprintf(file,
"%s@*\n", field_description.c_str());
960 if(!
f->options.empty()) {
961 fprintf(file,
"@*\nOptions:@*\n");
962 fprintf(file,
"@table @code\n");
963 for(
auto it2 =
f->options.begin(); it2 !=
f->options.end(); it2++) {
964 if(it2->second->isDeprecated())
continue;
965 fprintf(file,
"@item %s\n", it2->first.c_str());
967 it2->second->getTextRepresentation(val);
969 fprintf(file,
"%s@*\nType: %s@*\nDefault value: @code{%s}\n",
970 it2->second->getDescription().c_str(),
971 it2->second->getTypeName().c_str(), val.c_str());
973 fprintf(file,
"@end table\n\n");
975 if(!
f->callbacks.empty()) {
976 fprintf(file,
"Actions:@*\n");
977 fprintf(file,
"@table @code\n");
979 f->callbacks.begin();
980 it2 !=
f->callbacks.end(); it2++) {
981 fprintf(file,
"@item %s\n", it2->first.c_str());
982 fprintf(file,
"%s@*\n", it2->second->getDescription().c_str());
984 fprintf(file,
"@end table\n\n");
987 fprintf(file,
"@end ftable\n");
992 FILE *file =
Fopen(
"shortcuts.texi",
"w");
994 Msg::Error(
"Unable to open file 'shortcuts.texi'");
997 std::vector<std::pair<std::string, std::string> > s =
999 fprintf(file,
"%s@table @kbd\n", warn);
1000 for(std::size_t i = 0; i < s.size(); i++)
1001 fprintf(file,
"@item %s\n%s\n", s[i].first.c_str(), s[i].second.c_str());
1002 fprintf(file,
"@end table\n");
1006 FILE *file =
Fopen(
"mouse.texi",
"w");
1008 Msg::Error(
"Unable to open file 'mouse.texi'");
1011 std::vector<std::pair<std::string, std::string> > s =
GetMouseUsage();
1012 fprintf(file,
"%s@table @kbd\n", warn);
1013 for(std::size_t i = 0; i < s.size(); i++)
1014 fprintf(file,
"@item %s\n%s\n", s[i].first.c_str(), s[i].second.c_str());
1015 fprintf(file,
"@end table\n");
1019 FILE *file =
Fopen(
"commandline.texi",
"w");
1021 Msg::Error(
"Unable to open file 'commandline.texi'");
1024 std::vector<std::pair<std::string, std::string> > s =
GetUsage();
1025 fprintf(file,
"%s@ftable @code\n", warn);
1026 for(std::size_t i = 0; i < s.size(); i++)
1027 if(s[i].first.size() && s[i].second.size())
1028 fprintf(file,
"@item %s\n%s\n", s[i].first.c_str(),
1029 s[i].second.c_str());
1030 else if(s[i].first.size() && s[i].second.empty())
1031 fprintf(file,
"@end ftable\n %s\n@ftable @code\n", s[i].first.c_str());
1032 fprintf(file,
"@end ftable\n");
1037 #define GET_VIEW(error_val) \
1039 PViewData *data = 0; \
1040 PViewOptions *opt; \
1041 if(PView::list.empty()) \
1042 opt = PViewOptions::reference(); \
1044 if(num < 0 || num >= (int)PView::list.size()) { \
1045 Msg::Warning("View[%d] does not exist", num); \
1046 return (error_val); \
1048 view = PView::list[num]; \
1049 data = view->getData(); \
1050 opt = view->getOptions(); \
1053 #define GET_VIEWo(error_val) \
1055 PViewOptions *opt; \
1056 if(PView::list.empty()) \
1057 opt = PViewOptions::reference(); \
1059 if(num < 0 || num >= (int)PView::list.size()) { \
1060 Msg::Warning("View[%d] does not exist", num); \
1061 return (error_val); \
1063 view = PView::list[num]; \
1064 opt = view->getOptions(); \
1067 #define GET_VIEWd(error_val) \
1069 PViewData *data = 0; \
1070 if(!PView::list.empty()) { \
1071 if(num < 0 || num >= (int)PView::list.size()) { \
1072 Msg::Warning("View[%d] does not exist", num); \
1073 return (error_val); \
1075 view = PView::list[num]; \
1076 data = view->getData(); \
1084 #if defined(HAVE_FLTK)
1085 if(FlGui::available() && (action &
GMSH_GUI))
1086 FlGui::instance()->options->general.input[6]->value(
1095 #if defined(HAVE_FLTK)
1096 if(FlGui::available() && (action &
GMSH_GUI))
1097 FlGui::instance()->options->general.input[7]->value(
1106 #if defined(HAVE_FLTK)
1107 if(FlGui::available() && (action &
GMSH_GUI))
1108 FlGui::instance()->options->general.input[8]->value(
1117 #if defined(HAVE_FLTK)
1118 if(FlGui::available() && (action &
GMSH_GUI))
1119 FlGui::instance()->options->general.input[3]->value(
1128 #if defined(HAVE_FLTK)
1129 if(FlGui::available() && (action &
GMSH_GUI))
1130 FlGui::instance()->options->general.input[4]->value(
1139 #if defined(HAVE_FLTK)
1140 if(FlGui::available() && (action &
GMSH_GUI))
1141 FlGui::instance()->options->general.input[5]->value(
1156 #if defined(HAVE_FLTK)
1157 if(
CTX::instance()->bgImageFileName != val && FlGui::available()) {
1158 for(std::size_t i = 0; i < FlGui::instance()->graph.size(); i++)
1159 for(std::size_t j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++)
1164 ->invalidateBgImageTexture();
1176 std::string s = GMSH_CONFIG_OPTIONS;
1185 for(std::size_t i = 0; i < ss.size(); i++) {
1187 if(i != ss.size() - 1) s +=
"; ";
1189 std::string::size_type pos;
1190 while((pos = s.find(
" ")) != std::string::npos) {
1191 s.replace(pos, 2,
" ");
1209 #if defined(HAVE_FLTK)
1210 if(FlGui::available() && (action &
GMSH_GUI))
1211 FlGui::instance()->options->general.input[0]->value(
1305 std::string out =
"";
1316 #if defined(HAVE_FLTK)
1317 if(FlGui::available() && (action &
GMSH_GUI))
1318 FlGui::instance()->options->general.input[1]->value(
1339 #if defined(HAVE_FLTK)
1341 int index = dc.getFontIndex(
CTX::instance()->glFont.c_str());
1346 if(FlGui::available() && (action &
GMSH_GUI)) {
1347 FlGui::instance()->options->general.choice[1]->value(index);
1356 #if defined(HAVE_FLTK)
1358 int index = dc.getFontIndex(
CTX::instance()->glFontTitle.c_str());
1363 if(FlGui::available() && (action &
GMSH_GUI)) {
1364 FlGui::instance()->options->general.choice[6]->value(index);
1374 #if defined(HAVE_FLTK)
1378 #if defined(HAVE_CAIRO)
1390 if(FlGui::available() && (action &
GMSH_GUI)) {
1392 #if defined(HAVE_CAIRO)
1395 if(
CTX::instance()->glFontEngine ==
"StringTexture") index = 2;
1396 FlGui::instance()->options->general.choice[7]->value(index);
1442 #if defined(HAVE_FLTK)
1443 if(FlGui::available() && (action &
GMSH_GUI))
1444 FlGui::instance()->options->solver.input[0]->value(
1681 #if defined(HAVE_FLTK)
1682 if(FlGui::available() && (action &
GMSH_GUI))
1683 FlGui::instance()->options->solver.input[1]->value(
1692 #if defined(HAVE_FLTK)
1693 if(FlGui::available() && (action &
GMSH_GUI))
1694 FlGui::instance()->options->solver.input[2]->value(
1707 #if defined(HAVE_FLTK)
1708 int _gui_action_valid(
int action,
int num)
1710 if(!FlGui::available())
return 0;
1711 return (action &
GMSH_GUI) && (num == FlGui::instance()->options->view.index);
1717 #if defined(HAVE_POST)
1719 if(!data)
return "";
1722 #if defined(HAVE_FLTK)
1724 if(FlGui::available()) {
1725 for(
int i = 0; i < (int)
PView::list.size(); i++) {
1726 if((i == num ||
PView::list[i]->getAliasOf() == view->getTag() ||
1727 PView::list[i]->getTag() == view->getAliasOf()) &&
1728 FlGui::instance()->onelab->getViewButton(i)) {
1729 FlGui::instance()->onelab->getViewButton(i)->copy_label(
1731 FlGui::instance()->onelab->getViewButton(i)->redraw();
1737 #if defined(HAVE_FLTK)
1738 if(_gui_action_valid(action, num)) {
1739 FlGui::instance()->options->view.input[0]->value(data->getName().c_str());
1742 return data->getName();
1750 #if defined(HAVE_POST)
1752 if(action &
GMSH_SET) { opt->format = val; }
1753 #if defined(HAVE_FLTK)
1754 if(_gui_action_valid(action, num))
1755 FlGui::instance()->options->view.input[1]->value(opt->format.c_str());
1765 #if defined(HAVE_POST)
1767 if(action &
GMSH_SET) { opt->doubleClickedCommand = val; }
1768 return opt->doubleClickedCommand;
1776 #if defined(HAVE_POST)
1778 if(action &
GMSH_SET) { opt->group = val; }
1787 #if defined(HAVE_POST)
1789 if(!data)
return "";
1790 return data->getFileName();
1798 #if defined(HAVE_POST)
1800 if(action &
GMSH_SET) { opt->axesLabel[0] = val; }
1801 #if defined(HAVE_FLTK)
1802 if(_gui_action_valid(action, num))
1803 FlGui::instance()->options->view.input[10]->value(
1804 opt->axesLabel[0].c_str());
1806 return opt->axesLabel[0];
1814 #if defined(HAVE_POST)
1816 if(action &
GMSH_SET) { opt->axesLabel[1] = val; }
1817 #if defined(HAVE_FLTK)
1818 if(_gui_action_valid(action, num))
1819 FlGui::instance()->options->view.input[11]->value(
1820 opt->axesLabel[1].c_str());
1822 return opt->axesLabel[1];
1830 #if defined(HAVE_POST)
1832 if(action &
GMSH_SET) { opt->axesLabel[2] = val; }
1833 #if defined(HAVE_FLTK)
1834 if(_gui_action_valid(action, num))
1835 FlGui::instance()->options->view.input[12]->value(
1836 opt->axesLabel[2].c_str());
1838 return opt->axesLabel[2];
1846 #if defined(HAVE_POST)
1848 if(action &
GMSH_SET) { opt->axesFormat[0] = val; }
1849 #if defined(HAVE_FLTK)
1850 if(_gui_action_valid(action, num))
1851 FlGui::instance()->options->view.input[7]->value(
1852 opt->axesFormat[0].c_str());
1854 return opt->axesFormat[0];
1862 #if defined(HAVE_POST)
1864 if(action &
GMSH_SET) { opt->axesFormat[1] = val; }
1865 #if defined(HAVE_FLTK)
1866 if(_gui_action_valid(action, num))
1867 FlGui::instance()->options->view.input[8]->value(
1868 opt->axesFormat[1].c_str());
1870 return opt->axesFormat[1];
1878 #if defined(HAVE_POST)
1880 if(action &
GMSH_SET) { opt->axesFormat[2] = val; }
1881 #if defined(HAVE_FLTK)
1882 if(_gui_action_valid(action, num))
1883 FlGui::instance()->options->view.input[9]->value(
1884 opt->axesFormat[2].c_str());
1886 return opt->axesFormat[2];
1894 #if defined(HAVE_POST)
1897 opt->genRaiseX = val;
1898 if(view) view->setChanged(
true);
1900 #if defined(HAVE_FLTK)
1901 if(_gui_action_valid(action, num))
1902 FlGui::instance()->options->view.input[4]->value(opt->genRaiseX.c_str());
1904 return opt->genRaiseX;
1912 #if defined(HAVE_POST)
1915 opt->genRaiseY = val;
1916 if(view) view->setChanged(
true);
1918 #if defined(HAVE_FLTK)
1919 if(_gui_action_valid(action, num))
1920 FlGui::instance()->options->view.input[5]->value(opt->genRaiseY.c_str());
1922 return opt->genRaiseY;
1930 #if defined(HAVE_POST)
1933 opt->genRaiseZ = val;
1934 if(view) view->setChanged(
true);
1936 #if defined(HAVE_FLTK)
1937 if(_gui_action_valid(action, num))
1938 FlGui::instance()->options->view.input[6]->value(opt->genRaiseZ.c_str());
1940 return opt->genRaiseZ;
1950 case 'A':
return 10;
1952 case 'B':
return 11;
1954 case 'C':
return 12;
1956 case 'D':
return 13;
1958 case 'E':
return 14;
1960 case 'F':
return 15;
1962 if(
c >=
'0' &&
c <=
'9')
1972 if(str.size() < 8) {
1976 else if(str[1] !=
'*' || str[2] !=
'0' || str[3] !=
'x') {
1982 repeat = (int)str[0] -
'0';
1983 pattern = 16 * 16 * 16 *
_h2d(str[4]) + 16 * 16 *
_h2d(str[5]) +
1990 #if defined(HAVE_POST)
1993 opt->stippleString[0] = val;
1995 opt->stipple[0][1]);
1997 return opt->stippleString[0];
2005 #if defined(HAVE_POST)
2008 opt->stippleString[1] = val;
2010 opt->stipple[1][1]);
2012 return opt->stippleString[1];
2020 #if defined(HAVE_POST)
2023 opt->stippleString[2] = val;
2025 opt->stipple[2][1]);
2027 return opt->stippleString[2];
2035 #if defined(HAVE_POST)
2038 opt->stippleString[3] = val;
2040 opt->stipple[3][1]);
2042 return opt->stippleString[3];
2050 #if defined(HAVE_POST)
2053 opt->stippleString[4] = val;
2055 opt->stipple[4][1]);
2057 return opt->stippleString[4];
2065 #if defined(HAVE_POST)
2068 opt->stippleString[5] = val;
2070 opt->stipple[5][1]);
2072 return opt->stippleString[5];
2080 #if defined(HAVE_POST)
2083 opt->stippleString[6] = val;
2085 opt->stipple[6][1]);
2087 return opt->stippleString[6];
2095 #if defined(HAVE_POST)
2098 opt->stippleString[7] = val;
2100 opt->stipple[7][1]);
2102 return opt->stippleString[7];
2110 #if defined(HAVE_POST)
2113 opt->stippleString[8] = val;
2115 opt->stipple[8][1]);
2117 return opt->stippleString[8];
2125 #if defined(HAVE_POST)
2128 opt->stippleString[9] = val;
2130 opt->stipple[9][1]);
2132 return opt->stippleString[9];
2140 #if defined(HAVE_POST)
2142 if(action &
GMSH_SET) opt->attributes = val;
2143 return opt->attributes;
2190 #if defined(HAVE_FLTK)
2191 if(FlGui::available() && (action &
GMSH_GUI)) {
2192 FlGui::instance()->options->general.butt[21]->value(
2195 if(action &
GMSH_SET && FlGui::available()) {
2196 FlGui::instance()->applyColorScheme(
true);
2211 #if defined(HAVE_FLTK)
2212 if(FlGui::available() && (action &
GMSH_GUI))
2213 FlGui::instance()->options->general.value[12]->value(
2222 #if defined(HAVE_FLTK)
2223 if(FlGui::available() && (action &
GMSH_GUI))
2224 FlGui::instance()->options->general.value[28]->value(
2233 #if defined(HAVE_FLTK)
2234 if(FlGui::available() && (action &
GMSH_GUI))
2235 FlGui::instance()->options->general.butt[4]->value(
2244 #if defined(HAVE_FLTK)
2245 if(FlGui::available() && (action &
GMSH_GUI))
2246 FlGui::instance()->options->general.value[15]->value(
2255 #if defined(HAVE_FLTK)
2256 if(FlGui::available() && (action &
GMSH_GUI))
2257 FlGui::instance()->options->general.value[16]->value(
2281 #if defined(HAVE_FLTK)
2282 if(FlGui::available() && (action &
GMSH_GUI)) {
2283 FlGui::instance()->graph[0]->setGlWidth(
CTX::instance()->glSize[0]);
2295 #if defined(HAVE_FLTK)
2296 if(FlGui::available() && (action &
GMSH_GUI)) {
2297 FlGui::instance()->graph[0]->setGlHeight(
CTX::instance()->glSize[1]);
2358 #if defined(HAVE_FLTK)
2359 if(FlGui::available() && (action &
GMSH_GUI)) {
2360 FlGui::instance()->graph[0]->setMessageFontSize(
2371 #if defined(HAVE_FLTK)
2372 if(FlGui::available() && (action &
GMSH_GUI)) {
2374 FlGui::instance()->graph[0]->detachMenu();
2376 FlGui::instance()->graph[0]->attachMenu();
2394 #if defined(HAVE_FLTK)
2395 if(FlGui::available() && (action &
GMSH_GUI)) {
2396 FlGui::instance()->graph[0]->setMenuWidth(
CTX::instance()->menuSize[0]);
2584 #if defined(HAVE_FLTK)
2585 if(FlGui::available() && (action &
GMSH_GUI))
2586 FlGui::instance()->options->general.butt[8]->value(
2595 #if defined(HAVE_FLTK)
2596 if(FlGui::available() && (action &
GMSH_GUI))
2597 FlGui::instance()->options->general.butt[9]->value(
2606 #if defined(HAVE_FLTK)
2607 if(FlGui::available() && (action &
GMSH_GUI))
2608 FlGui::instance()->options->general.butt[14]->value(
2617 #if defined(HAVE_FLTK)
2618 if(FlGui::available()) {
2619 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2620 if(action &
GMSH_SET) gl->getDrawContext()->r[0] = val;
2621 return gl->getDrawContext()->r[0];
2630 #if defined(HAVE_FLTK)
2631 if(FlGui::available()) {
2632 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2633 if(action &
GMSH_SET) gl->getDrawContext()->r[1] = val;
2634 return gl->getDrawContext()->r[1];
2643 #if defined(HAVE_FLTK)
2644 if(FlGui::available()) {
2645 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2646 if(action &
GMSH_SET) gl->getDrawContext()->r[2] = val;
2647 return gl->getDrawContext()->r[2];
2656 #if defined(HAVE_FLTK)
2657 if(FlGui::available() && (action &
GMSH_GUI))
2658 FlGui::instance()->options->general.value[8]->value(
2667 #if defined(HAVE_FLTK)
2668 if(FlGui::available() && (action &
GMSH_GUI))
2669 FlGui::instance()->options->general.value[9]->value(
2678 #if defined(HAVE_FLTK)
2679 if(FlGui::available() && (action &
GMSH_GUI))
2680 FlGui::instance()->options->general.value[10]->value(
2689 #if defined(HAVE_FLTK)
2690 if(FlGui::available()) {
2691 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2692 if(action &
GMSH_SET) gl->getDrawContext()->quaternion[0] = val;
2693 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2694 return gl->getDrawContext()->quaternion[0];
2703 #if defined(HAVE_FLTK)
2704 if(FlGui::available()) {
2705 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2706 if(action &
GMSH_SET) gl->getDrawContext()->quaternion[1] = val;
2707 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2708 return gl->getDrawContext()->quaternion[1];
2717 #if defined(HAVE_FLTK)
2718 if(FlGui::available()) {
2719 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2720 if(action &
GMSH_SET) gl->getDrawContext()->quaternion[2] = val;
2721 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2722 return gl->getDrawContext()->quaternion[2];
2731 #if defined(HAVE_FLTK)
2732 if(FlGui::available()) {
2733 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2734 if(action &
GMSH_SET) gl->getDrawContext()->quaternion[3] = val;
2735 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2736 return gl->getDrawContext()->quaternion[3];
2745 #if defined(HAVE_FLTK)
2746 if(FlGui::available()) {
2747 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2748 if(action &
GMSH_SET) gl->getDrawContext()->t[0] = val;
2749 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2750 return gl->getDrawContext()->t[0];
2759 #if defined(HAVE_FLTK)
2760 if(FlGui::available()) {
2761 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2762 if(action &
GMSH_SET) gl->getDrawContext()->t[1] = val;
2763 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2764 return gl->getDrawContext()->t[1];
2773 #if defined(HAVE_FLTK)
2774 if(FlGui::available()) {
2775 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2776 if(action &
GMSH_SET) gl->getDrawContext()->t[2] = val;
2777 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2778 return gl->getDrawContext()->t[2];
2787 #if defined(HAVE_FLTK)
2788 if(FlGui::available()) {
2789 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2790 if(action &
GMSH_SET) gl->getDrawContext()->s[0] = val ? val : 1.0;
2791 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2792 return gl->getDrawContext()->s[0];
2801 #if defined(HAVE_FLTK)
2802 if(FlGui::available()) {
2803 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2804 if(action &
GMSH_SET) gl->getDrawContext()->s[1] = val ? val : 1.0;
2805 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2806 return gl->getDrawContext()->s[1];
2815 #if defined(HAVE_FLTK)
2816 if(FlGui::available()) {
2817 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
2818 if(action &
GMSH_SET) gl->getDrawContext()->s[2] = val ? val : 1.0;
2819 if(action &
GMSH_GUI) FlGui::instance()->manip->update();
2820 return gl->getDrawContext()->s[2];
2835 #if defined(HAVE_FLTK)
2836 if(FlGui::available() && (action &
GMSH_GUI))
2837 FlGui::instance()->options->general.value[14]->value(
2858 #if defined(HAVE_FLTK)
2859 if(FlGui::available() && (action &
GMSH_GUI))
2860 FlGui::instance()->options->general.value[6]->value(
2869 #if defined(HAVE_FLTK)
2870 if(FlGui::available() && (action &
GMSH_GUI))
2871 FlGui::instance()->options->general.value[7]->value(
2880 #if defined(HAVE_FLTK)
2881 if(FlGui::available() && (action &
GMSH_GUI))
2882 FlGui::instance()->options->general.value[1]->value(
CTX::instance()->shine);
2890 #if defined(HAVE_FLTK)
2891 if(FlGui::available() && (action &
GMSH_GUI))
2892 FlGui::instance()->options->general.value[0]->value(
2901 #if defined(HAVE_FLTK)
2902 if(FlGui::available() && (action &
GMSH_GUI))
2929 #if defined(HAVE_FLTK)
2930 if(FlGui::available() && (action &
GMSH_GUI))
2931 FlGui::instance()->options->general.butt[7]->value(
2941 #if defined(HAVE_FLTK)
2943 Fl_Tooltip::enable();
2945 Fl_Tooltip::disable();
2948 #if defined(HAVE_FLTK)
2949 if(FlGui::available() && (action &
GMSH_GUI))
2950 FlGui::instance()->options->general.butt[13]->value(
2965 #if defined(HAVE_FLTK)
2966 if(FlGui::available() && (action &
GMSH_GUI)) {
2968 FlGui::instance()->options->general.choice[2]->value(0);
2969 if(FlGui::available())
Msg::StatusBar(
false,
"Orthographic projection");
2972 FlGui::instance()->options->general.choice[2]->value(1);
2973 if(FlGui::available())
Msg::StatusBar(
false,
"Perspective projection");
2983 #if defined(HAVE_FLTK)
2984 if(FlGui::available() && (action &
GMSH_GUI)) {
2986 if(FlGui::available())
Msg::StatusBar(
false,
"Mouse selection ON");
2987 for(std::size_t i = 0; i < FlGui::instance()->graph.size(); i++)
2988 FlGui::instance()->graph[i]->getSelectionButton()->color(
2989 FL_BACKGROUND_COLOR);
2992 if(FlGui::available())
Msg::StatusBar(
false,
"Mouse selection OFF");
2993 for(std::size_t i = 0; i < FlGui::instance()->graph.size(); i++)
2994 FlGui::instance()->graph[i]->getSelectionButton()->color(FL_RED);
2996 for(std::size_t i = 0; i < FlGui::instance()->graph.size(); i++)
2997 FlGui::instance()->graph[i]->getSelectionButton()->redraw();
3006 #if defined(HAVE_FLTK)
3007 if(FlGui::available() && (action &
GMSH_GUI))
3008 FlGui::instance()->options->general.butt[11]->value(
3017 #if defined(HAVE_FLTK)
3018 if(FlGui::available() && (action &
GMSH_GUI))
3019 FlGui::instance()->options->general.butt[22]->value(
3028 #if defined(HAVE_FLTK)
3029 if(FlGui::available() && (action &
GMSH_GUI)) {
3030 FlGui::instance()->options->general.butt[2]->value(
3032 FlGui::instance()->options->activate(
"fast_redraw");
3041 #if defined(HAVE_FLTK)
3042 if(FlGui::available() && (action &
GMSH_GUI))
3043 FlGui::instance()->options->general.butt[6]->value(
3094 #if defined(HAVE_FLTK)
3095 if(FlGui::available() && (action &
GMSH_GUI)) {
3096 FlGui::instance()->options->general.choice[4]->value(
CTX::instance()->axes);
3097 FlGui::instance()->options->activate(
"general_axes");
3106 #if defined(HAVE_FLTK)
3107 if(FlGui::available() && (action &
GMSH_GUI))
3108 FlGui::instance()->options->general.butt[16]->value(
3117 #if defined(HAVE_FLTK)
3118 if(FlGui::available() && (action &
GMSH_GUI)) {
3119 FlGui::instance()->options->general.butt[0]->value(
3121 FlGui::instance()->options->activate(
"general_axes_auto");
3130 #if defined(HAVE_FLTK)
3131 if(FlGui::available() && (action &
GMSH_GUI))
3132 FlGui::instance()->options->general.value[17]->value(
3141 #if defined(HAVE_FLTK)
3142 if(FlGui::available() && (action &
GMSH_GUI))
3143 FlGui::instance()->options->general.value[18]->value(
3152 #if defined(HAVE_FLTK)
3153 if(FlGui::available() && (action &
GMSH_GUI))
3154 FlGui::instance()->options->general.value[19]->value(
3163 #if defined(HAVE_FLTK)
3164 if(FlGui::available() && (action &
GMSH_GUI))
3165 FlGui::instance()->options->general.value[20]->value(
3174 #if defined(HAVE_FLTK)
3175 if(FlGui::available() && (action &
GMSH_GUI))
3176 FlGui::instance()->options->general.value[23]->value(
3185 #if defined(HAVE_FLTK)
3186 if(FlGui::available() && (action &
GMSH_GUI))
3187 FlGui::instance()->options->general.value[21]->value(
3196 #if defined(HAVE_FLTK)
3197 if(FlGui::available() && (action &
GMSH_GUI))
3198 FlGui::instance()->options->general.value[24]->value(
3207 #if defined(HAVE_FLTK)
3208 if(FlGui::available() && (action &
GMSH_GUI))
3209 FlGui::instance()->options->general.value[22]->value(
3218 #if defined(HAVE_FLTK)
3219 if(FlGui::available() && (action &
GMSH_GUI))
3220 FlGui::instance()->options->general.value[25]->value(
3271 #if defined(HAVE_FLTK)
3272 if(FlGui::available() && (action &
GMSH_GUI)) {
3273 FlGui::instance()->options->general.butt[1]->value(
3275 FlGui::instance()->options->activate(
"general_small_axes");
3284 #if defined(HAVE_FLTK)
3285 if(FlGui::available() && (action &
GMSH_GUI))
3286 FlGui::instance()->options->general.value[26]->value(
3295 #if defined(HAVE_FLTK)
3296 if(FlGui::available() && (action &
GMSH_GUI))
3297 FlGui::instance()->options->general.value[27]->value(
3312 #if defined(HAVE_FLTK)
3313 if(FlGui::available()) {
3315 FlGui::instance()->options->general.value[11]->value(
3326 #if defined(HAVE_FLTK)
3327 if(FlGui::available()) {
3331 for(std::size_t i = 0; i < FlGui::instance()->graph.size(); i++)
3332 for(std::size_t j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++)
3333 FlGui::instance()->graph[i]->gl[j]->mode(mode);
3337 #if defined(HAVE_FLTK)
3338 if(FlGui::available() && (action &
GMSH_GUI))
3339 FlGui::instance()->options->general.butt[3]->value(
CTX::instance()->db);
3348 #if defined(HAVE_FLTK)
3349 if(FlGui::available()) {
3353 for(std::size_t i = 0; i < FlGui::instance()->graph.size(); i++)
3354 for(std::size_t j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++)
3355 FlGui::instance()->graph[i]->gl[j]->mode(mode);
3359 #if defined(HAVE_FLTK)
3360 if(FlGui::available() && (action &
GMSH_GUI))
3361 FlGui::instance()->options->general.butt[12]->value(
3380 #if defined(HAVE_FLTK)
3381 if(FlGui::available() && (action &
GMSH_GUI)) {
3382 FlGui::instance()->options->general.choice[0]->value(
3392 if(val < 0.) val = 0.;
3393 if(val > 1.) val = 1.;
3402 if(val < 0.) val = 0.;
3403 if(val > 1.) val = 1.;
3412 if(val < 0.) val = 0.;
3413 if(val > 1.) val = 1.;
3429 #if defined(HAVE_POST)
3430 for(std::size_t i = 0; i <
PView::list.size(); i++)
3440 #if defined(HAVE_POST)
3441 for(std::size_t i = 0; i <
PView::list.size(); i++)
3446 #if defined(HAVE_POST)
3454 #if defined(HAVE_FLTK)
3455 if(FlGui::available() && (action &
GMSH_GUI))
3456 FlGui::instance()->options->general.choice[3]->value(
3469 #if defined(HAVE_FLTK)
3470 if(FlGui::available() && (action &
GMSH_GUI))
3471 FlGui::instance()->options->general.choice[5]->value(
3516 #if defined(HAVE_FLTK)
3517 if(FlGui::available() && (action &
GMSH_GUI))
3518 FlGui::instance()->options->general.butt[5]->value(
3553 #if defined(HAVE_FLTK)
3554 if(FlGui::available() && (action &
GMSH_GUI)) {
3555 FlGui::instance()->options->general.butt[15]->value(
3557 FlGui::instance()->options->activate(
"rotation_center");
3572 #if defined(HAVE_FLTK)
3573 if(FlGui::available() && (action &
GMSH_GUI))
3574 FlGui::instance()->options->general.butt[10]->value(
3580 #if defined(HAVE_VISUDEV)
3588 #if defined(HAVE_FLTK)
3589 if(FlGui::available() && (action &
GMSH_GUI))
3590 FlGui::instance()->options->general.butt[20]->value(
3601 #if defined(HAVE_FLTK)
3602 if(FlGui::available() && (action &
GMSH_GUI))
3603 FlGui::instance()->options->general.butt[17]->value(
CTX::instance()->stereo);
3611 #if defined(HAVE_FLTK)
3612 if(FlGui::available() && (action &
GMSH_GUI))
3613 FlGui::instance()->options->general.value[29]->value
3622 #if defined(HAVE_FLTK)
3623 if(FlGui::available() && (action &
GMSH_GUI))
3624 FlGui::instance()->options->general.value[30]->value
3633 #if defined(HAVE_FLTK)
3634 if(FlGui::available() && (action &
GMSH_GUI))
3635 FlGui::instance()->options->general.value[31]->value
3644 #if defined(HAVE_FLTK)
3645 if(FlGui::available() && (action &
GMSH_GUI)){
3646 FlGui::instance()->options->general.butt[18]->value
3648 FlGui::instance()->options->activate(
"general_camera");
3657 #if defined(HAVE_FLTK)
3658 if(FlGui::available() && (action &
GMSH_GUI))
3659 FlGui::instance()->clipping->resetBrowser();
3667 #if defined(HAVE_FLTK)
3668 if(FlGui::available() && (action &
GMSH_GUI))
3669 FlGui::instance()->clipping->resetBrowser();
3677 #if defined(HAVE_FLTK)
3678 if(FlGui::available() && (action &
GMSH_GUI))
3679 FlGui::instance()->clipping->resetBrowser();
3687 #if defined(HAVE_FLTK)
3688 if(FlGui::available() && (action &
GMSH_GUI))
3689 FlGui::instance()->clipping->resetBrowser();
3697 #if defined(HAVE_FLTK)
3698 if(FlGui::available() && (action &
GMSH_GUI))
3699 FlGui::instance()->clipping->resetBrowser();
3707 #if defined(HAVE_FLTK)
3708 if(FlGui::available() && (action &
GMSH_GUI))
3709 FlGui::instance()->clipping->resetBrowser();
3717 #if defined(HAVE_FLTK)
3718 if(FlGui::available() && (action &
GMSH_GUI))
3719 FlGui::instance()->clipping->resetBrowser();
3727 #if defined(HAVE_FLTK)
3728 if(FlGui::available() && (action &
GMSH_GUI))
3729 FlGui::instance()->clipping->resetBrowser();
3737 #if defined(HAVE_FLTK)
3738 if(FlGui::available() && (action &
GMSH_GUI))
3739 FlGui::instance()->clipping->resetBrowser();
3747 #if defined(HAVE_FLTK)
3748 if(FlGui::available() && (action &
GMSH_GUI))
3749 FlGui::instance()->clipping->resetBrowser();
3757 #if defined(HAVE_FLTK)
3758 if(FlGui::available() && (action &
GMSH_GUI))
3759 FlGui::instance()->clipping->resetBrowser();
3767 #if defined(HAVE_FLTK)
3768 if(FlGui::available() && (action &
GMSH_GUI))
3769 FlGui::instance()->clipping->resetBrowser();
3777 #if defined(HAVE_FLTK)
3778 if(FlGui::available() && (action &
GMSH_GUI))
3779 FlGui::instance()->clipping->resetBrowser();
3787 #if defined(HAVE_FLTK)
3788 if(FlGui::available() && (action &
GMSH_GUI))
3789 FlGui::instance()->clipping->resetBrowser();
3797 #if defined(HAVE_FLTK)
3798 if(FlGui::available() && (action &
GMSH_GUI))
3799 FlGui::instance()->clipping->resetBrowser();
3807 #if defined(HAVE_FLTK)
3808 if(FlGui::available() && (action &
GMSH_GUI))
3809 FlGui::instance()->clipping->resetBrowser();
3817 #if defined(HAVE_FLTK)
3818 if(FlGui::available() && (action &
GMSH_GUI))
3819 FlGui::instance()->clipping->resetBrowser();
3827 #if defined(HAVE_FLTK)
3828 if(FlGui::available() && (action &
GMSH_GUI))
3829 FlGui::instance()->clipping->resetBrowser();
3837 #if defined(HAVE_FLTK)
3838 if(FlGui::available() && (action &
GMSH_GUI))
3839 FlGui::instance()->clipping->resetBrowser();
3847 #if defined(HAVE_FLTK)
3848 if(FlGui::available() && (action &
GMSH_GUI))
3849 FlGui::instance()->clipping->resetBrowser();
3857 #if defined(HAVE_FLTK)
3858 if(FlGui::available() && (action &
GMSH_GUI))
3859 FlGui::instance()->clipping->resetBrowser();
3867 #if defined(HAVE_FLTK)
3868 if(FlGui::available() && (action &
GMSH_GUI))
3869 FlGui::instance()->clipping->resetBrowser();
3877 #if defined(HAVE_FLTK)
3878 if(FlGui::available() && (action &
GMSH_GUI))
3879 FlGui::instance()->clipping->resetBrowser();
3887 #if defined(HAVE_FLTK)
3888 if(FlGui::available() && (action &
GMSH_GUI))
3889 FlGui::instance()->clipping->resetBrowser();
3897 #if defined(HAVE_FLTK)
3898 if(FlGui::available() && (action &
GMSH_GUI)) {
3899 FlGui::instance()->clipping->butt[0]->value(
3901 FlGui::instance()->options->activate(
"clip_whole_elements");
3911 #if defined(HAVE_FLTK)
3912 if(FlGui::available() && (action &
GMSH_GUI))
3913 FlGui::instance()->clipping->butt[1]->value(
3922 #if defined(HAVE_FLTK)
3923 if(FlGui::available() && (action &
GMSH_GUI))
3924 FlGui::instance()->clipping->butt[2]->value(
3939 #if defined(HAVE_FLTK)
3940 if(FlGui::available() && (action &
GMSH_GUI)) {
3941 FlGui::instance()->options->general.value[2]->value(
3943 FlGui::instance()->options->general.sphere->setValue(
3955 #if defined(HAVE_FLTK)
3956 if(FlGui::available() && (action &
GMSH_GUI)) {
3957 FlGui::instance()->options->general.value[3]->value(
3959 FlGui::instance()->options->general.sphere->setValue(
3971 #if defined(HAVE_FLTK)
3972 if(FlGui::available() && (action &
GMSH_GUI)) {
3973 FlGui::instance()->options->general.value[4]->value(
3975 FlGui::instance()->options->general.sphere->setValue(
3987 #if defined(HAVE_FLTK)
3988 if(FlGui::available() && (action &
GMSH_GUI))
3989 FlGui::instance()->options->general.value[13]->value(
4150 #if defined(HAVE_FLTK)
4151 if(FlGui::available() && (action &
GMSH_GUI))
4152 FlGui::instance()->options->general.value[32]->value(
CTX::instance()->numThreads);
4165 #if defined(HAVE_FLTK)
4166 if(FlGui::available()) {
4168 FlGui::instance()->options->geo.choice[3]->value(
4171 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
4175 gl->getDrawContext()->setTransform(tr);
4179 gl->getDrawContext()->setTransform(
nullptr);
4183 FlGui::instance()->options->activate(
"geo_transform");
4192 #if defined(HAVE_FLTK)
4193 if(FlGui::available()) {
4195 FlGui::instance()->options->geo.value[nn]->value(
4198 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
4257 #if defined(HAVE_FLTK)
4258 if(FlGui::available()) {
4260 FlGui::instance()->options->geo.value[nn]->value(
4263 openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow();
4292 #if defined(HAVE_FLTK)
4293 if(FlGui::available() && (action &
GMSH_GUI))
4294 FlGui::instance()->options->geo.butt[8]->value(
4309 #if defined(HAVE_FLTK)
4310 if(FlGui::available() && (action &
GMSH_GUI))
4311 FlGui::instance()->options->geo.butt[10]->value(
4320 #if defined(HAVE_FLTK)
4321 if(FlGui::available() && (action &
GMSH_GUI))
4322 FlGui::instance()->options->geo.value[2]->value(
4337 #if defined(HAVE_FLTK)
4338 if(FlGui::available() && (action &
GMSH_GUI))
4339 FlGui::instance()->options->geo.value[0]->value(
4348 #if defined(HAVE_FLTK)
4349 if(FlGui::available() && (action &
GMSH_GUI))
4350 FlGui::instance()->options->geo.value[1]->value(
4359 #if defined(HAVE_FLTK)
4360 if(FlGui::available() && (action &
GMSH_GUI))
4361 FlGui::instance()->options->geo.butt[0]->value(
4370 #if defined(HAVE_FLTK)
4371 if(FlGui::available() && (action &
GMSH_GUI))
4372 FlGui::instance()->options->geo.butt[1]->value(
4381 #if defined(HAVE_FLTK)
4382 if(FlGui::available() && (action &
GMSH_GUI))
4383 FlGui::instance()->options->geo.butt[2]->value(
4392 #if defined(HAVE_FLTK)
4393 if(FlGui::available() && (action &
GMSH_GUI))
4394 FlGui::instance()->options->geo.butt[3]->value(
4403 #if defined(HAVE_FLTK)
4404 if(FlGui::available() && (action &
GMSH_GUI))
4405 FlGui::instance()->options->geo.butt[4]->value(
4414 #if defined(HAVE_FLTK)
4415 if(FlGui::available() && (action &
GMSH_GUI))
4416 FlGui::instance()->options->geo.butt[5]->value(
4425 #if defined(HAVE_FLTK)
4426 if(FlGui::available() && (action &
GMSH_GUI))
4427 FlGui::instance()->options->geo.butt[6]->value(
4436 #if defined(HAVE_FLTK)
4437 if(FlGui::available() && (action &
GMSH_GUI))
4438 FlGui::instance()->options->geo.butt[7]->value(
4452 #if defined(HAVE_FLTK)
4453 if(FlGui::available() && (action &
GMSH_GUI)) {
4454 FlGui::instance()->options->geo.choice[4]->value(
4464 #if defined(HAVE_FLTK)
4465 if(FlGui::available() && (action &
GMSH_GUI))
4466 FlGui::instance()->options->geo.value[3]->value(
4475 #if defined(HAVE_FLTK)
4476 if(FlGui::available() && (action &
GMSH_GUI))
4477 FlGui::instance()->options->geo.value[5]->value(
4486 #if defined(HAVE_FLTK)
4487 if(FlGui::available() && (action &
GMSH_GUI)) {
4488 FlGui::instance()->options->geo.choice[0]->value(
4498 #if defined(HAVE_FLTK)
4499 if(FlGui::available() && (action &
GMSH_GUI))
4500 FlGui::instance()->options->geo.value[4]->value(
4509 #if defined(HAVE_FLTK)
4510 if(FlGui::available() && (action &
GMSH_GUI))
4511 FlGui::instance()->options->geo.value[6]->value(
4520 #if defined(HAVE_FLTK)
4521 if(FlGui::available() && (action &
GMSH_GUI)) {
4522 FlGui::instance()->options->geo.choice[1]->value(
4537 #if defined(HAVE_FLTK)
4538 if(FlGui::available() && (action &
GMSH_GUI)) {
4539 FlGui::instance()->options->geo.choice[2]->value(
4549 #if defined(HAVE_FLTK)
4550 if(FlGui::available() && (action &
GMSH_GUI)) {
4560 #if defined(HAVE_FLTK)
4561 if(FlGui::available() && (action &
GMSH_GUI))
4562 FlGui::instance()->options->geo.butt[15]->value(
4601 #if defined(HAVE_FLTK)
4602 if(FlGui::available() && (action &
GMSH_GUI)) {
4603 FlGui::instance()->options->geo.butt[16]->value(
4613 #if defined(HAVE_FLTK)
4614 if(FlGui::available() && (action &
GMSH_GUI)) {
4615 FlGui::instance()->options->geo.butt[11]->value(
4625 #if defined(HAVE_FLTK)
4626 if(FlGui::available() && (action &
GMSH_GUI)) {
4627 FlGui::instance()->options->geo.butt[12]->value(
4637 #if defined(HAVE_FLTK)
4638 if(FlGui::available() && (action &
GMSH_GUI)) {
4639 FlGui::instance()->options->geo.butt[13]->value(
4649 #if defined(HAVE_FLTK)
4650 if(FlGui::available() && (action &
GMSH_GUI)) {
4651 FlGui::instance()->options->geo.butt[14]->value(
4686 #if defined(HAVE_FLTK)
4687 if(FlGui::available() && (action &
GMSH_GUI)) {
4688 FlGui::instance()->options->geo.value[20]->value(
4738 #if defined(HAVE_FLTK)
4739 if(FlGui::available() && (action &
GMSH_GUI)) {
4740 FlGui::instance()->options->geo.value[19]->value(
4774 #if defined(HAVE_FLTK)
4775 if(FlGui::available() && (action &
GMSH_GUI))
4776 FlGui::instance()->elementaryContext->value[0]->value(
4785 #if defined(HAVE_FLTK)
4786 if(FlGui::available() && (action &
GMSH_GUI))
4787 FlGui::instance()->elementaryContext->value[1]->value(
4796 #if defined(HAVE_FLTK)
4797 if(FlGui::available() && (action &
GMSH_GUI))
4798 FlGui::instance()->elementaryContext->value[2]->value(
4807 #if defined(HAVE_FLTK)
4808 if(FlGui::available() && (action &
GMSH_GUI))
4809 FlGui::instance()->clipping->resetBrowser();
4859 #if defined(HAVE_FLTK)
4860 if(FlGui::available() && (action &
GMSH_GUI))
4861 FlGui::instance()->options->mesh.butt[2]->value(
4886 #if defined(HAVE_FLTK)
4887 if(FlGui::available() && (action &
GMSH_GUI))
4888 FlGui::instance()->options->mesh.butt[24]->value(
4914 #if defined(HAVE_FLTK)
4915 if(FlGui::available() && (action &
GMSH_GUI))
4916 FlGui::instance()->options->mesh.value[8]->value(
4931 #if defined(HAVE_FLTK)
4932 if(FlGui::available() && (action &
GMSH_GUI))
4933 FlGui::instance()->options->mesh.value[14]->value(
4942 #if defined(HAVE_FLTK)
4943 if(FlGui::available() && (action &
GMSH_GUI))
4944 FlGui::instance()->options->mesh.value[13]->value(
4957 #if defined(HAVE_FLTK)
4958 if(FlGui::available() && (action &
GMSH_GUI))
4959 FlGui::instance()->options->mesh.value[9]->value(
4984 Msg::Error(
"Mesh element size factor must be > 0");
4989 #if defined(HAVE_FLTK)
4990 if(FlGui::available() && (action &
GMSH_GUI))
4991 FlGui::instance()->options->mesh.value[2]->value(
5004 #if defined(HAVE_FLTK)
5005 if(FlGui::available() && (action &
GMSH_GUI))
5006 FlGui::instance()->options->mesh.value[25]->value(
5019 #if defined(HAVE_FLTK)
5020 if(FlGui::available() && (action &
GMSH_GUI))
5021 FlGui::instance()->options->mesh.value[26]->value(
5057 #if defined(HAVE_FLTK)
5058 if(FlGui::available() && (action &
GMSH_GUI)) {
5059 FlGui::instance()->options->mesh.value[1]->value(
5085 #if defined(HAVE_FLTK)
5086 if(FlGui::available() && (action &
GMSH_GUI)) {
5087 FlGui::instance()->options->mesh.butt[5]->value(
5102 #if defined(HAVE_FLTK)
5103 if(FlGui::available() && (action &
GMSH_GUI))
5104 FlGui::instance()->options->mesh.butt[26]->value(
5118 #if defined(HAVE_FLTK)
5119 if(FlGui::available() && (action &
GMSH_GUI))
5120 FlGui::instance()->options->mesh.butt[16]->value(
5168 #if defined(HAVE_FLTK)
5169 if(FlGui::available() && (action &
GMSH_GUI)) {
5170 FlGui::instance()->options->mesh.choice[6]->value(
5184 #if defined(HAVE_FLTK)
5185 if(FlGui::available() && (action &
GMSH_GUI))
5186 FlGui::instance()->options->mesh.value[4]->value(
5199 #if defined(HAVE_FLTK)
5200 if(FlGui::available() && (action &
GMSH_GUI))
5201 FlGui::instance()->options->mesh.value[5]->value(
5214 #if defined(HAVE_FLTK)
5215 if(FlGui::available() && (action &
GMSH_GUI))
5216 FlGui::instance()->options->mesh.value[6]->value(
5229 #if defined(HAVE_FLTK)
5230 if(FlGui::available() && (action &
GMSH_GUI))
5231 FlGui::instance()->options->mesh.value[7]->value(
5245 #if defined(HAVE_FLTK)
5246 if(FlGui::available() && (action &
GMSH_GUI)) {
5247 FlGui::instance()->options->mesh.choice[7]->value(
5273 #if defined(HAVE_FLTK)
5274 if(FlGui::available() && (action &
GMSH_GUI))
5275 FlGui::instance()->options->mesh.butt[6]->value(
5288 #if defined(HAVE_FLTK)
5289 if(FlGui::available() && (action &
GMSH_GUI))
5290 FlGui::instance()->options->mesh.butt[7]->value(
5303 #if defined(HAVE_FLTK)
5304 if(FlGui::available() && (action &
GMSH_GUI)) {
5306 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[0].set();
5308 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[0]
5322 #if defined(HAVE_FLTK)
5323 if(FlGui::available() && (action &
GMSH_GUI)) {
5325 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[1].set();
5327 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[1]
5341 #if defined(HAVE_FLTK)
5342 if(FlGui::available() && (action &
GMSH_GUI)) {
5344 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[2].set();
5346 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[2]
5360 #if defined(HAVE_FLTK)
5361 if(FlGui::available() && (action &
GMSH_GUI)) {
5363 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[3].set();
5365 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[3]
5379 #if defined(HAVE_FLTK)
5380 if(FlGui::available() && (action &
GMSH_GUI)) {
5382 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[4].set();
5384 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[4]
5398 #if defined(HAVE_FLTK)
5399 if(FlGui::available() && (action &
GMSH_GUI)) {
5401 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[5].set();
5403 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[5]
5417 #if defined(HAVE_FLTK)
5418 if(FlGui::available() && (action &
GMSH_GUI)) {
5420 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[6].set();
5422 ((Fl_Menu_Item *)FlGui::instance()->options->mesh.menu->menu())[6]
5442 #if defined(HAVE_FLTK)
5443 if(FlGui::available() && (action &
GMSH_GUI))
5444 FlGui::instance()->options->mesh.butt[8]->value(
5457 #if defined(HAVE_FLTK)
5458 if(FlGui::available() && (action &
GMSH_GUI))
5459 FlGui::instance()->options->mesh.butt[9]->value(
5472 #if defined(HAVE_FLTK)
5473 if(FlGui::available() && (action &
GMSH_GUI))
5474 FlGui::instance()->options->mesh.butt[10]->value(
5487 #if defined(HAVE_FLTK)
5488 if(FlGui::available() && (action &
GMSH_GUI))
5489 FlGui::instance()->options->mesh.butt[11]->value(
5498 #if defined(HAVE_FLTK)
5499 if(FlGui::available() && (action &
GMSH_GUI))
5500 FlGui::instance()->options->mesh.butt[12]->value(
5509 #if defined(HAVE_FLTK)
5510 if(FlGui::available() && (action &
GMSH_GUI))
5511 FlGui::instance()->options->mesh.butt[13]->value(
5520 #if defined(HAVE_FLTK)
5521 if(FlGui::available() && (action &
GMSH_GUI))
5522 FlGui::instance()->options->mesh.butt[14]->value(
5531 #if defined(HAVE_FLTK)
5532 if(FlGui::available() && (action &
GMSH_GUI))
5533 FlGui::instance()->options->mesh.butt[15]->value(
5542 #if defined(HAVE_FLTK)
5543 if(FlGui::available() && (action &
GMSH_GUI))
5544 FlGui::instance()->options->mesh.value[10]->value(
5553 #if defined(HAVE_FLTK)
5554 if(FlGui::available() && (action &
GMSH_GUI)) {
5555 FlGui::instance()->options->mesh.choice[0]->value(
5565 #if defined(HAVE_FLTK)
5566 if(FlGui::available() && (action &
GMSH_GUI))
5567 FlGui::instance()->options->mesh.value[11]->value(
5576 #if defined(HAVE_FLTK)
5577 if(FlGui::available() && (action &
GMSH_GUI))
5578 FlGui::instance()->options->mesh.value[12]->value(
5591 #if defined(HAVE_FLTK)
5592 if(FlGui::available() && (action &
GMSH_GUI))
5593 FlGui::instance()->options->mesh.butt[19]->value(
5618 #if defined(HAVE_FLTK)
5619 if(FlGui::available() && (action &
GMSH_GUI))
5620 FlGui::instance()->options->mesh.value[18]->value(
5629 #if defined(HAVE_FLTK)
5630 if(FlGui::available() && (action &
GMSH_GUI)) {
5631 FlGui::instance()->options->mesh.butt[17]->value(
5633 FlGui::instance()->options->activate(
"mesh_light");
5649 #if defined(HAVE_FLTK)
5650 if(FlGui::available() && (action &
GMSH_GUI))
5651 FlGui::instance()->options->mesh.choice[10]->value(
5660 #if defined(HAVE_FLTK)
5661 if(FlGui::available() && (action &
GMSH_GUI))
5662 FlGui::instance()->options->mesh.butt[18]->value(
5881 #if defined(HAVE_FLTK)
5882 if(FlGui::available() && (action &
GMSH_GUI))
5883 FlGui::instance()->options->mesh.value[0]->value(
5896 #if defined(HAVE_FLTK)
5897 if(FlGui::available() && (action &
GMSH_GUI)) {
5900 FlGui::instance()->options->mesh.choice[2]->value(1);
5903 FlGui::instance()->options->mesh.choice[2]->value(2);
5906 FlGui::instance()->options->mesh.choice[2]->value(3);
5909 FlGui::instance()->options->mesh.choice[2]->value(4);
5912 FlGui::instance()->options->mesh.choice[2]->value(5);
5915 FlGui::instance()->options->mesh.choice[2]->value(6);
5918 FlGui::instance()->options->mesh.choice[2]->value(7);
5921 FlGui::instance()->options->mesh.choice[2]->value(8);
5924 default: FlGui::instance()->options->mesh.choice[2]->value(0);
break;
5956 #if defined(HAVE_FLTK)
5957 if(FlGui::available() && (action &
GMSH_GUI)) {
5958 FlGui::instance()->options->mesh.choice[1]->value(
5973 #if defined(HAVE_FLTK)
5974 if(FlGui::available() && (action &
GMSH_GUI))
5975 FlGui::instance()->options->mesh.butt[21]->value(
6049 #if defined(HAVE_FLTK)
6050 if(FlGui::available() && (action &
GMSH_GUI)) {
6051 FlGui::instance()->options->mesh.choice[5]->value(
6068 #if defined(HAVE_FLTK)
6069 if(FlGui::available() && (action &
GMSH_GUI)) {
6072 FlGui::instance()->options->mesh.choice[3]->value(1);
6075 FlGui::instance()->options->mesh.choice[3]->value(2);
6078 FlGui::instance()->options->mesh.choice[3]->value(3);
6081 FlGui::instance()->options->mesh.choice[3]->value(4);
6084 default: FlGui::instance()->options->mesh.choice[3]->value(0);
break;
6159 #if defined(HAVE_FLTK)
6160 if(FlGui::available() && (action &
GMSH_GUI))
6161 FlGui::instance()->options->mesh.value[3]->value(
6170 #if defined(HAVE_FLTK)
6171 if(FlGui::available() && (action &
GMSH_GUI))
6172 FlGui::instance()->options->mesh.butt[3]->value(
6238 else if(ratio >= 0.5)
6301 #if defined(HAVE_FLTK)
6302 if(FlGui::available() && (action &
GMSH_GUI))
6303 FlGui::instance()->options->mesh.butt[4]->value(
6312 int value = std::min((
int)val, 4);
6438 #if defined(HAVE_FLTK)
6439 if(FlGui::available() && (action &
GMSH_GUI)) {
6440 FlGui::instance()->options->mesh.choice[4]->value(
6484 #if !defined(HAVE_MESH)
6487 for(
int i = 0; i < 50; i++) stat[i] = 0;
6551 return s[14] + s[15] + s[16];
6557 const int ival = std::max(0, (
int)val);
6604 #if defined(HAVE_FLTK)
6605 if(FlGui::available() && (action &
GMSH_GUI))
6606 FlGui::instance()->clipping->resetBrowser();
6718 #if defined(HAVE_FLTK)
6719 if(FlGui::available() && (action &
GMSH_GUI))
6720 FlGui::instance()->options->solver.butt[0]->value(
6729 #if defined(HAVE_FLTK)
6730 if(FlGui::available() && (action &
GMSH_GUI))
6731 FlGui::instance()->options->solver.value[0]->value(
6802 #if defined(HAVE_FLTK)
6803 if(FlGui::available() && (action &
GMSH_GUI))
6804 FlGui::instance()->options->post.butt[2]->value(
6819 #if defined(HAVE_FLTK)
6820 if(FlGui::available() && (action &
GMSH_GUI)) {
6821 FlGui::instance()->options->post.choice[0]->value(
6838 #if defined(HAVE_FLTK)
6839 if(FlGui::available() && (action &
GMSH_GUI))
6840 FlGui::instance()->options->post.value[0]->value(
6854 #if defined(HAVE_FLTK)
6855 if(FlGui::available() && (action &
GMSH_GUI))
6856 FlGui::instance()->options->post.butt[0]->value(
6858 if(FlGui::available())
6859 for(std::size_t i = 0; i < FlGui::instance()->graph.size(); i++)
6860 FlGui::instance()->graph[i]->checkAnimButtons();
6871 #if defined(HAVE_FLTK)
6872 if(FlGui::available() && (action &
GMSH_GUI))
6873 FlGui::instance()->options->post.value[1]->value(
6882 #if defined(HAVE_FLTK)
6883 if(FlGui::available() && (action &
GMSH_GUI))
6884 FlGui::instance()->options->post.butt[1]->value(
6904 #if defined(HAVE_POST)
6962 #if defined(HAVE_POST)
6965 #if defined(HAVE_FLTK)
6966 if(_gui_action_valid(action, num))
6967 FlGui::instance()->options->view.value[50]->maximum(
6968 data->getNumTimeSteps() - 1);
6969 if(FlGui::available())
6970 for(std::size_t i = 0; i < FlGui::instance()->graph.size(); i++)
6971 FlGui::instance()->graph[i]->checkAnimButtons();
6973 return data->getNumTimeSteps();
6981 #if defined(HAVE_POST)
6985 for(
int i = 0; i < data->getNumTimeSteps(); i++)
6986 if(data->hasTimeStep(i)) n++;
6995 #if defined(HAVE_POST)
6998 opt->timeStep = (int)val;
7000 if(opt->timeStep > data->getNumTimeSteps() - 1)
7002 else if(opt->timeStep < 0)
7003 opt->timeStep = data->getNumTimeSteps() - 1;
7004 if(data->getAdaptiveData())
7005 data->getAdaptiveData()->changeResolution(
7006 opt->timeStep, opt->maxRecursionLevel, opt->targetError);
7007 opt->currentTime = data->getTime(opt->timeStep);
7009 if(view) view->setChanged(
true);
7011 #if defined(HAVE_FLTK)
7012 if(_gui_action_valid(action, num))
7013 FlGui::instance()->options->view.value[50]->value(opt->timeStep);
7015 return opt->timeStep;
7023 #if defined(HAVE_POST)
7029 double dt_min = std::numeric_limits<double>::max();
7031 for(
int i = 0; i < data->getNumTimeSteps(); i++) {
7032 double dt = std::abs(data->getTime(i) - val);
7035 dt_min = std::min(dt_min, dt);
7041 return opt->currentTime;
7049 #if defined(HAVE_POST)
7051 if(!data)
return 0.;
7053 return view->getData(
true)->getMin();
7061 #if defined(HAVE_POST)
7063 if(!data)
return 0.;
7065 return view->getData(
true)->getMax();
7073 #if defined(HAVE_POST)
7075 if(!data)
return 0.;
7079 return data->getMin(opt->timeStep,
true, tensorRep, opt->forceNumComponents,
7088 #if defined(HAVE_POST)
7090 if(!data)
return 0.;
7094 return data->getMax(opt->timeStep,
true, tensorRep, opt->forceNumComponents,
7103 #if defined(HAVE_POST)
7106 opt->customMin = val;
7107 if(view) view->setChanged(
true);
7109 #if defined(HAVE_FLTK)
7110 if(_gui_action_valid(action, num)) {
7111 FlGui::instance()->options->view.value[31]->value(opt->customMin);
7114 return opt->customMin;
7122 #if defined(HAVE_POST)
7125 opt->customMax = val;
7126 if(view) view->setChanged(
true);
7128 #if defined(HAVE_FLTK)
7129 if(_gui_action_valid(action, num))
7130 FlGui::instance()->options->view.value[32]->value(opt->customMax);
7132 return opt->customMax;
7140 #if defined(HAVE_POST)
7143 opt->customAbscissaMin = val;
7144 if(view) view->setChanged(
true);
7146 return opt->customAbscissaMin;
7154 #if defined(HAVE_POST)
7157 opt->customAbscissaMax = val;
7158 if(view) view->setChanged(
true);
7160 return opt->customAbscissaMax;
7168 #if defined(HAVE_POST)
7170 if(!data)
return 0.;
7171 return data->getBoundingBox().min().x();
7179 #if defined(HAVE_POST)
7181 if(!data)
return 0.;
7182 return data->getBoundingBox().max().x();
7190 #if defined(HAVE_POST)
7192 if(!data)
return 0.;
7193 return data->getBoundingBox().min().y();
7201 #if defined(HAVE_POST)
7203 if(!data)
return 0.;
7204 return data->getBoundingBox().max().y();
7212 #if defined(HAVE_POST)
7214 if(!data)
return 0.;
7215 return data->getBoundingBox().min().z();
7223 #if defined(HAVE_POST)
7225 if(!data)
return 0.;
7226 return data->getBoundingBox().max().z();
7234 #if defined(HAVE_POST)
7237 opt->offset[0] = val;
7238 if(view) view->setChanged(
true);
7240 #if defined(HAVE_FLTK)
7241 if(_gui_action_valid(action, num))
7242 FlGui::instance()->options->view.value[40]->value(opt->offset[0]);
7244 return opt->offset[0];
7252 #if defined(HAVE_POST)
7255 opt->offset[1] = val;
7256 if(view) view->setChanged(
true);
7258 #if defined(HAVE_FLTK)
7259 if(_gui_action_valid(action, num))
7260 FlGui::instance()->options->view.value[41]->value(opt->offset[1]);
7262 return opt->offset[1];
7270 #if defined(HAVE_POST)
7273 opt->offset[2] = val;
7274 if(view) view->setChanged(
true);
7276 #if defined(HAVE_FLTK)
7277 if(_gui_action_valid(action, num))
7278 FlGui::instance()->options->view.value[42]->value(opt->offset[2]);
7280 return opt->offset[2];
7288 #if defined(HAVE_POST)
7291 opt->raise[0] = val;
7292 if(view) view->setChanged(
true);
7294 #if defined(HAVE_FLTK)
7295 if(_gui_action_valid(action, num))
7296 FlGui::instance()->options->view.value[43]->value(opt->raise[0]);
7298 return opt->raise[0];
7306 #if defined(HAVE_POST)
7309 opt->raise[1] = val;
7310 if(view) view->setChanged(
true);
7312 #if defined(HAVE_FLTK)
7313 if(_gui_action_valid(action, num))
7314 FlGui::instance()->options->view.value[44]->value(opt->raise[1]);
7316 return opt->raise[1];
7324 #if defined(HAVE_POST)
7327 opt->raise[2] = val;
7328 if(view) view->setChanged(
true);
7330 #if defined(HAVE_FLTK)
7331 if(_gui_action_valid(action, num))
7332 FlGui::instance()->options->view.value[45]->value(opt->raise[2]);
7334 return opt->raise[2];
7342 #if defined(HAVE_POST)
7345 opt->normalRaise = val;
7346 if(view) view->setChanged(
true);
7348 #if defined(HAVE_FLTK)
7349 if(_gui_action_valid(action, num))
7350 FlGui::instance()->options->view.value[46]->value(opt->normalRaise);
7352 return opt->normalRaise;
7360 #if defined(HAVE_POST)
7363 opt->transform[0][0] = val;
7364 if(view) view->setChanged(
true);
7366 #if defined(HAVE_FLTK)
7367 if(_gui_action_valid(action, num))
7368 FlGui::instance()->options->view.value[51]->value(opt->transform[0][0]);
7370 return opt->transform[0][0];
7378 #if defined(HAVE_POST)
7381 opt->transform[0][1] = val;
7382 if(view) view->setChanged(
true);
7384 #if defined(HAVE_FLTK)
7385 if(_gui_action_valid(action, num))
7386 FlGui::instance()->options->view.value[52]->value(opt->transform[0][1]);
7388 return opt->transform[0][1];
7396 #if defined(HAVE_POST)
7399 opt->transform[0][2] = val;
7400 if(view) view->setChanged(
true);
7402 #if defined(HAVE_FLTK)
7403 if(_gui_action_valid(action, num))
7404 FlGui::instance()->options->view.value[53]->value(opt->transform[0][2]);
7406 return opt->transform[0][2];
7414 #if defined(HAVE_POST)
7417 opt->transform[1][0] = val;
7418 if(view) view->setChanged(
true);
7420 #if defined(HAVE_FLTK)
7421 if(_gui_action_valid(action, num))
7422 FlGui::instance()->options->view.value[54]->value(opt->transform[1][0]);
7424 return opt->transform[1][0];
7432 #if defined(HAVE_POST)
7435 opt->transform[1][1] = val;
7436 if(view) view->setChanged(
true);
7438 #if defined(HAVE_FLTK)
7439 if(_gui_action_valid(action, num))
7440 FlGui::instance()->options->view.value[55]->value(opt->transform[1][1]);
7442 return opt->transform[1][1];
7450 #if defined(HAVE_POST)
7453 opt->transform[1][2] = val;
7454 if(view) view->setChanged(
true);
7456 #if defined(HAVE_FLTK)
7457 if(_gui_action_valid(action, num))
7458 FlGui::instance()->options->view.value[56]->value(opt->transform[1][2]);
7460 return opt->transform[1][2];
7468 #if defined(HAVE_POST)
7471 opt->transform[2][0] = val;
7472 if(view) view->setChanged(
true);
7474 #if defined(HAVE_FLTK)
7475 if(_gui_action_valid(action, num))
7476 FlGui::instance()->options->view.value[57]->value(opt->transform[2][0]);
7478 return opt->transform[2][0];
7486 #if defined(HAVE_POST)
7489 opt->transform[2][1] = val;
7490 if(view) view->setChanged(
true);
7492 #if defined(HAVE_FLTK)
7493 if(_gui_action_valid(action, num))
7494 FlGui::instance()->options->view.value[58]->value(opt->transform[2][1]);
7496 return opt->transform[2][1];
7504 #if defined(HAVE_POST)
7507 opt->transform[2][2] = val;
7508 if(view) view->setChanged(
true);
7510 #if defined(HAVE_FLTK)
7511 if(_gui_action_valid(action, num))
7512 FlGui::instance()->options->view.value[59]->value(opt->transform[2][2]);
7514 return opt->transform[2][2];
7522 #if defined(HAVE_POST)
7524 if(action &
GMSH_SET) { opt->arrowSizeMin = val; }
7525 #if defined(HAVE_FLTK)
7526 if(_gui_action_valid(action, num))
7527 FlGui::instance()->options->view.value[64]->value(opt->arrowSizeMin);
7529 return opt->arrowSizeMin;
7537 #if defined(HAVE_POST)
7539 if(action &
GMSH_SET) { opt->arrowSizeMax = val; }
7540 #if defined(HAVE_FLTK)
7541 if(_gui_action_valid(action, num))
7542 FlGui::instance()->options->view.value[60]->value(opt->arrowSizeMax);
7544 return opt->arrowSizeMax;
7552 #if defined(HAVE_POST)
7554 if(action &
GMSH_SET) { opt->normals = val; }
7555 #if defined(HAVE_FLTK)
7556 if(_gui_action_valid(action, num))
7557 FlGui::instance()->options->view.value[0]->value(opt->normals);
7559 return opt->normals;
7567 #if defined(HAVE_POST)
7569 if(action &
GMSH_SET) { opt->tangents = val; }
7570 #if defined(HAVE_FLTK)
7571 if(_gui_action_valid(action, num))
7572 FlGui::instance()->options->view.value[1]->value(opt->tangents);
7574 return opt->tangents;
7582 #if defined(HAVE_POST)
7585 opt->displacementFactor = val;
7586 if(view) view->setChanged(
true);
7588 #if defined(HAVE_FLTK)
7589 if(_gui_action_valid(action, num))
7590 FlGui::instance()->options->view.value[63]->value(opt->displacementFactor);
7592 return opt->displacementFactor;
7600 #if defined(HAVE_POST)
7603 opt->fakeTransparency = (int)val;
7604 if(view) view->setChanged(
true);
7606 #if defined(HAVE_FLTK)
7607 if(_gui_action_valid(action, num))
7608 FlGui::instance()->options->view.butt[24]->value(opt->fakeTransparency);
7610 return opt->fakeTransparency;
7618 #if defined(HAVE_POST)
7622 if(view) view->setChanged(
true);
7624 #if defined(HAVE_FLTK)
7625 if(_gui_action_valid(action, num))
7626 FlGui::instance()->options->view.value[12]->value(opt->explode);
7628 return opt->explode;
7636 #if defined(HAVE_POST)
7638 if(action &
GMSH_SET) { opt->visible = (int)val; }
7639 #if defined(HAVE_FLTK)
7640 if(FlGui::available() && (action &
GMSH_GUI) && num >= 0 &&
7641 FlGui::instance()->onelab->getViewButton(num))
7642 FlGui::instance()->onelab->getViewButton(num)->value(opt->visible);
7644 return opt->visible;
7652 #if defined(HAVE_POST)
7655 opt->intervalsType = (int)val;
7656 if(opt->intervalsType < 1 || opt->intervalsType > 4) opt->intervalsType = 1;
7657 if(view) view->setChanged(
true);
7659 #if defined(HAVE_FLTK)
7660 if(_gui_action_valid(action, num)) {
7661 FlGui::instance()->options->view.choice[0]->value(opt->intervalsType - 1);
7664 return opt->intervalsType;
7672 #if defined(HAVE_POST)
7675 opt->saturateValues = (int)val;
7676 if(view) view->setChanged(
true);
7678 #if defined(HAVE_FLTK)
7679 if(_gui_action_valid(action, num)) {
7680 FlGui::instance()->options->view.butt[38]->value(opt->saturateValues);
7683 return opt->saturateValues;
7691 #if defined(HAVE_POST)
7694 opt->adaptVisualizationGrid = (int)val;
7696 if(opt->adaptVisualizationGrid)
7697 data->initAdaptiveData(opt->timeStep, opt->maxRecursionLevel,
7700 data->destroyAdaptiveData();
7701 view->setChanged(
true);
7704 #if defined(HAVE_FLTK)
7705 if(_gui_action_valid(action, num)) {
7706 FlGui::instance()->options->view.butt[0]->value(
7707 opt->adaptVisualizationGrid);
7708 FlGui::instance()->options->activate(
"view_adaptive");
7711 return opt->adaptVisualizationGrid;
7719 #if defined(HAVE_POST)
7722 opt->maxRecursionLevel = (int)val;
7723 if(data && data->getAdaptiveData()) {
7724 data->getAdaptiveData()->changeResolution(
7725 opt->timeStep, opt->maxRecursionLevel, opt->targetError);
7726 view->setChanged(
true);
7729 #if defined(HAVE_FLTK)
7730 if(_gui_action_valid(action, num)) {
7731 FlGui::instance()->options->view.value[33]->value(opt->maxRecursionLevel);
7734 return opt->maxRecursionLevel;
7742 #if defined(HAVE_POST)
7745 opt->targetError = val;
7746 if(data && data->getAdaptiveData()) {
7747 data->getAdaptiveData()->changeResolution(
7748 opt->timeStep, opt->maxRecursionLevel, opt->targetError);
7749 view->setChanged(
true);
7752 #if defined(HAVE_FLTK)
7753 if(_gui_action_valid(action, num)) {
7754 FlGui::instance()->options->view.value[34]->value(opt->targetError);
7757 return opt->targetError;
7765 #if defined(HAVE_POST)
7768 opt->type = (int)val;
7769 if(opt->type < 1 || opt->type > 4) opt->type = 1;
7770 if(view) view->setChanged(
true);
7772 #if defined(HAVE_FLTK)
7773 if(_gui_action_valid(action, num)) {
7774 FlGui::instance()->options->view.choice[13]->value(opt->type - 1);
7785 #if defined(HAVE_POST)
7788 opt->autoPosition = (int)val;
7789 if(opt->autoPosition < 0 || opt->autoPosition > 12) opt->autoPosition = 0;
7791 #if defined(HAVE_FLTK)
7792 if(_gui_action_valid(action, num)) {
7793 FlGui::instance()->options->view.choice[16]->value(opt->autoPosition);
7794 FlGui::instance()->options->activate(
"view_axes_auto_2d");
7797 return opt->autoPosition;
7805 #if defined(HAVE_POST)
7807 if(action &
GMSH_SET) { opt->position[0] = val; }
7808 #if defined(HAVE_FLTK)
7809 if(_gui_action_valid(action, num))
7810 FlGui::instance()->options->view.value[20]->value(opt->position[0]);
7812 return opt->position[0];
7820 #if defined(HAVE_POST)
7822 if(action &
GMSH_SET) { opt->position[1] = val; }
7823 #if defined(HAVE_FLTK)
7824 if(_gui_action_valid(action, num))
7825 FlGui::instance()->options->view.value[21]->value(opt->position[1]);
7827 return opt->position[1];
7835 #if defined(HAVE_POST)
7838 opt->sampling = (int)val;
7839 if(view) view->setChanged(
true);
7841 #if defined(HAVE_FLTK)
7842 if(_gui_action_valid(action, num))
7843 FlGui::instance()->options->view.value[6]->value(opt->sampling);
7845 return opt->sampling;
7853 #if defined(HAVE_POST)
7855 if(action &
GMSH_SET) { opt->size[0] = val; }
7856 #if defined(HAVE_FLTK)
7857 if(_gui_action_valid(action, num))
7858 FlGui::instance()->options->view.value[22]->value(opt->size[0]);
7860 return opt->size[0];
7868 #if defined(HAVE_POST)
7870 if(action &
GMSH_SET) { opt->size[1] = val; }
7871 #if defined(HAVE_FLTK)
7872 if(_gui_action_valid(action, num))
7873 FlGui::instance()->options->view.value[23]->value(opt->size[1]);
7875 return opt->size[1];
7883 #if defined(HAVE_POST)
7886 opt->axes = (int)val;
7887 if(opt->axes < 0 || opt->axes > 5) opt->axes = 0;
7889 #if defined(HAVE_FLTK)
7890 if(_gui_action_valid(action, num)) {
7891 FlGui::instance()->options->view.choice[8]->value(opt->axes);
7892 FlGui::instance()->options->activate(
"view_axes");
7903 #if defined(HAVE_POST)
7905 if(action &
GMSH_SET) { opt->axesMikado = (int)val; }
7906 #if defined(HAVE_FLTK)
7907 if(_gui_action_valid(action, num)) {
7908 FlGui::instance()->options->view.butt[3]->value(opt->axesMikado);
7911 return opt->axesMikado;
7919 #if defined(HAVE_POST)
7921 if(action &
GMSH_SET) { opt->axesAutoPosition = (int)val; }
7922 #if defined(HAVE_FLTK)
7923 if(_gui_action_valid(action, num)) {
7924 FlGui::instance()->options->view.butt[25]->value(opt->axesAutoPosition);
7925 FlGui::instance()->options->activate(
"view_axes_auto_3d");
7928 return opt->axesAutoPosition;
7936 #if defined(HAVE_POST)
7938 if(action &
GMSH_SET) { opt->axesPosition[0] = val; }
7939 #if defined(HAVE_FLTK)
7940 if(_gui_action_valid(action, num)) {
7941 FlGui::instance()->options->view.value[13]->value(opt->axesPosition[0]);
7944 return opt->axesPosition[0];
7952 #if defined(HAVE_POST)
7954 if(action &
GMSH_SET) { opt->axesPosition[1] = val; }
7955 #if defined(HAVE_FLTK)
7956 if(_gui_action_valid(action, num)) {
7957 FlGui::instance()->options->view.value[16]->value(opt->axesPosition[1]);
7960 return opt->axesPosition[1];
7968 #if defined(HAVE_POST)
7970 if(action &
GMSH_SET) { opt->axesPosition[2] = val; }
7971 #if defined(HAVE_FLTK)
7972 if(_gui_action_valid(action, num)) {
7973 FlGui::instance()->options->view.value[14]->value(opt->axesPosition[2]);
7976 return opt->axesPosition[2];
7984 #if defined(HAVE_POST)
7986 if(action &
GMSH_SET) { opt->axesPosition[3] = val; }
7987 #if defined(HAVE_FLTK)
7988 if(_gui_action_valid(action, num)) {
7989 FlGui::instance()->options->view.value[17]->value(opt->axesPosition[3]);
7992 return opt->axesPosition[3];
8000 #if defined(HAVE_POST)
8002 if(action &
GMSH_SET) { opt->axesPosition[4] = val; }
8003 #if defined(HAVE_FLTK)
8004 if(_gui_action_valid(action, num)) {
8005 FlGui::instance()->options->view.value[15]->value(opt->axesPosition[4]);
8008 return opt->axesPosition[4];
8016 #if defined(HAVE_POST)
8018 if(action &
GMSH_SET) { opt->axesPosition[5] = val; }
8019 #if defined(HAVE_FLTK)
8020 if(_gui_action_valid(action, num)) {
8021 FlGui::instance()->options->view.value[18]->value(opt->axesPosition[5]);
8024 return opt->axesPosition[5];
8032 #if defined(HAVE_POST)
8034 if(action &
GMSH_SET) { opt->axesTics[0] = val; }
8035 #if defined(HAVE_FLTK)
8036 if(_gui_action_valid(action, num)) {
8037 FlGui::instance()->options->view.value[3]->value(opt->axesTics[0]);
8040 return opt->axesTics[0];
8048 #if defined(HAVE_POST)
8050 if(action &
GMSH_SET) { opt->axesTics[1] = val; }
8051 #if defined(HAVE_FLTK)
8052 if(_gui_action_valid(action, num)) {
8053 FlGui::instance()->options->view.value[4]->value(opt->axesTics[1]);
8056 return opt->axesTics[1];
8064 #if defined(HAVE_POST)
8066 if(action &
GMSH_SET) { opt->axesTics[2] = val; }
8067 #if defined(HAVE_FLTK)
8068 if(_gui_action_valid(action, num)) {
8069 FlGui::instance()->options->view.value[5]->value(opt->axesTics[2]);
8072 return opt->axesTics[2];
8080 #if defined(HAVE_POST)
8083 opt->nbIso = (int)val;
8084 if(view) view->setChanged(
true);
8086 #if defined(HAVE_FLTK)
8087 if(_gui_action_valid(action, num))
8088 FlGui::instance()->options->view.value[30]->value(opt->nbIso);
8098 #if defined(HAVE_POST)
8101 opt->boundary = (int)val;
8102 if(opt->boundary < 0 || opt->boundary > 3) opt->boundary = 0;
8103 if(view) view->setChanged(
true);
8105 #if defined(HAVE_FLTK)
8106 if(_gui_action_valid(action, num)) {
8107 FlGui::instance()->options->view.choice[9]->value(opt->boundary);
8110 return opt->boundary;
8118 #if defined(HAVE_POST)
8121 opt->light = (int)val;
8122 if(view) view->setChanged(
true);
8124 #if defined(HAVE_FLTK)
8125 if(_gui_action_valid(action, num)) {
8126 FlGui::instance()->options->view.butt[11]->value(opt->light);
8127 FlGui::instance()->options->activate(
"view_light");
8138 #if defined(HAVE_POST)
8140 if(action &
GMSH_SET) { opt->lightTwoSide = (int)val; }
8141 #if defined(HAVE_FLTK)
8142 if(_gui_action_valid(action, num))
8143 FlGui::instance()->options->view.butt[9]->value(opt->lightTwoSide);
8145 return opt->lightTwoSide;
8153 #if defined(HAVE_POST)
8155 if(action &
GMSH_SET) { opt->lightLines = (int)val; }
8156 #if defined(HAVE_FLTK)
8157 if(_gui_action_valid(action, num))
8158 FlGui::instance()->options->view.butt[8]->value(opt->lightLines);
8160 return opt->lightLines;
8168 #if defined(HAVE_POST)
8171 opt->smoothNormals = (int)val;
8172 if(view) view->setChanged(
true);
8174 #if defined(HAVE_FLTK)
8175 if(_gui_action_valid(action, num))
8176 FlGui::instance()->options->view.butt[12]->value(opt->smoothNormals);
8178 return opt->smoothNormals;
8186 #if defined(HAVE_POST)
8189 opt->angleSmoothNormals = val;
8190 if(view) view->setChanged(
true);
8192 #if defined(HAVE_FLTK)
8193 if(_gui_action_valid(action, num))
8194 FlGui::instance()->options->view.value[10]->value(opt->angleSmoothNormals);
8196 return opt->angleSmoothNormals;
8204 #if defined(HAVE_POST)
8207 opt->showElement = (int)val;
8208 if(view) view->setChanged(
true);
8210 #if defined(HAVE_FLTK)
8211 if(_gui_action_valid(action, num))
8212 FlGui::instance()->options->view.butt[10]->value(opt->showElement);
8214 return opt->showElement;
8222 #if defined(HAVE_POST)
8225 opt->showTime = (int)val;
8226 if(opt->showTime < 0 || opt->showTime > 7) opt->showTime = 0;
8228 #if defined(HAVE_FLTK)
8229 if(_gui_action_valid(action, num))
8230 FlGui::instance()->options->view.choice[12]->value(opt->showTime);
8232 return opt->showTime;
8240 #if defined(HAVE_POST)
8242 if(action &
GMSH_SET) { opt->showScale = (int)val; }
8243 #if defined(HAVE_FLTK)
8244 if(_gui_action_valid(action, num))
8245 FlGui::instance()->options->view.butt[4]->value(opt->showScale);
8247 return opt->showScale;
8255 #if defined(HAVE_POST)
8257 if(action &
GMSH_SET) { opt->drawStrings = (int)val; }
8258 #if defined(HAVE_FLTK)
8259 if(_gui_action_valid(action, num))
8260 FlGui::instance()->options->view.butt[5]->value(opt->drawStrings);
8262 return opt->drawStrings;
8270 #if defined(HAVE_POST)
8273 opt->drawPoints = (int)val;
8274 if(view) view->setChanged(
true);
8276 #if defined(HAVE_FLTK)
8277 if(_gui_action_valid(action, num)) {
8279 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[0]
8282 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[0]
8286 return opt->drawPoints;
8294 #if defined(HAVE_POST)
8297 opt->drawLines = (int)val;
8298 if(view) view->setChanged(
true);
8300 #if defined(HAVE_FLTK)
8301 if(_gui_action_valid(action, num)) {
8303 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[1]
8306 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[1]
8310 return opt->drawLines;
8318 #if defined(HAVE_POST)
8321 opt->drawTriangles = (int)val;
8322 if(view) view->setChanged(
true);
8324 #if defined(HAVE_FLTK)
8325 if(_gui_action_valid(action, num)) {
8326 if(opt->drawTriangles)
8327 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[2]
8330 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[2]
8334 return opt->drawTriangles;
8342 #if defined(HAVE_POST)
8345 opt->drawQuadrangles = (int)val;
8346 if(view) view->setChanged(
true);
8348 #if defined(HAVE_FLTK)
8349 if(_gui_action_valid(action, num)) {
8350 if(opt->drawQuadrangles)
8351 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[3]
8354 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[3]
8358 return opt->drawQuadrangles;
8366 #if defined(HAVE_POST)
8369 opt->drawTetrahedra = (int)val;
8370 if(view) view->setChanged(
true);
8372 #if defined(HAVE_FLTK)
8373 if(_gui_action_valid(action, num)) {
8374 if(opt->drawTetrahedra)
8375 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[4]
8378 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[4]
8382 return opt->drawTetrahedra;
8390 #if defined(HAVE_POST)
8393 opt->drawHexahedra = (int)val;
8394 if(view) view->setChanged(
true);
8396 #if defined(HAVE_FLTK)
8397 if(_gui_action_valid(action, num)) {
8398 if(opt->drawHexahedra)
8399 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[5]
8402 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[5]
8406 return opt->drawHexahedra;
8414 #if defined(HAVE_POST)
8417 opt->drawPrisms = (int)val;
8418 if(view) view->setChanged(
true);
8420 #if defined(HAVE_FLTK)
8421 if(_gui_action_valid(action, num)) {
8423 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[6]
8426 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[6]
8430 return opt->drawPrisms;
8438 #if defined(HAVE_POST)
8441 opt->drawPyramids = (int)val;
8442 if(view) view->setChanged(
true);
8444 #if defined(HAVE_FLTK)
8445 if(_gui_action_valid(action, num)) {
8446 if(opt->drawPyramids)
8447 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[7]
8450 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[7]
8454 return opt->drawPyramids;
8462 #if defined(HAVE_POST)
8465 opt->drawTrihedra = (int)val;
8466 if(view) view->setChanged(
true);
8468 #if defined(HAVE_FLTK)
8469 if(_gui_action_valid(action, num)) {
8470 if(opt->drawTrihedra)
8471 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[8]
8474 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[1]->menu())[8]
8478 return opt->drawTrihedra;
8486 #if defined(HAVE_POST)
8489 opt->drawScalars = (int)val;
8490 if(view) view->setChanged(
true);
8492 #if defined(HAVE_FLTK)
8493 if(_gui_action_valid(action, num)) {
8494 if(opt->drawScalars)
8495 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[0]->menu())[0]
8498 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[0]->menu())[0]
8502 return opt->drawScalars;
8510 #if defined(HAVE_POST)
8513 opt->drawVectors = (int)val;
8514 if(view) view->setChanged(
true);
8516 #if defined(HAVE_FLTK)
8517 if(_gui_action_valid(action, num)) {
8518 if(opt->drawVectors)
8519 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[0]->menu())[1]
8522 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[0]->menu())[1]
8526 return opt->drawVectors;
8534 #if defined(HAVE_POST)
8537 opt->drawTensors = (int)val;
8538 if(view) view->setChanged(
true);
8540 #if defined(HAVE_FLTK)
8541 if(_gui_action_valid(action, num)) {
8542 if(opt->drawTensors)
8543 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[0]->menu())[2]
8546 ((Fl_Menu_Item *)FlGui::instance()->options->view.menu[0]->menu())[2]
8550 return opt->drawTensors;
8558 #if defined(HAVE_POST)
8561 opt->drawSkinOnly = (int)val;
8562 if(view) view->setChanged(
true);
8564 #if defined(HAVE_FLTK)
8565 if(_gui_action_valid(action, num))
8566 FlGui::instance()->options->view.butt[2]->value(opt->drawSkinOnly);
8568 return opt->drawSkinOnly;
8576 #if defined(HAVE_POST)
8579 opt->scaleType = (int)val;
8580 if(opt->scaleType < 1 || opt->scaleType > 3) opt->scaleType = 1;
8581 if(view) view->setChanged(
true);
8583 #if defined(HAVE_FLTK)
8584 if(_gui_action_valid(action, num)) {
8585 FlGui::instance()->options->view.choice[1]->value(opt->scaleType - 1);
8588 return opt->scaleType;
8596 #if defined(HAVE_POST)
8599 opt->rangeType = (int)val;
8600 if(opt->rangeType < 1 || opt->rangeType > 3) opt->rangeType = 1;
8601 if(view) view->setChanged(
true);
8603 #if defined(HAVE_FLTK)
8604 if(_gui_action_valid(action, num)) {
8605 FlGui::instance()->options->view.choice[7]->value(opt->rangeType - 1);
8606 FlGui::instance()->options->activate(
"custom_range");
8609 return opt->rangeType;
8617 #if defined(HAVE_POST)
8620 opt->abscissaRangeType = (int)val;
8621 if(opt->abscissaRangeType < 1 || opt->abscissaRangeType > 3)
8622 opt->abscissaRangeType = 1;
8623 if(view) view->setChanged(
true);
8625 return opt->abscissaRangeType;
8633 #if defined(HAVE_POST)
8636 opt->tensorType = (int)val;
8637 if(opt->tensorType > 7 || opt->tensorType < 1) opt->tensorType = 1;
8638 if(view) view->setChanged(
true);
8640 #if defined(HAVE_FLTK)
8641 if(_gui_action_valid(action, num)) {
8642 FlGui::instance()->options->view.choice[4]->value(opt->tensorType - 1);
8645 return opt->tensorType;
8653 #if defined(HAVE_POST)
8656 opt->vectorType = (int)val;
8657 if(opt->vectorType < 1 || opt->vectorType > 6) opt->vectorType = 1;
8658 if(view) view->setChanged(
true);
8660 #if defined(HAVE_FLTK)
8661 if(_gui_action_valid(action, num)) {
8662 FlGui::instance()->options->view.choice[2]->value(opt->vectorType - 1);
8665 return opt->vectorType;
8673 #if defined(HAVE_POST)
8676 opt->glyphLocation = (int)val;
8677 if(opt->glyphLocation < 1 || opt->glyphLocation > 2) opt->glyphLocation = 1;
8678 if(view) view->setChanged(
true);
8680 #if defined(HAVE_FLTK)
8681 if(_gui_action_valid(action, num)) {
8682 FlGui::instance()->options->view.choice[3]->value(opt->glyphLocation - 1);
8685 return opt->glyphLocation;
8693 #if defined(HAVE_POST)
8696 opt->centerGlyphs = (int)val;
8697 if(opt->centerGlyphs < 0 || opt->centerGlyphs > 2) opt->glyphLocation = 0;
8698 if(view) view->setChanged(
true);
8700 #if defined(HAVE_FLTK)
8701 if(_gui_action_valid(action, num)) {
8702 FlGui::instance()->options->view.choice[15]->value(opt->centerGlyphs);
8705 return opt->centerGlyphs;
8713 #if defined(HAVE_POST)
8715 if(action &
GMSH_SET) { opt->pointSize = val; }
8716 #if defined(HAVE_FLTK)
8717 if(_gui_action_valid(action, num))
8718 FlGui::instance()->options->view.value[61]->value(opt->pointSize);
8720 return opt->pointSize;
8728 #if defined(HAVE_POST)
8730 if(action &
GMSH_SET) { opt->lineWidth = val; }
8731 #if defined(HAVE_FLTK)
8732 if(_gui_action_valid(action, num))
8733 FlGui::instance()->options->view.value[62]->value(opt->lineWidth);
8735 return opt->lineWidth;
8743 #if defined(HAVE_POST)
8746 opt->pointType = (int)val;
8747 if(opt->pointType < 0 || opt->pointType > 3) opt->pointType = 0;
8748 if(view) view->setChanged(
true);
8750 #if defined(HAVE_FLTK)
8751 if(_gui_action_valid(action, num)) {
8752 FlGui::instance()->options->view.choice[5]->value(opt->pointType);
8755 return opt->pointType;
8763 #if defined(HAVE_POST)
8766 opt->lineType = (int)val;
8767 if(opt->lineType < 0 || opt->lineType > 2) opt->lineType = 0;
8768 if(view) view->setChanged(
true);
8770 #if defined(HAVE_FLTK)
8771 if(_gui_action_valid(action, num)) {
8772 FlGui::instance()->options->view.choice[6]->value(opt->lineType);
8775 return opt->lineType;
8783 #if defined(HAVE_POST)
8788 if(view) view->setChanged(
true);
8790 #if defined(HAVE_FLTK)
8791 if(_gui_action_valid(action, num)) {
8792 FlGui::instance()->options->view.colorbar->redraw();
8803 #if defined(HAVE_POST)
8808 if(view) view->setChanged(
true);
8810 #if defined(HAVE_FLTK)
8811 if(_gui_action_valid(action, num)) {
8812 FlGui::instance()->options->view.colorbar->redraw();
8823 #if defined(HAVE_POST)
8828 if(view) view->setChanged(
true);
8830 #if defined(HAVE_FLTK)
8831 if(_gui_action_valid(action, num)) {
8832 FlGui::instance()->options->view.colorbar->redraw();
8843 #if defined(HAVE_POST)
8848 if(view) view->setChanged(
true);
8850 #if defined(HAVE_FLTK)
8851 if(_gui_action_valid(action, num)) {
8852 FlGui::instance()->options->view.colorbar->redraw();
8863 #if defined(HAVE_POST)
8868 if(view) view->setChanged(
true);
8870 #if defined(HAVE_FLTK)
8871 if(_gui_action_valid(action, num)) {
8872 FlGui::instance()->options->view.colorbar->redraw();
8883 #if defined(HAVE_POST)
8888 if(view) view->setChanged(
true);
8890 #if defined(HAVE_FLTK)
8891 if(_gui_action_valid(action, num)) {
8892 FlGui::instance()->options->view.colorbar->redraw();
8903 #if defined(HAVE_POST)
8911 if(view) view->setChanged(
true);
8913 #if defined(HAVE_FLTK)
8914 if(_gui_action_valid(action, num)) {
8915 FlGui::instance()->options->view.colorbar->redraw();
8926 #if defined(HAVE_POST)
8931 if(view) view->setChanged(
true);
8933 #if defined(HAVE_FLTK)
8934 if(_gui_action_valid(action, num)) {
8935 FlGui::instance()->options->view.colorbar->redraw();
8946 #if defined(HAVE_POST)
8951 if(view) view->setChanged(
true);
8953 #if defined(HAVE_FLTK)
8954 if(_gui_action_valid(action, num)) {
8955 FlGui::instance()->options->view.colorbar->redraw();
8966 #if defined(HAVE_POST)
8969 opt->externalViewIndex = (int)val;
8970 if(view) view->setChanged(
true);
8972 #if defined(HAVE_FLTK)
8973 if(_gui_action_valid(action, num)) {
8975 int item = opt->externalViewIndex + 1;
8977 item < FlGui::instance()->options->view.choice[10]->size() - 1)
8978 FlGui::instance()->options->view.choice[10]->value(item);
8980 FlGui::instance()->options->view.choice[10]->value(0);
8983 return opt->externalViewIndex;
8991 #if defined(HAVE_POST)
8994 opt->viewIndexForGenRaise = (int)val;
8995 if(view) view->setChanged(
true);
8997 #if defined(HAVE_FLTK)
8998 if(_gui_action_valid(action, num)) {
9000 int item = opt->viewIndexForGenRaise + 1;
9002 item < FlGui::instance()->options->view.choice[11]->size() - 1)
9003 FlGui::instance()->options->view.choice[11]->value(item);
9005 FlGui::instance()->options->view.choice[11]->value(0);
9008 return opt->viewIndexForGenRaise;
9016 #if defined(HAVE_POST)
9019 opt->genRaiseFactor = val;
9020 if(view) view->setChanged(
true);
9022 #if defined(HAVE_FLTK)
9023 if(_gui_action_valid(action, num))
9024 FlGui::instance()->options->view.value[2]->value(opt->genRaiseFactor);
9026 return opt->genRaiseFactor;
9034 #if defined(HAVE_POST)
9037 opt->useGenRaise = (int)val;
9038 if(view) view->setChanged(
true);
9040 #if defined(HAVE_FLTK)
9041 if(_gui_action_valid(action, num)) {
9042 FlGui::instance()->options->view.butt[6]->value(opt->useGenRaise);
9043 FlGui::instance()->options->activate(
"view_general_transform");
9046 return opt->useGenRaise;
9054 #if defined(HAVE_POST)
9056 if(action &
GMSH_SET) { opt->useStipple = (int)val; }
9057 #if defined(HAVE_FLTK)
9058 if(_gui_action_valid(action, num)) {
9059 FlGui::instance()->options->view.butt[26]->value(opt->useStipple);
9062 return opt->useStipple;
9070 #if defined(HAVE_POST)
9072 if(action &
GMSH_SET) { opt->clip = (int)val; }
9073 #if defined(HAVE_FLTK)
9074 if(_gui_action_valid(action, num)) {
9075 FlGui::instance()->clipping->resetBrowser();
9086 #if defined(HAVE_POST)
9089 opt->forceNumComponents = (int)val;
9090 if(view) view->setChanged(
true);
9092 #if defined(HAVE_FLTK)
9093 if(_gui_action_valid(action, num)) {
9094 if(opt->forceNumComponents == 1)
9095 FlGui::instance()->options->view.choice[14]->value(1);
9096 else if(opt->forceNumComponents == 3)
9097 FlGui::instance()->options->view.choice[14]->value(2);
9098 else if(opt->forceNumComponents == 9)
9099 FlGui::instance()->options->view.choice[14]->value(3);
9101 FlGui::instance()->options->view.choice[14]->value(0);
9104 return opt->forceNumComponents;
9112 #if defined(HAVE_POST)
9115 opt->componentMap[nn] = (int)val;
9116 if(view) view->setChanged(
true);
9118 #if defined(HAVE_FLTK)
9119 if(_gui_action_valid(action, num)) {
9120 FlGui::instance()->options->view.value[70 + nn]->value(
9121 opt->componentMap[nn]);
9124 return opt->componentMap[nn];
9132 return ovcm(num, action, val, 0);
9136 return ovcm(num, action, val, 1);
9140 return ovcm(num, action, val, 2);
9144 return ovcm(num, action, val, 3);
9148 return ovcm(num, action, val, 4);
9152 return ovcm(num, action, val, 5);
9156 return ovcm(num, action, val, 6);
9160 return ovcm(num, action, val, 7);
9164 return ovcm(num, action, val, 8);
9169 #if defined(HAVE_POST)
9171 if(action &
GMSH_SET) { opt->closed = (int)val; }
9172 #if defined(HAVE_FLTK)
9173 if(FlGui::available() && (action &
GMSH_GUI) && num >= 0) {
9174 FlGui::instance()->onelab->openCloseViewButton(num);
9471 #if defined(HAVE_FLTK)
9473 #define CCC(col, but) \
9474 if(FlGui::available() && (action & GMSH_GUI)) { \
9476 fl_color_cube(CTX::instance()->unpackRed(col) * FL_NUM_RED / 256, \
9477 CTX::instance()->unpackGreen(col) * FL_NUM_GREEN / 256, \
9478 CTX::instance()->unpackBlue(col) * FL_NUM_BLUE / 256); \
9480 (but)->labelcolor(fl_contrast(FL_BLACK, c)); \
9490 #if defined(HAVE_FLTK)
9491 if(FlGui::available()) FlGui::instance()->options->view.colorbar->redraw();
9494 #if defined(HAVE_FLTK)
9495 CCC(
CTX::instance()->color.
bg, FlGui::instance()->options->general.color[0]);
9503 #if defined(HAVE_FLTK)
9505 FlGui::instance()->options->general.color[1]);
9513 #if defined(HAVE_FLTK)
9514 CCC(
CTX::instance()->color.
fg, FlGui::instance()->options->general.color[2]);
9522 #if defined(HAVE_FLTK)
9524 FlGui::instance()->options->general.color[3]);
9533 #if defined(HAVE_FLTK)
9535 FlGui::instance()->options->general.color[4]);
9544 #if defined(HAVE_FLTK)
9546 FlGui::instance()->options->general.color[5]);
9556 #if defined(HAVE_FLTK)
9558 FlGui::instance()->options->general.color[6]);
9567 #if defined(HAVE_FLTK)
9569 FlGui::instance()->options->general.color[7]);
9578 #if defined(HAVE_FLTK)
9580 FlGui::instance()->options->general.color[8]);
9588 #if defined(HAVE_FLTK)
9590 FlGui::instance()->options->geo.color[0]);
9598 #if defined(HAVE_FLTK)
9600 FlGui::instance()->options->geo.color[1]);
9608 #if defined(HAVE_FLTK)
9610 FlGui::instance()->options->geo.color[2]);
9618 #if defined(HAVE_FLTK)
9620 FlGui::instance()->options->geo.color[3]);
9628 #if defined(HAVE_FLTK)
9630 FlGui::instance()->options->geo.color[4]);
9638 #if defined(HAVE_FLTK)
9640 FlGui::instance()->options->geo.color[5]);
9648 #if defined(HAVE_FLTK)
9650 FlGui::instance()->options->geo.color[6]);
9658 #if defined(HAVE_FLTK)
9660 FlGui::instance()->options->geo.color[7]);
9668 #if defined(HAVE_FLTK)
9670 FlGui::instance()->options->geo.color[8]);
9678 #if defined(HAVE_FLTK)
9680 FlGui::instance()->options->geo.color[9]);
9688 #if defined(HAVE_FLTK)
9690 FlGui::instance()->options->geo.color[10]);
9698 #if defined(HAVE_FLTK)
9700 FlGui::instance()->options->mesh.color[0]);
9708 #if defined(HAVE_FLTK)
9710 FlGui::instance()->options->mesh.color[1]);
9725 #if defined(HAVE_FLTK)
9727 FlGui::instance()->options->mesh.color[2]);
9742 #if defined(HAVE_FLTK)
9744 FlGui::instance()->options->mesh.color[3]);
9759 #if defined(HAVE_FLTK)
9761 FlGui::instance()->options->mesh.color[4]);
9776 #if defined(HAVE_FLTK)
9778 FlGui::instance()->options->mesh.color[5]);
9793 #if defined(HAVE_FLTK)
9795 FlGui::instance()->options->mesh.color[6]);
9810 #if defined(HAVE_FLTK)
9812 FlGui::instance()->options->mesh.color[7]);
9827 #if defined(HAVE_FLTK)
9829 FlGui::instance()->options->mesh.color[8]);
9844 #if defined(HAVE_FLTK)
9846 FlGui::instance()->options->mesh.color[9]);
9854 #if defined(HAVE_FLTK)
9856 FlGui::instance()->options->mesh.color[10]);
9864 #if defined(HAVE_FLTK)
9866 FlGui::instance()->options->mesh.color[11]);
9873 int n = (i < 0 || i >= 20) ? 0 : i;
9882 #if defined(HAVE_FLTK)
9884 FlGui::instance()->options->mesh.color[12 + n]);
9972 #if defined(HAVE_POST)
9975 opt->color.point = val;
9976 if(view) view->setChanged(
true);
9978 #if defined(HAVE_FLTK)
9979 if(_gui_action_valid(action, num)) {
9980 CCC(opt->color.point, FlGui::instance()->options->view.color[0]);
9983 return opt->color.point;
9991 #if defined(HAVE_POST)
9994 opt->color.line = val;
9995 if(view) view->setChanged(
true);
9997 #if defined(HAVE_FLTK)
9998 if(_gui_action_valid(action, num)) {
9999 CCC(opt->color.line, FlGui::instance()->options->view.color[1]);
10002 return opt->color.line;
10010 #if defined(HAVE_POST)
10013 opt->color.triangle = val;
10014 if(view) view->setChanged(
true);
10016 #if defined(HAVE_FLTK)
10017 if(_gui_action_valid(action, num)) {
10018 CCC(opt->color.triangle, FlGui::instance()->options->view.color[2]);
10021 return opt->color.triangle;
10029 #if defined(HAVE_POST)
10032 opt->color.quadrangle = val;
10033 if(view) view->setChanged(
true);
10035 #if defined(HAVE_FLTK)
10036 if(_gui_action_valid(action, num)) {
10037 CCC(opt->color.quadrangle, FlGui::instance()->options->view.color[3]);
10040 return opt->color.quadrangle;
10048 #if defined(HAVE_POST)
10051 opt->color.tetrahedron = val;
10052 if(view) view->setChanged(
true);
10054 #if defined(HAVE_FLTK)
10055 if(_gui_action_valid(action, num)) {
10056 CCC(opt->color.tetrahedron, FlGui::instance()->options->view.color[4]);
10059 return opt->color.tetrahedron;
10067 #if defined(HAVE_POST)
10070 opt->color.hexahedron = val;
10071 if(view) view->setChanged(
true);
10073 #if defined(HAVE_FLTK)
10074 if(_gui_action_valid(action, num)) {
10075 CCC(opt->color.hexahedron, FlGui::instance()->options->view.color[5]);
10078 return opt->color.hexahedron;
10086 #if defined(HAVE_POST)
10089 opt->color.prism = val;
10090 if(view) view->setChanged(
true);
10092 #if defined(HAVE_FLTK)
10093 if(_gui_action_valid(action, num)) {
10094 CCC(opt->color.prism, FlGui::instance()->options->view.color[6]);
10097 return opt->color.prism;
10105 #if defined(HAVE_POST)
10108 opt->color.pyramid = val;
10109 if(view) view->setChanged(
true);
10111 #if defined(HAVE_FLTK)
10112 if(_gui_action_valid(action, num)) {
10113 CCC(opt->color.pyramid, FlGui::instance()->options->view.color[7]);
10116 return opt->color.pyramid;
10124 #if defined(HAVE_POST)
10127 opt->color.trihedron = val;
10128 if(view) view->setChanged(
true);
10130 #if defined(HAVE_FLTK)
10131 if(_gui_action_valid(action, num)) {
10132 CCC(opt->color.trihedron, FlGui::instance()->options->view.color[8]);
10135 return opt->color.trihedron;
10143 #if defined(HAVE_POST)
10146 opt->color.tangents = val;
10147 if(view) view->setChanged(
true);
10149 #if defined(HAVE_FLTK)
10150 if(_gui_action_valid(action, num)) {
10151 CCC(opt->color.tangents, FlGui::instance()->options->view.color[9]);
10154 return opt->color.tangents;
10162 #if defined(HAVE_POST)
10165 opt->color.normals = val;
10166 if(view) view->setChanged(
true);
10168 #if defined(HAVE_FLTK)
10169 if(_gui_action_valid(action, num)) {
10170 CCC(opt->color.normals, FlGui::instance()->options->view.color[10]);
10173 return opt->color.normals;
10181 #if defined(HAVE_POST)
10183 if(action &
GMSH_SET) { opt->color.text2d = val; }
10184 #if defined(HAVE_FLTK)
10185 if(_gui_action_valid(action, num)) {
10186 CCC(opt->color.text2d, FlGui::instance()->options->view.color[11]);
10190 return opt->color.text2d;
10198 #if defined(HAVE_POST)
10200 if(action &
GMSH_SET) { opt->color.text3d = val; }
10201 #if defined(HAVE_FLTK)
10202 if(_gui_action_valid(action, num)) {
10203 CCC(opt->color.text3d, FlGui::instance()->options->view.color[12]);
10207 return opt->color.text3d;
10215 #if defined(HAVE_POST)
10217 if(action &
GMSH_SET) { opt->color.axes = val; }
10218 #if defined(HAVE_FLTK)
10219 if(_gui_action_valid(action, num)) {
10220 CCC(opt->color.axes, FlGui::instance()->options->view.color[13]);
10224 return opt->color.axes;
10232 #if defined(HAVE_POST)
10234 if(action &
GMSH_SET) { opt->color.background2d = val; }
10235 #if defined(HAVE_FLTK)
10236 if(_gui_action_valid(action, num)) {
10237 CCC(opt->color.background2d, FlGui::instance()->options->view.color[14]);
10241 return opt->color.background2d;