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
6c75e5fb
Commit
6c75e5fb
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
save all
parent
ab5d5557
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Fltk/Callbacks.cpp
+32
-1
32 additions, 1 deletion
Fltk/Callbacks.cpp
Fltk/Callbacks.h
+2
-0
2 additions, 0 deletions
Fltk/Callbacks.h
Fltk/GUI.cpp
+5
-3
5 additions, 3 deletions
Fltk/GUI.cpp
with
39 additions
and
4 deletions
Fltk/Callbacks.cpp
+
32
−
1
View file @
6c75e5fb
// $Id: Callbacks.cpp,v 1.8
2
2001-0
8-23 18:03
:4
5
geuzaine Exp $
// $Id: Callbacks.cpp,v 1.8
3
2001-0
9-06 06:38
:4
8
geuzaine Exp $
#include
<sys/types.h>
#include
<signal.h>
...
...
@@ -216,6 +216,15 @@ void file_save_as_msh_cb(CALLBACK_ARGS) {
if
((
newfile
=
fl_file_chooser
(
"Save MSH file"
,
"*"
,
NULL
)))
CreateOutputFile
(
newfile
,
CTX
.
print
.
format
=
CTX
.
mesh
.
format
=
FORMAT_MSH
);
}
void
file_save_as_msh_all_cb
(
CALLBACK_ARGS
)
{
char
*
newfile
;
if
((
newfile
=
fl_file_chooser
(
"Save MSH file (no physicals)"
,
"*"
,
NULL
))){
int
all
=
CTX
.
mesh
.
save_all
;
CTX
.
mesh
.
save_all
=
1
;
CreateOutputFile
(
newfile
,
CTX
.
print
.
format
=
CTX
.
mesh
.
format
=
FORMAT_MSH
);
CTX
.
mesh
.
save_all
=
all
;
}
}
void
file_save_as_unv_cb
(
CALLBACK_ARGS
)
{
char
*
newfile
;
if
((
newfile
=
fl_file_chooser
(
"Save UNV file"
,
"*"
,
NULL
)))
...
...
@@ -229,15 +238,19 @@ void file_save_as_gref_cb(CALLBACK_ARGS) {
void
file_save_as_eps_simple_cb
(
CALLBACK_ARGS
)
{
char
*
newfile
;
if
((
newfile
=
fl_file_chooser
(
"Save EPS file"
,
"*"
,
NULL
))){
int
old
=
CTX
.
print
.
eps_quality
;
CTX
.
print
.
eps_quality
=
1
;
CreateOutputFile
(
newfile
,
CTX
.
print
.
format
=
FORMAT_EPS
);
CTX
.
print
.
eps_quality
=
old
;
}
}
void
file_save_as_eps_accurate_cb
(
CALLBACK_ARGS
)
{
char
*
newfile
;
if
((
newfile
=
fl_file_chooser
(
"Save EPS file"
,
"*"
,
NULL
))){
int
old
=
CTX
.
print
.
eps_quality
;
CTX
.
print
.
eps_quality
=
2
;
CreateOutputFile
(
newfile
,
CTX
.
print
.
format
=
FORMAT_EPS
);
CTX
.
print
.
eps_quality
=
old
;
}
}
void
file_save_as_jpeg_cb
(
CALLBACK_ARGS
)
{
...
...
@@ -249,25 +262,37 @@ void file_save_as_jpeg_cb(CALLBACK_ARGS) {
void
file_save_as_gif_cb
(
CALLBACK_ARGS
)
{
char
*
newfile
;
if
((
newfile
=
fl_file_chooser
(
"Save GIF file"
,
"*"
,
NULL
))){
int
dither
=
CTX
.
print
.
gif_dither
;
int
transp
=
CTX
.
print
.
gif_transparent
;
CTX
.
print
.
gif_dither
=
0
;
CTX
.
print
.
gif_transparent
=
0
;
CreateOutputFile
(
newfile
,
CTX
.
print
.
format
=
FORMAT_GIF
);
CTX
.
print
.
gif_dither
=
dither
;
CTX
.
print
.
gif_transparent
=
transp
;
}
}
void
file_save_as_gif_dithered_cb
(
CALLBACK_ARGS
)
{
char
*
newfile
;
if
((
newfile
=
fl_file_chooser
(
"Save GIF file"
,
"*"
,
NULL
))){
int
dither
=
CTX
.
print
.
gif_dither
;
int
transp
=
CTX
.
print
.
gif_transparent
;
CTX
.
print
.
gif_dither
=
1
;
CTX
.
print
.
gif_transparent
=
0
;
CreateOutputFile
(
newfile
,
CTX
.
print
.
format
=
FORMAT_GIF
);
CTX
.
print
.
gif_dither
=
dither
;
CTX
.
print
.
gif_transparent
=
transp
;
}
}
void
file_save_as_gif_transparent_cb
(
CALLBACK_ARGS
)
{
char
*
newfile
;
if
((
newfile
=
fl_file_chooser
(
"Save GIF file"
,
"*"
,
NULL
))){
int
dither
=
CTX
.
print
.
gif_dither
;
int
transp
=
CTX
.
print
.
gif_transparent
;
CTX
.
print
.
gif_dither
=
0
;
CTX
.
print
.
gif_transparent
=
1
;
CreateOutputFile
(
newfile
,
CTX
.
print
.
format
=
FORMAT_GIF
);
CTX
.
print
.
gif_dither
=
dither
;
CTX
.
print
.
gif_transparent
=
transp
;
}
}
void
file_save_as_ppm_cb
(
CALLBACK_ARGS
)
{
...
...
@@ -1166,6 +1191,12 @@ void geometry_physical_add_volume_cb (CALLBACK_ARGS){
void
mesh_save_cb
(
CALLBACK_ARGS
)
{
Print_Mesh
(
&
M
,
CTX
.
output_filename
,
CTX
.
mesh
.
format
);
}
void
mesh_save_all_cb
(
CALLBACK_ARGS
)
{
int
all
=
CTX
.
mesh
.
save_all
;
CTX
.
mesh
.
save_all
=
1
;
Print_Mesh
(
&
M
,
CTX
.
output_filename
,
CTX
.
mesh
.
format
);
CTX
.
mesh
.
save_all
=
all
;
}
void
mesh_define_cb
(
CALLBACK_ARGS
){
WID
->
set_context
(
menu_mesh_define
,
0
);
}
...
...
This diff is collapsed.
Click to expand it.
Fltk/Callbacks.h
+
2
−
0
View file @
6c75e5fb
...
...
@@ -26,6 +26,7 @@ void file_save_as_auto_cb(CALLBACK_ARGS) ;
void
file_save_as_geo_cb
(
CALLBACK_ARGS
)
;
void
file_save_as_geo_options_cb
(
CALLBACK_ARGS
)
;
void
file_save_as_msh_cb
(
CALLBACK_ARGS
)
;
void
file_save_as_msh_all_cb
(
CALLBACK_ARGS
)
;
void
file_save_as_unv_cb
(
CALLBACK_ARGS
)
;
void
file_save_as_gref_cb
(
CALLBACK_ARGS
)
;
void
file_save_as_eps_simple_cb
(
CALLBACK_ARGS
)
;
...
...
@@ -176,6 +177,7 @@ void con_geometry_define_symmetry_cb(CALLBACK_ARGS) ;
// Dynamic Mesh Menus
void
mesh_save_cb
(
CALLBACK_ARGS
)
;
void
mesh_save_all_cb
(
CALLBACK_ARGS
)
;
void
mesh_define_cb
(
CALLBACK_ARGS
)
;
void
mesh_1d_cb
(
CALLBACK_ARGS
)
;
void
mesh_2d_cb
(
CALLBACK_ARGS
)
;
...
...
This diff is collapsed.
Click to expand it.
Fltk/GUI.cpp
+
5
−
3
View file @
6c75e5fb
// $Id: GUI.cpp,v 1.11
2
2001-0
8-28 20:40:21
geuzaine Exp $
// $Id: GUI.cpp,v 1.11
3
2001-0
9-06 06:38:48
geuzaine Exp $
// To make the interface as visually consistent as possible, please:
// - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
...
...
@@ -43,6 +43,7 @@ Fl_Menu_Item m_menubar_table[] = {
{
"Save as"
,
0
,
0
,
0
,
FL_MENU_DIVIDER
|
FL_SUBMENU
},
{
"By extension..."
,
FL_CTRL
+
'p'
,
(
Fl_Callback
*
)
file_save_as_auto_cb
,
0
,
FL_MENU_DIVIDER
},
{
"MSH native mesh format..."
,
0
,
(
Fl_Callback
*
)
file_save_as_msh_cb
,
0
},
{
"MSH without physicals..."
,
0
,
(
Fl_Callback
*
)
file_save_as_msh_all_cb
,
0
},
{
"UNV universal mesh format..."
,
0
,
(
Fl_Callback
*
)
file_save_as_unv_cb
,
0
},
{
"GREF gref mesh format..."
,
0
,
(
Fl_Callback
*
)
file_save_as_gref_cb
,
0
},
{
"GEO flattened geometry..."
,
0
,
(
Fl_Callback
*
)
file_save_as_geo_cb
,
0
},
...
...
@@ -124,8 +125,8 @@ Context_Item menu_geometry[] =
{
"B-Spline"
,
(
Fl_Callback
*
)
geometry_elementary_add_new_bspline_cb
}
,
{
"Circle"
,
(
Fl_Callback
*
)
geometry_elementary_add_new_circle_cb
}
,
{
"Ellipsis"
,
(
Fl_Callback
*
)
geometry_elementary_add_new_ellipsis_cb
}
,
{
"Plane
S
urface"
,
(
Fl_Callback
*
)
geometry_elementary_add_new_planesurface_cb
}
,
{
"Ruled
S
urface"
,
(
Fl_Callback
*
)
geometry_elementary_add_new_ruledsurface_cb
}
,
{
"Plane
s
urface"
,
(
Fl_Callback
*
)
geometry_elementary_add_new_planesurface_cb
}
,
{
"Ruled
s
urface"
,
(
Fl_Callback
*
)
geometry_elementary_add_new_ruledsurface_cb
}
,
{
"Volume"
,
(
Fl_Callback
*
)
geometry_elementary_add_new_volume_cb
}
,
{
NULL
}
};
...
...
@@ -233,6 +234,7 @@ Context_Item menu_mesh[] =
{
"2D"
,
(
Fl_Callback
*
)
mesh_2d_cb
}
,
{
"3D"
,
(
Fl_Callback
*
)
mesh_3d_cb
}
,
{
"Save"
,
(
Fl_Callback
*
)
mesh_save_cb
}
,
{
"Save all"
,
(
Fl_Callback
*
)
mesh_save_all_cb
}
,
{
NULL
}
};
Context_Item
menu_mesh_define
[]
=
...
...
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