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
ecc5aa6f
Commit
ecc5aa6f
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
use help_view in about win
parent
2a481f1c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Fltk/aboutWindow.cpp
+33
-75
33 additions, 75 deletions
Fltk/aboutWindow.cpp
Fltk/pluginWindow.cpp
+1
-2
1 addition, 2 deletions
Fltk/pluginWindow.cpp
with
34 additions
and
77 deletions
Fltk/aboutWindow.cpp
+
33
−
75
View file @
ecc5aa6f
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
// See the LICENSE.txt file for license information. Please report all
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
// bugs and problems to <gmsh@geuz.org>.
#include
<stdio.h>
#include
<sstream>
#include
<FL/Fl_Browser.H>
#include
<FL/Fl_Help_View.H>
#include
<FL/Fl_Box.H>
#include
<FL/Fl_Button.H>
#include
"FlGui.h"
#include
"FlGui.h"
#include
"aboutWindow.h"
#include
"aboutWindow.h"
#include
"paletteWindow.h"
#include
"paletteWindow.h"
...
@@ -15,88 +13,48 @@
...
@@ -15,88 +13,48 @@
#include
"OS.h"
#include
"OS.h"
#include
"Context.h"
#include
"Context.h"
static
void
help_license_cb
(
Fl_Widget
*
w
,
void
*
data
)
static
const
char
*
help_link
(
Fl_Widget
*
w
,
const
char
*
uri
)
{
{
std
::
string
prog
=
FixWindowsPath
(
CTX
::
instance
()
->
webBrowser
);
std
::
string
prog
=
FixWindowsPath
(
CTX
::
instance
()
->
webBrowser
);
SystemCall
(
ReplacePercentS
(
prog
,
"http://geuz.org/gmsh/doc/LICENSE.txt"
));
SystemCall
(
ReplacePercentS
(
prog
,
uri
));
}
return
0
;
static
void
help_credits_cb
(
Fl_Widget
*
w
,
void
*
data
)
{
std
::
string
prog
=
FixWindowsPath
(
CTX
::
instance
()
->
webBrowser
);
SystemCall
(
ReplacePercentS
(
prog
,
"http://geuz.org/gmsh/doc/CREDITS.txt"
));
}
static
void
help_hide_cb
(
Fl_Widget
*
w
,
void
*
data
)
{
((
Fl_Window
*
)
data
)
->
hide
();
}
}
aboutWindow
::
aboutWindow
()
aboutWindow
::
aboutWindow
()
{
{
char
buffer
[
1024
];
int
width
=
26
*
FL_NORMAL_SIZE
;
int
width
=
28
*
FL_NORMAL_SIZE
;
int
height
=
16
*
BH
;
int
height
=
17
*
BH
;
win
=
new
paletteWindow
win
=
new
paletteWindow
(
width
,
height
,
CTX
::
instance
()
->
nonModalWindows
?
true
:
false
,
"About Gmsh"
);
(
width
,
height
,
CTX
::
instance
()
->
nonModalWindows
?
true
:
false
,
"About Gmsh"
);
win
->
box
(
GMSH_WINDOW_BOX
);
win
->
box
(
GMSH_WINDOW_BOX
);
{
Fl_Help_View
*
o
=
new
Fl_Help_View
(
0
,
0
,
width
,
height
);
Fl_Browser
*
o
=
new
Fl_Browser
(
0
,
0
,
width
,
height
-
2
*
WB
-
BH
);
o
->
box
(
FL_FLAT_BOX
);
o
->
box
(
FL_FLAT_BOX
);
o
->
has_scrollbar
(
0
);
// no scrollbars
std
::
ostringstream
sstream
;
o
->
add
(
" "
);
sstream
<<
"<center><h3>Gmsh</h3><br>version "
<<
GetGmshVersion
()
o
->
add
(
"@c@b@.Gmsh"
);
<<
"<p>Copyright (C) 1997-2009"
o
->
add
(
"@c@.A three-dimensional finite element mesh generator"
);
<<
"<br>Christophe Geuzaine and Jean-François Remacle"
o
->
add
(
"@c@.with built-in pre- and post-processing facilities"
);
<<
"<p><a href=
\"
http://geuz.org/gmsh/doc/CREDITS.txt
\"
>Credits</a> "
o
->
add
(
" "
);
<<
"and <a href=
\"
http://geuz.org/gmsh/doc/LICENSE.txt
\"
>licensing "
o
->
add
(
"@c@.Copyright (C) 1997-2009"
);
<<
"information</a>"
o
->
add
(
"@c@.Christophe Geuzaine and Jean-Francois Remacle"
);
<<
"<p>Please send all questions and bug reports to "
o
->
add
(
" "
);
<<
"<a href=
\"
mailto:gmsh@geuz.org
\"
>gmsh@geuz.org</a></center>"
o
->
add
(
"@c@.Please send all questions and bug reports to"
);
<<
"<font color=#888888><ul>"
o
->
add
(
"@c@b@.gmsh@geuz.org"
);
<<
"<li><i>GUI toolkit:</i> FLTK "
o
->
add
(
" "
);
<<
FL_MAJOR_VERSION
<<
"."
<<
FL_MINOR_VERSION
<<
"."
<<
FL_PATCH_VERSION
sprintf
(
buffer
,
"@c@.Version: %s"
,
GetGmshVersion
());
<<
"<li><i>Build OS:</i> "
<<
GetGmshBuildOS
()
o
->
add
(
buffer
);
<<
"<li><i>Build date:</i> "
<<
GetGmshBuildDate
()
sprintf
(
buffer
,
"@c@.License: %s"
,
GetGmshShortLicense
());
<<
"<li><i>Build host:</i> "
<<
GetGmshBuildHost
()
o
->
add
(
buffer
);
<<
"<li><i>Packaged by:</i> "
<<
GetGmshPackager
()
sprintf
(
buffer
,
"@c@.Graphical user interface toolkit: FLTK %d.%d.%d"
,
<<
"<li><i>Build options:</i>"
<<
GetGmshBuildOptions
()
FL_MAJOR_VERSION
,
FL_MINOR_VERSION
,
FL_PATCH_VERSION
);
<<
"</ul></font><center>"
o
->
add
(
buffer
);
<<
"Visit <a href=
\"
http://geuz.org/gmsh/
\"
>http://geuz.org/gmsh/</a> "
sprintf
(
buffer
,
"@c@.Build OS: %s"
,
GetGmshBuildOS
());
<<
"for more information</center>"
;
o
->
add
(
buffer
);
o
->
value
(
sstream
.
str
().
c_str
());
sprintf
(
buffer
,
"@c@.Build date: %s"
,
GetGmshBuildDate
());
o
->
link
(
help_link
);
o
->
add
(
buffer
);
o
->
textfont
(
FL_HELVETICA
);
sprintf
(
buffer
,
"@c@.Build host: %s"
,
GetGmshBuildHost
());
o
->
textsize
(
FL_NORMAL_SIZE
);
o
->
add
(
buffer
);
std
::
vector
<
std
::
string
>
lines
=
SplitWhiteSpace
(
GetGmshBuildOptions
(),
30
);
for
(
unsigned
int
i
=
0
;
i
<
lines
.
size
();
i
++
){
if
(
!
i
)
sprintf
(
buffer
,
"@c@.Build options:%s"
,
lines
[
i
].
c_str
());
else
sprintf
(
buffer
,
"@c@.%s"
,
lines
[
i
].
c_str
());
o
->
add
(
buffer
);
}
sprintf
(
buffer
,
"@c@.Packaged by: %s"
,
GetGmshPackager
());
o
->
add
(
buffer
);
o
->
add
(
" "
);
o
->
add
(
"@c@.Visit http://www.geuz.org/gmsh/ for more information"
);
o
->
add
(
" "
);
o
->
callback
(
help_hide_cb
,
(
void
*
)
win
);
}
{
Fl_Button
*
o
=
new
Fl_Button
(
width
/
2
-
BB
-
WB
/
2
,
height
-
BH
-
WB
,
BB
,
BH
,
"License"
);
o
->
callback
(
help_license_cb
);
}
{
Fl_Button
*
o
=
new
Fl_Button
(
width
/
2
+
WB
/
2
,
height
-
BH
-
WB
,
BB
,
BH
,
"Credits"
);
o
->
callback
(
help_credits_cb
);
}
win
->
position
(
Fl
::
x
()
+
Fl
::
w
()
/
2
-
width
/
2
,
win
->
position
(
Fl
::
x
()
+
Fl
::
w
()
/
2
-
width
/
2
,
Fl
::
y
()
+
Fl
::
h
()
/
2
-
height
/
2
);
Fl
::
y
()
+
Fl
::
h
()
/
2
-
height
/
2
);
...
...
This diff is collapsed.
Click to expand it.
Fltk/pluginWindow.cpp
+
1
−
2
View file @
ecc5aa6f
...
@@ -348,8 +348,7 @@ pluginWindow::pluginWindow(int deltaFontSize)
...
@@ -348,8 +348,7 @@ pluginWindow::pluginWindow(int deltaFontSize)
record
->
type
(
FL_TOGGLE_BUTTON
);
record
->
type
(
FL_TOGGLE_BUTTON
);
record
->
tooltip
(
"Append scripting command to file options when plugin is run"
);
record
->
tooltip
(
"Append scripting command to file options when plugin is run"
);
Fl_Box
*
resize_box
=
new
Fl_Box
(
L1
+
L2
+
2
*
BH
,
height
-
4
*
BH
,
1
,
1
);
win
->
resizable
(
new
Fl_Box
(
L1
+
L2
+
2
*
BH
,
height
-
4
*
BH
,
10
,
10
));
win
->
resizable
(
resize_box
);
win
->
size_range
(
width0
,
height0
);
win
->
size_range
(
width0
,
height0
);
win
->
position
(
CTX
::
instance
()
->
pluginPosition
[
0
],
CTX
::
instance
()
->
pluginPosition
[
1
]);
win
->
position
(
CTX
::
instance
()
->
pluginPosition
[
0
],
CTX
::
instance
()
->
pluginPosition
[
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