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
a1bc2e83
Commit
a1bc2e83
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
tweak
parent
faa10d3b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Fltk/graphicWindow.cpp
+5
-11
5 additions, 11 deletions
Fltk/graphicWindow.cpp
Fltk/mainWindow.h
+5
-4
5 additions, 4 deletions
Fltk/mainWindow.h
with
10 additions
and
15 deletions
Fltk/graphicWindow.cpp
+
5
−
11
View file @
a1bc2e83
...
@@ -479,12 +479,6 @@ static void file_rename_cb(Fl_Widget *w, void *data)
...
@@ -479,12 +479,6 @@ static void file_rename_cb(Fl_Widget *w, void *data)
void
file_quit_cb
(
Fl_Widget
*
w
,
void
*
data
)
void
file_quit_cb
(
Fl_Widget
*
w
,
void
*
data
)
{
{
if
(
data
){
std
::
string
opt
((
const
char
*
)
data
);
if
(
opt
==
"ask"
)
if
(
!
fl_choice
(
"Do you really want to quit?"
,
"Cancel"
,
"Quit"
,
0
))
return
;
}
Msg
::
Exit
(
0
);
Msg
::
Exit
(
0
);
}
}
...
@@ -2718,7 +2712,7 @@ graphicWindow::graphicWindow(bool main, int numTiles, bool detachedMenu)
...
@@ -2718,7 +2712,7 @@ graphicWindow::graphicWindow(bool main, int numTiles, bool detachedMenu)
// non-modal)
// non-modal)
if
(
main
){
if
(
main
){
win
=
new
mainWindow
(
width
,
height
,
false
);
win
=
new
mainWindow
(
width
,
height
,
false
);
win
->
callback
(
file_quit_cb
,
(
void
*
)
"ask"
);
win
->
callback
(
file_quit_cb
);
}
}
else
{
else
{
win
=
new
paletteWindow
(
width
,
height
,
false
);
win
=
new
paletteWindow
(
width
,
height
,
false
);
...
@@ -2916,10 +2910,10 @@ graphicWindow::graphicWindow(bool main, int numTiles, bool detachedMenu)
...
@@ -2916,10 +2910,10 @@ graphicWindow::graphicWindow(bool main, int numTiles, bool detachedMenu)
win
->
end
();
win
->
end
();
if
(
main
&&
detachedMenu
){
if
(
main
&&
detachedMenu
){
menuwin
=
new
palette
Window
menuwin
=
new
main
Window
(
CTX
::
instance
()
->
menuSize
[
0
],
CTX
::
instance
()
->
menuSize
[
1
],
(
CTX
::
instance
()
->
menuSize
[
0
],
CTX
::
instance
()
->
menuSize
[
1
],
CTX
::
instance
()
->
nonModalWindows
?
true
:
false
,
"Gmsh"
);
CTX
::
instance
()
->
nonModalWindows
?
true
:
false
,
"Gmsh"
);
menuwin
->
callback
(
file_quit_cb
,
(
void
*
)
"ask"
);
menuwin
->
callback
(
file_quit_cb
);
menuwin
->
box
(
GMSH_WINDOW_BOX
);
menuwin
->
box
(
GMSH_WINDOW_BOX
);
onelab
=
new
onelabGroup
(
0
,
0
,
menuwin
->
w
(),
menuwin
->
h
());
onelab
=
new
onelabGroup
(
0
,
0
,
menuwin
->
w
(),
menuwin
->
h
());
menuwin
->
position
(
CTX
::
instance
()
->
menuPosition
[
0
],
menuwin
->
position
(
CTX
::
instance
()
->
menuPosition
[
0
],
...
@@ -2961,10 +2955,10 @@ void graphicWindow::detachMenu()
...
@@ -2961,10 +2955,10 @@ void graphicWindow::detachMenu()
}
}
tile
->
redraw
();
tile
->
redraw
();
menuwin
=
new
palette
Window
menuwin
=
new
main
Window
(
CTX
::
instance
()
->
menuSize
[
0
],
CTX
::
instance
()
->
menuSize
[
1
],
(
CTX
::
instance
()
->
menuSize
[
0
],
CTX
::
instance
()
->
menuSize
[
1
],
CTX
::
instance
()
->
nonModalWindows
?
true
:
false
,
"Gmsh"
);
CTX
::
instance
()
->
nonModalWindows
?
true
:
false
,
"Gmsh"
);
menuwin
->
callback
(
file_quit_cb
,
(
void
*
)
"ask"
);
menuwin
->
callback
(
file_quit_cb
);
menuwin
->
box
(
GMSH_WINDOW_BOX
);
menuwin
->
box
(
GMSH_WINDOW_BOX
);
menuwin
->
add
(
onelab
);
menuwin
->
add
(
onelab
);
onelab
->
resize
(
0
,
0
,
menuwin
->
w
(),
menuwin
->
h
());
onelab
->
resize
(
0
,
0
,
menuwin
->
w
(),
menuwin
->
h
());
...
...
This diff is collapsed.
Click to expand it.
Fltk/mainWindow.h
+
5
−
4
View file @
a1bc2e83
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
#include
<FL/Fl.H>
#include
<FL/Fl.H>
#include
<FL/Fl_Double_Window.H>
#include
<FL/Fl_Double_Window.H>
#include
<FL/fl_ask.H>
// Derive the main window from Fl_Window (it shows up faster that way)
// Derive the main window from Fl_Window (it shows up faster that way)
class
mainWindow
:
public
Fl_Window
{
class
mainWindow
:
public
Fl_Window
{
void
(
*
myhandle
)(
int
event
);
private:
private:
int
handle
(
int
event
)
int
handle
(
int
event
)
{
{
...
@@ -25,6 +25,7 @@ class mainWindow : public Fl_Window {
...
@@ -25,6 +25,7 @@ class mainWindow : public Fl_Window {
#else
#else
if
(
Fl
::
test_shortcut
(
FL_CTRL
+
'w'
)){
if
(
Fl
::
test_shortcut
(
FL_CTRL
+
'w'
)){
#endif
#endif
if
(
fl_choice
(
"Do you really want to quit?"
,
"Cancel"
,
"Quit"
,
0
))
do_callback
();
do_callback
();
return
1
;
return
1
;
}
}
...
...
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