diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index 2da48961bd61afdd00b95a834fee6d78fad87ba9..722fff2cb4d691fac96fbe69fc6324026ac15210 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -374,7 +374,7 @@ int MergeFile(const std::string &fileName, bool warnIfMissing) status = readFile3M(fileName); } #endif -#if defined(HAVE_ONELAB_METAMODEL) && defined(HAVE_FLTK) +#if defined(HAVE_ONELAB_METAMODEL) && defined(HAVE_FLTK) else if(ext == ".ol"){ // TODO: allow passing action to metamodel from command line status = metamodel_cb(fileName); diff --git a/Fltk/CMakeLists.txt b/Fltk/CMakeLists.txt index 930d9657cd253b4e5b7ed9165e14f431c0d6bb05..7814c45c19d449c8a7eb9f65464a20a5c55b1aea 100644 --- a/Fltk/CMakeLists.txt +++ b/Fltk/CMakeLists.txt @@ -25,6 +25,7 @@ set(SRC classificationEditor.cpp partitionDialog.cpp onelabWindow.cpp + inputRegion.cpp ) file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) diff --git a/Fltk/inputRange.h b/Fltk/inputRange.h index 720197382d25d7ad11dd05d4ee43c4c95868a900..2d8e3403776c40716b086c6b36826ffffcd3dd53 100644 --- a/Fltk/inputRange.h +++ b/Fltk/inputRange.h @@ -3,6 +3,9 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to <gmsh@geuz.org>. +#ifndef _INPUT_RANGE_H_ +#define _INPUT_RANGE_H_ + #include <string> #include <sstream> #include <stdio.h> @@ -316,3 +319,5 @@ class inputRange : public Fl_Group { int color(){ return _input->color(); } Fl_Value_Input *input(){ return _input; } }; + +#endif diff --git a/Fltk/inputRegion.h b/Fltk/inputRegion.h index 12419b9b060b6f73aa9c9435a34c7269f1d52aa3..a2b8090175d2762de3151e9c061bfe86aac1eb10 100644 --- a/Fltk/inputRegion.h +++ b/Fltk/inputRegion.h @@ -3,12 +3,22 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to <gmsh@geuz.org>. +#ifndef _INPUT_REGION_H_ +#define _INPUT_REGION_H_ + #include <string> #include <stdio.h> +#include <set> +#include <string> #include <FL/Fl.H> +#include <FL/Fl_Group.H> #include <FL/Fl_Input.H> #include <FL/Fl_Output.H> #include <FL/Fl_Button.H> +#include "FlGui.h" +#include "GEntity.h" +#include "Options.h" +#include "GmshDefines.h" class inputRegion : public Fl_Group { private: @@ -19,11 +29,7 @@ class inputRegion : public Fl_Group { inputRegion *b = (inputRegion*)data; b->do_callback(); } - static void _region_butt_cb(Fl_Widget *w, void *data) - { - inputRegion *b = (inputRegion*)data; - printf("SELECT region with mouse!\n"); - } + static void _region_butt_cb(Fl_Widget *w, void *data); std::string _set2string(const std::set<std::string> &s) { std::string out; @@ -66,7 +72,7 @@ class inputRegion : public Fl_Group { _input->callback(_input_cb, this); _input->when(FL_WHEN_ENTER_KEY|FL_WHEN_RELEASE); - _region_butt = new Fl_Button(x + input_w, y, butt_w, h, "."); + _region_butt = new Fl_Button(x + input_w, y, butt_w, h, "+"); _region_butt->callback(_region_butt_cb, this); _region_butt->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); _region_butt->tooltip("Interactive region selection"); @@ -82,3 +88,5 @@ class inputRegion : public Fl_Group { _input->value(_set2string(val).c_str()); } }; + +#endif