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
b114d8ea
Commit
b114d8ea
authored
Sep 17, 2004
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
pretty print
parent
f71f1389
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Fltk/GUI.cpp
+20
-13
20 additions, 13 deletions
Fltk/GUI.cpp
with
20 additions
and
13 deletions
Fltk/GUI.cpp
+
20
−
13
View file @
b114d8ea
// $Id: GUI.cpp,v 1.34
3
2004-09-1
6
2
2:24:48
geuzaine Exp $
// $Id: GUI.cpp,v 1.34
4
2004-09-1
7
2
1:36:19
geuzaine Exp $
//
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -613,22 +613,26 @@ int GUI::global_shortcuts(int event)
...
@@ -613,22 +613,26 @@ int GUI::global_shortcuts(int event)
return
1
;
return
1
;
}
}
else
if
(
Fl
::
test_shortcut
(
FL_ALT
+
FL_SHIFT
+
's'
))
{
else
if
(
Fl
::
test_shortcut
(
FL_ALT
+
FL_SHIFT
+
's'
))
{
int
old
=
opt_mesh_surfaces_edges
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_surfaces_faces
(
0
,
GMSH_GET
,
0
);
int
old
=
opt_mesh_surfaces_edges
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_surfaces_faces
(
0
,
GMSH_GET
,
0
);
opt_mesh_surfaces_edges
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_surfaces_edges
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_surfaces_faces
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_surfaces_faces
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
redraw_opengl
();
redraw_opengl
();
return
1
;
return
1
;
}
}
else
if
(
Fl
::
test_shortcut
(
FL_ALT
+
FL_SHIFT
+
'v'
))
{
else
if
(
Fl
::
test_shortcut
(
FL_ALT
+
FL_SHIFT
+
'v'
))
{
int
old
=
opt_mesh_volumes_edges
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_volumes_faces
(
0
,
GMSH_GET
,
0
);
int
old
=
opt_mesh_volumes_edges
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_volumes_faces
(
0
,
GMSH_GET
,
0
);
opt_mesh_volumes_edges
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_volumes_edges
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_volumes_faces
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_volumes_faces
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
redraw_opengl
();
redraw_opengl
();
return
1
;
return
1
;
}
}
else
if
(
Fl
::
test_shortcut
(
FL_ALT
+
'm'
))
{
else
if
(
Fl
::
test_shortcut
(
FL_ALT
+
'm'
))
{
int
old
=
opt_mesh_points
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_lines
(
0
,
GMSH_GET
,
0
)
||
int
old
=
opt_mesh_points
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_surfaces_edges
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_surfaces_faces
(
0
,
GMSH_GET
,
0
);
opt_mesh_lines
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_surfaces_edges
(
0
,
GMSH_GET
,
0
)
||
opt_mesh_surfaces_faces
(
0
,
GMSH_GET
,
0
);
opt_mesh_points
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_points
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_lines
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_lines
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_surfaces_edges
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
opt_mesh_surfaces_edges
(
0
,
GMSH_SET
|
GMSH_GUI
,
!
old
);
...
@@ -1008,7 +1012,7 @@ void GUI::set_context(Context_Item * menu_asked, int flag)
...
@@ -1008,7 +1012,7 @@ void GUI::set_context(Context_Item * menu_asked, int flag)
m_pop_plugin
.
clear
();
m_pop_plugin
.
clear
();
int
width
=
m_window
->
w
();
int
width
=
m_window
->
w
();
int
right_pop_width
=
4
*
fontsize
+
3
;
int
popw
=
4
*
fontsize
+
3
;
// construct the dynamic menu
// construct the dynamic menu
int
nb
=
0
;
int
nb
=
0
;
...
@@ -1016,7 +1020,7 @@ void GUI::set_context(Context_Item * menu_asked, int flag)
...
@@ -1016,7 +1020,7 @@ void GUI::set_context(Context_Item * menu_asked, int flag)
for
(
nb
=
0
;
nb
<
List_Nbr
(
CTX
.
post
.
list
);
nb
++
)
{
for
(
nb
=
0
;
nb
<
List_Nbr
(
CTX
.
post
.
list
);
nb
++
)
{
Post_View
*
v
=
(
Post_View
*
)
List_Pointer
(
CTX
.
post
.
list
,
nb
);
Post_View
*
v
=
(
Post_View
*
)
List_Pointer
(
CTX
.
post
.
list
,
nb
);
Fl_Light_Button
*
b1
=
new
Fl_Light_Button
(
0
,
MH
+
nb
*
BH
,
width
-
right_pop_width
,
BH
);
Fl_Light_Button
*
b1
=
new
Fl_Light_Button
(
0
,
MH
+
nb
*
BH
,
width
-
popw
,
BH
);
b1
->
callback
(
view_toggle_cb
,
(
void
*
)
nb
);
b1
->
callback
(
view_toggle_cb
,
(
void
*
)
nb
);
b1
->
align
(
FL_ALIGN_LEFT
|
FL_ALIGN_INSIDE
|
FL_ALIGN_CLIP
);
b1
->
align
(
FL_ALIGN_LEFT
|
FL_ALIGN_INSIDE
|
FL_ALIGN_CLIP
);
b1
->
value
(
v
->
Visible
);
b1
->
value
(
v
->
Visible
);
...
@@ -1025,16 +1029,16 @@ void GUI::set_context(Context_Item * menu_asked, int flag)
...
@@ -1025,16 +1029,16 @@ void GUI::set_context(Context_Item * menu_asked, int flag)
char
*
tmp
=
new
char
[
32
];
char
*
tmp
=
new
char
[
32
];
sprintf
(
tmp
,
"[%d]@#-1>"
,
nb
);
sprintf
(
tmp
,
"[%d]@#-1>"
,
nb
);
Fl_Button
*
b2
=
new
Fl_Button
(
width
-
right_pop_width
,
MH
+
nb
*
BH
,
right_pop_width
,
BH
,
tmp
);
Fl_Button
*
b2
=
new
Fl_Button
(
width
-
popw
,
MH
+
nb
*
BH
,
popw
,
BH
,
tmp
);
m_pop_label
.
push_back
(
tmp
);
m_pop_label
.
push_back
(
tmp
);
b2
->
align
(
FL_ALIGN_RIGHT
|
FL_ALIGN_INSIDE
|
FL_ALIGN_CLIP
);
b2
->
align
(
FL_ALIGN_RIGHT
|
FL_ALIGN_INSIDE
|
FL_ALIGN_CLIP
);
b2
->
tooltip
(
"Show view option menu (Shift+w)"
);
b2
->
tooltip
(
"Show view option menu (Shift+w)"
);
Fl_Menu_Button
*
p
[
2
];
Fl_Menu_Button
*
p
[
2
];
p
[
0
]
=
new
Fl_Menu_Button
(
width
-
right_pop_width
,
MH
+
nb
*
BH
,
right_pop_width
,
BH
);
p
[
0
]
=
new
Fl_Menu_Button
(
width
-
popw
,
MH
+
nb
*
BH
,
popw
,
BH
);
p
[
0
]
->
type
(
Fl_Menu_Button
::
POPUP123
);
p
[
0
]
->
type
(
Fl_Menu_Button
::
POPUP123
);
p
[
1
]
=
new
Fl_Menu_Button
(
0
,
MH
+
nb
*
BH
,
width
-
right_pop_width
,
BH
);
p
[
1
]
=
new
Fl_Menu_Button
(
0
,
MH
+
nb
*
BH
,
width
-
popw
,
BH
);
p
[
1
]
->
type
(
Fl_Menu_Button
::
POPUP3
);
p
[
1
]
->
type
(
Fl_Menu_Button
::
POPUP3
);
for
(
int
j
=
0
;
j
<
2
;
j
++
)
{
for
(
int
j
=
0
;
j
<
2
;
j
++
)
{
...
@@ -1210,9 +1214,12 @@ void GUI::create_graphic_window(int argc, char **argv)
...
@@ -1210,9 +1214,12 @@ void GUI::create_graphic_window(int argc, char **argv)
}
}
}
}
g_status_label
[
0
]
=
new
Fl_Box
(
x
,
glheight
+
2
,
(
width
-
x
)
/
3
,
sh
-
4
);
g_status_label
[
0
]
=
new
Fl_Box
(
x
,
glheight
+
2
,
g_status_label
[
1
]
=
new
Fl_Box
(
x
+
(
width
-
x
)
/
3
,
glheight
+
2
,
(
width
-
x
)
/
3
,
sh
-
4
);
(
width
-
x
)
/
3
,
sh
-
4
);
g_status_label
[
2
]
=
new
Fl_Box
(
x
+
2
*
(
width
-
x
)
/
3
,
glheight
+
2
,
(
width
-
x
)
/
3
-
2
,
sh
-
4
);
g_status_label
[
1
]
=
new
Fl_Box
(
x
+
(
width
-
x
)
/
3
,
glheight
+
2
,
(
width
-
x
)
/
3
,
sh
-
4
);
g_status_label
[
2
]
=
new
Fl_Box
(
x
+
2
*
(
width
-
x
)
/
3
,
glheight
+
2
,
(
width
-
x
)
/
3
-
2
,
sh
-
4
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
g_status_label
[
i
]
->
box
(
FL_FLAT_BOX
);
g_status_label
[
i
]
->
box
(
FL_FLAT_BOX
);
g_status_label
[
i
]
->
align
(
FL_ALIGN_LEFT
|
FL_ALIGN_INSIDE
|
FL_ALIGN_CLIP
);
g_status_label
[
i
]
->
align
(
FL_ALIGN_LEFT
|
FL_ALIGN_INSIDE
|
FL_ALIGN_CLIP
);
...
...
...
...
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