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
186de926
Commit
186de926
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
qques retouches esthetiques
parent
c7526466
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
Fltk/GUI.cpp
+32
-11
32 additions, 11 deletions
Fltk/GUI.cpp
Fltk/GUI.h
+1
-0
1 addition, 0 deletions
Fltk/GUI.h
Plugin/CutMap.cpp
+4
-2
4 additions, 2 deletions
Plugin/CutMap.cpp
Plugin/CutPlane.cpp
+5
-2
5 additions, 2 deletions
Plugin/CutPlane.cpp
Plugin/CutSphere.cpp
+5
-3
5 additions, 3 deletions
Plugin/CutSphere.cpp
with
47 additions
and
18 deletions
Fltk/GUI.cpp
+
32
−
11
View file @
186de926
// $Id: GUI.cpp,v 1.9
8
2001-07-31 1
4
:0
6:16
geuzaine Exp $
// $Id: GUI.cpp,v 1.9
9
2001-07-31 1
8
:0
7:57
geuzaine Exp $
// To make the interface as visually consistent as possible, please:
// To make the interface as visually consistent as possible, please:
// - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
// - use the BH, BW, WB, IW values for button heights/widths, window borders, etc.
...
@@ -1688,10 +1688,28 @@ void GUI::set_statistics(){
...
@@ -1688,10 +1688,28 @@ void GUI::set_statistics(){
sprintf
(
label
[
22
],
"%g/%g"
,
p
[
8
],
p
[
4
]);
stat_value
[
22
]
->
value
(
label
[
22
]);
sprintf
(
label
[
22
],
"%g/%g"
,
p
[
8
],
p
[
4
]);
stat_value
[
22
]
->
value
(
label
[
22
]);
}
}
/*
A plugin has n options, we also show infos about
//*********************** Create the window for the plugins *************************
the plugin on the top of the window
*/
void
GUI
::
add_multiline_in_browser
(
Fl_Browser
*
o
,
char
*
prefix
,
char
*
str
){
int
start
=
0
,
len
;
char
*
buff
;
if
(
!
strlen
(
str
)
||
!
strcmp
(
str
,
"
\n
"
)){
o
->
add
(
""
);
return
;
}
for
(
unsigned
int
i
=
0
;
i
<
strlen
(
str
)
;
i
++
){
if
(
i
==
strlen
(
str
)
-
1
||
str
[
i
]
==
'\n'
){
len
=
i
-
start
+
(
str
[
i
]
==
'\n'
?
0
:
1
);
buff
=
new
char
[
len
+
strlen
(
prefix
)
+
2
];
strcpy
(
buff
,
prefix
);
strncat
(
buff
,
&
str
[
start
],
len
);
buff
[
len
+
strlen
(
prefix
)]
=
'\0'
;
o
->
add
(
buff
);
start
=
i
+
1
;
}
}
}
PluginDialogBox
*
GUI
::
create_plugin_window
(
GMSH_Plugin
*
p
,
int
iView
){
PluginDialogBox
*
GUI
::
create_plugin_window
(
GMSH_Plugin
*
p
,
int
iView
){
char
buffer
[
1024
],
namep
[
1024
],
copyright
[
256
],
author
[
256
],
help
[
1024
];
char
buffer
[
1024
],
namep
[
1024
],
copyright
[
256
],
author
[
256
],
help
[
1024
];
...
@@ -1706,7 +1724,7 @@ PluginDialogBox * GUI::create_plugin_window(GMSH_Plugin *p, int iView){
...
@@ -1706,7 +1724,7 @@ PluginDialogBox * GUI::create_plugin_window(GMSH_Plugin *p, int iView){
// create window
// create window
int
width
=
20
*
CTX
.
fontsize
;
int
width
=
20
*
CTX
.
fontsize
;
int
height
=
(
n
+
2
)
*
BH
+
5
*
WB
;
int
height
=
(
(
n
>
5
?
n
:
5
)
+
2
)
*
BH
+
5
*
WB
;
PluginDialogBox
*
pdb
=
new
PluginDialogBox
;
PluginDialogBox
*
pdb
=
new
PluginDialogBox
;
pdb
->
main_window
=
new
Fl_Window
(
width
,
height
);
pdb
->
main_window
=
new
Fl_Window
(
width
,
height
);
...
@@ -1742,15 +1760,18 @@ PluginDialogBox * GUI::create_plugin_window(GMSH_Plugin *p, int iView){
...
@@ -1742,15 +1760,18 @@ PluginDialogBox * GUI::create_plugin_window(GMSH_Plugin *p, int iView){
g
->
labelsize
(
CTX
.
fontsize
);
g
->
labelsize
(
CTX
.
fontsize
);
Fl_Browser
*
o
=
new
Fl_Browser
(
2
*
WB
,
2
*
WB
+
1
*
BH
,
width
-
4
*
WB
,
height
-
5
*
WB
-
2
*
BH
);
Fl_Browser
*
o
=
new
Fl_Browser
(
2
*
WB
,
2
*
WB
+
1
*
BH
,
width
-
4
*
WB
,
height
-
5
*
WB
-
2
*
BH
);
o
->
add
(
""
);
o
->
add
(
""
);
o
->
add
(
namep
);
add_multiline_in_browser
(
o
,
"@c@b@."
,
namep
);
o
->
add
(
""
);
o
->
add
(
""
);
o
->
add
(
help
);
add_multiline_in_browser
(
o
,
""
,
help
);
o
->
add
(
""
);
o
->
add
(
""
);
o
->
add
(
author
);
add_multiline_in_browser
(
o
,
"Author(s): "
,
author
);
o
->
add
(
copyright
);
add_multiline_in_browser
(
o
,
"Copyright: "
,
copyright
);
o
->
textsize
(
CTX
.
fontsize
);
o
->
textsize
(
CTX
.
fontsize
);
pdb
->
main_window
->
resizable
(
o
);
g
->
end
();
g
->
end
();
}
}
o
->
end
();
o
->
end
();
...
...
This diff is collapsed.
Click to expand it.
Fltk/GUI.h
+
1
−
0
View file @
186de926
...
@@ -84,6 +84,7 @@ class GUI{
...
@@ -84,6 +84,7 @@ class GUI{
// Bitmaps
// Bitmaps
Fl_Bitmap
*
abort_bmp
,
*
start_bmp
,
*
stop_bmp
,
*
about_bmp
;
Fl_Bitmap
*
abort_bmp
,
*
start_bmp
,
*
stop_bmp
,
*
about_bmp
;
void
add_post_plugins
(
Fl_Menu_Button
*
button
,
int
iView
);
void
add_post_plugins
(
Fl_Menu_Button
*
button
,
int
iView
);
void
add_multiline_in_browser
(
Fl_Browser
*
o
,
char
*
prefix
,
char
*
str
);
public:
public:
...
...
This diff is collapsed.
Click to expand it.
Plugin/CutMap.cpp
+
4
−
2
View file @
186de926
// $Id: CutMap.cpp,v 1.1
1
2001-07-31 1
1:13:16
geuzaine Exp $
// $Id: CutMap.cpp,v 1.1
2
2001-07-31 1
8:07:57
geuzaine Exp $
#include
"CutMap.h"
#include
"CutMap.h"
#include
"List.h"
#include
"List.h"
...
@@ -32,7 +32,9 @@ void GMSH_CutMapPlugin::getInfos(char *author, char *copyright, char *help_text)
...
@@ -32,7 +32,9 @@ void GMSH_CutMapPlugin::getInfos(char *author, char *copyright, char *help_text)
{
{
strcpy
(
author
,
"J.-F. Remacle (remacle@scorec.rpi.edu)"
);
strcpy
(
author
,
"J.-F. Remacle (remacle@scorec.rpi.edu)"
);
strcpy
(
copyright
,
"DGR (www.multiphysics.com)"
);
strcpy
(
copyright
,
"DGR (www.multiphysics.com)"
);
strcpy
(
help_text
,
"This Plugins extracts the isovalue surface of value 'Value'"
);
strcpy
(
help_text
,
"Extracts the isovalue surface of value 'Value' from a
\n
"
"3D scalar map. Script name: Plugin(CutMap)."
);
}
}
int
GMSH_CutMapPlugin
::
getNbOptions
()
const
int
GMSH_CutMapPlugin
::
getNbOptions
()
const
...
...
This diff is collapsed.
Click to expand it.
Plugin/CutPlane.cpp
+
5
−
2
View file @
186de926
// $Id: CutPlane.cpp,v 1.
9
2001-07-31 1
1:13:16
geuzaine Exp $
// $Id: CutPlane.cpp,v 1.
10
2001-07-31 1
8:07:57
geuzaine Exp $
#include
"CutPlane.h"
#include
"CutPlane.h"
#include
"List.h"
#include
"List.h"
...
@@ -37,7 +37,10 @@ void GMSH_CutPlanePlugin::getInfos(char *author, char *copyright, char *help_tex
...
@@ -37,7 +37,10 @@ void GMSH_CutPlanePlugin::getInfos(char *author, char *copyright, char *help_tex
{
{
strcpy
(
author
,
"J.-F. Remacle (remacle@scorec.rpi.edu)"
);
strcpy
(
author
,
"J.-F. Remacle (remacle@scorec.rpi.edu)"
);
strcpy
(
copyright
,
"DGR (www.multiphysics.com)"
);
strcpy
(
copyright
,
"DGR (www.multiphysics.com)"
);
strcpy
(
help_text
,
"This Plugins cuts a view with a plane a x + b y + c z + d = 0"
);
strcpy
(
help_text
,
"Cuts a 3D scalar view view with the plane
\n
"
"A*X + B*Y + C*Z + D = 0.
\n
"
"Script name: Plugin(CutPlane)."
);
}
}
int
GMSH_CutPlanePlugin
::
getNbOptions
()
const
int
GMSH_CutPlanePlugin
::
getNbOptions
()
const
...
...
This diff is collapsed.
Click to expand it.
Plugin/CutSphere.cpp
+
5
−
3
View file @
186de926
// $Id: CutSphere.cpp,v 1.
8
2001-07-31 1
1:13:16
geuzaine Exp $
// $Id: CutSphere.cpp,v 1.
9
2001-07-31 1
8:07:57
geuzaine Exp $
#include
<string.h>
#include
<string.h>
#include
"CutSphere.h"
#include
"CutSphere.h"
...
@@ -38,8 +38,10 @@ void GMSH_CutSpherePlugin::getInfos(char *author, char *copyright, char *help_te
...
@@ -38,8 +38,10 @@ void GMSH_CutSpherePlugin::getInfos(char *author, char *copyright, char *help_te
{
{
strcpy
(
author
,
"J.-F. Remacle (remacle@scorec.rpi.edu)"
);
strcpy
(
author
,
"J.-F. Remacle (remacle@scorec.rpi.edu)"
);
strcpy
(
copyright
,
"DGR (www.multiphysics.com)"
);
strcpy
(
copyright
,
"DGR (www.multiphysics.com)"
);
strcpy
(
help_text
,
"This Plugins cuts a view with the sphere "
strcpy
(
help_text
,
" (x-xc)^2 + (y-yc)^2 + (z-zc)^2 = r^20"
);
"Cuts a 3D scalar view with the sphere
\n
"
"(X-Xc)^2 + (Y-Yc)^2 + (Z-Zc)^2 = R^2.
\n
"
"Script name: Plugin(CutSphere)."
);
}
}
int
GMSH_CutSpherePlugin
::
getNbOptions
()
const
int
GMSH_CutSpherePlugin
::
getNbOptions
()
const
...
...
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