Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
c0191cac
Commit
c0191cac
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
first working selection of onelab regions
parent
816f1fa3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Common/OpenFile.cpp
+1
-1
1 addition, 1 deletion
Common/OpenFile.cpp
Fltk/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Fltk/CMakeLists.txt
Fltk/inputRange.h
+5
-0
5 additions, 0 deletions
Fltk/inputRange.h
Fltk/inputRegion.h
+14
-6
14 additions, 6 deletions
Fltk/inputRegion.h
with
21 additions
and
7 deletions
Common/OpenFile.cpp
+
1
−
1
View file @
c0191cac
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Fltk/CMakeLists.txt
+
1
−
0
View file @
c0191cac
...
...
@@ -25,6 +25,7 @@ set(SRC
classificationEditor.cpp
partitionDialog.cpp
onelabWindow.cpp
inputRegion.cpp
)
file
(
GLOB HDR RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*.h
)
...
...
This diff is collapsed.
Click to expand it.
Fltk/inputRange.h
+
5
−
0
View file @
c0191cac
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Fltk/inputRegion.h
+
14
−
6
View file @
c0191cac
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment