summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-10-21 20:01:56 +0000
committerBill Spitzak <spitzak@gmail.com>2000-10-21 20:01:56 +0000
commit2cbf4041b3bf742c4ab23402234b956db9d83ce8 (patch)
treef728cb1766fd2d6ba25348815bd5a93e6aa3692a
parent710dcef237366e052ef74e68189546db6789e980 (diff)
Does not clear Fl::keysym on every event, this makes better back compatability and fixes Win2000
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/glut.H8
-rw-r--r--configure.in25
-rw-r--r--makeinclude.in8
-rw-r--r--src/Fl.cxx5
-rw-r--r--src/Fl_Group.cxx20
-rw-r--r--src/Fl_win32.cxx5
-rw-r--r--src/Fl_x.cxx5
-rw-r--r--test/tabs.fl18
8 files changed, 53 insertions, 41 deletions
diff --git a/FL/glut.H b/FL/glut.H
index 6b2d9e8c6..fdf71e6ac 100644
--- a/FL/glut.H
+++ b/FL/glut.H
@@ -1,5 +1,5 @@
//
-// "$Id: glut.H,v 1.6.2.4 2000/10/17 07:30:22 spitzak Exp $"
+// "$Id: glut.H,v 1.6.2.5 2000/10/21 20:01:55 spitzak Exp $"
//
// GLUT emulation header file for the Fast Light Tool Kit (FLTK).
//
@@ -435,8 +435,8 @@ extern "C" {
extern APIENTRY int glutExtensionSupported(char *name);
/* Stroke font opaque addresses (use constants instead in source code). */
-extern FL_GLUT_API void *glutStrokeRoman;
-extern FL_GLUT_API void *glutStrokeMonoRoman;
+extern APIENTRY void *glutStrokeRoman;
+extern APIENTRY void *glutStrokeMonoRoman;
/* Stroke font constants (use these in GLUT program). */
#ifdef _WIN32
@@ -476,5 +476,5 @@ extern APIENTRY void glutSolidIcosahedron();
#endif /* __glut_h__ */
//
-// End of "$Id: glut.H,v 1.6.2.4 2000/10/17 07:30:22 spitzak Exp $".
+// End of "$Id: glut.H,v 1.6.2.5 2000/10/21 20:01:55 spitzak Exp $".
//
diff --git a/configure.in b/configure.in
index cc427b414..0855e3584 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
-dnl "$Id: configure.in,v 1.33.2.15 2000/06/06 14:48:17 mike Exp $"
+dnl "$Id: configure.in,v 1.33.2.16 2000/10/21 20:01:55 spitzak Exp $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
@@ -140,11 +140,10 @@ AC_CHECK_FUNC(snprintf,
AC_CHECK_FUNCS(vsprintf)
AC_PATH_XTRA
-echo "Ignoring libraries \"$X_PRE_LIBS\" requested by configure."
-dnl LIBS="$LIBS$X_LIBS$X_PRE_LIBS"
+dnl# echo "Ignoring libraries \"$X_PRE_LIBS\" requested by configure."
LIBS="$LIBS$X_LIBS"
-CFLAGS="$CFLAGS $X_CFLAGS"
-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+CFLAGS="$CFLAGS$X_CFLAGS"
+CXXFLAGS="$CXXFLAGS$X_CFLAGS"
dnl My test to see if OpenGL is on this machine:
GLLIB=
@@ -176,10 +175,15 @@ dnl add warnings to compiler switches:
dnl do this last so messing with switches does not break tests
if test -n "$GXX"; then
CFLAGS="-Wall $CFLAGS"
- CXXFLAGS="-Wall -Wno-return-type $CXXFLAGS"
+ CXXFLAGS="-Wall $CXXFLAGS"
if test -z "$DEBUGFLAG"; then
- CFLAGS="-O2 -fforce-mem -fforce-addr -fcaller-saves $CFLAGS"
- CXXFLAGS="-O2 -fforce-mem -fforce-addr -fcaller-saves $CXXFLAGS"
+ # Note: Can't use -fomit-frame-pointer - prevents tools like
+ # libsafe from working!
+ # WAS: I removed the -fforce-mem, -fforce-addr, -fcaller-saves
+ # They all seemed to make either no difference or enlarged
+ # the code by a few hundred bytes.
+ CFLAGS="-O2 $CFLAGS"
+ CXXFLAGS="-O2 $CXXFLAGS"
fi
if test $PICFLAG = 1; then
CFLAGS="-fPIC $CFLAGS"
@@ -223,9 +227,8 @@ else
# MAKEDEPEND="CC -M"
echo "FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI -n32"
- # -woff 3322 is necessary due to errors in Xlib headers on IRIX
CFLAGS="-fullwarn $CFLAGS"
- CXXFLAGS="-fullwarn -woff 1685,3322 $CXXFLAGS"
+ CXXFLAGS="-fullwarn $CXXFLAGS"
else
CXXFLAGS="+w +pp $CXXFLAGS"
fi
@@ -275,5 +278,5 @@ AC_CONFIG_HEADER(config.h:configh.in)
AC_OUTPUT(makeinclude)
dnl
-dnl End of "$Id: configure.in,v 1.33.2.15 2000/06/06 14:48:17 mike Exp $".
+dnl End of "$Id: configure.in,v 1.33.2.16 2000/10/21 20:01:55 spitzak Exp $".
dnl
diff --git a/makeinclude.in b/makeinclude.in
index f3afc3614..eadc6b47c 100644
--- a/makeinclude.in
+++ b/makeinclude.in
@@ -1,5 +1,5 @@
#
-# "$Id: makeinclude.in,v 1.7.2.5 2000/07/07 08:38:58 spitzak Exp $"
+# "$Id: makeinclude.in,v 1.7.2.6 2000/10/21 20:01:55 spitzak Exp $"
#
# Make include file for the Fast Light Tool Kit (FLTK).
# @configure_input@
@@ -38,8 +38,8 @@ CC =@CC@
MAKEDEPEND =@MAKEDEPEND@
# flags for C++ compiler:
-CFLAGS =@CFLAGS@ @X_CFLAGS@
-CXXFLAGS =@CXXFLAGS@ @X_CFLAGS@
+CFLAGS =@CFLAGS@
+CXXFLAGS =@CXXFLAGS@
# program to make the archive:
LIBNAME =@LIBNAME@
@@ -71,5 +71,5 @@ GLDLIBS =@LDFLAGS@ @LIBS@ @GLLIB@ -lX11 -lXext @X_EXTRA_LIBS@ -lm
$(CXX) -I.. $(CXXFLAGS) $< -c
#
-# End of "$Id: makeinclude.in,v 1.7.2.5 2000/07/07 08:38:58 spitzak Exp $".
+# End of "$Id: makeinclude.in,v 1.7.2.6 2000/10/21 20:01:55 spitzak Exp $".
#
diff --git a/src/Fl.cxx b/src/Fl.cxx
index f278e0ca5..331bc295e 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx,v 1.24.2.31 2000/10/17 06:40:53 spitzak Exp $"
+// "$Id: Fl.cxx,v 1.24.2.32 2000/10/21 20:01:55 spitzak Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -372,6 +372,7 @@ void fl_fix_focus() {
// set focus based on Fl::modal() and fl_xfocus
Fl_Widget* w = fl_xfocus;
if (w) {
+ Fl::e_keysym = 0; // make sure widgets don't think a keystroke moved focus
while (w->parent()) w = w->parent();
if (Fl::modal()) w = Fl::modal();
if (!w->contains(Fl::focus()))
@@ -733,5 +734,5 @@ void Fl_Window::flush() {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.31 2000/10/17 06:40:53 spitzak Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.32 2000/10/21 20:01:55 spitzak Exp $".
//
diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx
index ce5f483a7..655110b9d 100644
--- a/src/Fl_Group.cxx
+++ b/src/Fl_Group.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Group.cxx,v 1.8.2.6 2000/06/05 21:20:51 mike Exp $"
+// "$Id: Fl_Group.cxx,v 1.8.2.7 2000/10/21 20:01:56 spitzak Exp $"
//
// Group widget for the Fast Light Tool Kit (FLTK).
//
@@ -277,21 +277,29 @@ void Fl_Group::clear() {
Fl_Group::~Fl_Group() {clear();}
-void Fl_Group::insert(Fl_Widget &o, int i) {
- if (o.parent()) ((Fl_Group*)(o.parent()))->remove(o);
+void Fl_Group::insert(Fl_Widget &o, int index) {
+ if (o.parent()) {
+ Fl_Group* g = (Fl_Group*)(o.parent());
+ int n = g->find(o);
+ if (g == this) {
+ if (index > n) index--;
+ if (index == n) return;
+ }
+ g->remove(o);
+ }
o.parent_ = this;
if (children_ == 0) { // use array pointer to point at single child
array_ = (Fl_Widget**)&o;
} else if (children_ == 1) { // go from 1 to 2 children
Fl_Widget* t = (Fl_Widget*)array_;
array_ = (Fl_Widget**)malloc(2*sizeof(Fl_Widget*));
- if (i) {array_[0] = t; array_[1] = &o;}
+ if (index) {array_[0] = t; array_[1] = &o;}
else {array_[0] = &o; array_[1] = t;}
} else {
if (!(children_ & (children_-1))) // double number of children
array_ = (Fl_Widget**)realloc((void*)array_,
2*children_*sizeof(Fl_Widget*));
- int j; for (j = children_; j > i; j--) array_[j] = array_[j-1];
+ int j; for (j = children_; j > index; j--) array_[j] = array_[j-1];
array_[j] = &o;
}
children_++;
@@ -505,5 +513,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& w) const {
}
//
-// End of "$Id: Fl_Group.cxx,v 1.8.2.6 2000/06/05 21:20:51 mike Exp $".
+// End of "$Id: Fl_Group.cxx,v 1.8.2.7 2000/10/21 20:01:56 spitzak Exp $".
//
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 1f5eeb90b..8c1ec6b80 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_win32.cxx,v 1.33.2.28 2000/06/20 05:47:38 bill Exp $"
+// "$Id: Fl_win32.cxx,v 1.33.2.29 2000/10/21 20:01:56 spitzak Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@@ -417,7 +417,6 @@ static Fl_Window* resize_bug_fix;
static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- Fl::e_keysym = 0;
#if 0
// Not sure what this is, it may be left over from earlier attempts to
@@ -951,5 +950,5 @@ void Fl_Window::make_current() {
}
//
-// End of "$Id: Fl_win32.cxx,v 1.33.2.28 2000/06/20 05:47:38 bill Exp $".
+// End of "$Id: Fl_win32.cxx,v 1.33.2.29 2000/10/21 20:01:56 spitzak Exp $".
//
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index bf71118af..e7f6e5aea 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.24.2.19 2000/08/20 04:35:16 spitzak Exp $"
+// "$Id: Fl_x.cxx,v 1.24.2.20 2000/10/21 20:01:56 spitzak Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -364,7 +364,6 @@ static Fl_Window* resize_bug_fix;
int fl_handle(const XEvent& xevent)
{
- Fl::e_keysym = 0;
fl_xevent = &xevent;
Window xid = xevent.xany.window;
@@ -898,5 +897,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.24.2.19 2000/08/20 04:35:16 spitzak Exp $".
+// End of "$Id: Fl_x.cxx,v 1.24.2.20 2000/10/21 20:01:56 spitzak Exp $".
//
diff --git a/test/tabs.fl b/test/tabs.fl
index 13b97796a..8967a6dcb 100644
--- a/test/tabs.fl
+++ b/test/tabs.fl
@@ -1,15 +1,17 @@
# data file for the Fltk User Interface Designer (fluid)
-version 0.99
+version 1.0009
+header_name {.h}
+code_name {.cxx}
gridx 10
gridy 10
snap 3
Function {} {open
} {
Fl_Window foo_window {open
- xywh {329 266 321 324} hide resizable
+ xywh {329 266 321 324} resizable visible
} {
Fl_Tabs {} {open
- xywh {10 10 300 200} color {47 15} resizable
+ xywh {10 10 300 200} selection_color 15 resizable
} {
Fl_Group {} {
label Label1 open
@@ -41,13 +43,13 @@ Function {} {open
xywh {140 100 100 30}
}
Fl_Button {} {
- label {This is stuff inside the Fl_Group "tab2"} selected
+ label {This is stuff inside the Fl_Group "tab2"}
xywh {30 140 260 30}
}
}
Fl_Group {} {
- label tab3 open
- xywh {10 30 300 180} hide
+ label tab3 open selected
+ xywh {10 30 300 180}
} {
Fl_Button {} {
label button2
@@ -81,7 +83,7 @@ Function {} {open
}
Fl_Group {} {
label { tab5 } open
- xywh {10 30 300 180} labeltype ENGRAVED_LABEL
+ xywh {10 30 300 180} labeltype ENGRAVED_LABEL hide
} {
Fl_Button {} {
label button2
@@ -93,7 +95,7 @@ Function {} {open
}
Fl_Clock {} {
label {Make sure this clock does not use processor time when this tab is hidden or window is iconized}
- xywh {160 50 100 100} box OSHADOW_BOX color {238 0} labelfont 8 labelsize 10 align 130
+ xywh {160 50 100 100} box OSHADOW_BOX color 238 selection_color 0 labelfont 8 labelsize 10 align 130
}
}
}