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
c8ef685b
Commit
c8ef685b
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Use system menu for mac
parent
10d6c857
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/GUI.cpp
+19
-6
19 additions, 6 deletions
Fltk/GUI.cpp
Fltk/GUI.h
+8
-0
8 additions, 0 deletions
Fltk/GUI.h
with
27 additions
and
6 deletions
Fltk/GUI.cpp
+
19
−
6
View file @
c8ef685b
// $Id: GUI.cpp,v 1.17
5
2002-05-1
8 23:07:42
geuzaine Exp $
// $Id: GUI.cpp,v 1.17
6
2002-05-1
9 08:31:13
geuzaine Exp $
//
//
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -691,22 +691,35 @@ void GUI::create_menu_window(int argc, char **argv){
...
@@ -691,22 +691,35 @@ void GUI::create_menu_window(int argc, char **argv){
}
}
int
width
=
13
*
CTX
.
fontsize
-
CTX
.
fontsize
/
2
-
2
;
int
width
=
13
*
CTX
.
fontsize
-
CTX
.
fontsize
/
2
-
2
;
MH
=
BH
+
BH
+
6
;
// this is the initial height: no dynamic button is shown!
// this is the initial height: no dynamic button is shown!
#if defined(__APPLE__) && defined(APPLE_USE_SYS_MENU)
MH
=
BH
+
6
;
// the menu bar is not in the application!
#else
MH
=
BH
+
BH
+
6
;
#endif
m_window
=
new
Fl_Window
(
width
,
MH
);
m_window
=
new
Fl_Window
(
width
,
MH
);
m_window
->
box
(
WINDOW_BOX
);
m_window
->
box
(
WINDOW_BOX
);
m_window
->
label
(
"Gmsh"
);
m_window
->
label
(
"Gmsh"
);
m_window
->
callback
(
file_quit_cb
);
m_window
->
callback
(
file_quit_cb
);
#if defined(__APPLE__) && defined(APPLE_USE_SYS_MENU)
m_menu_bar
=
new
Fl_Sys_Menu_Bar
();
m_menu_bar
->
menu
(
m_menubar_table
);
m_menu_bar
->
global
();
Fl_Box
*
o
=
new
Fl_Box
(
0
,
0
,
width
,
BH
+
6
);
o
->
box
(
FL_UP_BOX
);
y
=
3
;
#else
m_menu_bar
=
new
Fl_Menu_Bar
(
0
,
0
,
width
,
BH
);
m_menu_bar
=
new
Fl_Menu_Bar
(
0
,
0
,
width
,
BH
);
m_menu_bar
->
menu
(
m_menubar_table
);
m_menu_bar
->
menu
(
m_menubar_table
);
m_menu_bar
->
box
(
FL_UP_BOX
);
m_menu_bar
->
box
(
FL_UP_BOX
);
m_menu_bar
->
global
();
m_menu_bar
->
global
();
Fl_Box
*
o
=
new
Fl_Box
(
0
,
BH
,
width
,
BH
+
6
);
Fl_Box
*
o
=
new
Fl_Box
(
0
,
BH
,
width
,
BH
+
6
);
o
->
box
(
FL_UP_BOX
);
o
->
box
(
FL_UP_BOX
);
y
=
BH
+
3
;
y
=
BH
+
3
;
#endif
m_navig_butt
[
0
]
=
new
Fl_Button
(
1
,
y
,
18
,
BH
/
2
,
"@<"
);
m_navig_butt
[
0
]
=
new
Fl_Button
(
1
,
y
,
18
,
BH
/
2
,
"@<"
);
m_navig_butt
[
0
]
->
labeltype
(
FL_SYMBOL_LABEL
);
m_navig_butt
[
0
]
->
labeltype
(
FL_SYMBOL_LABEL
);
...
...
This diff is collapsed.
Click to expand it.
Fltk/GUI.h
+
8
−
0
View file @
c8ef685b
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#if !((FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 0))
#if !((FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 0))
#include
<FL/Fl_Tooltip.H>
#include
<FL/Fl_Tooltip.H>
#include
<FL/Fl_Sys_Menu_Bar.H>
#endif
#endif
#include
"Opengl_Window.h"
#include
"Opengl_Window.h"
...
@@ -52,6 +53,9 @@
...
@@ -52,6 +53,9 @@
#define NB_BUTT_MAX 100
#define NB_BUTT_MAX 100
#define NB_HISTORY_MAX 1000
#define NB_HISTORY_MAX 1000
// Undefine this to get the menu inside Gmsh (like in Window/Unix)
#define APPLE_USE_SYS_MENU
// The dynamic contexts
// The dynamic contexts
typedef
struct
{
typedef
struct
{
...
@@ -124,7 +128,11 @@ public:
...
@@ -124,7 +128,11 @@ public:
// menu window
// menu window
Fl_Window
*
m_window
;
Fl_Window
*
m_window
;
#if defined(__APPLE__) && defined(APPLE_USE_SYS_MENU)
Fl_Sys_Menu_Bar
*
m_menu_bar
;
#else
Fl_Menu_Bar
*
m_menu_bar
;
Fl_Menu_Bar
*
m_menu_bar
;
#endif
Fl_Choice
*
m_module_butt
;
Fl_Choice
*
m_module_butt
;
Fl_Button
*
m_navig_butt
[
2
]
;
Fl_Button
*
m_navig_butt
[
2
]
;
Fl_Button
*
m_push_butt
[
NB_BUTT_MAX
]
;
Fl_Button
*
m_push_butt
[
NB_BUTT_MAX
]
;
...
...
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