Skip to content
Snippets Groups Projects
Commit c0191cac authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

first working selection of onelab regions

parent 816f1fa3
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -25,6 +25,7 @@ set(SRC
classificationEditor.cpp
partitionDialog.cpp
onelabWindow.cpp
inputRegion.cpp
)
file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment