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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
efb9d2f4
Commit
efb9d2f4
authored
May 18, 2002
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Introduce some workarounds for the "1 mouse button case" (for macs...)
parent
f0cf59c0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Fltk/Callbacks.cpp
+73
-62
73 additions, 62 deletions
Fltk/Callbacks.cpp
Fltk/Colorbar_Window.cpp
+3
-4
3 additions, 4 deletions
Fltk/Colorbar_Window.cpp
Fltk/GUI.cpp
+12
-1
12 additions, 1 deletion
Fltk/GUI.cpp
Fltk/Opengl_Window.cpp
+3
-3
3 additions, 3 deletions
Fltk/Opengl_Window.cpp
with
91 additions
and
70 deletions
Fltk/Callbacks.cpp
+
73
−
62
View file @
efb9d2f4
// $Id: Callbacks.cpp,v 1.12
4
2002-05-18
07:56:47
geuzaine Exp $
// $Id: Callbacks.cpp,v 1.12
5
2002-05-18
23:07:42
geuzaine Exp $
//
//
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -792,6 +792,12 @@ void opt_visibility_number_cb(CALLBACK_ARGS){
...
@@ -792,6 +792,12 @@ void opt_visibility_number_cb(CALLBACK_ARGS){
// Help Menu
// Help Menu
#ifdef __APPLE__
#define XX "Cmd "
#else
#define XX "Ctrl"
#endif
void
help_short_cb
(
CALLBACK_ARGS
){
void
help_short_cb
(
CALLBACK_ARGS
){
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
"Mouse:"
);
Msg
(
DIRECT
,
"Mouse:"
);
...
@@ -799,36 +805,38 @@ void help_short_cb(CALLBACK_ARGS){
...
@@ -799,36 +805,38 @@ void help_short_cb(CALLBACK_ARGS){
Msg
(
DIRECT
,
" move - highlight the elementary geometrical entity"
);
Msg
(
DIRECT
,
" move - highlight the elementary geometrical entity"
);
Msg
(
DIRECT
,
" currently under the mouse pointer and display"
);
Msg
(
DIRECT
,
" currently under the mouse pointer and display"
);
Msg
(
DIRECT
,
" its properties in the status bar"
);
Msg
(
DIRECT
,
" its properties in the status bar"
);
Msg
(
DIRECT
,
" - size a rubber zoom started with
Ctrl
+mouse1"
);
Msg
(
DIRECT
,
"
- size a rubber zoom started with
"
XX
"
+mouse1"
);
Msg
(
DIRECT
,
"
mouse1
- rotate"
);
Msg
(
DIRECT
,
"
LeftButt
- rotate"
);
Msg
(
DIRECT
,
" - accept a rubber zoom started with
Ctrl
+mouse1"
);
Msg
(
DIRECT
,
"
- accept a rubber zoom started with
"
XX
"
+mouse1"
);
Msg
(
DIRECT
,
"
Ctrl+mouse1
start (anisotropic) rubber zoom"
);
Msg
(
DIRECT
,
"
"
XX
"+LeftButt
start (anisotropic) rubber zoom"
);
Msg
(
DIRECT
,
"
Shift+mouse1
- zoom (isotropic)"
);
Msg
(
DIRECT
,
"
MiddleButt
- zoom (isotropic)"
);
Msg
(
DIRECT
,
" - cancel a rubber zoom"
);
Msg
(
DIRECT
,
" - cancel a rubber zoom"
);
Msg
(
DIRECT
,
" mouse2 same as Shift+mouse1"
);
Msg
(
DIRECT
,
" "
XX
"+MiddleButt orthogonalize display"
);
Msg
(
DIRECT
,
" Ctrl+mouse2 orthogonalize display"
);
Msg
(
DIRECT
,
" RightButt - pan"
);
Msg
(
DIRECT
,
" mouse3 - pan"
);
Msg
(
DIRECT
,
" - cancel a rubber zoom"
);
Msg
(
DIRECT
,
" - cancel a rubber zoom"
);
Msg
(
DIRECT
,
" - pop up menu on post-processing view button"
);
Msg
(
DIRECT
,
" - pop up menu on post-processing view button"
);
Msg
(
DIRECT
,
" Ctrl+mouse3 reset to default viewpoint"
);
Msg
(
DIRECT
,
" "
XX
"+RightButt reset to default viewpoint"
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
" For a 2 button mouse, MiddleButt = Shift+LeftButt"
);
Msg
(
DIRECT
,
" For a 1 button mouse, MiddleButt = Shift+LeftButt, RightButt = Alt+LeftButt"
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
"Menu bar shortcuts:"
);
Msg
(
DIRECT
,
"Menu bar shortcuts:"
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
" b go back to previous context"
);
Msg
(
DIRECT
,
" b go back to previous context"
);
Msg
(
DIRECT
,
"
Ctrl+e
save file by extension"
);
Msg
(
DIRECT
,
"
"
XX
"+e
save file by extension"
);
Msg
(
DIRECT
,
" f go forward to next context"
);
Msg
(
DIRECT
,
" f go forward to next context"
);
Msg
(
DIRECT
,
" g go to geometry module"
);
Msg
(
DIRECT
,
" g go to geometry module"
);
Msg
(
DIRECT
,
" Shift+g show geometry options"
);
Msg
(
DIRECT
,
" Shift+g show geometry options"
);
Msg
(
DIRECT
,
" Shift+i show statistics window"
);
Msg
(
DIRECT
,
" Shift+i show statistics window"
);
Msg
(
DIRECT
,
" m go to mesh module"
);
Msg
(
DIRECT
,
" m go to mesh module"
);
Msg
(
DIRECT
,
" Shift+m show mesh options"
);
Msg
(
DIRECT
,
" Shift+m show mesh options"
);
Msg
(
DIRECT
,
"
Ctrl+m
merge file"
);
Msg
(
DIRECT
,
"
"
XX
"+m
merge file"
);
Msg
(
DIRECT
,
" Shift+o show general options"
);
Msg
(
DIRECT
,
" Shift+o show general options"
);
Msg
(
DIRECT
,
"
Ctrl+o
open file"
);
Msg
(
DIRECT
,
"
"
XX
"+o
open file"
);
Msg
(
DIRECT
,
" p go to post-processor module"
);
Msg
(
DIRECT
,
" p go to post-processor module"
);
Msg
(
DIRECT
,
" Shift+p show post-processing general options"
);
Msg
(
DIRECT
,
" Shift+p show post-processing general options"
);
Msg
(
DIRECT
,
"
Ctrl+q
quit"
);
Msg
(
DIRECT
,
"
"
XX
"+q
quit"
);
Msg
(
DIRECT
,
"
Ctrl+s
save mesh in default format"
);
Msg
(
DIRECT
,
"
"
XX
"+s
save mesh in default format"
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
"Other shortcuts"
);
Msg
(
DIRECT
,
"Other shortcuts"
);
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
""
);
...
@@ -842,7 +850,7 @@ void help_short_cb(CALLBACK_ARGS){
...
@@ -842,7 +850,7 @@ void help_short_cb(CALLBACK_ARGS){
Msg
(
DIRECT
,
" Alt+c alternate between predefined color schemes"
);
Msg
(
DIRECT
,
" Alt+c alternate between predefined color schemes"
);
Msg
(
DIRECT
,
" Alt+d alternate between mesh wire frame, hidden lines and shading modes"
);
Msg
(
DIRECT
,
" Alt+d alternate between mesh wire frame, hidden lines and shading modes"
);
Msg
(
DIRECT
,
" Shift+d decrease animation delay"
);
Msg
(
DIRECT
,
" Shift+d decrease animation delay"
);
Msg
(
DIRECT
,
"
Ctrl
+Shift+d increase animation delay"
);
Msg
(
DIRECT
,
"
"
XX
"
+Shift+d
increase animation delay"
);
Msg
(
DIRECT
,
" Alt+f toggle redraw mode (fast/full)"
);
Msg
(
DIRECT
,
" Alt+f toggle redraw mode (fast/full)"
);
Msg
(
DIRECT
,
" Alt+h hide/show all post-processing views"
);
Msg
(
DIRECT
,
" Alt+h hide/show all post-processing views"
);
Msg
(
DIRECT
,
" Alt+l hide/show geometry lines"
);
Msg
(
DIRECT
,
" Alt+l hide/show geometry lines"
);
...
@@ -866,6 +874,9 @@ void help_short_cb(CALLBACK_ARGS){
...
@@ -866,6 +874,9 @@ void help_short_cb(CALLBACK_ARGS){
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
""
);
WID
->
create_message_window
();
WID
->
create_message_window
();
}
}
#undef XX
void
help_command_line_cb
(
CALLBACK_ARGS
){
void
help_command_line_cb
(
CALLBACK_ARGS
){
Msg
(
DIRECT
,
""
);
Msg
(
DIRECT
,
""
);
Print_Usage
(
"gmsh"
);
Print_Usage
(
"gmsh"
);
...
...
...
...
This diff is collapsed.
Click to expand it.
Fltk/Colorbar_Window.cpp
+
3
−
4
View file @
efb9d2f4
// $Id: Colorbar_Window.cpp,v 1.2
3
2002-05-18
07:56:47
geuzaine Exp $
// $Id: Colorbar_Window.cpp,v 1.2
4
2002-05-18
23:07:42
geuzaine Exp $
//
//
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -521,10 +521,9 @@ int Colorbar_Window::handle(int event){
...
@@ -521,10 +521,9 @@ int Colorbar_Window::handle(int event){
// determine which curve to modify
// determine which curve to modify
if
(
Fl
::
event_state
(
FL_CTRL
))
if
(
Fl
::
event_state
(
FL_CTRL
))
p4
=
1
;
p4
=
1
;
else
if
(
ibut
==
1
&&
!
Fl
::
event_state
(
FL_SHIFT
))
else
if
(
ibut
==
1
&&
!
Fl
::
event_state
(
FL_SHIFT
)
&&
!
Fl
::
event_state
(
FL_ALT
)
)
p1
=
1
;
p1
=
1
;
else
if
(
ibut
==
2
||
else
if
(
ibut
==
2
||
(
ibut
==
1
&&
Fl
::
event_state
(
FL_SHIFT
)))
ibut
==
1
&&
Fl
::
event_state
(
FL_SHIFT
))
p2
=
1
;
p2
=
1
;
else
else
p3
=
1
;
p3
=
1
;
...
...
...
...
This diff is collapsed.
Click to expand it.
Fltk/GUI.cpp
+
12
−
1
View file @
efb9d2f4
// $Id: GUI.cpp,v 1.17
4
2002-05-18
07:56:47
geuzaine Exp $
// $Id: GUI.cpp,v 1.17
5
2002-05-18
23:07:42
geuzaine Exp $
//
//
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include
"GUI.h"
#include
"GUI.h"
#include
"Callbacks.h"
#include
"Callbacks.h"
#include
"Bitmaps.h"
#include
"Bitmaps.h"
#include
"Icon.h"
#include
"OpenFile.h"
#include
"OpenFile.h"
#include
"GetOptions.h"
#include
"GetOptions.h"
...
@@ -738,7 +739,11 @@ void GUI::create_menu_window(int argc, char **argv){
...
@@ -738,7 +739,11 @@ void GUI::create_menu_window(int argc, char **argv){
m_toggle_butt
[
i
]
=
new
Fl_Light_Button
(
0
,
y
+
i
*
BH
,
width
,
BH
);
m_toggle_butt
[
i
]
=
new
Fl_Light_Button
(
0
,
y
+
i
*
BH
,
width
,
BH
);
m_toggle_butt
[
i
]
->
callback
(
view_toggle_cb
,
(
void
*
)
i
);
m_toggle_butt
[
i
]
->
callback
(
view_toggle_cb
,
(
void
*
)
i
);
m_toggle_butt
[
i
]
->
hide
();
m_toggle_butt
[
i
]
->
hide
();
#ifdef __APPLE__ // FIXME: is there a better way??
m_popup_butt
[
i
]
=
new
Fl_Menu_Button
(
0
,
y
+
i
*
BH
,
width
,
BH
,
"&Options"
);
#else
m_popup_butt
[
i
]
=
new
Fl_Menu_Button
(
0
,
y
+
i
*
BH
,
width
,
BH
);
m_popup_butt
[
i
]
=
new
Fl_Menu_Button
(
0
,
y
+
i
*
BH
,
width
,
BH
);
#endif
m_popup_butt
[
i
]
->
type
(
Fl_Menu_Button
::
POPUP3
);
m_popup_butt
[
i
]
->
type
(
Fl_Menu_Button
::
POPUP3
);
m_popup_butt
[
i
]
->
add
(
"Reload/View"
,
0
,
m_popup_butt
[
i
]
->
add
(
"Reload/View"
,
0
,
(
Fl_Callback
*
)
view_reload_cb
,
(
void
*
)
i
,
0
);
(
Fl_Callback
*
)
view_reload_cb
,
(
void
*
)
i
,
0
);
...
@@ -1605,9 +1610,15 @@ void GUI::create_post_options_window(){
...
@@ -1605,9 +1610,15 @@ void GUI::create_post_options_window(){
post_butt
[
i
]
->
selection_color
(
RADIO_COLOR
);
post_butt
[
i
]
->
selection_color
(
RADIO_COLOR
);
}
}
Fl_Box
*
text
=
new
Fl_Box
(
FL_NO_BOX
,
2
*
WB
,
3
*
WB
+
6
*
BH
,
width
-
4
*
WB
,
2
*
BH
,
Fl_Box
*
text
=
new
Fl_Box
(
FL_NO_BOX
,
2
*
WB
,
3
*
WB
+
6
*
BH
,
width
-
4
*
WB
,
2
*
BH
,
#ifdef __APPLE__
"Individual view options are available by "
"pressing 'o' when the mouse is over the view "
"button in the post-processing menu"
);
#else
"Individual view options are available "
"Individual view options are available "
"by right-clicking on each view button "
"by right-clicking on each view button "
"in the post-processing menu"
);
"in the post-processing menu"
);
#endif
text
->
align
(
FL_ALIGN_LEFT
|
FL_ALIGN_TOP
|
FL_ALIGN_INSIDE
|
FL_ALIGN_WRAP
);
text
->
align
(
FL_ALIGN_LEFT
|
FL_ALIGN_TOP
|
FL_ALIGN_INSIDE
|
FL_ALIGN_WRAP
);
o
->
end
();
o
->
end
();
}
}
...
...
...
...
This diff is collapsed.
Click to expand it.
Fltk/Opengl_Window.cpp
+
3
−
3
View file @
efb9d2f4
// $Id: Opengl_Window.cpp,v 1.2
3
2002-05-18
07:56:48
geuzaine Exp $
// $Id: Opengl_Window.cpp,v 1.2
4
2002-05-18
23:07:42
geuzaine Exp $
//
//
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -157,7 +157,7 @@ int Opengl_Window::handle(int event) {
...
@@ -157,7 +157,7 @@ int Opengl_Window::handle(int event) {
xpos
=
Fl
::
event_x
();
xpos
=
Fl
::
event_x
();
ypos
=
Fl
::
event_y
();
ypos
=
Fl
::
event_y
();
if
(
ibut
==
1
&&
!
Fl
::
event_state
(
FL_SHIFT
)){
if
(
ibut
==
1
&&
!
Fl
::
event_state
(
FL_SHIFT
)
&&
!
Fl
::
event_state
(
FL_ALT
)
){
if
(
!
ZoomClick
&&
Fl
::
event_state
(
FL_CTRL
)){
if
(
!
ZoomClick
&&
Fl
::
event_state
(
FL_CTRL
)){
ZOOM_X0
=
ZOOM_X1
=
CTX
.
vxmin
+
((
double
)
xpos
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
ZOOM_X0
=
ZOOM_X1
=
CTX
.
vxmin
+
((
double
)
xpos
/
(
double
)
w
())
*
(
CTX
.
vxmax
-
CTX
.
vxmin
);
ZOOM_Y0
=
ZOOM_Y1
=
CTX
.
vymax
-
((
double
)
ypos
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
ZOOM_Y0
=
ZOOM_Y1
=
CTX
.
vymax
-
((
double
)
ypos
/
(
double
)
h
())
*
(
CTX
.
vymax
-
CTX
.
vymin
);
...
@@ -240,7 +240,7 @@ int Opengl_Window::handle(int event) {
...
@@ -240,7 +240,7 @@ int Opengl_Window::handle(int event) {
FirstClick
=
0
;
FirstClick
=
0
;
}
}
if
(
ibut
==
1
&&
!
Fl
::
event_state
(
FL_SHIFT
)){
if
(
ibut
==
1
&&
!
Fl
::
event_state
(
FL_SHIFT
)
&&
!
Fl
::
event_state
(
FL_ALT
)
){
if
(
CTX
.
useTrackball
)
if
(
CTX
.
useTrackball
)
CTX
.
addQuaternion
((
2.0
*
xpos
-
w
())
/
w
(),
CTX
.
addQuaternion
((
2.0
*
xpos
-
w
())
/
w
(),
(
h
()
-
2.0
*
ypos
)
/
h
(),
(
h
()
-
2.0
*
ypos
)
/
h
(),
...
...
...
...
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