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
b229a6d8
Commit
b229a6d8
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
e5b496f0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Fltk/Makefile
+1
-1
1 addition, 1 deletion
Fltk/Makefile
Fltk/fileChooser.h
+0
-48
0 additions, 48 deletions
Fltk/fileChooser.h
Fltk/fileDialogs.cpp
+33
-1
33 additions, 1 deletion
Fltk/fileDialogs.cpp
with
34 additions
and
50 deletions
Fltk/Makefile
+
1
−
1
View file @
b229a6d8
...
@@ -294,7 +294,7 @@ fileDialogs${OBJEXT}: fileDialogs.cpp ../Common/GmshConfig.h \
...
@@ -294,7 +294,7 @@ fileDialogs${OBJEXT}: fileDialogs.cpp ../Common/GmshConfig.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h
\
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h
\
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h
\
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h
\
../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h
\
../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h
\
../Mesh/meshPartitionOptions.h
fileChooser.h
../Mesh/meshPartitionOptions.h
extraDialogs${OBJEXT}
:
extraDialogs.cpp GUI.h paletteWindow.h
\
extraDialogs${OBJEXT}
:
extraDialogs.cpp GUI.h paletteWindow.h
\
../Common/GmshDefines.h ../Common/OpenFile.h ../Common/CreateFile.h
\
../Common/GmshDefines.h ../Common/OpenFile.h ../Common/CreateFile.h
\
../Common/Options.h ../Post/ColorTable.h Draw.h ../Geo/GModel.h
\
../Common/Options.h ../Post/ColorTable.h Draw.h ../Geo/GModel.h
\
...
...
This diff is collapsed.
Click to expand it.
Fltk/fileChooser.h
deleted
100644 → 0
+
0
−
48
View file @
e5b496f0
// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#ifndef _FILE_PICKER_H_
#define _FILE_PICKER_H_
#include
<FL/Fl_File_Chooser.H>
#include
<FL/Fl_Window.H>
#include
<FL/Fl_File_Input.H>
// The FLTK team doesn't want to add a position() method to the file
// chooser, so we have to derive our own. To make things worse, the
// original file chooser doesn't expose its window to the world, so
// we need to use a cheap hack to get to it. Even worse is the hack
// used to get the focus on the file input widget. Sigh...
class
fileChooser
:
public
Fl_File_Chooser
{
private:
Fl_Window
*
_win
;
Fl_File_Input
*
_in
;
public:
fileChooser
(
const
char
*
d
,
const
char
*
p
,
int
t
,
const
char
*
title
)
:
Fl_File_Chooser
(
d
,
p
,
t
,
title
)
{
_win
=
dynamic_cast
<
Fl_Window
*>
(
newButton
->
parent
()
->
parent
());
_in
=
dynamic_cast
<
Fl_File_Input
*>
(
previewButton
->
parent
()
->
parent
()
->
resizable
());
}
void
show
()
{
if
(
_win
){
_win
->
show
();
rescan
();
// necessary since fltk 1.1.7
if
(
_in
)
_in
->
take_focus
();
else
_win
->
take_focus
();
}
else
Fl_File_Chooser
::
show
();
}
void
position
(
int
x
,
int
y
){
if
(
_win
)
_win
->
position
(
x
,
y
);
}
int
x
(){
if
(
_win
)
return
_win
->
x
();
else
return
100
;
}
int
y
(){
if
(
_win
)
return
_win
->
y
();
else
return
100
;
}
};
#endif
This diff is collapsed.
Click to expand it.
Fltk/fileDialogs.cpp
+
33
−
1
View file @
b229a6d8
...
@@ -34,7 +34,39 @@
...
@@ -34,7 +34,39 @@
#include
<FL/Fl_Native_File_Chooser.H>
#include
<FL/Fl_Native_File_Chooser.H>
static
Fl_Native_File_Chooser
*
fc
=
0
;
static
Fl_Native_File_Chooser
*
fc
=
0
;
#else
#else
#include
"fileChooser.h"
#include
<FL/Fl_File_Chooser.H>
#include
<FL/Fl_Window.H>
#include
<FL/Fl_File_Input.H>
class
fileChooser
:
public
Fl_File_Chooser
{
// we derive our own so we can set its position (The original file
// chooser doesn't expose its window to the world, so we need to use
// a cheap hack to get to it. Even worse is the hack used to get the
// focus on the file input widget.)
private:
Fl_Window
*
_win
;
Fl_File_Input
*
_in
;
public:
fileChooser
(
const
char
*
d
,
const
char
*
p
,
int
t
,
const
char
*
title
)
:
Fl_File_Chooser
(
d
,
p
,
t
,
title
)
{
_win
=
dynamic_cast
<
Fl_Window
*>
(
newButton
->
parent
()
->
parent
());
_in
=
dynamic_cast
<
Fl_File_Input
*>
(
previewButton
->
parent
()
->
parent
()
->
resizable
());
}
void
show
()
{
if
(
_win
){
_win
->
show
();
rescan
();
// necessary since fltk 1.1.7
if
(
_in
)
_in
->
take_focus
();
else
_win
->
take_focus
();
}
else
Fl_File_Chooser
::
show
();
}
void
position
(
int
x
,
int
y
){
if
(
_win
)
_win
->
position
(
x
,
y
);
}
int
x
(){
if
(
_win
)
return
_win
->
x
();
else
return
100
;
}
int
y
(){
if
(
_win
)
return
_win
->
y
();
else
return
100
;
}
};
static
fileChooser
*
fc
=
0
;
static
fileChooser
*
fc
=
0
;
#endif
#endif
...
...
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