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
f4dc8502
Commit
f4dc8502
authored
18 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
put fltk popup bug fix in a single header file
parent
50c205ec
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
-7
1 addition, 7 deletions
Fltk/Makefile
Fltk/Popup_Button.cpp
+0
-68
0 additions, 68 deletions
Fltk/Popup_Button.cpp
Fltk/Popup_Button.h
+44
-2
44 additions, 2 deletions
Fltk/Popup_Button.h
with
45 additions
and
77 deletions
Fltk/Makefile
+
1
−
7
View file @
f4dc8502
# $Id: Makefile,v 1.10
4
2006-08-2
6 13:34:4
6 geuzaine Exp $
# $Id: Makefile,v 1.10
5
2006-08-2
9 02:27:2
6 geuzaine Exp $
#
# Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
#
...
...
@@ -34,7 +34,6 @@ SRC = Main.cpp \
Opengl.cpp
\
Opengl_Window.cpp
\
Colorbar_Window.cpp
\
Popup_Button.cpp
\
Solvers.cpp
...
...
@@ -232,11 +231,6 @@ Colorbar_Window.o: Colorbar_Window.cpp ../Common/Gmsh.h \
../Common/ColorTable.h Popup_Button.h SpherePosition_Widget.h
\
../Common/Context.h
# 1 "/Users/geuzaine/.gmsh/Fltk//"
Popup_Button.o
:
Popup_Button.cpp ../Common/Gmsh.h ../Common/Message.h
\
../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h
\
../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h
\
../Common/GmshUI.h Popup_Button.h
# 1 "/Users/geuzaine/.gmsh/Fltk//"
Solvers.o
:
Solvers.cpp ../Common/Gmsh.h ../Common/Message.h
\
../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h
\
../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h
\
...
...
This diff is collapsed.
Click to expand it.
Fltk/Popup_Button.cpp
deleted
100644 → 0
+
0
−
68
View file @
50c205ec
// $Id: Popup_Button.cpp,v 1.4 2006-04-01 23:02:22 geuzaine Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems to <gmsh@geuz.org>.
#include
"Gmsh.h"
#include
"GmshUI.h"
#include
"Popup_Button.h"
const
Fl_Menu_Item
*
Popup_Button
::
popup
()
{
const
Fl_Menu_Item
*
m
;
redraw
();
m
=
menu
()
->
popup
(
Fl
::
event_x
(),
Fl
::
event_y
(),
label
(),
mvalue
(),
this
);
picked
(
m
);
return
m
;
}
int
Popup_Button
::
handle
(
int
e
)
{
if
(
!
menu
()
||
!
menu
()
->
text
)
return
0
;
switch
(
e
)
{
case
FL_ENTER
:
case
FL_LEAVE
:
return
(
box
()
&&
!
type
())
?
1
:
0
;
case
FL_PUSH
:
if
(
!
box
())
{
if
(
Fl
::
event_button
()
!=
3
)
return
0
;
}
else
if
(
type
())
{
if
(
!
(
type
()
&
(
1
<<
(
Fl
::
event_button
()
-
1
))))
return
0
;
}
if
(
Fl
::
visible_focus
())
Fl
::
focus
(
this
);
popup
();
return
1
;
case
FL_KEYBOARD
:
if
(
!
box
())
return
0
;
if
(
Fl
::
event_key
()
==
' '
&&
!
(
Fl
::
event_state
()
&
(
FL_SHIFT
|
FL_CTRL
|
FL_ALT
|
FL_META
)))
{
popup
();
return
1
;
}
else
return
0
;
case
FL_SHORTCUT
:
if
(
Fl_Widget
::
test_shortcut
())
{
popup
();
return
1
;}
return
test_shortcut
()
!=
0
;
case
FL_FOCUS
:
case
FL_UNFOCUS
:
if
(
box
()
&&
Fl
::
visible_focus
())
{
redraw
();
return
1
;
}
default
:
return
0
;
}
}
This diff is collapsed.
Click to expand it.
Fltk/Popup_Button.h
+
44
−
2
View file @
f4dc8502
...
...
@@ -34,8 +34,50 @@ class Popup_Button : public Fl_Menu_Button {
Popup_Button
(
int
x
,
int
y
,
int
w
,
int
h
,
char
*
label
=
0
)
:
Fl_Menu_Button
(
x
,
y
,
w
,
h
,
label
)
{}
void
draw
(){
Fl_Menu_Button
::
draw
();
}
int
handle
(
int
e
);
const
Fl_Menu_Item
*
popup
();
int
handle
(
int
e
)
{
if
(
!
menu
()
||
!
menu
()
->
text
)
return
0
;
switch
(
e
)
{
case
FL_ENTER
:
case
FL_LEAVE
:
return
(
box
()
&&
!
type
())
?
1
:
0
;
case
FL_PUSH
:
if
(
!
box
())
{
if
(
Fl
::
event_button
()
!=
3
)
return
0
;
}
else
if
(
type
())
{
if
(
!
(
type
()
&
(
1
<<
(
Fl
::
event_button
()
-
1
))))
return
0
;
}
if
(
Fl
::
visible_focus
())
Fl
::
focus
(
this
);
popup
();
return
1
;
case
FL_KEYBOARD
:
if
(
!
box
())
return
0
;
if
(
Fl
::
event_key
()
==
' '
&&
!
(
Fl
::
event_state
()
&
(
FL_SHIFT
|
FL_CTRL
|
FL_ALT
|
FL_META
)))
{
popup
();
return
1
;
}
else
return
0
;
case
FL_SHORTCUT
:
if
(
Fl_Widget
::
test_shortcut
())
{
popup
();
return
1
;}
return
test_shortcut
()
!=
0
;
case
FL_FOCUS
:
case
FL_UNFOCUS
:
if
(
box
()
&&
Fl
::
visible_focus
())
{
redraw
();
return
1
;
}
default
:
return
0
;
}
}
const
Fl_Menu_Item
*
popup
()
{
const
Fl_Menu_Item
*
m
;
redraw
();
m
=
menu
()
->
popup
(
Fl
::
event_x
(),
Fl
::
event_y
(),
label
(),
mvalue
(),
this
);
picked
(
m
);
return
m
;
}
};
#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