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
3e79b658
Commit
3e79b658
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
gui for mpeg
parent
f0915760
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Fltk/fileDialogs.cpp
+63
-0
63 additions, 0 deletions
Fltk/fileDialogs.cpp
Fltk/fileDialogs.h
+1
-0
1 addition, 0 deletions
Fltk/fileDialogs.h
Fltk/menuWindow.cpp
+3
-1
3 additions, 1 deletion
Fltk/menuWindow.cpp
with
67 additions
and
1 deletion
Fltk/fileDialogs.cpp
+
63
−
0
View file @
3e79b658
...
@@ -348,6 +348,69 @@ int jpegFileDialog(const char *name)
...
@@ -348,6 +348,69 @@ int jpegFileDialog(const char *name)
return
0
;
return
0
;
}
}
// Save mpeg dialog
int
mpegFileDialog
(
const
char
*
name
)
{
struct
_mpegFileDialog
{
Fl_Window
*
window
;
Fl_Round_Button
*
b
[
2
];
Fl_Check_Button
*
c
[
1
];
Fl_Button
*
ok
,
*
cancel
;
};
static
_mpegFileDialog
*
dialog
=
NULL
;
if
(
!
dialog
){
dialog
=
new
_mpegFileDialog
;
int
h
=
3
*
WB
+
4
*
BH
,
w
=
2
*
BB
+
3
*
WB
,
y
=
WB
;
dialog
->
window
=
new
Fl_Double_Window
(
w
,
h
,
"MPEG Options"
);
dialog
->
window
->
box
(
GMSH_WINDOW_BOX
);
dialog
->
window
->
set_modal
();
{
Fl_Group
*
o
=
new
Fl_Group
(
WB
,
y
,
2
*
BB
+
WB
,
2
*
BH
);
dialog
->
b
[
0
]
=
new
Fl_Round_Button
(
WB
,
y
,
2
*
BB
+
WB
,
BH
,
"Cycle through time steps"
);
y
+=
BH
;
dialog
->
b
[
0
]
->
type
(
FL_RADIO_BUTTON
);
dialog
->
b
[
1
]
=
new
Fl_Round_Button
(
WB
,
y
,
2
*
BB
+
WB
,
BH
,
"Cycle through views"
);
y
+=
BH
;
dialog
->
b
[
1
]
->
type
(
FL_RADIO_BUTTON
);
o
->
end
();
}
dialog
->
c
[
0
]
=
new
Fl_Check_Button
(
WB
,
y
,
2
*
BB
+
WB
,
BH
,
"Composite all window tiles"
);
y
+=
BH
;
dialog
->
c
[
0
]
->
type
(
FL_TOGGLE_BUTTON
);
dialog
->
ok
=
new
Fl_Return_Button
(
WB
,
y
+
WB
,
BB
,
BH
,
"OK"
);
dialog
->
cancel
=
new
Fl_Button
(
2
*
WB
+
BB
,
y
+
WB
,
BB
,
BH
,
"Cancel"
);
dialog
->
window
->
end
();
dialog
->
window
->
hotspot
(
dialog
->
window
);
}
dialog
->
b
[
0
]
->
value
(
!
CTX
::
instance
()
->
post
.
animCycle
);
dialog
->
b
[
1
]
->
value
(
CTX
::
instance
()
->
post
.
animCycle
);
dialog
->
c
[
0
]
->
value
(
CTX
::
instance
()
->
print
.
compositeWindows
);
dialog
->
window
->
show
();
while
(
dialog
->
window
->
shown
()){
Fl
::
wait
();
for
(;;)
{
Fl_Widget
*
o
=
Fl
::
readqueue
();
if
(
!
o
)
break
;
if
(
o
==
dialog
->
ok
)
{
opt_post_anim_cycle
(
0
,
GMSH_SET
|
GMSH_GUI
,
(
int
)
dialog
->
b
[
1
]
->
value
());
opt_print_composite_windows
(
0
,
GMSH_SET
|
GMSH_GUI
,
(
int
)
dialog
->
c
[
0
]
->
value
());
CreateOutputFile
(
name
,
FORMAT_MPEG
);
dialog
->
window
->
hide
();
return
1
;
}
if
(
o
==
dialog
->
window
||
o
==
dialog
->
cancel
){
dialog
->
window
->
hide
();
return
0
;
}
}
}
return
0
;
}
// Save gif dialog
// Save gif dialog
int
gifFileDialog
(
const
char
*
name
)
int
gifFileDialog
(
const
char
*
name
)
...
...
This diff is collapsed.
Click to expand it.
Fltk/fileDialogs.h
+
1
−
0
View file @
3e79b658
...
@@ -22,6 +22,7 @@ int fileChooserGetFilter();
...
@@ -22,6 +22,7 @@ int fileChooserGetFilter();
void
fileChooserGetPosition
(
int
*
x
,
int
*
y
);
void
fileChooserGetPosition
(
int
*
x
,
int
*
y
);
int
jpegFileDialog
(
const
char
*
filename
);
int
jpegFileDialog
(
const
char
*
filename
);
int
mpegFileDialog
(
const
char
*
filename
);
int
gifFileDialog
(
const
char
*
filename
);
int
gifFileDialog
(
const
char
*
filename
);
int
geoFileDialog
(
const
char
*
filename
);
int
geoFileDialog
(
const
char
*
filename
);
int
genericBitmapFileDialog
(
const
char
*
filename
,
const
char
*
title
,
int
format
);
int
genericBitmapFileDialog
(
const
char
*
filename
,
const
char
*
title
,
int
format
);
...
...
This diff is collapsed.
Click to expand it.
Fltk/menuWindow.cpp
+
3
−
1
View file @
3e79b658
...
@@ -252,6 +252,7 @@ static int _save_eps(const char *name){ return gl2psFileDialog
...
@@ -252,6 +252,7 @@ static int _save_eps(const char *name){ return gl2psFileDialog
(
name
,
"EPS Options"
,
FORMAT_EPS
);
}
(
name
,
"EPS Options"
,
FORMAT_EPS
);
}
static
int
_save_gif
(
const
char
*
name
){
return
gifFileDialog
(
name
);
}
static
int
_save_gif
(
const
char
*
name
){
return
gifFileDialog
(
name
);
}
static
int
_save_jpeg
(
const
char
*
name
){
return
jpegFileDialog
(
name
);
}
static
int
_save_jpeg
(
const
char
*
name
){
return
jpegFileDialog
(
name
);
}
static
int
_save_mpeg
(
const
char
*
name
){
return
mpegFileDialog
(
name
);
}
static
int
_save_tex
(
const
char
*
name
){
return
latexFileDialog
(
name
);
}
static
int
_save_tex
(
const
char
*
name
){
return
latexFileDialog
(
name
);
}
static
int
_save_pdf
(
const
char
*
name
){
return
gl2psFileDialog
static
int
_save_pdf
(
const
char
*
name
){
return
gl2psFileDialog
(
name
,
"PDF Options"
,
FORMAT_PDF
);
}
(
name
,
"PDF Options"
,
FORMAT_PDF
);
}
...
@@ -287,6 +288,7 @@ static int _save_auto(const char *name)
...
@@ -287,6 +288,7 @@ static int _save_auto(const char *name)
case
FORMAT_EPS
:
return
_save_eps
(
name
);
case
FORMAT_EPS
:
return
_save_eps
(
name
);
case
FORMAT_GIF
:
return
_save_gif
(
name
);
case
FORMAT_GIF
:
return
_save_gif
(
name
);
case
FORMAT_JPEG
:
return
_save_jpeg
(
name
);
case
FORMAT_JPEG
:
return
_save_jpeg
(
name
);
case
FORMAT_MPEG
:
return
_save_mpeg
(
name
);
case
FORMAT_TEX
:
return
_save_tex
(
name
);
case
FORMAT_TEX
:
return
_save_tex
(
name
);
case
FORMAT_PDF
:
return
_save_pdf
(
name
);
case
FORMAT_PDF
:
return
_save_pdf
(
name
);
case
FORMAT_PNG
:
return
_save_png
(
name
);
case
FORMAT_PNG
:
return
_save_png
(
name
);
...
@@ -334,7 +336,7 @@ static void file_save_as_cb(Fl_Widget *w, void *data)
...
@@ -334,7 +336,7 @@ static void file_save_as_cb(Fl_Widget *w, void *data)
{
"JPEG"
TT
"*.jpg"
,
_save_jpeg
},
{
"JPEG"
TT
"*.jpg"
,
_save_jpeg
},
#endif
#endif
#if defined(HAVE_MPEG_ENCODE)
#if defined(HAVE_MPEG_ENCODE)
{
"MPEG"
TT
"*.mpg"
,
0
},
{
"MPEG"
TT
"*.mpg"
,
_save_mpeg
},
#endif
#endif
{
"LaTeX"
TT
"*.tex"
,
_save_tex
},
{
"LaTeX"
TT
"*.tex"
,
_save_tex
},
{
"PDF"
TT
"*.pdf"
,
_save_pdf
},
{
"PDF"
TT
"*.pdf"
,
_save_pdf
},
...
...
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