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
bc976ec9
Commit
bc976ec9
authored
24 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
03abe7cd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
Fltk/GUI.cpp
+8
-2
8 additions, 2 deletions
Fltk/GUI.cpp
Fltk/GUI.h
+1
-0
1 addition, 0 deletions
Fltk/GUI.h
Fltk/Opengl.cpp
+2
-2
2 additions, 2 deletions
Fltk/Opengl.cpp
Fltk/Opengl_Window.cpp
+17
-29
17 additions, 29 deletions
Fltk/Opengl_Window.cpp
Makefile
+2
-2
2 additions, 2 deletions
Makefile
with
30 additions
and
35 deletions
Fltk/GUI.cpp
+
8
−
2
View file @
bc976ec9
// $Id: GUI.cpp,v 1.3
7
2001-02-04 1
2:46:08
geuzaine Exp $
// $Id: GUI.cpp,v 1.3
8
2001-02-04 1
5:52:26
geuzaine Exp $
// To make the interface as visually consistent as possible, please:
// To make the interface as visually consistent as possible, please:
// - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
// - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
...
@@ -535,12 +535,18 @@ void GUI::run(){
...
@@ -535,12 +535,18 @@ void GUI::run(){
Fl
::
run
();
Fl
::
run
();
}
}
// Check if any pending events and run them
// Check
(now)
if any pending events and run them
void
GUI
::
check
(){
void
GUI
::
check
(){
Fl
::
check
();
Fl
::
check
();
}
}
// Wait for any events and run them
void
GUI
::
wait
(){
Fl
::
wait
();
}
//********************************* Create the menu window *****************************
//********************************* Create the menu window *****************************
void
GUI
::
create_menu_window
(
int
argc
,
char
**
argv
){
void
GUI
::
create_menu_window
(
int
argc
,
char
**
argv
){
...
...
This diff is collapsed.
Click to expand it.
Fltk/GUI.h
+
1
−
0
View file @
bc976ec9
...
@@ -184,6 +184,7 @@ public:
...
@@ -184,6 +184,7 @@ public:
// general purpose interaction
// general purpose interaction
void
run
();
void
run
();
void
check
();
void
check
();
void
wait
();
void
make_opengl_current
();
void
make_opengl_current
();
void
make_colorbar_current
();
void
make_colorbar_current
();
void
make_overlay_current
();
void
make_overlay_current
();
...
...
This diff is collapsed.
Click to expand it.
Fltk/Opengl.cpp
+
2
−
2
View file @
bc976ec9
// $Id: Opengl.cpp,v 1.1
7
2001-02-04 1
2:46:09
geuzaine Exp $
// $Id: Opengl.cpp,v 1.1
8
2001-02-04 1
5:52:26
geuzaine Exp $
#include
"Gmsh.h"
#include
"Gmsh.h"
#include
"GmshUI.h"
#include
"GmshUI.h"
...
@@ -112,7 +112,7 @@ int SelectEntity(int type, Vertex **v, Curve **c, Surface **s){
...
@@ -112,7 +112,7 @@ int SelectEntity(int type, Vertex **v, Curve **c, Surface **s){
WID
->
end_selection
=
0
;
WID
->
end_selection
=
0
;
while
(
1
){
while
(
1
){
Fl
::
check
();
WID
->
wait
();
if
(
WID
->
quit_selection
){
if
(
WID
->
quit_selection
){
WID
->
quit_selection
=
0
;
WID
->
quit_selection
=
0
;
return
0
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Fltk/Opengl_Window.cpp
+
17
−
29
View file @
bc976ec9
// $Id: Opengl_Window.cpp,v 1.1
1
2001-02-04 1
2:46:09
geuzaine Exp $
// $Id: Opengl_Window.cpp,v 1.1
2
2001-02-04 1
5:52:26
geuzaine Exp $
#include
"Gmsh.h"
#include
"Gmsh.h"
#include
"GmshUI.h"
#include
"GmshUI.h"
...
@@ -23,7 +23,7 @@ void myZoom(GLdouble X1, GLdouble X2, GLdouble Y1, GLdouble Y2,
...
@@ -23,7 +23,7 @@ void myZoom(GLdouble X1, GLdouble X2, GLdouble Y1, GLdouble Y2,
GLdouble
Xc1
,
GLdouble
Xc2
,
GLdouble
Yc1
,
GLdouble
Yc2
);
GLdouble
Xc1
,
GLdouble
Xc2
,
GLdouble
Yc1
,
GLdouble
Yc2
);
static
int
ZOOM
=
0
;
static
int
ZOOM
=
0
;
static
double
ZOOM_X0
,
ZOOM_Y0
,
ZOOM_X1
,
ZOOM_Y1
,
ZOOM_X2
,
ZOOM_Y2
;
static
double
ZOOM_X0
,
ZOOM_Y0
,
ZOOM_X1
,
ZOOM_Y1
;
void
Opengl_Window
::
draw
()
{
void
Opengl_Window
::
draw
()
{
if
(
!
valid
()){
if
(
!
valid
()){
...
@@ -68,11 +68,13 @@ void Opengl_Window::draw() {
...
@@ -68,11 +68,13 @@ void Opengl_Window::draw() {
glVertex2d
(
ZOOM_X0
,
ZOOM_Y1
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y1
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y0
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y0
);
glEnd
();
glEnd
();
ZOOM_X1
=
CTX
.
vxmin
+
((
double
)
Fl
::
event_x
()
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
ZOOM_Y1
=
CTX
.
vymax
-
((
double
)
Fl
::
event_y
()
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
glBegin
(
GL_LINE_STRIP
);
glBegin
(
GL_LINE_STRIP
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y0
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y0
);
glVertex2d
(
ZOOM_X
2
,
ZOOM_Y0
);
glVertex2d
(
ZOOM_X
1
,
ZOOM_Y0
);
glVertex2d
(
ZOOM_X
2
,
ZOOM_Y
2
);
glVertex2d
(
ZOOM_X
1
,
ZOOM_Y
1
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y
2
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y
1
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y0
);
glVertex2d
(
ZOOM_X0
,
ZOOM_Y0
);
glEnd
();
glEnd
();
glDisable
(
GL_BLEND
);
glDisable
(
GL_BLEND
);
...
@@ -101,8 +103,7 @@ void Opengl_Window::clear_overlay() {
...
@@ -101,8 +103,7 @@ void Opengl_Window::clear_overlay() {
int
Opengl_Window
::
handle
(
int
event
)
{
int
Opengl_Window
::
handle
(
int
event
)
{
static
int
xpos
,
ypos
,
xmov
,
ymov
,
ibut
,
hits
;
static
int
xpos
,
ypos
,
xmov
,
ymov
,
ibut
,
hits
;
static
int
ZoomClick
=
0
,
FirstClick
=
0
;
static
int
ZoomClick
=
0
,
FirstClick
=
0
;
static
GLdouble
xc1
,
yc1
,
xc2
,
yc2
,
xt1
,
yt1
,
xscale1
,
yscale1
;
static
GLdouble
xc
,
yc
,
xc1
,
yc1
,
xc2
,
yc2
,
xt1
,
yt1
,
xscale1
,
yscale1
;
static
GLdouble
xb
,
yb
,
xc
,
yc
,
xe
,
ye
;
static
Vertex
*
v
=
NULL
,
*
ov
;
static
Vertex
*
v
=
NULL
,
*
ov
;
static
Curve
*
c
=
NULL
,
*
oc
;
static
Curve
*
c
=
NULL
,
*
oc
;
static
Surface
*
s
=
NULL
,
*
os
;
static
Surface
*
s
=
NULL
,
*
os
;
...
@@ -119,20 +120,19 @@ int Opengl_Window::handle(int event) {
...
@@ -119,20 +120,19 @@ int Opengl_Window::handle(int event) {
if
(
ibut
==
1
&&
!
Fl
::
event_state
(
FL_SHIFT
)){
if
(
ibut
==
1
&&
!
Fl
::
event_state
(
FL_SHIFT
)){
if
(
!
ZoomClick
&&
Fl
::
event_state
(
FL_CTRL
)){
if
(
!
ZoomClick
&&
Fl
::
event_state
(
FL_CTRL
)){
xb
=
CTX
.
vxmin
+
((
double
)
xpos
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
ZOOM_X0
=
ZOOM_X1
=
CTX
.
vxmin
+
((
double
)
xpos
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
yb
=
CTX
.
vymax
-
((
double
)
ypos
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
ZOOM_Y0
=
ZOOM_Y1
=
CTX
.
vymax
-
((
double
)
ypos
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
xc1
=
xb
/
CTX
.
s
[
0
]
-
CTX
.
t
[
0
];
xc1
=
ZOOM_X0
/
CTX
.
s
[
0
]
-
CTX
.
t
[
0
];
yc1
=
yb
/
CTX
.
s
[
1
]
-
CTX
.
t
[
1
];
yc1
=
ZOOM_Y0
/
CTX
.
s
[
1
]
-
CTX
.
t
[
1
];
ZoomClick
=
1
;
ZoomClick
=
1
;
}
}
else
if
(
ZoomClick
){
else
if
(
ZoomClick
){
xe
=
CTX
.
vxmin
+
((
double
)
xpos
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
xc2
=
ZOOM_X1
/
CTX
.
s
[
0
]
-
CTX
.
t
[
0
];
ye
=
CTX
.
vymax
-
((
double
)
ypos
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
yc2
=
ZOOM_Y1
/
CTX
.
s
[
1
]
-
CTX
.
t
[
1
];
xc2
=
xe
/
CTX
.
s
[
0
]
-
CTX
.
t
[
0
];
yc2
=
ye
/
CTX
.
s
[
1
]
-
CTX
.
t
[
1
];
ZoomClick
=
0
;
ZoomClick
=
0
;
clear_overlay
();
clear_overlay
();
if
(
xb
!=
xe
&&
yb
!=
ye
)
myZoom
(
xb
,
xe
,
yb
,
ye
,
xc1
,
xc2
,
yc1
,
yc2
);
if
(
ZOOM_X0
!=
ZOOM_X1
&&
ZOOM_Y0
!=
ZOOM_Y1
)
myZoom
(
ZOOM_X0
,
ZOOM_X1
,
ZOOM_Y0
,
ZOOM_Y1
,
xc1
,
xc2
,
yc1
,
yc2
);
}
}
else
{
else
{
WID
->
try_selection
=
1
;
WID
->
try_selection
=
1
;
...
@@ -183,12 +183,6 @@ int Opengl_Window::handle(int event) {
...
@@ -183,12 +183,6 @@ int Opengl_Window::handle(int event) {
ymov
=
Fl
::
event_y
()
-
ypos
;
ymov
=
Fl
::
event_y
()
-
ypos
;
if
(
ZoomClick
)
{
if
(
ZoomClick
)
{
ZOOM_X0
=
xb
;
ZOOM_Y0
=
yb
;
ZOOM_X1
=
CTX
.
vxmin
+
((
double
)
xpos
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
ZOOM_Y1
=
CTX
.
vymax
-
((
double
)
ypos
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
ZOOM_X2
=
CTX
.
vxmin
+
((
double
)
Fl
::
event_x
()
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
ZOOM_Y2
=
CTX
.
vymax
-
((
double
)
Fl
::
event_y
()
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
ZOOM
=
1
;
ZOOM
=
1
;
redraw
();
redraw
();
}
}
...
@@ -248,8 +242,8 @@ int Opengl_Window::handle(int event) {
...
@@ -248,8 +242,8 @@ int Opengl_Window::handle(int event) {
}
}
redraw
();
redraw
();
}
}
xpos
+=
xmov
;
xpos
+=
xmov
;
ypos
+=
ymov
;
ypos
+=
ymov
;
return
1
;
return
1
;
...
@@ -260,12 +254,6 @@ int Opengl_Window::handle(int event) {
...
@@ -260,12 +254,6 @@ int Opengl_Window::handle(int event) {
ymov
=
Fl
::
event_y
()
-
ypos
;
ymov
=
Fl
::
event_y
()
-
ypos
;
if
(
ZoomClick
)
{
if
(
ZoomClick
)
{
ZOOM_X0
=
xb
;
ZOOM_Y0
=
yb
;
ZOOM_X1
=
CTX
.
vxmin
+
((
double
)
xpos
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
ZOOM_Y1
=
CTX
.
vymax
-
((
double
)
ypos
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
ZOOM_X2
=
CTX
.
vxmin
+
((
double
)
Fl
::
event_x
()
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
ZOOM_Y2
=
CTX
.
vymax
-
((
double
)
Fl
::
event_y
()
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
ZOOM
=
1
;
ZOOM
=
1
;
redraw
();
redraw
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
2
−
2
View file @
bc976ec9
# $Id: Makefile,v 1.4
7
2001-02-0
3
1
3:10
:26 geuzaine Exp $
# $Id: Makefile,v 1.4
8
2001-02-0
4
1
5:52
:26 geuzaine Exp $
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Makefile for Gmsh
# Makefile for Gmsh
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
@@ -150,7 +150,7 @@ tag:
...
@@ -150,7 +150,7 @@ tag:
echo
"#define GMSH_VERSION
$(
GMSH_RELEASE
)
"
>
Common/GmshVersion.h
echo
"#define GMSH_VERSION
$(
GMSH_RELEASE
)
"
>
Common/GmshVersion.h
echo
"#define GMSH_DATE
\"
`
date
`
\"
"
>>
Common/GmshVersion.h
echo
"#define GMSH_DATE
\"
`
date
`
\"
"
>>
Common/GmshVersion.h
echo
"#define GMSH_HOST
\"
`
hostname
`
\"
"
>>
Common/GmshVersion.h
echo
"#define GMSH_HOST
\"
`
hostname
`
\"
"
>>
Common/GmshVersion.h
echo
"#define GMSH_PACKAGER
\"
`
logn
am
e
`
\"
"
>>
Common/GmshVersion.h
echo
"#define GMSH_PACKAGER
\"
`
who
am
i
`
\"
"
>>
Common/GmshVersion.h
echo
"#define GMSH_OS
\"
`
uname
-sr
`
\"
"
>>
Common/GmshVersion.h
echo
"#define GMSH_OS
\"
`
uname
-sr
`
\"
"
>>
Common/GmshVersion.h
initialtag
:
initialtag
:
...
...
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