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
a124f582
Commit
a124f582
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
tweak
parent
68bfedaf
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/FlGui.cpp
+12
-6
12 additions, 6 deletions
Fltk/FlGui.cpp
Fltk/FlGui.h
+4
-2
4 additions, 2 deletions
Fltk/FlGui.h
with
16 additions
and
8 deletions
Fltk/FlGui.cpp
+
12
−
6
View file @
a124f582
...
...
@@ -657,11 +657,11 @@ char FlGui::selectEntity(int type)
selectedElements
);
}
void
FlGui
::
setStatus
(
const
char
*
msg
,
bool
opengl
)
void
FlGui
::
setStatus
(
const
std
::
string
&
msg
,
bool
opengl
)
{
if
(
!
opengl
){
static
char
buff
[
1024
];
strncpy
(
buff
,
msg
,
sizeof
(
buff
)
-
1
);
strncpy
(
buff
,
msg
.
c_str
()
,
sizeof
(
buff
)
-
1
);
buff
[
sizeof
(
buff
)
-
1
]
=
'\0'
;
for
(
unsigned
int
i
=
0
;
i
<
graph
.
size
();
i
++
){
graph
[
i
]
->
getProgress
()
->
label
(
buff
);
...
...
@@ -670,21 +670,21 @@ void FlGui::setStatus(const char *msg, bool opengl)
}
else
{
openglWindow
*
gl
=
getCurrentOpenglWindow
();
int
n
=
strlen
(
msg
);
int
n
=
msg
.
size
(
);
int
i
=
0
;
while
(
i
<
n
)
if
(
msg
[
i
++
]
==
'\n'
)
break
;
gl
->
screenMessage
[
0
]
=
std
::
string
(
msg
)
;
gl
->
screenMessage
[
0
]
=
msg
;
if
(
i
)
gl
->
screenMessage
[
0
].
resize
(
i
-
1
);
if
(
i
<
n
)
gl
->
screenMessage
[
1
]
=
std
::
string
(
&
msg
[
i
]
);
gl
->
screenMessage
[
1
]
=
msg
.
substr
(
i
);
else
gl
->
screenMessage
[
1
].
clear
();
drawContext
::
global
()
->
draw
();
}
}
void
FlGui
::
setProgress
(
const
char
*
msg
,
double
val
,
double
min
,
double
max
)
void
FlGui
::
setProgress
(
const
std
::
string
&
msg
,
double
val
,
double
min
,
double
max
)
{
for
(
unsigned
int
i
=
0
;
i
<
FlGui
::
instance
()
->
graph
.
size
();
i
++
){
if
(
FlGui
::
instance
()
->
graph
[
i
]
->
getProgress
()
->
value
()
!=
val
)
...
...
@@ -697,6 +697,12 @@ void FlGui::setProgress(const char *msg, double val, double min, double max)
setStatus
(
msg
);
}
void
FlGui
::
setProgressColor
(
int
col
)
{
for
(
unsigned
int
i
=
0
;
i
<
FlGui
::
instance
()
->
graph
.
size
();
i
++
)
FlGui
::
instance
()
->
graph
[
i
]
->
getProgress
()
->
labelcolor
(
col
);
}
void
FlGui
::
storeCurrentWindowsInfo
()
{
CTX
::
instance
()
->
glPosition
[
0
]
=
graph
[
0
]
->
getWindow
()
->
x
();
...
...
This diff is collapsed.
Click to expand it.
Fltk/FlGui.h
+
4
−
2
View file @
a124f582
...
...
@@ -108,9 +108,11 @@ class FlGui{
// select an entity in the most recent graphic window
char
selectEntity
(
int
type
);
// display status message
void
setStatus
(
const
char
*
msg
,
bool
opengl
=
false
);
void
setStatus
(
const
std
::
string
&
msg
,
bool
opengl
=
false
);
// display status message and update progress bar
void
setProgress
(
const
char
*
msg
,
double
val
,
double
min
,
double
max
);
void
setProgress
(
const
std
::
string
&
msg
,
double
val
,
double
min
,
double
max
);
// set color of progress message
void
setProgressColor
(
int
col
);
// create the window for physical context dependant definitions
void
callForSolverPlugin
(
int
dim
);
// add line in message console(s)
...
...
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