diff options
Diffstat (limited to 'src')
177 files changed, 1159 insertions, 867 deletions
@@ -1,9 +1,9 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.61 2003/05/20 15:17:12 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.62 2004/04/11 04:38:56 easysw Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -985,5 +985,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.61 2003/05/20 15:17:12 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.62 2004/04/11 04:38:56 easysw Exp $". // diff --git a/src/Fl_Adjuster.cxx b/src/Fl_Adjuster.cxx index ec14e4a..cac4a16 100644 --- a/src/Fl_Adjuster.cxx +++ b/src/Fl_Adjuster.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Adjuster.cxx,v 1.5.2.3.2.9 2003/01/30 21:41:19 easysw Exp $" +// "$Id: Fl_Adjuster.cxx,v 1.5.2.3.2.10 2004/04/11 04:38:57 easysw Exp $" // // Adjuster widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -165,5 +165,5 @@ Fl_Adjuster::Fl_Adjuster(int X, int Y, int W, int H, const char* l) } // -// End of "$Id: Fl_Adjuster.cxx,v 1.5.2.3.2.9 2003/01/30 21:41:19 easysw Exp $". +// End of "$Id: Fl_Adjuster.cxx,v 1.5.2.3.2.10 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_BMP_Image.cxx b/src/Fl_BMP_Image.cxx index 1037c7f..0ac462f 100644 --- a/src/Fl_BMP_Image.cxx +++ b/src/Fl_BMP_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_BMP_Image.cxx,v 1.1.2.13 2003/01/30 21:41:21 easysw Exp $" +// "$Id: Fl_BMP_Image.cxx,v 1.1.2.14 2004/04/11 04:38:57 easysw Exp $" // // Fl_BMP_Image routines. // -// Copyright 1997-2003 by Easy Software Products. +// Copyright 1997-2004 by Easy Software Products. // Image support donated by Matthias Melcher, Copyright 2000. // // This library is free software; you can redistribute it and/or @@ -450,5 +450,5 @@ read_long(FILE *fp) { // I - File to read from // -// End of "$Id: Fl_BMP_Image.cxx,v 1.1.2.13 2003/01/30 21:41:21 easysw Exp $". +// End of "$Id: Fl_BMP_Image.cxx,v 1.1.2.14 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx index 6ece864..cc9d7a1 100644 --- a/src/Fl_Bitmap.cxx +++ b/src/Fl_Bitmap.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.22 2003/01/30 21:41:22 easysw Exp $" +// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.23 2004/04/11 04:38:57 easysw Exp $" // // Bitmap drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -474,5 +474,5 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) { // -// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.22 2003/01/30 21:41:22 easysw Exp $". +// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.23 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Box.cxx b/src/Fl_Box.cxx index 37c1e0c..3743ea6 100644 --- a/src/Fl_Box.cxx +++ b/src/Fl_Box.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Box.cxx,v 1.4.2.3.2.4 2003/01/30 21:41:23 easysw Exp $" +// "$Id: Fl_Box.cxx,v 1.4.2.3.2.5 2004/04/11 04:38:57 easysw Exp $" // // Box widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -38,5 +38,5 @@ int Fl_Box::handle(int event) { // -// End of "$Id: Fl_Box.cxx,v 1.4.2.3.2.4 2003/01/30 21:41:23 easysw Exp $". +// End of "$Id: Fl_Box.cxx,v 1.4.2.3.2.5 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Browser.cxx b/src/Fl_Browser.cxx index de4f1ee..6e495a2 100644 --- a/src/Fl_Browser.cxx +++ b/src/Fl_Browser.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Browser.cxx,v 1.9.2.12.2.8 2003/01/30 21:41:24 easysw Exp $" +// "$Id: Fl_Browser.cxx,v 1.9.2.12.2.9 2004/04/11 04:38:57 easysw Exp $" // // Browser widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -495,5 +495,5 @@ int Fl_Browser::value() const { } // -// End of "$Id: Fl_Browser.cxx,v 1.9.2.12.2.8 2003/01/30 21:41:24 easysw Exp $". +// End of "$Id: Fl_Browser.cxx,v 1.9.2.12.2.9 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx index d7d49ad..f0e7392 100644 --- a/src/Fl_Browser_.cxx +++ b/src/Fl_Browser_.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.18 2003/01/30 21:41:27 easysw Exp $" +// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.20 2004/04/11 04:38:57 easysw Exp $" // // Base Browser widget class for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -559,6 +559,7 @@ int Fl_Browser_::handle(int event) { return 1; } else switch (Fl::event_key()) { case FL_Enter: + case FL_KP_Enter: select_only(l, 1); return 1; case ' ': @@ -757,5 +758,5 @@ void Fl_Browser_::item_select(void*, int) {} int Fl_Browser_::item_selected(void* l) const {return l==selection_;} // -// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.18 2003/01/30 21:41:27 easysw Exp $". +// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.20 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Browser_load.cxx b/src/Fl_Browser_load.cxx index 0439040..1e082ac 100644 --- a/src/Fl_Browser_load.cxx +++ b/src/Fl_Browser_load.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Browser_load.cxx,v 1.4.2.3.2.2 2003/01/30 21:41:29 easysw Exp $" +// "$Id: Fl_Browser_load.cxx,v 1.4.2.3.2.3 2004/04/11 04:38:57 easysw Exp $" // // File loading routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -51,5 +51,5 @@ int Fl_Browser::load(const char *filename) { } // -// End of "$Id: Fl_Browser_load.cxx,v 1.4.2.3.2.2 2003/01/30 21:41:29 easysw Exp $". +// End of "$Id: Fl_Browser_load.cxx,v 1.4.2.3.2.3 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index ab08c99..9309173 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Button.cxx,v 1.4.2.6.2.21 2003/01/30 21:41:30 easysw Exp $" +// "$Id: Fl_Button.cxx,v 1.4.2.6.2.22 2004/04/11 04:38:57 easysw Exp $" // // Button widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -156,5 +156,5 @@ Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *l) } // -// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.21 2003/01/30 21:41:30 easysw Exp $". +// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.22 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Chart.cxx b/src/Fl_Chart.cxx index 1ae5750..ab81cb5 100644 --- a/src/Fl_Chart.cxx +++ b/src/Fl_Chart.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Chart.cxx,v 1.5.2.6.2.12 2003/01/30 21:41:32 easysw Exp $" +// "$Id: Fl_Chart.cxx,v 1.5.2.6.2.13 2004/04/11 04:38:57 easysw Exp $" // // Forms-compatible chart widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -384,5 +384,5 @@ void Fl_Chart::maxsize(int m) { } // -// End of "$Id: Fl_Chart.cxx,v 1.5.2.6.2.12 2003/01/30 21:41:32 easysw Exp $". +// End of "$Id: Fl_Chart.cxx,v 1.5.2.6.2.13 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Check_Browser.cxx b/src/Fl_Check_Browser.cxx index 683bfd2..7979621 100644 --- a/src/Fl_Check_Browser.cxx +++ b/src/Fl_Check_Browser.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Check_Browser.cxx,v 1.1.2.7 2003/01/30 21:41:33 easysw Exp $" +// "$Id: Fl_Check_Browser.cxx,v 1.1.2.8 2004/04/11 04:38:57 easysw Exp $" // // Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -266,5 +266,5 @@ void Fl_Check_Browser::check_none() { // -// End of "$Id: Fl_Check_Browser.cxx,v 1.1.2.7 2003/01/30 21:41:33 easysw Exp $". +// End of "$Id: Fl_Check_Browser.cxx,v 1.1.2.8 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Check_Button.cxx b/src/Fl_Check_Button.cxx index 5299e66..808d38c 100644 --- a/src/Fl_Check_Button.cxx +++ b/src/Fl_Check_Button.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Check_Button.cxx,v 1.4.2.3.2.5 2003/01/30 21:41:33 easysw Exp $" +// "$Id: Fl_Check_Button.cxx,v 1.4.2.3.2.6 2004/04/11 04:38:57 easysw Exp $" // // Check button widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx index d14315e..7cdcd88 100644 --- a/src/Fl_Choice.cxx +++ b/src/Fl_Choice.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.14 2003/08/24 13:09:06 easysw Exp $" +// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.16 2004/04/11 04:38:57 easysw Exp $" // // Choice widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -66,30 +66,31 @@ void Fl_Choice::draw() { // ERCO int xx = x() + dx, yy = y() + dy + 1, ww = w() - W, hh = H - 2; - if ( Fl::scheme() ) - { - Fl_Label l; - l.value = m.text; - l.image = 0; - l.deimage = 0; - l.type = m.labeltype_; - l.font = m.labelsize_ || m.labelfont_ ? m.labelfont_ : uchar(textfont()); - l.size = m.labelsize_ ? m.labelsize_ : textsize(); - l.color= m.labelcolor_ ? m.labelcolor_ : textcolor(); - if (!m.active()) l.color = fl_inactive((Fl_Color)l.color); - fl_draw_shortcut = 2; // hack value to make '&' disappear - l.draw(xx+3, yy, ww>6 ? ww-6 : 0, hh, FL_ALIGN_LEFT); - fl_draw_shortcut = 0; - if ( Fl::focus() == this ) draw_focus(box(), xx, yy, ww, hh); + + fl_clip(xx, yy, ww, hh); + + if ( Fl::scheme()) { + Fl_Label l; + l.value = m.text; + l.image = 0; + l.deimage = 0; + l.type = m.labeltype_; + l.font = m.labelsize_ || m.labelfont_ ? m.labelfont_ : uchar(textfont()); + l.size = m.labelsize_ ? m.labelsize_ : textsize(); + l.color= m.labelcolor_ ? m.labelcolor_ : textcolor(); + if (!m.active()) l.color = fl_inactive((Fl_Color)l.color); + fl_draw_shortcut = 2; // hack value to make '&' disappear + l.draw(xx+3, yy, ww>6 ? ww-6 : 0, hh, FL_ALIGN_LEFT); + fl_draw_shortcut = 0; + if ( Fl::focus() == this ) draw_focus(box(), xx, yy, ww, hh); } - else - { - fl_clip(xx, yy, ww, hh); - fl_draw_shortcut = 2; // hack value to make '&' disappear - m.draw(xx, yy, ww, hh, this, Fl::focus() == this); - fl_draw_shortcut = 0; - fl_pop_clip(); + else { + fl_draw_shortcut = 2; // hack value to make '&' disappear + m.draw(xx, yy, ww, hh, this, Fl::focus() == this); + fl_draw_shortcut = 0; } + + fl_pop_clip(); } draw_label(); @@ -151,5 +152,5 @@ int Fl_Choice::handle(int e) { } // -// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.14 2003/08/24 13:09:06 easysw Exp $". +// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.16 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Clock.cxx b/src/Fl_Clock.cxx index 541d737..bb57bd1 100644 --- a/src/Fl_Clock.cxx +++ b/src/Fl_Clock.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Clock.cxx,v 1.8.2.4.2.3 2003/01/30 21:41:35 easysw Exp $" +// "$Id: Fl_Clock.cxx,v 1.8.2.4.2.4 2004/04/11 04:38:57 easysw Exp $" // // Clock widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -170,5 +170,5 @@ Fl_Clock::~Fl_Clock() { } // -// End of "$Id: Fl_Clock.cxx,v 1.8.2.4.2.3 2003/01/30 21:41:35 easysw Exp $". +// End of "$Id: Fl_Clock.cxx,v 1.8.2.4.2.4 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Color_Chooser.cxx b/src/Fl_Color_Chooser.cxx index 58f0397..8684540 100644 --- a/src/Fl_Color_Chooser.cxx +++ b/src/Fl_Color_Chooser.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Color_Chooser.cxx,v 1.7.2.4.2.6 2003/01/30 21:41:36 easysw Exp $" +// "$Id: Fl_Color_Chooser.cxx,v 1.7.2.4.2.7 2004/04/11 04:38:57 easysw Exp $" // // Color chooser for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -521,5 +521,5 @@ int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b) { } // -// End of "$Id: Fl_Color_Chooser.cxx,v 1.7.2.4.2.6 2003/01/30 21:41:36 easysw Exp $". +// End of "$Id: Fl_Color_Chooser.cxx,v 1.7.2.4.2.7 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Counter.cxx b/src/Fl_Counter.cxx index 5a0522d..6157efe 100644 --- a/src/Fl_Counter.cxx +++ b/src/Fl_Counter.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.13 2003/01/30 21:41:38 easysw Exp $" +// "$Id: Fl_Counter.cxx,v 1.8.2.3.2.14 2004/04/11 04:38:57 easysw Exp $" // // Counter widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -188,5 +188,5 @@ Fl_Counter::Fl_Counter(int X, int Y, int W, int H, const char* l) } // -// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.13 2003/01/30 21:41:38 easysw Exp $". +// End of "$Id: Fl_Counter.cxx,v 1.8.2.3.2.14 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Dial.cxx b/src/Fl_Dial.cxx index 24a8cb9..6631cd3 100644 --- a/src/Fl_Dial.cxx +++ b/src/Fl_Dial.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Dial.cxx,v 1.12.2.3.2.6 2003/07/18 05:53:21 matthiaswm Exp $" +// "$Id: Fl_Dial.cxx,v 1.12.2.3.2.7 2004/04/11 04:38:57 easysw Exp $" // // Circular dial widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -134,5 +134,5 @@ Fl_Dial::Fl_Dial(int X, int Y, int W, int H, const char* l) } // -// End of "$Id: Fl_Dial.cxx,v 1.12.2.3.2.6 2003/07/18 05:53:21 matthiaswm Exp $". +// End of "$Id: Fl_Dial.cxx,v 1.12.2.3.2.7 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index e487001..29143c8 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.8 2003/05/20 19:09:32 easysw Exp $" +// "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.9 2004/04/11 04:38:57 easysw Exp $" // // Double-buffered window code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -299,5 +299,5 @@ Fl_Double_Window::~Fl_Double_Window() { } // -// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.8 2003/05/20 19:09:32 easysw Exp $". +// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.9 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_File_Browser.cxx b/src/Fl_File_Browser.cxx index 6052fa9..7fec671 100644 --- a/src/Fl_File_Browser.cxx +++ b/src/Fl_File_Browser.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_File_Browser.cxx,v 1.1.2.26 2003/05/04 21:45:45 easysw Exp $" +// "$Id: Fl_File_Browser.cxx,v 1.1.2.28 2004/04/11 04:38:57 easysw Exp $" // // Fl_File_Browser routines. // -// Copyright 1999-2003 by Michael Sweet. +// Copyright 1999-2004 by Michael Sweet. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -421,8 +421,12 @@ Fl_File_Browser::load(const char *directory,// I - Directory to load // printf("Fl_File_Browser::load(\"%s\")\n", directory); clear(); + directory_ = directory; + if (!directory) + return (0); + if (directory_[0] == '\0') { // @@ -639,5 +643,5 @@ Fl_File_Browser::filter(const char *pattern) // I - Pattern string // -// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.26 2003/05/04 21:45:45 easysw Exp $". +// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.28 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx index d79da30..f769c6b 100644 --- a/src/Fl_File_Chooser.cxx +++ b/src/Fl_File_Chooser.cxx @@ -1,4 +1,4 @@ -// generated by Fast Light User Interface Designer (fluid) version 1.0104 +// generated by Fast Light User Interface Designer (fluid) version 1.0105 #include "../FL/Fl_File_Chooser.H" @@ -149,10 +149,10 @@ Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char favoritesButton->label(favorites_label); } { Fl_Button* o = newButton = new Fl_Button(455, 10, 25, 25); - o->tooltip("Create a new directory."); o->image(image_new); o->labelsize(8); o->callback((Fl_Callback*)cb_newButton); + o->tooltip(new_directory_tooltip); } o->end(); } diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl index 9443720..7c37445 100644 --- a/src/Fl_File_Chooser.fl +++ b/src/Fl_File_Chooser.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0104 +version 1.0105 header_name {../FL/Fl_File_Chooser.H} code_name {.cxx} class FL_EXPORT Fl_File_Chooser {open @@ -53,8 +53,9 @@ window->hide();} open } {} Fl_Button newButton { callback {newdir();} - tooltip {Create a new directory.} image {new.xbm} xywh {455 10 25 25} labelsize 8 + image {new.xbm} xywh {455 10 25 25} labelsize 8 code0 {\#include <FL/Fl_Preferences.H>} + code1 {o->tooltip(new_directory_tooltip);} } } Fl_Tile {} { @@ -324,6 +325,8 @@ else } decl {static const char *new_directory_label;} {public } + decl {static const char *new_directory_tooltip;} {public + } decl {static const char *preview_label;} {public } decl {static const char *show_label;} {public diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index ce1c5d2..6bbbe68 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.32 2003/09/03 19:38:01 easysw Exp $" +// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.36 2004/04/11 04:38:57 easysw Exp $" // // More Fl_File_Chooser routines. // -// Copyright 1999-2003 by Michael Sweet. +// Copyright 1999-2004 by Michael Sweet. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -89,6 +89,7 @@ const char *Fl_File_Chooser::filesystems_label = "File Systems"; #endif // WIN32 const char *Fl_File_Chooser::manage_favorites_label = "Manage Favorites"; const char *Fl_File_Chooser::new_directory_label = "New Directory?"; +const char *Fl_File_Chooser::new_directory_tooltip = "Create a new directory."; const char *Fl_File_Chooser::preview_label = "Preview"; const char *Fl_File_Chooser::show_label = "Show:"; Fl_File_Sort_F *Fl_File_Chooser::sort = fl_numericsort; @@ -474,7 +475,7 @@ Fl_File_Chooser::fileNameCB() #if (defined(WIN32) && !defined(__CYGWIN__)) || defined(__EMX__) if (directory_[0] != '\0' && filename[0] != '/' && filename[0] != '\\' && - !(isalpha(filename[0]) && filename[1] == ':')) { + !(isalpha(filename[0]) && (!filename[1] || filename[1] == ':'))) { #else if (directory_[0] != '\0' && filename[0] != '/') { #endif /* WIN32 || __EMX__ */ @@ -488,7 +489,7 @@ Fl_File_Chooser::fileNameCB() filename = pathname; // Now process things according to the key pressed... - if (Fl::event_key() == FL_Enter) + if (Fl::event_key() == FL_Enter || Fl::event_key() == FL_KP_Enter) { // Enter pressed - select or change directory... #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__) @@ -1163,5 +1164,5 @@ unquote_pathname(char *dst, // O - Destination string // -// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.32 2003/09/03 19:38:01 easysw Exp $". +// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.36 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_File_Icon.cxx b/src/Fl_File_Icon.cxx index a07eb7e..540b916 100644 --- a/src/Fl_File_Icon.cxx +++ b/src/Fl_File_Icon.cxx @@ -1,11 +1,11 @@ // -// "$Id: Fl_File_Icon.cxx,v 1.1.2.15 2003/01/30 21:41:43 easysw Exp $" +// "$Id: Fl_File_Icon.cxx,v 1.1.2.16 2004/04/11 04:38:57 easysw Exp $" // // Fl_File_Icon routines. // // KDE icon code donated by Maarten De Boer. // -// Copyright 1999-2003 by Michael Sweet. +// Copyright 1999-2004 by Michael Sweet. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -477,5 +477,5 @@ Fl_File_Icon::labeltype(const Fl_Label *o, // I - Label data // -// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.15 2003/01/30 21:41:43 easysw Exp $". +// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.16 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx index f124a7e..c4bdd7b 100644 --- a/src/Fl_File_Icon2.cxx +++ b/src/Fl_File_Icon2.cxx @@ -1,11 +1,11 @@ // -// "$Id: Fl_File_Icon2.cxx,v 1.1.2.19 2003/01/30 21:41:43 easysw Exp $" +// "$Id: Fl_File_Icon2.cxx,v 1.1.2.20 2004/02/29 12:47:36 easysw Exp $" // // Fl_File_Icon system icon routines. // // KDE icon code donated by Maarten De Boer. // -// Copyright 1999-2003 by Michael Sweet. +// Copyright 1999-2004 by Michael Sweet. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -74,8 +74,8 @@ // Local functions... // -static void load_kde_icons(const char *directory); -static void load_kde_mimelnk(const char *filename); +static void load_kde_icons(const char *directory, const char *icondir); +static void load_kde_mimelnk(const char *filename, const char *icondir); static char *kde_to_fltk_pattern(const char *kdepattern); static char *get_kde_val(char *str, const char *key); @@ -582,9 +582,19 @@ Fl_File_Icon::load_image(const char *ifile) // I - File to read from void Fl_File_Icon::load_system_icons(void) { + int i; // Looping var Fl_File_Icon *icon; // New icons char filename[1024]; // Filename + char icondir[1024]; // Icon directory static int init = 0; // Have the icons been initialized? + const char * const icondirs[] = + { // Icon directories to look for, in order + "Bluecurve", + "crystalsvg", + "default.kde", + "hicolor", + NULL + }; static short plain[] = // Plain file icon { COLOR, -1, -1, OUTLINEPOLYGON, 0, FL_GRAY, @@ -678,25 +688,35 @@ Fl_File_Icon::load_system_icons(void) // Load KDE icons... icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN); - snprintf(filename, sizeof(filename), - "%s/share/icons/hicolor/16x16/mimetypes/unknown.png", kdedir); + for (i = 0; icondirs[i]; i ++) + { + snprintf(icondir, sizeof(icondir), "%s/share/icons/%s", kdedir, + icondirs[i]); + + if (!access(icondir, F_OK)) + break; + } - if (access(filename, F_OK)) + if (icondirs[i]) + snprintf(filename, sizeof(filename), "%s/16x16/mimetypes/unknown.png", + icondir); + else snprintf(filename, sizeof(filename), "%s/share/icons/unknown.xpm", kdedir); - icon->load_image(filename); + if (!access(filename, F_OK)) + icon->load_image(filename); icon = new Fl_File_Icon("*", Fl_File_Icon::LINK); - snprintf(filename, sizeof(filename), - "%s/share/icons/hicolor/16x16/filesystems/link.png", kdedir); + snprintf(filename, sizeof(filename), "%s/16x16/filesystems/link.png", + icondir); if (!access(filename, F_OK)) icon->load_image(filename); snprintf(filename, sizeof(filename), "%s/share/mimelnk", kdedir); - load_kde_icons(filename); + load_kde_icons(filename, icondir); } else if (!access("/usr/share/icons/folder.xpm", F_OK)) { @@ -790,7 +810,8 @@ Fl_File_Icon::load_system_icons(void) // static void -load_kde_icons(const char *directory) // I - Directory to load +load_kde_icons(const char *directory, // I - Directory to load + const char *icondir) // I - Location of icons { int i; // Looping var int n; // Number of entries in directory @@ -808,9 +829,9 @@ load_kde_icons(const char *directory) // I - Directory to load snprintf(full, sizeof(full), "%s/%s", directory, entries[i]->d_name); if (fl_filename_isdir(full)) - load_kde_icons(full); + load_kde_icons(full, icondir); else - load_kde_mimelnk(full); + load_kde_mimelnk(full, icondir); } free((void *)entries[i]); @@ -825,7 +846,8 @@ load_kde_icons(const char *directory) // I - Directory to load // static void -load_kde_mimelnk(const char *filename) +load_kde_mimelnk(const char *filename, // I - mimelnk filename + const char *icondir) // I - Location of icons { FILE *fp; char tmp[1024]; @@ -857,11 +879,9 @@ load_kde_mimelnk(const char *filename) if (iconfilename[0] && (pattern[0] || strncmp(mimetype, "inode/", 6) == 0)) { - snprintf(tmp, sizeof(tmp), "%s/share/icons/hicolor", kdedir); - - if (!access(tmp, F_OK)) + if (!access(icondir, F_OK)) { - // KDE 2.x icons + // KDE 3.x and 2.x icons int i; // Looping var static const char *paths[] = { // Subdirs to look in... "16x16/actions", @@ -870,22 +890,58 @@ load_kde_mimelnk(const char *filename) "16x16/filesystems", "16x16/mimetypes", + "20x20/actions", + "20x20/apps", + "20x20/devices", + "20x20/filesystems", + "20x20/mimetypes", + "22x22/actions", "22x22/apps", "22x22/devices", "22x22/filesystems", "22x22/mimetypes", + "24x24/actions", + "24x24/apps", + "24x24/devices", + "24x24/filesystems", + "24x24/mimetypes", + "32x32/actions", "32x32/apps", "32x32/devices", "32x32/filesystems", - "32x32/mimetypes" + "32x32/mimetypes", + + "36x36/actions", + "36x36/apps", + "36x36/devices", + "36x36/filesystems", + "36x36/mimetypes", + + "48x48/actions", + "48x48/apps", + "48x48/devices", + "48x48/filesystems", + "48x48/mimetypes", + + "64x64/actions", + "64x64/apps", + "64x64/devices", + "64x64/filesystems", + "64x64/mimetypes", + + "96x96/actions", + "96x96/apps", + "96x96/devices", + "96x96/filesystems", + "96x96/mimetypes" }; for (i = 0; i < (int)(sizeof(paths) / sizeof(paths[0])); i ++) { snprintf(full_iconfilename, sizeof(full_iconfilename), - "%s/%s/%s.png", tmp, paths[i], iconfilename); + "%s/%s/%s.png", icondir, paths[i], iconfilename); if (!access(full_iconfilename, F_OK)) break; } @@ -971,5 +1027,5 @@ get_kde_val(char *str, // -// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.19 2003/01/30 21:41:43 easysw Exp $". +// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.20 2004/02/29 12:47:36 easysw Exp $". // diff --git a/src/Fl_File_Input.cxx b/src/Fl_File_Input.cxx index cd10e95..e4dbe43 100644 --- a/src/Fl_File_Input.cxx +++ b/src/Fl_File_Input.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_File_Input.cxx,v 1.1.2.10 2003/01/30 21:41:45 easysw Exp $" +// "$Id: Fl_File_Input.cxx,v 1.1.2.11 2004/04/11 04:38:57 easysw Exp $" // // File_Input header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // Original version Copyright 1998 by Curtis Edwards. // // This library is free software; you can redistribute it and/or @@ -270,5 +270,5 @@ Fl_File_Input::handle_button(int event) // I - Event // -// End of "$Id: Fl_File_Input.cxx,v 1.1.2.10 2003/01/30 21:41:45 easysw Exp $". +// End of "$Id: Fl_File_Input.cxx,v 1.1.2.11 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Font.H b/src/Fl_Font.H index 5a4f7b3..f221be3 100644 --- a/src/Fl_Font.H +++ b/src/Fl_Font.H @@ -1,9 +1,9 @@ // -// "$Id: Fl_Font.H,v 1.6.2.3.2.4 2003/01/30 21:41:46 easysw Exp $" +// "$Id: Fl_Font.H,v 1.6.2.3.2.5 2004/04/11 04:38:57 easysw Exp $" // // Font definitions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -94,5 +94,5 @@ FL_EXPORT char *fl_find_fontsize(char *name); #endif // -// End of "$Id: Fl_Font.H,v 1.6.2.3.2.4 2003/01/30 21:41:46 easysw Exp $". +// End of "$Id: Fl_Font.H,v 1.6.2.3.2.5 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_GIF_Image.cxx b/src/Fl_GIF_Image.cxx index 3c64b63..b1e44ff 100644 --- a/src/Fl_GIF_Image.cxx +++ b/src/Fl_GIF_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_GIF_Image.cxx,v 1.1.2.15 2003/01/30 21:41:46 easysw Exp $" +// "$Id: Fl_GIF_Image.cxx,v 1.1.2.16 2004/04/11 04:38:57 easysw Exp $" // // Fl_GIF_Image routines. // -// Copyright 1997-2003 by Bill Spitzak and others. +// Copyright 1997-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -373,5 +373,5 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { // -// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.15 2003/01/30 21:41:46 easysw Exp $". +// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.16 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index 2719f2e..9b55f82 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.15 2003/07/23 14:38:00 easysw Exp $" +// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.17 2004/04/11 04:38:57 easysw Exp $" // // OpenGL visual selection code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -181,8 +181,8 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int m, const int *alistp) { // offering overlay is better: if (!(chosen_pfd.bReserved & 15) && (pfd.bReserved & 15)) {} // otherwise more bit planes is better: - else if (chosen_pfd.cColorBits < pfd.cColorBits) {} - else continue; + else if (chosen_pfd.cColorBits > pfd.cColorBits) continue; + else if (chosen_pfd.cDepthBits > pfd.cDepthBits) continue; } pixelformat = i; chosen_pfd = pfd; @@ -347,5 +347,5 @@ void fl_delete_gl_context(GLContext context) { // -// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.15 2003/07/23 14:38:00 easysw Exp $". +// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.17 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx index 5b9f182..d649514 100644 --- a/src/Fl_Gl_Overlay.cxx +++ b/src/Fl_Gl_Overlay.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.18.2.3 2003/01/30 21:41:48 easysw Exp $" +// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.18.2.4 2004/04/11 04:38:57 easysw Exp $" // // OpenGL overlay code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -231,5 +231,5 @@ void Fl_Gl_Window::hide_overlay() { #endif // -// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.18.2.3 2003/01/30 21:41:48 easysw Exp $". +// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.18.2.4 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 757113f..adaf822 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.19 2003/03/31 18:23:53 easysw Exp $" +// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.20 2004/04/11 04:38:57 easysw Exp $" // // OpenGL window code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -409,5 +409,5 @@ void Fl_Gl_Window::draw_overlay() {} #endif // -// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.19 2003/03/31 18:23:53 easysw Exp $". +// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.20 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx index c89ef03..75178ce 100644 --- a/src/Fl_Group.cxx +++ b/src/Fl_Group.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Group.cxx,v 1.8.2.8.2.21 2003/01/30 21:41:51 easysw Exp $" +// "$Id: Fl_Group.cxx,v 1.8.2.8.2.24 2004/04/11 04:38:57 easysw Exp $" // // Group widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -106,13 +106,6 @@ static int navkey() { return FL_Up; case FL_Down: return FL_Down; - default: - switch (Fl::event_text()[0]) { - case ctrl('N') : return FL_Down; - case ctrl('P') : return FL_Up; - case ctrl('F') : return FL_Right; - case ctrl('B') : return FL_Left; - } } return 0; } @@ -158,7 +151,7 @@ int Fl_Group::handle(int event) { if (o->takesevents() && !Fl::event_inside(o) && send(o,FL_SHORTCUT)) return 1; } - if (Fl::event_key() == FL_Enter) return navigation(FL_Down); + if ((Fl::event_key() == FL_Enter || Fl::event_key() == FL_KP_Enter)) return navigation(FL_Down); return 0; case FL_ENTER: @@ -593,5 +586,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& widget) const { } // -// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.21 2003/01/30 21:41:51 easysw Exp $". +// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.24 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Help_Dialog.cxx b/src/Fl_Help_Dialog.cxx index eab956c..aadee54 100644 --- a/src/Fl_Help_Dialog.cxx +++ b/src/Fl_Help_Dialog.cxx @@ -1,4 +1,4 @@ -// generated by Fast Light User Interface Designer (fluid) version 1.0104 +// generated by Fast Light User Interface Designer (fluid) version 1.0105 #include "../FL/Fl_Help_Dialog.H" #include "flstring.h" @@ -55,10 +55,12 @@ if (index_ == 0) forward_->activate(); +int l = line_[index_]; + if (strcmp(view_->filename(), file_[index_]) != 0) view_->load(file_[index_]); -view_->topline(line_[index_]); +view_->topline(l); } void Fl_Help_Dialog::cb_back_(Fl_Button* o, void* v) { ((Fl_Help_Dialog*)(o->parent()->user_data()))->cb_back__i(o,v); @@ -73,10 +75,12 @@ if (index_ >= max_) back_->activate(); +int l = view_->topline(); + if (strcmp(view_->filename(), file_[index_]) != 0) view_->load(file_[index_]); -view_->topline(line_[index_]); +view_->topline(l); } void Fl_Help_Dialog::cb_forward_(Fl_Button* o, void* v) { ((Fl_Help_Dialog*)(o->parent()->user_data()))->cb_forward__i(o,v); @@ -120,12 +124,12 @@ Fl_Help_Dialog::Fl_Help_Dialog() { o->user_data((void*)(this)); { Fl_Help_View* o = view_ = new Fl_Help_View(10, 10, 510, 330); o->box(FL_DOWN_BOX); - o->color(49); - o->selection_color(15); + o->color(FL_BACKGROUND_COLOR); + o->selection_color(FL_SELECTION_COLOR); o->labeltype(FL_NORMAL_LABEL); o->labelfont(0); o->labelsize(14); - o->labelcolor(56); + o->labelcolor(FL_BLACK); o->callback((Fl_Callback*)cb_view_); o->align(FL_ALIGN_TOP); o->when(FL_WHEN_RELEASE); @@ -139,13 +143,13 @@ Fl_Help_Dialog::Fl_Help_Dialog() { { Fl_Button* o = back_ = new Fl_Button(355, 350, 25, 25, "@<-"); o->tooltip("Show the previous help page."); o->shortcut(0xff51); - o->labelcolor(2); + o->labelcolor((Fl_Color)2); o->callback((Fl_Callback*)cb_back_); } { Fl_Button* o = forward_ = new Fl_Button(390, 350, 25, 25, "@->"); o->tooltip("Show the next help page."); o->shortcut(0xff53); - o->labelcolor(2); + o->labelcolor((Fl_Color)2); o->callback((Fl_Callback*)cb_forward_); } { Fl_Button* o = smaller_ = new Fl_Button(285, 350, 25, 25, "F"); diff --git a/src/Fl_Help_Dialog.fl b/src/Fl_Help_Dialog.fl index dff63a7..7647aaa 100644 --- a/src/Fl_Help_Dialog.fl +++ b/src/Fl_Help_Dialog.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0104 +version 1.0105 header_name {../FL/Fl_Help_Dialog.H} code_name {.cxx} decl {\#include "flstring.h"} {} @@ -17,7 +17,7 @@ class FL_EXPORT Fl_Help_Dialog {open } { Fl_Window window_ { label {Help Dialog} open - private xywh {398 65 530 385} type Double resizable visible + private xywh {398 65 530 385} type Double hide resizable } { Fl_Group view_ { callback {if (view_->changed()) @@ -48,7 +48,7 @@ else if (view_->filename()) { strlcpy(file_[index_], view_->filename(), sizeof(file_[0])); line_[index_] = view_->topline(); -}} open +}} open selected private xywh {10 10 510 330} box DOWN_BOX selection_color 15 resizable code0 {\#include <FL/Fl_Help_View.H>} class Fl_Help_View @@ -69,10 +69,12 @@ if (index_ == 0) forward_->activate(); +int l = line_[index_]; + if (strcmp(view_->filename(), file_[index_]) != 0) view_->load(file_[index_]); -view_->topline(line_[index_]);} +view_->topline(l);} private tooltip {Show the previous help page.} xywh {355 350 25 25} shortcut 0xff51 labelcolor 2 } Fl_Button forward_ { @@ -85,10 +87,12 @@ if (index_ >= max_) back_->activate(); +int l = view_->topline(); + if (strcmp(view_->filename(), file_[index_]) != 0) view_->load(file_[index_]); -view_->topline(line_[index_]);} +view_->topline(l);} private tooltip {Show the next help page.} xywh {390 350 25 25} shortcut 0xff53 labelcolor 2 } Fl_Button smaller_ { @@ -112,7 +116,7 @@ smaller_->activate();} private tooltip {Make the help text larger.} xywh {320 350 25 25} labelfont 1 labelsize 16 } Fl_Input find_ { - callback {find_pos_ = view_->find(find_->value(), find_pos_);} selected + callback {find_pos_ = view_->find(find_->value(), find_pos_);} private xywh {10 350 265 25} when 10 } } diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index 75136eb..d1d1052 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Help_View.cxx,v 1.1.2.48 2003/06/12 01:36:17 easysw Exp $" +// "$Id: Fl_Help_View.cxx,v 1.1.2.49 2004/04/11 04:38:57 easysw Exp $" // // Fl_Help_View widget routines. // -// Copyright 1997-2003 by Easy Software Products. +// Copyright 1997-2004 by Easy Software Products. // Image support donated by Matthias Melcher, Copyright 2000. // // This library is free software; you can redistribute it and/or @@ -2795,5 +2795,5 @@ hscrollbar_callback(Fl_Widget *s, void *) // -// End of "$Id: Fl_Help_View.cxx,v 1.1.2.48 2003/06/12 01:36:17 easysw Exp $". +// End of "$Id: Fl_Help_View.cxx,v 1.1.2.49 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 54b5372..b1f39e9 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Image.cxx,v 1.5.2.3.2.31 2003/08/04 19:20:50 easysw Exp $" +// "$Id: Fl_Image.cxx,v 1.5.2.3.2.32 2004/04/11 04:38:57 easysw Exp $" // // Image drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -397,5 +397,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) { // -// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.31 2003/08/04 19:20:50 easysw Exp $". +// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.32 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index 2200ed2..690ff38 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Input.cxx,v 1.10.2.15.2.18 2003/06/05 21:14:18 easysw Exp $" +// "$Id: Fl_Input.cxx,v 1.10.2.15.2.19 2004/04/11 04:38:57 easysw Exp $" // // Input widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -414,5 +414,5 @@ Fl_Input::Fl_Input(int X, int Y, int W, int H, const char *l) } // -// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.18 2003/06/05 21:14:18 easysw Exp $". +// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.19 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 6fd9716..03e3045 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.27 2003/01/30 21:42:00 easysw Exp $" +// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.29 2004/04/11 04:38:57 easysw Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -656,11 +656,11 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { switch (event) { case FL_ENTER: - if (active_r()) window()->cursor(FL_CURSOR_INSERT); + if (active_r() && window()) window()->cursor(FL_CURSOR_INSERT); return 1; case FL_LEAVE: - if (active_r()) window()->cursor(FL_CURSOR_DEFAULT); + if (active_r() && window()) window()->cursor(FL_CURSOR_DEFAULT); return 1; case FL_FOCUS: @@ -852,5 +852,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.27 2003/01/30 21:42:00 easysw Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.29 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx index 2898288..c8fa0a9 100644 --- a/src/Fl_JPEG_Image.cxx +++ b/src/Fl_JPEG_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_JPEG_Image.cxx,v 1.1.2.7 2003/01/30 21:42:02 easysw Exp $" +// "$Id: Fl_JPEG_Image.cxx,v 1.1.2.10 2004/04/11 04:38:57 easysw Exp $" // // Fl_JPEG_Image routines. // -// Copyright 1997-2003 by Easy Software Products. +// Copyright 1997-2004 by Easy Software Products. // Image support donated by Matthias Melcher, Copyright 2000. // // This library is free software; you can redistribute it and/or @@ -56,6 +56,19 @@ extern "C" // +// Error handler for JPEG files... +// + +#ifdef HAVE_LIBJPEG +static void +jpeg_error_handler(j_common_ptr) +{ + return; +} +#endif // HAVE_LIBJPEG + + +// // 'Fl_JPEG_Image::Fl_JPEG_Image()' - Load a JPEG image file. // @@ -71,6 +84,8 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *jpeg) // I - File to load if ((fp = fopen(jpeg, "rb")) == NULL) return; cinfo.err = jpeg_std_error(&jerr); + jerr.error_exit = jpeg_error_handler; + jpeg_create_decompress(&cinfo); jpeg_stdio_src(&cinfo, fp); jpeg_read_header(&cinfo, 1); @@ -107,5 +122,5 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *jpeg) // I - File to load } // -// End of "$Id: Fl_JPEG_Image.cxx,v 1.1.2.7 2003/01/30 21:42:02 easysw Exp $". +// End of "$Id: Fl_JPEG_Image.cxx,v 1.1.2.10 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Light_Button.cxx b/src/Fl_Light_Button.cxx index 31ef863..2a89346 100644 --- a/src/Fl_Light_Button.cxx +++ b/src/Fl_Light_Button.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.22 2003/01/30 21:42:02 easysw Exp $" +// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.23 2004/04/11 04:38:57 easysw Exp $" // // Lighted button widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -146,5 +146,5 @@ Fl_Light_Button::Fl_Light_Button(int X, int Y, int W, int H, const char* l) } // -// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.22 2003/01/30 21:42:02 easysw Exp $". +// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.23 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index e28a940..a39db67 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.27 2003/07/18 22:36:00 matthiaswm Exp $" +// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.30 2004/04/11 04:38:57 easysw Exp $" // // Menu code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -341,14 +341,9 @@ void menuwindow::drawentry(const Fl_Menu_Item* m, int n, int eraseit) { int hh = itemheight - LEADING; if (eraseit && n != selected) { - if (Fl::scheme()) { - fl_push_clip(xx+1, yy-(LEADING-2)/2, ww-2, hh+(LEADING-2)); - draw_box(box(), 0, 0, w(), h(), color()); - fl_pop_clip(); - } else { - fl_color(button ? button->color() : FL_GRAY); - fl_rectf(xx+1, yy-(LEADING-2)/2, ww-2, hh+(LEADING-2)); - } + fl_push_clip(xx+1, yy-(LEADING-2)/2, ww-2, hh+(LEADING-2)); + draw_box(box(), 0, 0, w(), h(), button ? button->color() : color()); + fl_pop_clip(); } m->draw(xx, yy, ww, hh, button, n==selected); @@ -535,6 +530,7 @@ int menuwindow::handle(int e) { setitem(pp.menu_number-1, pp.p[pp.menu_number-1]->selected); return 1; case FL_Enter: + case FL_KP_Enter: case ' ': pp.state = DONE_STATE; return 1; @@ -793,5 +789,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const { } // -// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.27 2003/07/18 22:36:00 matthiaswm Exp $". +// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.30 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Menu_.cxx b/src/Fl_Menu_.cxx index 6b95675..e84b0b5 100644 --- a/src/Fl_Menu_.cxx +++ b/src/Fl_Menu_.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.6 2003/01/30 21:42:11 easysw Exp $" +// "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.9 2004/04/11 04:38:57 easysw Exp $" // // Common menu code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -36,6 +36,81 @@ #include <stdio.h> #include <stdlib.h> +// Set 'pathname' of specified menuitem +// If finditem==NULL, mvalue() is used (the most recently picked menuitem) +// Returns: +// 0 : OK +// -1 : item not found (name="") +// -2 : 'name' not large enough (name="") +// +#define SAFE_STRCAT(s) \ + { len += strlen(s); if ( len >= namelen ) { *name='\0'; return(-2); } else strcat(name,(s)); } +int Fl_Menu_::item_pathname(char *name, int namelen, const Fl_Menu_Item *finditem) const { + int len = 0; + finditem = finditem ? finditem : mvalue(); + name[0] = '\0'; + for ( int t=0; t<size(); t++ ) { + const Fl_Menu_Item *m = &(menu()[t]); + if ( m->submenu() ) { // submenu? descend + if ( *name ) SAFE_STRCAT("/"); + SAFE_STRCAT(m->label()); + } else { + if ( m->label() ) { // menu item? + if ( m == finditem ) { // found? tack on itemname, done. + SAFE_STRCAT("/"); + SAFE_STRCAT(m->label()); + return(0); + } + } else { // end of submenu? pop + char *ss = strrchr(name, '/'); + if ( ss ) { *ss = 0; len = strlen(name); } // "File/Edit" -> "File" + else { name[0] = '\0'; len = 0; } // "File" -> "" + continue; + } + } + } + *name = '\0'; + return(-1); // item not found +} + +// FIND MENU ITEM INDEX, GIVEN MENU PATHNAME +// eg. "Edit/Copy" +// Will also return submenus, eg. "Edit" +// Returns NULL if not found. +// +const Fl_Menu_Item * +Fl_Menu_::find_item(const char *name) +{ + char menupath[1024] = ""; // File/Export + + for ( int t=0; t < size(); t++ ) { + Fl_Menu_Item *m = menu_ + t; + + if (m->submenu()) { + // IT'S A SUBMENU + if (menupath[0]) strlcat(menupath, "/", sizeof(menupath)); + strlcat(menupath, m->label(), sizeof(menupath)); + if (!strcmp(menupath, name)) return m; + } else { + if (!m->label()) { + // END OF SUBMENU? Pop back one level. + char *ss = strrchr(menupath, '/'); + if ( ss ) *ss = 0; + continue; + } + + // IT'S A MENU ITEM + char itempath[1024]; // eg. Edit/Copy + strcpy(itempath, menupath); + if (itempath[0]) strlcat(itempath, "/", sizeof(itempath)); + strlcat(itempath, m->label(), sizeof(itempath)); + if (!strcmp(itempath, name)) return m; + } + } + + return (const Fl_Menu_Item *)0; +} + int Fl_Menu_::value(const Fl_Menu_Item* m) { clear_changed(); if (value_ != m) {value_ = m; return 1;} @@ -150,5 +225,5 @@ void Fl_Menu_::clear() { } // -// End of "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.6 2003/01/30 21:42:11 easysw Exp $". +// End of "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.9 2004/04/11 04:38:57 easysw Exp $". // diff --git a/src/Fl_Menu_Bar.cxx b/src/Fl_Menu_Bar.cxx index 19d7013..7161dca 100644 --- a/src/Fl_Menu_Bar.cxx +++ b/src/Fl_Menu_Bar.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.6.2.3 2003/01/30 21:42:18 easysw Exp $" +// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.6.2.4 2004/04/11 04:38:58 easysw Exp $" // // Menu bar widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -72,5 +72,5 @@ int Fl_Menu_Bar::handle(int event) { } // -// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.6.2.3 2003/01/30 21:42:18 easysw Exp $". +// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.6.2.4 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Menu_Button.cxx b/src/Fl_Menu_Button.cxx index 659d44c..46608e0 100644 --- a/src/Fl_Menu_Button.cxx +++ b/src/Fl_Menu_Button.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.7 2003/01/30 21:42:20 easysw Exp $" +// "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.8 2004/04/11 04:38:58 easysw Exp $" // // Menu button widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -95,5 +95,5 @@ Fl_Menu_Button::Fl_Menu_Button(int X,int Y,int W,int H,const char *l) } // -// End of "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.7 2003/01/30 21:42:20 easysw Exp $". +// End of "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.8 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Menu_Window.cxx b/src/Fl_Menu_Window.cxx index 06fe4ee..55c09be 100644 --- a/src/Fl_Menu_Window.cxx +++ b/src/Fl_Menu_Window.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Menu_Window.cxx,v 1.8.2.5.2.2 2003/01/30 21:42:21 easysw Exp $" +// "$Id: Fl_Menu_Window.cxx,v 1.8.2.5.2.3 2004/04/11 04:38:58 easysw Exp $" // // Menu window code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -97,5 +97,5 @@ Fl_Menu_Window::~Fl_Menu_Window() { } // -// End of "$Id: Fl_Menu_Window.cxx,v 1.8.2.5.2.2 2003/01/30 21:42:21 easysw Exp $". +// End of "$Id: Fl_Menu_Window.cxx,v 1.8.2.5.2.3 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Menu_add.cxx b/src/Fl_Menu_add.cxx index 665f127..cb238dd 100644 --- a/src/Fl_Menu_add.cxx +++ b/src/Fl_Menu_add.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.7 2003/01/30 21:42:21 easysw Exp $" +// "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.8 2004/04/11 04:38:58 easysw Exp $" // // Menu utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -262,5 +262,5 @@ void Fl_Menu_::remove(int i) { } // -// End of "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.7 2003/01/30 21:42:21 easysw Exp $". +// End of "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.8 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Menu_global.cxx b/src/Fl_Menu_global.cxx index 41f128a..001e2cb 100644 --- a/src/Fl_Menu_global.cxx +++ b/src/Fl_Menu_global.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Menu_global.cxx,v 1.5.2.4.2.2 2003/01/30 21:42:22 easysw Exp $" +// "$Id: Fl_Menu_global.cxx,v 1.5.2.4.2.3 2004/04/11 04:38:58 easysw Exp $" // // Global menu shortcut code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -44,5 +44,5 @@ void Fl_Menu_::global() { } // -// End of "$Id: Fl_Menu_global.cxx,v 1.5.2.4.2.2 2003/01/30 21:42:22 easysw Exp $". +// End of "$Id: Fl_Menu_global.cxx,v 1.5.2.4.2.3 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Multi_Label.cxx b/src/Fl_Multi_Label.cxx index 40f9fa1..755eeda 100644 --- a/src/Fl_Multi_Label.cxx +++ b/src/Fl_Multi_Label.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Multi_Label.cxx,v 1.4.2.3.2.2 2003/01/30 21:42:22 easysw Exp $" +// "$Id: Fl_Multi_Label.cxx,v 1.4.2.3.2.3 2004/04/11 04:38:58 easysw Exp $" // // Multi-label widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -74,5 +74,5 @@ void Fl_Multi_Label::label(Fl_Menu_Item* o) { } // -// End of "$Id: Fl_Multi_Label.cxx,v 1.4.2.3.2.2 2003/01/30 21:42:22 easysw Exp $". +// End of "$Id: Fl_Multi_Label.cxx,v 1.4.2.3.2.3 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Overlay_Window.cxx b/src/Fl_Overlay_Window.cxx index 447ddb2..5e5517b 100644 --- a/src/Fl_Overlay_Window.cxx +++ b/src/Fl_Overlay_Window.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Overlay_Window.cxx,v 1.7.2.6.2.3 2003/01/30 21:42:23 easysw Exp $" +// "$Id: Fl_Overlay_Window.cxx,v 1.7.2.6.2.4 2004/04/11 04:38:58 easysw Exp $" // // Overlay window code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -149,5 +149,5 @@ void Fl_Overlay_Window::redraw_overlay() { #endif // -// End of "$Id: Fl_Overlay_Window.cxx,v 1.7.2.6.2.3 2003/01/30 21:42:23 easysw Exp $". +// End of "$Id: Fl_Overlay_Window.cxx,v 1.7.2.6.2.4 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_PNG_Image.cxx b/src/Fl_PNG_Image.cxx index b5de742..61e4c4f 100644 --- a/src/Fl_PNG_Image.cxx +++ b/src/Fl_PNG_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_PNG_Image.cxx,v 1.1.2.9 2003/01/30 21:42:23 easysw Exp $" +// "$Id: Fl_PNG_Image.cxx,v 1.1.2.11 2004/04/11 04:38:58 easysw Exp $" // // Fl_PNG_Image routines. // -// Copyright 1997-2003 by Easy Software Products. +// Copyright 1997-2004 by Easy Software Products. // Image support donated by Matthias Melcher, Copyright 2000. // // This library is free software; you can redistribute it and/or @@ -32,6 +32,7 @@ // Include necessary header files... // +#include <FL/Fl.H> #include <FL/Fl_PNG_Image.H> #include <config.h> #include <stdio.h> @@ -72,6 +73,12 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); info = png_create_info_struct(pp); + if (setjmp(pp->jmpbuf)) + { + Fl::warning("PNG file \"%s\" contains errors!\n", png); + return; + } + // Initialize the PNG read "engine"... png_init_io(pp, fp); @@ -132,5 +139,5 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read // -// End of "$Id: Fl_PNG_Image.cxx,v 1.1.2.9 2003/01/30 21:42:23 easysw Exp $". +// End of "$Id: Fl_PNG_Image.cxx,v 1.1.2.11 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_PNM_Image.cxx b/src/Fl_PNM_Image.cxx index 798483d..633256f 100644 --- a/src/Fl_PNM_Image.cxx +++ b/src/Fl_PNM_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_PNM_Image.cxx,v 1.1.2.12 2003/01/30 21:42:25 easysw Exp $" +// "$Id: Fl_PNM_Image.cxx,v 1.1.2.13 2004/04/11 04:38:58 easysw Exp $" // // Fl_PNM_Image routines. // -// Copyright 1997-2003 by Easy Software Products. +// Copyright 1997-2004 by Easy Software Products. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -176,5 +176,5 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read // -// End of "$Id: Fl_PNM_Image.cxx,v 1.1.2.12 2003/01/30 21:42:25 easysw Exp $". +// End of "$Id: Fl_PNM_Image.cxx,v 1.1.2.13 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Pack.cxx b/src/Fl_Pack.cxx index dd95532..cfaf198 100644 --- a/src/Fl_Pack.cxx +++ b/src/Fl_Pack.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Pack.cxx,v 1.6.2.4.2.5 2003/05/16 18:43:40 easysw Exp $" +// "$Id: Fl_Pack.cxx,v 1.6.2.4.2.6 2004/04/11 04:38:58 easysw Exp $" // // Packing widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -132,5 +132,5 @@ void Fl_Pack::draw() { } // -// End of "$Id: Fl_Pack.cxx,v 1.6.2.4.2.5 2003/05/16 18:43:40 easysw Exp $". +// End of "$Id: Fl_Pack.cxx,v 1.6.2.4.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index e935337..f07cdd9 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.27 2003/01/30 21:42:27 easysw Exp $" +// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.28 2004/04/11 04:38:58 easysw Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -461,5 +461,5 @@ void Fl_Pixmap::desaturate() { } // -// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.27 2003/01/30 21:42:27 easysw Exp $". +// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.28 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Positioner.cxx b/src/Fl_Positioner.cxx index af35ba7..0540b64 100644 --- a/src/Fl_Positioner.cxx +++ b/src/Fl_Positioner.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.3 2003/01/30 21:42:28 easysw Exp $" +// "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:58 easysw Exp $" // // Positioner widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -129,5 +129,5 @@ void Fl_Positioner::ybounds(double a, double b) { } // -// End of "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.3 2003/01/30 21:42:28 easysw Exp $". +// End of "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index 54cbbb8..bba7c78 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Preferences.cxx,v 1.1.2.25 2003/05/04 21:45:46 easysw Exp $" +// "$Id: Fl_Preferences.cxx,v 1.1.2.27 2004/04/11 04:38:58 easysw Exp $" // // Preferences methods for the Fast Light Tool Kit (FLTK). // -// Copyright 2002-2003 by Matthias Melcher. +// Copyright 2002-2004 by Matthias Melcher. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -671,8 +671,6 @@ Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, Root root, const char "%s/%s.prefs", vendor, application); #endif - makePathForFile(filename); - prefs_ = prefs; filename_ = strdup(filename); vendor_ = strdup(vendor); @@ -689,8 +687,6 @@ Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, const char *path, con snprintf(filename, sizeof(filename), "%s/%s.prefs", path, application); - makePathForFile(filename); - prefs_ = prefs; filename_ = strdup(filename); vendor_ = strdup(vendor); @@ -758,6 +754,7 @@ int Fl_Preferences::RootNode::read() // write the group tree and all entry leafs int Fl_Preferences::RootNode::write() { + makePathForFile(filename_); FILE *f = fopen( filename_, "wb" ); if ( !f ) return 1; fprintf( f, "; FLTK preferences file format 1.0\n" ); @@ -1116,5 +1113,5 @@ char Fl_Preferences::Node::remove() // -// End of "$Id: Fl_Preferences.cxx,v 1.1.2.25 2003/05/04 21:45:46 easysw Exp $". +// End of "$Id: Fl_Preferences.cxx,v 1.1.2.27 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Progress.cxx b/src/Fl_Progress.cxx index 43fa055..0b93061 100644 --- a/src/Fl_Progress.cxx +++ b/src/Fl_Progress.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Progress.cxx,v 1.1.2.7 2003/01/30 21:42:31 easysw Exp $" +// "$Id: Fl_Progress.cxx,v 1.1.2.8 2004/04/11 04:38:58 easysw Exp $" // // Progress bar widget routines. // -// Copyright 2000-2003 by Michael Sweet. +// Copyright 2000-2004 by Michael Sweet. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -105,5 +105,5 @@ Fl_Progress::Fl_Progress(int X, int Y, int W, int H, const char* l) // -// End of "$Id: Fl_Progress.cxx,v 1.1.2.7 2003/01/30 21:42:31 easysw Exp $". +// End of "$Id: Fl_Progress.cxx,v 1.1.2.8 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Repeat_Button.cxx b/src/Fl_Repeat_Button.cxx index 46d8f55..2792490 100644 --- a/src/Fl_Repeat_Button.cxx +++ b/src/Fl_Repeat_Button.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Repeat_Button.cxx,v 1.4.2.4.2.5 2003/01/30 21:42:31 easysw Exp $" +// "$Id: Fl_Repeat_Button.cxx,v 1.4.2.4.2.6 2004/04/11 04:38:58 easysw Exp $" // // Repeat button widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -62,5 +62,5 @@ int Fl_Repeat_Button::handle(int event) { } // -// End of "$Id: Fl_Repeat_Button.cxx,v 1.4.2.4.2.5 2003/01/30 21:42:31 easysw Exp $". +// End of "$Id: Fl_Repeat_Button.cxx,v 1.4.2.4.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Return_Button.cxx b/src/Fl_Return_Button.cxx index b76bfcc..4f37941 100644 --- a/src/Fl_Return_Button.cxx +++ b/src/Fl_Return_Button.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Return_Button.cxx,v 1.5.2.3.2.5 2003/01/30 21:42:33 easysw Exp $" +// "$Id: Fl_Return_Button.cxx,v 1.5.2.3.2.6 2004/04/11 04:38:58 easysw Exp $" // // Return button widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -66,5 +66,5 @@ int Fl_Return_Button::handle(int event) { } // -// End of "$Id: Fl_Return_Button.cxx,v 1.5.2.3.2.5 2003/01/30 21:42:33 easysw Exp $". +// End of "$Id: Fl_Return_Button.cxx,v 1.5.2.3.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Roller.cxx b/src/Fl_Roller.cxx index f932fa1..ce7af7f 100644 --- a/src/Fl_Roller.cxx +++ b/src/Fl_Roller.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Roller.cxx,v 1.6.2.4.2.8 2003/01/30 21:42:34 easysw Exp $" +// "$Id: Fl_Roller.cxx,v 1.6.2.4.2.9 2004/04/11 04:38:58 easysw Exp $" // // Roller widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -171,5 +171,5 @@ Fl_Roller::Fl_Roller(int X,int Y,int W,int H,const char* L) } // -// End of "$Id: Fl_Roller.cxx,v 1.6.2.4.2.8 2003/01/30 21:42:34 easysw Exp $". +// End of "$Id: Fl_Roller.cxx,v 1.6.2.4.2.9 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Round_Button.cxx b/src/Fl_Round_Button.cxx index 860ca87..40a61a8 100644 --- a/src/Fl_Round_Button.cxx +++ b/src/Fl_Round_Button.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Round_Button.cxx,v 1.4.2.3.2.5 2003/01/30 21:42:36 easysw Exp $" +// "$Id: Fl_Round_Button.cxx,v 1.4.2.3.2.6 2004/04/11 04:38:58 easysw Exp $" // // Round button for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -38,5 +38,5 @@ Fl_Round_Button::Fl_Round_Button(int X,int Y,int W,int H, const char *l) } // -// End of "$Id: Fl_Round_Button.cxx,v 1.4.2.3.2.5 2003/01/30 21:42:36 easysw Exp $". +// End of "$Id: Fl_Round_Button.cxx,v 1.4.2.3.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Scroll.cxx b/src/Fl_Scroll.cxx index 7d09eb8..76041ce 100644 --- a/src/Fl_Scroll.cxx +++ b/src/Fl_Scroll.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.5 2003/06/15 04:41:16 easysw Exp $" +// "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.11 2004/04/11 04:38:58 easysw Exp $" // // Scroll widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -24,6 +24,7 @@ // #include <FL/Fl.H> +#include <FL/Fl_Tiled_Image.H> #include <FL/Fl_Scroll.H> #include <FL/fl_draw.H> @@ -31,7 +32,10 @@ void Fl_Scroll::clear() { for (int i=children() - 1; i >= 0; i --) { Fl_Widget* o = child(i); - if (o != &hscrollbar && o != &scrollbar) delete o; + if (o != &hscrollbar && o != &scrollbar) { + remove(o); + delete o; + } } } @@ -49,38 +53,39 @@ void Fl_Scroll::fix_scrollbar_order() { void Fl_Scroll::draw_clip(void* v,int X, int Y, int W, int H) { fl_clip(X,Y,W,H); Fl_Scroll* s = (Fl_Scroll*)v; - // erase background if there is a boxtype: - if (s->box()) { - fl_color(s->color()); - fl_rectf(X,Y,W,H); + // erase background as needed... + switch (s->box()) { + case FL_NO_BOX : + case FL_UP_FRAME : + case FL_DOWN_FRAME : + case FL_THIN_UP_FRAME : + case FL_THIN_DOWN_FRAME : + case FL_ENGRAVED_FRAME : + case FL_EMBOSSED_FRAME : + case FL_BORDER_FRAME : + case _FL_SHADOW_FRAME : + case _FL_ROUNDED_FRAME : + case _FL_OVAL_FRAME : + case _FL_PLASTIC_UP_FRAME : + case _FL_PLASTIC_DOWN_FRAME : + if (s->parent() == (Fl_Group *)s->window() && Fl::scheme_bg_) { + Fl::scheme_bg_->draw(X-(X%((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->w()), + Y-(Y%((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->h()), + W+((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->w(), + H+((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->h()); + break; + } + + default : + fl_color(s->color()); + fl_rectf(X,Y,W,H); + break; } Fl_Widget*const* a = s->array(); - int R = X; int B = Y; // track bottom & right edge of all children for (int i=s->children()-2; i--;) { Fl_Widget& o = **a++; - int NR, NB; s->draw_child(o); s->draw_outside_label(o); - NR = o.x()+o.w(); - NB = o.y()+o.h(); - if ((o.align() & (FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT)) && - !(o.align() & FL_ALIGN_INSIDE)) { - int LW = 0, LH = 0; - o.measure_label(LW, LH); - if (o.align() & FL_ALIGN_BOTTOM) NB += LH; - else NR += LW; - } - if (NR > R) R = NR; - if (NB > B) B = NB; - } - // fill any area to right & bottom of widgets: - if (R < X+W && B > Y) { - fl_color(s->color()); - fl_rectf(R,Y,X+W-R,B-Y); - } - if (B < Y+H) { - fl_color(s->color()); - fl_rectf(X,B,W,Y+H-B); } fl_pop_clip(); } @@ -110,8 +115,27 @@ void Fl_Scroll::draw() { draw_box(box(),x(),y(),w(),h(),color()); draw_clip(this, X, Y, W, H); } else { - if (d & FL_DAMAGE_SCROLL) { // scroll the contents: + if (d & FL_DAMAGE_SCROLL) { + // scroll the contents: fl_scroll(X, Y, W, H, oldx-xposition_, oldy-yposition_, draw_clip, this); + + // Erase the background as needed... + Fl_Widget*const* a = array(); + int L, R, T, B; + L = 999999; + R = 0; + T = 999999; + B = 0; + for (int i=children()-2; i--; a++) { + if ((*a)->x() < L) L = (*a)->x(); + if (((*a)->x() + (*a)->w()) > R) R = (*a)->x() + (*a)->w(); + if ((*a)->y() < T) T = (*a)->y(); + if (((*a)->y() + (*a)->h()) > B) B = (*a)->y() + (*a)->h(); + } + if (L > X) draw_clip(this, X, Y, L - X, H); + if (R < (X + W)) draw_clip(this, R, Y, X + W - R, H); + if (T > Y) draw_clip(this, X, Y, W, T - Y); + if (B < (Y + H)) draw_clip(this, X, B, W, Y + H - B); } if (d & FL_DAMAGE_CHILD) { // draw damaged children fl_clip(X, Y, W, H); @@ -266,5 +290,5 @@ int Fl_Scroll::handle(int event) { } // -// End of "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.5 2003/06/15 04:41:16 easysw Exp $". +// End of "$Id: Fl_Scroll.cxx,v 1.7.2.6.2.11 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Scrollbar.cxx b/src/Fl_Scrollbar.cxx index 23dbb96..238a14a 100644 --- a/src/Fl_Scrollbar.cxx +++ b/src/Fl_Scrollbar.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.15 2003/01/30 21:42:39 easysw Exp $" +// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.16 2004/04/11 04:38:58 easysw Exp $" // // Scroll bar widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -242,5 +242,5 @@ Fl_Scrollbar::Fl_Scrollbar(int X, int Y, int W, int H, const char* L) } // -// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.15 2003/01/30 21:42:39 easysw Exp $". +// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.16 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx index 1f6ba9a..d4faaca 100644 --- a/src/Fl_Shared_Image.cxx +++ b/src/Fl_Shared_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Shared_Image.cxx,v 1.23.2.19 2003/01/30 21:42:41 easysw Exp $" +// "$Id: Fl_Shared_Image.cxx,v 1.23.2.20 2004/04/11 04:38:58 easysw Exp $" // // Shared image code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -466,5 +466,5 @@ Fl_Shared_Image::remove_handler(Fl_Shared_Handler f) { // -// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.19 2003/01/30 21:42:41 easysw Exp $". +// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.20 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Single_Window.cxx b/src/Fl_Single_Window.cxx index 31f8acb..0d67770 100644 --- a/src/Fl_Single_Window.cxx +++ b/src/Fl_Single_Window.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Single_Window.cxx,v 1.4.2.3.2.2 2003/01/30 21:42:43 easysw Exp $" +// "$Id: Fl_Single_Window.cxx,v 1.4.2.3.2.3 2004/04/11 04:38:58 easysw Exp $" // // Single-buffered window for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -35,5 +35,5 @@ void Fl_Single_Window::show() {Fl_Window::show();} void Fl_Single_Window::flush() {Fl_Window::flush();} // -// End of "$Id: Fl_Single_Window.cxx,v 1.4.2.3.2.2 2003/01/30 21:42:43 easysw Exp $". +// End of "$Id: Fl_Single_Window.cxx,v 1.4.2.3.2.3 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Slider.cxx b/src/Fl_Slider.cxx index 921dd5b..cbd61c9 100644 --- a/src/Fl_Slider.cxx +++ b/src/Fl_Slider.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Slider.cxx,v 1.8.2.10.2.13 2003/01/30 21:42:44 easysw Exp $" +// "$Id: Fl_Slider.cxx,v 1.8.2.10.2.15 2004/04/11 04:38:58 easysw Exp $" // // Slider widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -83,13 +83,9 @@ int Fl_Slider::scrollvalue(int p, int W, int t, int l) { // actually it ranges from 0 to 1/(1-size). void Fl_Slider::draw_bg(int X, int Y, int W, int H) { - if (!(damage()&FL_DAMAGE_ALL)) { // not a complete redraw - fl_push_clip(X, Y, W, H); - draw_box(); - fl_pop_clip(); - } else { - draw_box(); - } + fl_push_clip(X, Y, W, H); + draw_box(); + fl_pop_clip(); Fl_Color black = active_r() ? FL_FOREGROUND_COLOR : FL_INACTIVE_COLOR; if (type() == FL_VERT_NICE_SLIDER) { @@ -290,5 +286,5 @@ int Fl_Slider::handle(int event) { } // -// End of "$Id: Fl_Slider.cxx,v 1.8.2.10.2.13 2003/01/30 21:42:44 easysw Exp $". +// End of "$Id: Fl_Slider.cxx,v 1.8.2.10.2.15 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Sys_Menu_Bar.cxx b/src/Fl_Sys_Menu_Bar.cxx index 7ea2eee..5b1bf73 100644 --- a/src/Fl_Sys_Menu_Bar.cxx +++ b/src/Fl_Sys_Menu_Bar.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Sys_Menu_Bar.cxx,v 1.1.2.7 2003/06/12 01:36:18 easysw Exp $" +// "$Id: Fl_Sys_Menu_Bar.cxx,v 1.1.2.9 2004/04/11 04:38:58 easysw Exp $" // // MacOS system menu bar widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -48,6 +48,8 @@ * Changing the menu items has no effect on the menu bar. */ +#if defined(__APPLE__) + #include <FL/X.H> #include <FL/Fl.H> #include <FL/Fl_Sys_Menu_Bar.H> @@ -315,6 +317,8 @@ int Fl_Menu_Bar::handle(int event) { } */ +#endif /* __APPLE__ */ + // -// End of "$Id: Fl_Sys_Menu_Bar.cxx,v 1.1.2.7 2003/06/12 01:36:18 easysw Exp $". +// End of "$Id: Fl_Sys_Menu_Bar.cxx,v 1.1.2.9 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index a8abbc1..bc8a143 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.18 2003/05/16 18:33:03 easysw Exp $" +// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.19 2004/04/11 04:38:58 easysw Exp $" // // Tab widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -302,5 +302,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) : } // -// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.18 2003/05/16 18:33:03 easysw Exp $". +// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.19 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx index 3f97e6c..558ff7f 100644 --- a/src/Fl_Text_Buffer.cxx +++ b/src/Fl_Text_Buffer.cxx @@ -1,7 +1,7 @@ // -// "$Id: Fl_Text_Buffer.cxx,v 1.9.2.19 2003/05/28 16:09:12 matthiaswm Exp $" +// "$Id: Fl_Text_Buffer.cxx,v 1.9.2.20 2004/04/11 04:38:58 easysw Exp $" // -// Copyright 2001-2003 by Bill Spitzak and others. +// Copyright 2001-2004 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // @@ -2510,5 +2510,5 @@ Fl_Text_Buffer::outputfile(const char *file, int start, int end, int buflen) { // -// End of "$Id: Fl_Text_Buffer.cxx,v 1.9.2.19 2003/05/28 16:09:12 matthiaswm Exp $". +// End of "$Id: Fl_Text_Buffer.cxx,v 1.9.2.20 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 21a68a4..0d6c9da 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,7 +1,7 @@ // -// "$Id: Fl_Text_Display.cxx,v 1.12.2.46 2003/08/24 13:09:06 easysw Exp $" +// "$Id: Fl_Text_Display.cxx,v 1.12.2.51 2004/04/11 04:38:58 easysw Exp $" // -// Copyright 2001-2003 by Bill Spitzak and others. +// Copyright 2001-2004 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // @@ -143,7 +143,10 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l) ** freed, nor are the style buffer or style table. */ Fl_Text_Display::~Fl_Text_Display() { - if (mBuffer) mBuffer->remove_modify_callback(buffer_modified_cb, this); + if (mBuffer) { + mBuffer->remove_modify_callback(buffer_modified_cb, this); + mBuffer->remove_predelete_callback(buffer_predelete_cb, this); + } if (mLineStarts) delete[] mLineStarts; } @@ -153,6 +156,7 @@ Fl_Text_Display::~Fl_Text_Display() { void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) { /* If the text display is already displaying a buffer, clear it off of the display and remove our callback from it */ + if ( buf == mBuffer) return; if ( mBuffer != 0 ) { buffer_modified_cb( 0, 0, mBuffer->length(), 0, 0, this ); mBuffer->remove_modify_callback( buffer_modified_cb, this ); @@ -162,11 +166,13 @@ void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) { /* Add the buffer to the display, and attach a callback to the buffer for receiving modification information when the buffer contents change */ mBuffer = buf; - mBuffer->add_modify_callback( buffer_modified_cb, this ); - mBuffer->add_predelete_callback( buffer_predelete_cb, this ); + if (mBuffer) { + mBuffer->add_modify_callback( buffer_modified_cb, this ); + mBuffer->add_predelete_callback( buffer_predelete_cb, this ); - /* Update the display */ - buffer_modified_cb( 0, buf->length(), 0, 0, 0, this ); + /* Update the display */ + buffer_modified_cb( 0, buf->length(), 0, 0, 0, this ); + } /* Resize the widget to update the screen... */ resize(x(), y(), w(), h()); @@ -1580,13 +1586,15 @@ void Fl_Text_Display::draw_string( int style, int X, int Y, int toX, font = styleRec->font; fsize = styleRec->size; - if ( style & (HIGHLIGHT_MASK | PRIMARY_MASK) && Fl::focus() == this) { - background = selection_color(); + if (style & (HIGHLIGHT_MASK | PRIMARY_MASK)) { + if (Fl::focus() == this) background = selection_color(); + else background = fl_color_average(color(), selection_color(), 0.5f); } else background = color(); foreground = fl_contrast(styleRec->color, background); - } else if ( style & (HIGHLIGHT_MASK | PRIMARY_MASK) && Fl::focus() == this ) { - background = selection_color(); + } else if (style & (HIGHLIGHT_MASK | PRIMARY_MASK)) { + if (Fl::focus() == this) background = selection_color(); + else background = fl_color_average(color(), selection_color(), 0.5f); foreground = fl_contrast(textcolor(), background); } else { foreground = textcolor(); @@ -1744,7 +1752,7 @@ int Fl_Text_Display::position_style( int lineStartPos, style = FILL_MASK; else if ( styleBuf != NULL ) { style = ( unsigned char ) styleBuf->character( pos ); - if (style == mUnfinishedStyle) { + if (style == mUnfinishedStyle && mUnfinishedHighlightCB) { /* encountered "unfinished" style, trigger parsing */ (mUnfinishedHighlightCB)( pos, mHighlightCBArg); style = (unsigned char) styleBuf->character( pos); @@ -2700,7 +2708,7 @@ int Fl_Text_Display::measure_proportional_character(char c, int colNum, int pos) style = 0; } else { style = (unsigned char)styleBuf->character(pos); - if (style == mUnfinishedStyle) { + if (style == mUnfinishedStyle && mUnfinishedHighlightCB) { /* encountered "unfinished" style, trigger parsing */ (mUnfinishedHighlightCB)(pos, mHighlightCBArg); style = (unsigned char)styleBuf->character(pos); @@ -2978,7 +2986,7 @@ int Fl_Text_Display::handle(int event) { case FL_LEAVE: case FL_HIDE: - if (active_r()) { + if (active_r() && window()) { window()->cursor(FL_CURSOR_DEFAULT); return 1; @@ -3058,5 +3066,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.46 2003/08/24 13:09:06 easysw Exp $". +// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.51 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index a24096f..0b14258 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -1,7 +1,7 @@ // -// "$Id: Fl_Text_Editor.cxx,v 1.9.2.17 2003/08/24 13:09:06 easysw Exp $" +// "$Id: Fl_Text_Editor.cxx,v 1.9.2.18 2004/04/11 04:38:58 easysw Exp $" // -// Copyright 2001-2003 by Bill Spitzak and others. +// Copyright 2001-2004 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // @@ -490,5 +490,5 @@ int Fl_Text_Editor::handle(int event) { } // -// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.17 2003/08/24 13:09:06 easysw Exp $". +// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.18 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx index 3af8d29..0bf4b67 100644 --- a/src/Fl_Tile.cxx +++ b/src/Fl_Tile.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.4 2003/01/30 21:42:51 easysw Exp $" +// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.6 2004/04/11 04:38:58 easysw Exp $" // // Tile widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -96,7 +96,7 @@ void Fl_Tile::resize(int X,int Y,int W,int H) { static void set_cursor(Fl_Tile*t, Fl_Cursor c) { static Fl_Cursor cursor; - if (cursor == c) return; + if (cursor == c || !t->window()) return; cursor = c; #ifdef __sgi t->window()->cursor(c,FL_RED,FL_WHITE); @@ -196,5 +196,5 @@ int Fl_Tile::handle(int event) { } // -// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.4 2003/01/30 21:42:51 easysw Exp $". +// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Tiled_Image.cxx b/src/Fl_Tiled_Image.cxx index b0679ab..890834a 100644 --- a/src/Fl_Tiled_Image.cxx +++ b/src/Fl_Tiled_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Tiled_Image.cxx,v 1.1.2.6 2003/01/30 21:42:52 easysw Exp $" +// "$Id: Fl_Tiled_Image.cxx,v 1.1.2.7 2004/04/11 04:38:58 easysw Exp $" // // Tiled image code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -133,5 +133,5 @@ Fl_Tiled_Image::draw(int X, // I - Starting X position // -// End of "$Id: Fl_Tiled_Image.cxx,v 1.1.2.6 2003/01/30 21:42:52 easysw Exp $". +// End of "$Id: Fl_Tiled_Image.cxx,v 1.1.2.7 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 3c8c655..1431e93 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Tooltip.cxx,v 1.38.2.27 2003/01/30 21:42:53 easysw Exp $" +// "$Id: Fl_Tooltip.cxx,v 1.38.2.29 2004/04/11 04:38:58 easysw Exp $" // // Tooltip source file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -30,6 +30,7 @@ #include <stdio.h> float Fl_Tooltip::delay_ = 1.0f; +float Fl_Tooltip::hoverdelay_ = 0.2f; int Fl_Tooltip::enabled_ = 1; unsigned Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1, FL_NUM_GREEN - 1, @@ -156,7 +157,7 @@ tt_exit(Fl_Widget *w) { if (window) window->hide(); if (recent_tooltip) { if (Fl::event_state() & FL_BUTTONS) recent_tooltip = 0; - else Fl::add_timeout(.2f, recent_timeout); + else Fl::add_timeout(Fl_Tooltip::hoverdelay(), recent_timeout); } } @@ -203,7 +204,10 @@ Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t) // remember it: widget_ = wid; X = x; Y = y; W = w; H = h; tip = t; // popup the tooltip immediately if it was recently up: - if (recent_tooltip || Fl_Tooltip::delay() < .1) { + if (recent_tooltip) { + if (window) window->hide(); + Fl::add_timeout(Fl_Tooltip::hoverdelay(), tooltip_timeout); + } else if (Fl_Tooltip::delay() < .1) { #ifdef WIN32 // possible fix for the Windows titlebar, it seems to want the // window to be destroyed, moving it messes up the parenting: @@ -232,5 +236,5 @@ void Fl_Widget::tooltip(const char *tt) { } // -// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.27 2003/01/30 21:42:53 easysw Exp $". +// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.29 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Valuator.cxx b/src/Fl_Valuator.cxx index ace987b..fb7192c 100644 --- a/src/Fl_Valuator.cxx +++ b/src/Fl_Valuator.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.6 2003/01/30 21:42:53 easysw Exp $" +// "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.8 2004/04/11 04:38:58 easysw Exp $" // // Valuator widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -29,6 +29,7 @@ #include <FL/Fl_Valuator.H> #include <FL/math.h> #include <stdio.h> +#include "flstring.h" Fl_Valuator::Fl_Valuator(int X, int Y, int W, int H, const char* L) : Fl_Widget(X,Y,W,H,L) { @@ -115,7 +116,8 @@ double Fl_Valuator::increment(double v, int n) { int Fl_Valuator::format(char* buffer) { double v = value(); - if (!A) return sprintf(buffer, "%g", v); + // MRS: THIS IS A HACK - RECOMMEND ADDING BUFFER SIZE ARGUMENT + if (!A) return snprintf(buffer, 128, "%g", v); int i, X; double ba = B / A; for (X = 1, i = 0; X < ba; X *= 10) i++; @@ -123,5 +125,5 @@ int Fl_Valuator::format(char* buffer) { } // -// End of "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.6 2003/01/30 21:42:53 easysw Exp $". +// End of "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.8 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Value_Input.cxx b/src/Fl_Value_Input.cxx index 78b6ecb..17bfc3c 100644 --- a/src/Fl_Value_Input.cxx +++ b/src/Fl_Value_Input.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.8 2003/01/30 21:42:54 easysw Exp $" +// "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.9 2004/04/11 04:38:58 easysw Exp $" // // Value input widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -131,5 +131,5 @@ Fl_Value_Input::Fl_Value_Input(int X, int Y, int W, int H, const char* l) } // -// End of "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.8 2003/01/30 21:42:54 easysw Exp $". +// End of "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.9 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Value_Output.cxx b/src/Fl_Value_Output.cxx index d161f19..d886bf9 100644 --- a/src/Fl_Value_Output.cxx +++ b/src/Fl_Value_Output.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.7 2003/01/30 21:42:57 easysw Exp $" +// "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.8 2004/04/11 04:38:58 easysw Exp $" // // Value output widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -97,5 +97,5 @@ Fl_Value_Output::Fl_Value_Output(int X, int Y, int W, int H,const char *l) } // -// End of "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.7 2003/01/30 21:42:57 easysw Exp $". +// End of "$Id: Fl_Value_Output.cxx,v 1.6.2.3.2.8 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Value_Slider.cxx b/src/Fl_Value_Slider.cxx index 6dc20ed..8cbac3a 100644 --- a/src/Fl_Value_Slider.cxx +++ b/src/Fl_Value_Slider.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Value_Slider.cxx,v 1.5.2.4.2.4 2003/01/30 21:42:57 easysw Exp $" +// "$Id: Fl_Value_Slider.cxx,v 1.5.2.4.2.5 2004/04/11 04:38:58 easysw Exp $" // // Value slider widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -72,5 +72,5 @@ int Fl_Value_Slider::handle(int event) { } // -// End of "$Id: Fl_Value_Slider.cxx,v 1.5.2.4.2.4 2003/01/30 21:42:57 easysw Exp $". +// End of "$Id: Fl_Value_Slider.cxx,v 1.5.2.4.2.5 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx index 832c490..14fc2ed 100644 --- a/src/Fl_Widget.cxx +++ b/src/Fl_Widget.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.22 2003/01/30 21:42:58 easysw Exp $" +// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.23 2004/04/11 04:38:58 easysw Exp $" // // Base widget class for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -245,5 +245,5 @@ int Fl_Widget::contains(const Fl_Widget *o) const { } // -// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.22 2003/01/30 21:42:58 easysw Exp $". +// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.23 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index 24d6bbb..32bc565 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Window.cxx,v 1.6.2.3.2.11 2003/01/30 21:42:58 easysw Exp $" +// "$Id: Fl_Window.cxx,v 1.6.2.3.2.12 2004/04/11 04:38:58 easysw Exp $" // // Window widget class for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -127,5 +127,5 @@ Fl_Window *Fl_Window::current() { // -// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.11 2003/01/30 21:42:58 easysw Exp $". +// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.12 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Window_fullscreen.cxx b/src/Fl_Window_fullscreen.cxx index 84bf886..ab2dcae 100644 --- a/src/Fl_Window_fullscreen.cxx +++ b/src/Fl_Window_fullscreen.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Window_fullscreen.cxx,v 1.5.2.3.2.5 2003/01/30 21:42:59 easysw Exp $" +// "$Id: Fl_Window_fullscreen.cxx,v 1.5.2.3.2.6 2004/04/11 04:38:58 easysw Exp $" // // Fullscreen window support for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -73,5 +73,5 @@ void Fl_Window::fullscreen_off(int X,int Y,int W,int H) { } // -// End of "$Id: Fl_Window_fullscreen.cxx,v 1.5.2.3.2.5 2003/01/30 21:42:59 easysw Exp $". +// End of "$Id: Fl_Window_fullscreen.cxx,v 1.5.2.3.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Window_hotspot.cxx b/src/Fl_Window_hotspot.cxx index 5a12ed8..b34b514 100644 --- a/src/Fl_Window_hotspot.cxx +++ b/src/Fl_Window_hotspot.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Window_hotspot.cxx,v 1.7.2.3.2.5 2003/01/30 21:42:59 easysw Exp $" +// "$Id: Fl_Window_hotspot.cxx,v 1.7.2.3.2.6 2004/04/11 04:38:58 easysw Exp $" // // Common hotspot routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -80,5 +80,5 @@ void Fl_Window::hotspot(const Fl_Widget *o, int offscreen) { // -// End of "$Id: Fl_Window_hotspot.cxx,v 1.7.2.3.2.5 2003/01/30 21:42:59 easysw Exp $". +// End of "$Id: Fl_Window_hotspot.cxx,v 1.7.2.3.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Window_iconize.cxx b/src/Fl_Window_iconize.cxx index 704cf87..9a5f6ce 100644 --- a/src/Fl_Window_iconize.cxx +++ b/src/Fl_Window_iconize.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.5 2003/01/30 21:43:00 easysw Exp $" +// "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.6 2004/04/11 04:38:58 easysw Exp $" // // Window minification code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -43,5 +43,5 @@ void Fl_Window::iconize() { } // -// End of "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.5 2003/01/30 21:43:00 easysw Exp $". +// End of "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_Wizard.cxx b/src/Fl_Wizard.cxx index fdb6cfa..3ea65cf 100644 --- a/src/Fl_Wizard.cxx +++ b/src/Fl_Wizard.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_Wizard.cxx,v 1.1.2.5 2003/01/30 21:43:00 easysw Exp $" +// "$Id: Fl_Wizard.cxx,v 1.1.2.7 2004/04/11 04:38:58 easysw Exp $" // // Fl_Wizard widget routines. // -// Copyright 1997-2003 by Easy Software Products. +// Copyright 1997-2004 by Easy Software Products. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -199,10 +199,10 @@ Fl_Wizard::value(Fl_Widget *kid) // This will restore the mouse pointer to the window's default cursor // whenever the wizard pane is changed. Otherwise text widgets that // show the next pane may leave the cursor set to the I beam, etc... - window()->cursor(FL_CURSOR_DEFAULT); + if (window()) window()->cursor(FL_CURSOR_DEFAULT); } // -// End of "$Id: Fl_Wizard.cxx,v 1.1.2.5 2003/01/30 21:43:00 easysw Exp $". +// End of "$Id: Fl_Wizard.cxx,v 1.1.2.7 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_XBM_Image.cxx b/src/Fl_XBM_Image.cxx index 35cdee5..101bc3e 100644 --- a/src/Fl_XBM_Image.cxx +++ b/src/Fl_XBM_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_XBM_Image.cxx,v 1.1.2.9 2003/01/30 21:43:01 easysw Exp $" +// "$Id: Fl_XBM_Image.cxx,v 1.1.2.10 2004/04/11 04:38:58 easysw Exp $" // // Fl_XBM_Image routines. // -// Copyright 1997-2003 by Bill Spitzak and others. +// Copyright 1997-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -100,5 +100,5 @@ Fl_XBM_Image::Fl_XBM_Image(const char *name) : Fl_Bitmap((const char *)0,0,0) { // -// End of "$Id: Fl_XBM_Image.cxx,v 1.1.2.9 2003/01/30 21:43:01 easysw Exp $". +// End of "$Id: Fl_XBM_Image.cxx,v 1.1.2.10 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_XPM_Image.cxx b/src/Fl_XPM_Image.cxx index 2b3d036..3569dfd 100644 --- a/src/Fl_XPM_Image.cxx +++ b/src/Fl_XPM_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_XPM_Image.cxx,v 1.1.2.8 2003/01/30 21:43:01 easysw Exp $" +// "$Id: Fl_XPM_Image.cxx,v 1.1.2.9 2004/04/11 04:38:58 easysw Exp $" // // Fl_XPM_Image routines. // -// Copyright 1997-2003 by Bill Spitzak and others. +// Copyright 1997-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -125,5 +125,5 @@ Fl_XPM_Image::Fl_XPM_Image(const char *name) : Fl_Pixmap((char *const*)0) { // -// End of "$Id: Fl_XPM_Image.cxx,v 1.1.2.8 2003/01/30 21:43:01 easysw Exp $". +// End of "$Id: Fl_XPM_Image.cxx,v 1.1.2.9 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_abort.cxx b/src/Fl_abort.cxx index 648b362..eb59790 100644 --- a/src/Fl_abort.cxx +++ b/src/Fl_abort.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_abort.cxx,v 1.8.2.3.2.5 2003/01/30 21:43:01 easysw Exp $" +// "$Id: Fl_abort.cxx,v 1.8.2.3.2.6 2004/04/11 04:38:58 easysw Exp $" // // Warning/error message code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -96,5 +96,5 @@ void (*Fl::error)(const char* format, ...) = ::error; void (*Fl::fatal)(const char* format, ...) = ::fatal; // -// End of "$Id: Fl_abort.cxx,v 1.8.2.3.2.5 2003/01/30 21:43:01 easysw Exp $". +// End of "$Id: Fl_abort.cxx,v 1.8.2.3.2.6 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_add_idle.cxx b/src/Fl_add_idle.cxx index f605a6d..f3669c0 100644 --- a/src/Fl_add_idle.cxx +++ b/src/Fl_add_idle.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_add_idle.cxx,v 1.4.2.7.2.2 2003/01/30 21:43:02 easysw Exp $" +// "$Id: Fl_add_idle.cxx,v 1.4.2.7.2.3 2004/04/11 04:38:58 easysw Exp $" // // Idle routine support for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -94,5 +94,5 @@ void Fl::remove_idle(void (*cb)(void*), void* data) { } // -// End of "$Id: Fl_add_idle.cxx,v 1.4.2.7.2.2 2003/01/30 21:43:02 easysw Exp $". +// End of "$Id: Fl_add_idle.cxx,v 1.4.2.7.2.3 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx index 71c0276..93591df 100644 --- a/src/Fl_arg.cxx +++ b/src/Fl_arg.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_arg.cxx,v 1.5.2.8.2.16 2003/08/02 13:49:17 easysw Exp $" +// "$Id: Fl_arg.cxx,v 1.5.2.8.2.17 2004/04/11 04:38:58 easysw Exp $" // // Optional argument initialization code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -416,5 +416,5 @@ int XParseGeometry(const char* string, int* x, int* y, #endif // ifdef WIN32 // -// End of "$Id: Fl_arg.cxx,v 1.5.2.8.2.16 2003/08/02 13:49:17 easysw Exp $". +// End of "$Id: Fl_arg.cxx,v 1.5.2.8.2.17 2004/04/11 04:38:58 easysw Exp $". // diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx index 277a26c..f4de2a6 100644 --- a/src/Fl_compose.cxx +++ b/src/Fl_compose.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_compose.cxx,v 1.1.2.7.2.4 2003/05/20 15:29:42 easysw Exp $" +// "$Id: Fl_compose.cxx,v 1.1.2.7.2.6 2004/04/11 04:38:59 easysw Exp $" // // Character compose processing for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -91,6 +91,9 @@ int Fl::compose(int& del) { e_text[0] = char(0xA0); compose_state = 0; return 1; + } else if (ascii < ' ' || ascii == 127) { + compose_state = 0; + return 0; } // see if it is either character of any pair: diff --git a/src/Fl_display.cxx b/src/Fl_display.cxx index 432ce3e..6bb6934 100644 --- a/src/Fl_display.cxx +++ b/src/Fl_display.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_display.cxx,v 1.4.2.3.2.6 2003/01/30 21:43:04 easysw Exp $" +// "$Id: Fl_display.cxx,v 1.4.2.3.2.7 2004/04/11 04:38:59 easysw Exp $" // // Display function for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -48,5 +48,5 @@ void Fl::display(const char *d) { } // -// End of "$Id: Fl_display.cxx,v 1.4.2.3.2.6 2003/01/30 21:43:04 easysw Exp $". +// End of "$Id: Fl_display.cxx,v 1.4.2.3.2.7 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_get_key.cxx b/src/Fl_get_key.cxx index 62e0aa6..a3031ad 100644 --- a/src/Fl_get_key.cxx +++ b/src/Fl_get_key.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_get_key.cxx,v 1.5.2.3.2.5 2003/04/03 04:28:15 matthiaswm Exp $" +// "$Id: Fl_get_key.cxx,v 1.5.2.3.2.6 2004/04/11 04:38:59 easysw Exp $" // // Keyboard state routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -63,5 +63,5 @@ int Fl::get_key(int k) { #endif // -// End of "$Id: Fl_get_key.cxx,v 1.5.2.3.2.5 2003/04/03 04:28:15 matthiaswm Exp $". +// End of "$Id: Fl_get_key.cxx,v 1.5.2.3.2.6 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_get_key_mac.cxx b/src/Fl_get_key_mac.cxx index dfb22b1..f92bf92 100644 --- a/src/Fl_get_key_mac.cxx +++ b/src/Fl_get_key_mac.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_get_key_mac.cxx,v 1.1.2.7 2003/05/28 05:10:05 matthiaswm Exp $" +// "$Id: Fl_get_key_mac.cxx,v 1.1.2.8 2004/04/11 04:38:59 easysw Exp $" // // MacOS keyboard state routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -99,5 +99,5 @@ int Fl::get_key(int k) { } // -// End of "$Id: Fl_get_key_mac.cxx,v 1.1.2.7 2003/05/28 05:10:05 matthiaswm Exp $". +// End of "$Id: Fl_get_key_mac.cxx,v 1.1.2.8 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_get_key_win32.cxx b/src/Fl_get_key_win32.cxx index ae87caf..6e90576 100755 --- a/src/Fl_get_key_win32.cxx +++ b/src/Fl_get_key_win32.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_get_key_win32.cxx,v 1.4.2.5.2.4 2003/01/30 21:43:06 easysw Exp $" +// "$Id: Fl_get_key_win32.cxx,v 1.4.2.5.2.5 2004/04/11 04:38:59 easysw Exp $" // // WIN32 keyboard state routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -132,5 +132,5 @@ int Fl::get_key(int k) { } // -// End of "$Id: Fl_get_key_win32.cxx,v 1.4.2.5.2.4 2003/01/30 21:43:06 easysw Exp $". +// End of "$Id: Fl_get_key_win32.cxx,v 1.4.2.5.2.5 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index 844d38c..77b3e3b 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.23 2003/08/02 13:49:17 easysw Exp $" +// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.25 2004/04/11 04:38:59 easysw Exp $" // // System color support for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -70,7 +70,6 @@ void Fl::foreground(uchar r, uchar g, uchar b) { } void Fl::background2(uchar r, uchar g, uchar b) { - fl_fg_set = 1; fl_bg2_set = 1; Fl::set_color(FL_BACKGROUND2_COLOR,r,g,b); @@ -333,5 +332,5 @@ int Fl::reload_scheme() { // -// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.23 2003/08/02 13:49:17 easysw Exp $". +// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.25 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_grab.cxx b/src/Fl_grab.cxx index f7b5b9b..eff5924 100644 --- a/src/Fl_grab.cxx +++ b/src/Fl_grab.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_grab.cxx,v 1.1.2.4.2.8 2003/01/30 21:43:07 easysw Exp $" +// "$Id: Fl_grab.cxx,v 1.1.2.4.2.9 2004/04/11 04:38:59 easysw Exp $" // // Grab/release code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -100,5 +100,5 @@ void Fl::grab(Fl_Window* win) { } // -// End of "$Id: Fl_grab.cxx,v 1.1.2.4.2.8 2003/01/30 21:43:07 easysw Exp $". +// End of "$Id: Fl_grab.cxx,v 1.1.2.4.2.9 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index 43a1e82..1fc8e0b 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_lock.cxx,v 1.13.2.4 2003/01/30 21:43:07 easysw Exp $" +// "$Id: Fl_lock.cxx,v 1.13.2.5 2004/04/11 04:38:59 easysw Exp $" // // Multi-threading support code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -200,5 +200,5 @@ void Fl::awake(void* msg) { #endif // -// End of "$Id: Fl_lock.cxx,v 1.13.2.4 2003/01/30 21:43:07 easysw Exp $". +// End of "$Id: Fl_lock.cxx,v 1.13.2.5 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index bfda9b7..4a18aeb 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_mac.cxx,v 1.1.2.51 2003/08/02 05:54:43 matthiaswm Exp $" +// "$Id: Fl_mac.cxx,v 1.1.2.54 2004/04/11 04:38:59 easysw Exp $" // // MacOS specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -57,13 +57,15 @@ extern "C" { // #define DEBUG_SELECT // UNCOMMENT FOR SELECT()/THREAD DEBUGGING #ifdef DEBUG_SELECT -#include <stdio.h> // testing -#define DEBUGMSG(msg) fprintf(stderr, msg); -#define DEBUGPERRORMSG(msg) perror(msg) +#include <stdio.h> // testing +#define DEBUGMSG(msg) if ( msg ) fprintf(stderr, msg); +#define DEBUGPERRORMSG(msg) if ( msg ) perror(msg) +#define DEBUGTEXT(txt) txt #else #define DEBUGMSG(msg) #define DEBUGPERRORMSG(msg) -#endif /*DEBUGSELECT*/ +#define DEBUGTEXT(txt) NULL +#endif /*DEBUG_SELECT*/ // external functions extern Fl_Window* fl_find(Window); @@ -141,169 +143,278 @@ static void nothing() {} void (*fl_lock_function)() = nothing; void (*fl_unlock_function)() = nothing; - -// -// Select interface // +// Select interface -- how it's implemented: +// When the user app configures one or more file descriptors to monitor +// with Fl::add_fd(), we start a separate thread to select() the data, +// sending a custom OSX 'FLTK data ready event' to the parent thread's +// RunApplicationLoop(), so that it triggers the data ready callbacks +// in the parent thread. -erco 04/04/04 +// #define POLLIN 1 #define POLLOUT 4 #define POLLERR 8 -struct FD + +// Class to handle select() 'data ready' +class DataReady { - int fd; - short events; - void (*cb)(int, void*); - void* arg; + struct FD + { + int fd; + short events; + void (*cb)(int, void*); + void* arg; + }; + int nfds, fd_array_size; + FD *fds; + pthread_t tid; // select()'s thread id + + // Data that needs to be locked (all start with '_') + pthread_mutex_t _datalock; // data lock + fd_set _fdsets[3]; // r/w/x sets user wants to monitor + int _maxfd; // max fd count to monitor + int _cancelpipe[2]; // pipe used to help cancel thread + void *_userdata; // thread's userdata + +public: + DataReady() + { + nfds = 0; + fd_array_size = 0; + fds = 0; + tid = 0; + + pthread_mutex_init(&_datalock, NULL); + FD_ZERO(&_fdsets[0]); FD_ZERO(&_fdsets[1]); FD_ZERO(&_fdsets[2]); + _cancelpipe[0] = _cancelpipe[1] = 0; + _userdata = 0; + _maxfd = 0; + } + + ~DataReady() + { + CancelThread(DEBUGTEXT("DESTRUCTOR\n")); + if (fds) { free(fds); fds = 0; } + nfds = 0; + } + + // Locks + // The convention for locks: volatile vars start with '_', + // and must be locked before use. Locked code is prefixed + // with /*LOCK*/ to make painfully obvious esp. in debuggers. -erco + // + void DataLock() { pthread_mutex_lock(&_datalock); } + void DataUnlock() { pthread_mutex_unlock(&_datalock); } + + // Accessors + int IsThreadRunning() { return(tid ? 1 : 0); } + int GetNfds() { return(nfds); } + int GetCancelPipe(int ix) { return(_cancelpipe[ix]); } + fd_set GetFdset(int ix) { return(_fdsets[ix]); } + + // Methods + void AddFD(int n, int events, void (*cb)(int, void*), void *v); + void RemoveFD(int n, int events); + int CheckData(fd_set& r, fd_set& w, fd_set& x); + void HandleData(fd_set& r, fd_set& w, fd_set& x); + static void* DataReadyThread(void *self); + void StartThread(void *userdata); + void CancelThread(const char *reason); }; -static int nfds = 0; -static int fd_array_size = 0; -static FD *fd = 0; -static int G_pipe[2] = { 0,0 }; // work around pthread_cancel() problem -enum GetSet { GET = 1, SET = 2 }; -static pthread_mutex_t select_mutex; // global data lock - -// MAXFD ACCESSOR (HANDLES LOCKING) -static void MaxFD(GetSet which, int& val) -{ - static int maxfd = 0; - pthread_mutex_lock(&select_mutex); - if ( which == GET ) { val = maxfd; } - else { maxfd = val; } - pthread_mutex_unlock(&select_mutex); -} -// FDSET ACCESSOR (HANDLES LOCKING) -static void Fdset(GetSet which, fd_set& r, fd_set &w, fd_set &x) -{ - static fd_set fdsets[3]; - pthread_mutex_lock(&select_mutex); - if ( which == GET ) { r = fdsets[0]; w = fdsets[1]; x = fdsets[2]; } - else { fdsets[0] = r; fdsets[1] = w; fdsets[2] = x; } - pthread_mutex_unlock(&select_mutex); -} +static DataReady dataready; -void Fl::add_fd( int n, int events, void (*cb)(int, void*), void *v ) +void DataReady::AddFD(int n, int events, void (*cb)(int, void*), void *v) { - remove_fd(n, events); - + RemoveFD(n, events); int i = nfds++; - - if (i >= fd_array_size) { + if (i >= fd_array_size) + { FD *temp; fd_array_size = 2*fd_array_size+1; - - if (!fd) { temp = (FD*)malloc(fd_array_size*sizeof(FD)); } - else { temp = (FD*)realloc(fd, fd_array_size*sizeof(FD)); } - + if (!fds) { temp = (FD*)malloc(fd_array_size*sizeof(FD)); } + else { temp = (FD*)realloc(fds, fd_array_size*sizeof(FD)); } if (!temp) return; - fd = temp; - } - - fd[i].cb = cb; - fd[i].arg = v; - fd[i].fd = n; - fd[i].events = events; - - { - int maxfd; - fd_set r, w, x; - MaxFD(GET, maxfd); - Fdset(GET, r, w, x); - if (events & POLLIN) FD_SET(n, &r); - if (events & POLLOUT) FD_SET(n, &w); - if (events & POLLERR) FD_SET(n, &x); - if (n > maxfd) maxfd = n; - Fdset(SET, r, w, x); - MaxFD(SET, maxfd); + fds = temp; } + fds[i].cb = cb; + fds[i].arg = v; + fds[i].fd = n; + fds[i].events = events; + DataLock(); + /*LOCK*/ if (events & POLLIN) FD_SET(n, &_fdsets[0]); + /*LOCK*/ if (events & POLLOUT) FD_SET(n, &_fdsets[1]); + /*LOCK*/ if (events & POLLERR) FD_SET(n, &_fdsets[2]); + /*LOCK*/ if (n > _maxfd) _maxfd = n; + DataUnlock(); } -void Fl::add_fd(int fd, void (*cb)(int, void*), void* v) -{ - Fl::add_fd(fd, POLLIN, cb, v); -} - -void Fl::remove_fd(int n, int events) +// Remove an FD from the array +void DataReady::RemoveFD(int n, int events) { int i,j; - - for (i=j=0; i<nfds; i++) { - - if (fd[i].fd == n) { - int e = fd[i].events & ~events; + for (i=j=0; i<nfds; i++) + { + if (fds[i].fd == n) + { + int e = fds[i].events & ~events; if (!e) continue; // if no events left, delete this fd - fd[i].events = e; + fds[i].events = e; } - // move it down in the array if necessary: if (j<i) - { fd[j] = fd[i]; } - + { fds[j] = fds[i]; } j++; } - nfds = j; - - { - int maxfd; - fd_set r, w, x; - MaxFD(GET, maxfd); - Fdset(GET, r, w, x); - if (events & POLLIN) FD_CLR(n, &r); - if (events & POLLOUT) FD_CLR(n, &w); - if (events & POLLERR) FD_CLR(n, &x); - if (n == maxfd) maxfd--; - Fdset(SET, r, w, x); - MaxFD(SET, maxfd); - } -} - -void Fl::remove_fd(int n) -{ - remove_fd(n, -1); -} - -/** - * Check if there is actually a message pending! - */ -int fl_ready() -{ - if (GetNumEventsInQueue(GetCurrentEventQueue()) > 0) return 1; - return 0; + DataLock(); + /*LOCK*/ if (events & POLLIN) FD_CLR(n, &_fdsets[0]); + /*LOCK*/ if (events & POLLOUT) FD_CLR(n, &_fdsets[1]); + /*LOCK*/ if (events & POLLERR) FD_CLR(n, &_fdsets[2]); + /*LOCK*/ if (n == _maxfd) _maxfd--; + DataUnlock(); } -// CHECK IF USER DATA READY -static int CheckDataReady(fd_set& r, fd_set& w, fd_set& x) +// CHECK IF USER DATA READY, RETURNS r/w/x INDICATING WHICH IF ANY +int DataReady::CheckData(fd_set& r, fd_set& w, fd_set& x) { - int maxfd; - MaxFD(GET, maxfd); - timeval t = { 0, 1 }; // quick check - int ret = ::select(maxfd+1, &r, &w, &x, &t); + int ret; + DataLock(); + /*LOCK*/ timeval t = { 0, 1 }; // quick check + /*LOCK*/ r = _fdsets[0], w = _fdsets[1], x = _fdsets[2]; + /*LOCK*/ ret = ::select(_maxfd+1, &r, &w, &x, &t); + DataUnlock(); if ( ret == -1 ) - { DEBUGPERRORMSG("CheckDataReady(): select()"); } + { DEBUGPERRORMSG("CheckData(): select()"); } return(ret); } // HANDLE DATA READY CALLBACKS -static void HandleDataReady(fd_set& r, fd_set& w, fd_set& x) +void DataReady::HandleData(fd_set& r, fd_set& w, fd_set& x) { for (int i=0; i<nfds; i++) { - // fprintf(stderr, "CHECKING FD %d OF %d (%d)\n", i, nfds, fd[i].fd); - int f = fd[i].fd; + int f = fds[i].fd; short revents = 0; if (FD_ISSET(f, &r)) revents |= POLLIN; if (FD_ISSET(f, &w)) revents |= POLLOUT; if (FD_ISSET(f, &x)) revents |= POLLERR; - if (fd[i].events & revents) + if (fds[i].events & revents) { DEBUGMSG("DOING CALLBACK: "); - fd[i].cb(f, fd[i].arg); + fds[i].cb(f, fds[i].arg); DEBUGMSG("DONE\n"); } } } +// DATA READY THREAD +// This thread watches for changes in user's file descriptors. +// Sends a 'data ready event' to the main thread if any change. +// +void* DataReady::DataReadyThread(void *o) +{ + DataReady *self = (DataReady*)o; + while ( 1 ) // loop until thread cancel or error + { + // Thread safe local copies of data before each select() + self->DataLock(); + /*LOCK*/ int maxfd = self->_maxfd; + /*LOCK*/ fd_set r = self->GetFdset(0); + /*LOCK*/ fd_set w = self->GetFdset(1); + /*LOCK*/ fd_set x = self->GetFdset(2); + /*LOCK*/ void *userdata = self->_userdata; + /*LOCK*/ int cancelpipe = self->GetCancelPipe(0); + /*LOCK*/ if ( cancelpipe > maxfd ) maxfd = cancelpipe; + /*LOCK*/ FD_SET(cancelpipe, &r); // add cancelpipe to fd's to watch + /*LOCK*/ FD_SET(cancelpipe, &x); + self->DataUnlock(); + // timeval t = { 1000, 0 }; // 1000 seconds; + timeval t = { 2, 0 }; // HACK: 2 secs prevents 'hanging' problem + int ret = ::select(maxfd+1, &r, &w, &x, &t); + pthread_testcancel(); // OSX 10.0.4 and older: needed for parent to cancel + switch ( ret ) + { + case 0: // NO DATA + continue; + case -1: // ERROR + { + DEBUGPERRORMSG("CHILD THREAD: select() failed"); + return(NULL); // error? exit thread + } + default: // DATA READY + { + if (FD_ISSET(cancelpipe, &r) || FD_ISSET(cancelpipe, &x)) // cancel? + { return(NULL); } // just exit + DEBUGMSG("CHILD THREAD: DATA IS READY\n"); + EventRef drEvent; + CreateEvent( 0, kEventClassFLTK, kEventFLTKDataReady, + 0, kEventAttributeUserEvent, &drEvent); + EventQueueRef eventqueue = (EventQueueRef)userdata; + PostEventToQueue(eventqueue, drEvent, kEventPriorityStandard ); + ReleaseEvent( drEvent ); + return(NULL); // done with thread + } + } + } +} + +// START 'DATA READY' THREAD RUNNING, CREATE INTER-THREAD PIPE +void DataReady::StartThread(void *new_userdata) +{ + CancelThread(DEBUGTEXT("STARTING NEW THREAD\n")); + DataLock(); + /*LOCK*/ pipe(_cancelpipe); // pipe for sending cancel msg to thread + /*LOCK*/ _userdata = new_userdata; + DataUnlock(); + DEBUGMSG("*** START THREAD\n"); + pthread_create(&tid, NULL, DataReadyThread, (void*)this); +} + +// CANCEL 'DATA READY' THREAD, CLOSE PIPE +void DataReady::CancelThread(const char *reason) +{ + if ( tid ) + { + DEBUGMSG("*** CANCEL THREAD: "); + DEBUGMSG(reason); + if ( pthread_cancel(tid) == 0 ) // cancel first + { + DataLock(); + /*LOCK*/ write(_cancelpipe[1], "x", 1); // wake thread from select + DataUnlock(); + pthread_join(tid, NULL); // wait for thread to finish + } + tid = 0; + DEBUGMSG("(JOINED) OK\n"); + } + // Close pipe if open + DataLock(); + /*LOCK*/ if ( _cancelpipe[0] ) { close(_cancelpipe[0]); _cancelpipe[0] = 0; } + /*LOCK*/ if ( _cancelpipe[1] ) { close(_cancelpipe[1]); _cancelpipe[1] = 0; } + DataUnlock(); +} + +void Fl::add_fd( int n, int events, void (*cb)(int, void*), void *v ) + { dataready.AddFD(n, events, cb, v); } + +void Fl::add_fd(int fd, void (*cb)(int, void*), void* v) + { dataready.AddFD(fd, POLLIN, cb, v); } + +void Fl::remove_fd(int n, int events) + { dataready.RemoveFD(n, events); } + +void Fl::remove_fd(int n) + { dataready.RemoveFD(n, -1); } + +/** + * Check if there is actually a message pending! + */ +int fl_ready() +{ + if (GetNumEventsInQueue(GetCurrentEventQueue()) > 0) return 1; + return 0; +} /** * handle Apple Menu items (can be created using the Fl_Sys_Menu_Bar @@ -377,8 +488,10 @@ static pascal OSStatus carbonDispatchHandler( EventHandlerCallRef nextHandler, E case kEventMouseDragged: if ( fl_capture ) ret = SendEventToEventTarget( event, GetWindowEventTarget( fl_capture ) ); - else if ( fl_os_capture ) + else if ( fl_os_capture ){ ret = SendEventToEventTarget( event, GetWindowEventTarget( fl_os_capture ) ); + fl_os_capture = 0; + } break; } break; @@ -399,24 +512,21 @@ static pascal OSStatus carbonDispatchHandler( EventHandlerCallRef nextHandler, E break; case kEventFLTKDataReady: { - DEBUGMSG("DATA READY EVENT: RECEIVED\n"); + dataready.CancelThread(DEBUGTEXT("DATA READY EVENT\n")); // CHILD THREAD TELLS US DATA READY // Check to see what's ready, and invoke user's cb's // - fd_set r, w, x; - Fdset(GET, r, w, x); - switch ( CheckDataReady(r, w, x) ) + fd_set r,w,x; + switch(dataready.CheckData(r,w,x)) { - case 0: // NO DATA - break; - - case -1: // ERROR - break; - - default: // DATA READY - HandleDataReady(r, w, x); - break; + case 0: // NO DATA + break; + case -1: // ERROR + break; + default: // DATA READY + dataready.HandleData(r,w,x); + break; } } ret = noErr; @@ -445,55 +555,6 @@ static pascal void timerProcCB( EventLoopTimerRef, void* ) fl_unlock_function(); } - -// DATA READY THREAD -// Separate thread, watches for changes in user's file descriptors. -// Sends a 'data ready event' to the main thread if any change. -// -static void *dataready_thread(void *userdata) -{ - EventRef drEvent; - CreateEvent( 0, kEventClassFLTK, kEventFLTKDataReady, - 0, kEventAttributeUserEvent, &drEvent); - EventQueueRef eventqueue = (EventQueueRef)userdata; - - // Thread safe local copy - int maxfd; - fd_set r, w, x; - MaxFD(GET, maxfd); - Fdset(GET, r, w, x); - - // TACK ON FD'S FOR 'CANCEL PIPE' - FD_SET(G_pipe[0], &r); - if ( G_pipe[0] > maxfd ) maxfd = G_pipe[0]; - - // FOREVER UNTIL THREAD CANCEL OR ERROR - while ( 1 ) - { - timeval t = { 1000, 0 }; // 1000 seconds; - int ret = ::select(maxfd+1, &r, &w, &x, &t); - pthread_testcancel(); // OSX 10.0.4 and under: need to do this - // so parent can cancel us :( - switch ( ret ) - { - case 0: // NO DATA - continue; - case -1: // ERROR - { - DEBUGPERRORMSG("CHILD THREAD: select() failed"); - return(NULL); // error? exit thread - } - default: // DATA READY - { - DEBUGMSG("DATA READY EVENT: SENDING\n"); - PostEventToQueue(eventqueue, drEvent, kEventPriorityStandard ); - return(NULL); // done with thread - } - } - } -} - - /** * break the current event loop */ @@ -564,38 +625,20 @@ static double do_queued_events( double time = 0.0 ) got_events = 0; - // START A THREAD TO WATCH FOR DATA READY - static pthread_t dataready_tid = 0; - if ( nfds ) - { - void *userdata = (void*)GetCurrentEventQueue(); - - // PREPARE INTER-THREAD DATA - pthread_mutex_init(&select_mutex, NULL); + // Check for re-entrant condition + if ( dataready.IsThreadRunning() ) + { dataready.CancelThread(DEBUGTEXT("AVOID REENTRY\n")); } - if ( G_pipe[0] ) { close(G_pipe[0]); G_pipe[0] = 0; } - if ( G_pipe[1] ) { close(G_pipe[1]); G_pipe[1] = 0; } - pipe(G_pipe); - - DEBUGMSG("*** START THREAD\n"); - pthread_create(&dataready_tid, NULL, dataready_thread, userdata); - } + // Start thread to watch for data ready + if ( dataready.GetNfds() ) + { dataready.StartThread((void*)GetCurrentEventQueue()); } fl_unlock_function(); SetEventLoopTimerNextFireTime( timer, time ); RunApplicationEventLoop(); // will return after the previously set time - if ( dataready_tid != 0 ) - { - DEBUGMSG("*** CANCEL THREAD: "); - pthread_cancel(dataready_tid); // cancel first - write(G_pipe[1], "x", 1); // then wakeup thread from select - pthread_join(dataready_tid, NULL); // wait for thread to finish - if ( G_pipe[0] ) { close(G_pipe[0]); G_pipe[0] = 0; } - if ( G_pipe[1] ) { close(G_pipe[1]); G_pipe[1] = 0; } - dataready_tid = 0; - DEBUGMSG("OK\n"); - } + if ( dataready.IsThreadRunning() ) + { dataready.CancelThread(DEBUGTEXT("APPEVENTLOOP DONE\n")); } fl_lock_function(); @@ -1877,6 +1920,6 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) { // -// End of "$Id: Fl_mac.cxx,v 1.1.2.51 2003/08/02 05:54:43 matthiaswm Exp $". +// End of "$Id: Fl_mac.cxx,v 1.1.2.54 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_own_colormap.cxx b/src/Fl_own_colormap.cxx index 531aea5..44d6016 100644 --- a/src/Fl_own_colormap.cxx +++ b/src/Fl_own_colormap.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_own_colormap.cxx,v 1.4.2.3.2.3 2003/01/30 21:43:09 easysw Exp $" +// "$Id: Fl_own_colormap.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:59 easysw Exp $" // // Private colormap support for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -77,5 +77,5 @@ void Fl::own_colormap() { #endif // -// End of "$Id: Fl_own_colormap.cxx,v 1.4.2.3.2.3 2003/01/30 21:43:09 easysw Exp $". +// End of "$Id: Fl_own_colormap.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_visual.cxx b/src/Fl_visual.cxx index f1d61ed..49636ad 100644 --- a/src/Fl_visual.cxx +++ b/src/Fl_visual.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_visual.cxx,v 1.7.2.4.2.5 2003/01/30 21:43:10 easysw Exp $" +// "$Id: Fl_visual.cxx,v 1.7.2.4.2.6 2004/04/11 04:38:59 easysw Exp $" // // Visual support for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -115,5 +115,5 @@ int Fl::visual(int flags) { #endif // -// End of "$Id: Fl_visual.cxx,v 1.7.2.4.2.5 2003/01/30 21:43:10 easysw Exp $". +// End of "$Id: Fl_visual.cxx,v 1.7.2.4.2.6 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 30e58cd..ecd4651 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_win32.cxx,v 1.33.2.37.2.47 2003/06/15 04:27:35 easysw Exp $" +// "$Id: Fl_win32.cxx,v 1.33.2.37.2.48 2004/04/11 04:38:59 easysw Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -1195,5 +1195,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.47 2003/06/15 04:27:35 easysw Exp $". +// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.48 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 409ac2d..c028d43 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_x.cxx,v 1.24.2.24.2.30 2003/06/15 04:27:35 easysw Exp $" +// "$Id: Fl_x.cxx,v 1.24.2.24.2.33 2004/04/11 04:38:59 easysw Exp $" // // X specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -756,7 +756,9 @@ int fl_handle(const XEvent& thisevent) // easier to program shortcuts and is Windoze-compatable: keysym = XKeycodeToKeysym(fl_display, keycode, 0); } - if (Fl::event_state(FL_CTRL) && keysym == '-') buffer[0] = 0x1f; // ^_ + // MRS: Can't use Fl::event_state(FL_CTRL) since the state is not + // set until set_event_xy() is called later... + if ((xevent.xkey.state & ControlMask) && keysym == '-') buffer[0] = 0x1f; // ^_ buffer[len] = 0; Fl::e_text = buffer; Fl::e_length = len; @@ -1085,7 +1087,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap) } // Make it receptive to DnD: - int version = 4; + long version = 4; XChangeProperty(fl_display, xp->xid, fl_XdndAware, XA_ATOM, sizeof(int)*8, 0, (unsigned char*)&version, 1); @@ -1268,5 +1270,5 @@ void Fl_Window::make_current() { #endif // -// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.30 2003/06/15 04:27:35 easysw Exp $". +// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.33 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/Makefile b/src/Makefile index d93a3ac..b24d28f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,9 +1,9 @@ # -# "$Id: Makefile,v 1.18.2.14.2.54 2003/08/24 13:09:06 easysw Exp $" +# "$Id: Makefile,v 1.18.2.14.2.56 2004/04/11 04:38:59 easysw Exp $" # # Library makefile for the Fast Light Tool Kit (FLTK). # -# Copyright 1998-2003 by Bill Spitzak and others. +# Copyright 1998-2004 by Bill Spitzak and others. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -55,6 +55,7 @@ CPPFILES = \ Fl_Menu.cxx \ Fl_Menu_.cxx \ Fl_Menu_Bar.cxx \ + Fl_Sys_Menu_Bar.cxx \ Fl_Menu_Button.cxx \ Fl_Menu_Window.cxx \ Fl_Menu_add.cxx \ @@ -582,5 +583,5 @@ uninstall: # -# End of "$Id: Makefile,v 1.18.2.14.2.54 2003/08/24 13:09:06 easysw Exp $". +# End of "$Id: Makefile,v 1.18.2.14.2.56 2004/04/11 04:38:59 easysw Exp $". # diff --git a/src/cmap.cxx b/src/cmap.cxx index 60b317a..2f41a5a 100644 --- a/src/cmap.cxx +++ b/src/cmap.cxx @@ -1,9 +1,9 @@ // -// "$Id: cmap.cxx,v 1.4.2.6.2.3 2003/01/30 21:43:20 easysw Exp $" +// "$Id: cmap.cxx,v 1.4.2.6.2.4 2004/04/11 04:38:59 easysw Exp $" // // Colormap generation program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -175,5 +175,5 @@ int main() { } // -// End of "$Id: cmap.cxx,v 1.4.2.6.2.3 2003/01/30 21:43:20 easysw Exp $". +// End of "$Id: cmap.cxx,v 1.4.2.6.2.4 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index 6ce6d70..d4cfda2 100644 --- a/src/filename_absolute.cxx +++ b/src/filename_absolute.cxx @@ -1,9 +1,9 @@ // -// "$Id: filename_absolute.cxx,v 1.5.2.4.2.10 2003/01/30 21:43:20 easysw Exp $" +// "$Id: filename_absolute.cxx,v 1.5.2.4.2.12 2004/04/11 04:38:59 easysw Exp $" // // Filename expansion routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -132,6 +132,11 @@ fl_filename_relative(char *to, // O - Relative filename } #if defined(WIN32) || defined(__EMX__) + if (!strcasecmp(from, cwd)) { + strlcpy(to, ".", tolen); + return (1); + } + if (*from != *cwd) { // Not the same drive... strlcpy(to, from, tolen); @@ -139,6 +144,11 @@ fl_filename_relative(char *to, // O - Relative filename } for (slash = from + 2, newslash = cwd + 2; #else + if (!strcmp(from, cwd)) { + strlcpy(to, ".", tolen); + return (1); + } + for (slash = from, newslash = cwd; #endif // WIN32 || __EMX__ *slash != '\0' && *newslash != '\0'; @@ -176,5 +186,5 @@ fl_filename_relative(char *to, // O - Relative filename // -// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.10 2003/01/30 21:43:20 easysw Exp $". +// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.12 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/filename_expand.cxx b/src/filename_expand.cxx index 8b317fd..97502cd 100644 --- a/src/filename_expand.cxx +++ b/src/filename_expand.cxx @@ -1,9 +1,9 @@ // -// "$Id: filename_expand.cxx,v 1.4.2.4.2.7 2003/01/30 21:43:20 easysw Exp $" +// "$Id: filename_expand.cxx,v 1.4.2.4.2.8 2004/04/11 04:38:59 easysw Exp $" // // Filename expansion routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -104,5 +104,5 @@ int fl_filename_expand(char *to,int tolen, const char *from) { // -// End of "$Id: filename_expand.cxx,v 1.4.2.4.2.7 2003/01/30 21:43:20 easysw Exp $". +// End of "$Id: filename_expand.cxx,v 1.4.2.4.2.8 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/filename_ext.cxx b/src/filename_ext.cxx index ca34c64..a2c623c 100644 --- a/src/filename_ext.cxx +++ b/src/filename_ext.cxx @@ -1,9 +1,9 @@ // -// "$Id: filename_ext.cxx,v 1.4.2.4.2.3 2003/01/30 21:43:20 easysw Exp $" +// "$Id: filename_ext.cxx,v 1.4.2.4.2.4 2004/04/11 04:38:59 easysw Exp $" // // Filename extension routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -41,5 +41,5 @@ const char *fl_filename_ext(const char *buf) { } // -// End of "$Id: filename_ext.cxx,v 1.4.2.4.2.3 2003/01/30 21:43:20 easysw Exp $". +// End of "$Id: filename_ext.cxx,v 1.4.2.4.2.4 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/filename_isdir.cxx b/src/filename_isdir.cxx index 1a094ed..9fb1e77 100644 --- a/src/filename_isdir.cxx +++ b/src/filename_isdir.cxx @@ -1,9 +1,9 @@ // -// "$Id: filename_isdir.cxx,v 1.4.2.5.2.8 2003/01/30 21:43:21 easysw Exp $" +// "$Id: filename_isdir.cxx,v 1.4.2.5.2.9 2004/04/11 04:38:59 easysw Exp $" // // Directory detection routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -68,5 +68,5 @@ int fl_filename_isdir(const char* n) { } // -// End of "$Id: filename_isdir.cxx,v 1.4.2.5.2.8 2003/01/30 21:43:21 easysw Exp $". +// End of "$Id: filename_isdir.cxx,v 1.4.2.5.2.9 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/filename_list.cxx b/src/filename_list.cxx index 94bdf6f..baced1b 100644 --- a/src/filename_list.cxx +++ b/src/filename_list.cxx @@ -1,9 +1,9 @@ // -// "$Id: filename_list.cxx,v 1.10.2.11.2.6 2003/01/30 21:43:21 easysw Exp $" +// "$Id: filename_list.cxx,v 1.10.2.11.2.7 2004/04/11 04:38:59 easysw Exp $" // // Filename list routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -71,5 +71,5 @@ int fl_filename_list(const char *d, dirent ***list, } // -// End of "$Id: filename_list.cxx,v 1.10.2.11.2.6 2003/01/30 21:43:21 easysw Exp $". +// End of "$Id: filename_list.cxx,v 1.10.2.11.2.7 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/filename_match.cxx b/src/filename_match.cxx index 768bdc3..4d66763 100644 --- a/src/filename_match.cxx +++ b/src/filename_match.cxx @@ -1,9 +1,9 @@ // -// "$Id: filename_match.cxx,v 1.5.2.4.2.5 2003/01/30 21:43:22 easysw Exp $" +// "$Id: filename_match.cxx,v 1.5.2.4.2.6 2004/04/11 04:38:59 easysw Exp $" // // Pattern matching routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -100,5 +100,5 @@ int fl_filename_match(const char *s, const char *p) { } // -// End of "$Id: filename_match.cxx,v 1.5.2.4.2.5 2003/01/30 21:43:22 easysw Exp $". +// End of "$Id: filename_match.cxx,v 1.5.2.4.2.6 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/filename_setext.cxx b/src/filename_setext.cxx index f830192..64f3003 100644 --- a/src/filename_setext.cxx +++ b/src/filename_setext.cxx @@ -1,9 +1,9 @@ // -// "$Id: filename_setext.cxx,v 1.4.2.3.2.6 2003/01/30 21:43:23 easysw Exp $" +// "$Id: filename_setext.cxx,v 1.4.2.3.2.7 2004/04/11 04:38:59 easysw Exp $" // // Filename extension routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -40,5 +40,5 @@ char *fl_filename_setext(char *buf, int buflen, const char *ext) { // -// End of "$Id: filename_setext.cxx,v 1.4.2.3.2.6 2003/01/30 21:43:23 easysw Exp $". +// End of "$Id: filename_setext.cxx,v 1.4.2.3.2.7 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_arc.cxx b/src/fl_arc.cxx index b00913b..6af2176 100644 --- a/src/fl_arc.cxx +++ b/src/fl_arc.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_arc.cxx,v 1.4.2.3.2.7 2003/01/30 21:43:23 easysw Exp $" +// "$Id: fl_arc.cxx,v 1.4.2.3.2.8 2004/04/11 04:38:59 easysw Exp $" // // Arc functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -74,5 +74,5 @@ void fl_circle(double x,double y,double r) { #endif // -// End of "$Id: fl_arc.cxx,v 1.4.2.3.2.7 2003/01/30 21:43:23 easysw Exp $". +// End of "$Id: fl_arc.cxx,v 1.4.2.3.2.8 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_arci.cxx b/src/fl_arci.cxx index 62dfa1a..85f41c4 100644 --- a/src/fl_arci.cxx +++ b/src/fl_arci.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_arci.cxx,v 1.4.2.5.2.4 2003/01/30 21:43:24 easysw Exp $" +// "$Id: fl_arci.cxx,v 1.4.2.5.2.5 2004/04/11 04:38:59 easysw Exp $" // // Arc (integer) drawing functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -76,5 +76,5 @@ void fl_pie(int x,int y,int w,int h,double a1,double a2) { } // -// End of "$Id: fl_arci.cxx,v 1.4.2.5.2.4 2003/01/30 21:43:24 easysw Exp $". +// End of "$Id: fl_arci.cxx,v 1.4.2.5.2.5 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx index 1989988..98e2bb5 100644 --- a/src/fl_ask.cxx +++ b/src/fl_ask.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_ask.cxx,v 1.8.2.8.2.12 2003/01/30 21:43:26 easysw Exp $" +// "$Id: fl_ask.cxx,v 1.8.2.8.2.13 2004/04/11 04:38:59 easysw Exp $" // // Standard dialog functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -344,5 +344,5 @@ const char *fl_password(const char *fmt, const char *defstr, ...) { } // -// End of "$Id: fl_ask.cxx,v 1.8.2.8.2.12 2003/01/30 21:43:26 easysw Exp $". +// End of "$Id: fl_ask.cxx,v 1.8.2.8.2.13 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx index 2d7c2f2..226cd84 100644 --- a/src/fl_boxtype.cxx +++ b/src/fl_boxtype.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.13 2003/05/18 22:12:24 easysw Exp $" +// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.14 2004/04/11 04:38:59 easysw Exp $" // // Box drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -297,5 +297,5 @@ const { } // -// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.13 2003/05/18 22:12:24 easysw Exp $". +// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.14 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_call_main.c b/src/fl_call_main.c index 0ba8851..b3416ce 100644 --- a/src/fl_call_main.c +++ b/src/fl_call_main.c @@ -1,7 +1,7 @@ /* - * "$Id: fl_call_main.c,v 1.1.2.11.2.4 2003/01/30 21:43:28 easysw Exp $" + * "$Id: fl_call_main.c,v 1.1.2.11.2.5 2004/04/11 04:38:59 easysw Exp $" * - * Copyright 1998-2003 by Bill Spitzak and others. + * Copyright 1998-2004 by Bill Spitzak and others. * * fl_call_main() calls main() for you Windows people. Needs to be done in C * because Borland C++ won't let you call main() from C++. @@ -100,6 +100,6 @@ static void dummy(void) {dummy();} #endif /* - * End of "$Id: fl_call_main.c,v 1.1.2.11.2.4 2003/01/30 21:43:28 easysw Exp $". + * End of "$Id: fl_call_main.c,v 1.1.2.11.2.5 2004/04/11 04:38:59 easysw Exp $". */ diff --git a/src/fl_color.cxx b/src/fl_color.cxx index d736309..3bdbb8e 100644 --- a/src/fl_color.cxx +++ b/src/fl_color.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_color.cxx,v 1.12.2.5.2.8 2003/01/30 21:43:28 easysw Exp $" +// "$Id: fl_color.cxx,v 1.12.2.5.2.9 2004/04/11 04:38:59 easysw Exp $" // // Color functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -377,5 +377,5 @@ Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg) { } // -// End of "$Id: fl_color.cxx,v 1.12.2.5.2.8 2003/01/30 21:43:28 easysw Exp $". +// End of "$Id: fl_color.cxx,v 1.12.2.5.2.9 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_color_mac.cxx b/src/fl_color_mac.cxx index 351ee33..675b7a0 100644 --- a/src/fl_color_mac.cxx +++ b/src/fl_color_mac.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_color_mac.cxx,v 1.1.2.5 2003/01/30 21:43:29 easysw Exp $" +// "$Id: fl_color_mac.cxx,v 1.1.2.6 2004/04/11 04:38:59 easysw Exp $" // // MacOS color functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -86,5 +86,5 @@ void Fl::set_color(Fl_Color i, unsigned c) { } // -// End of "$Id: fl_color_mac.cxx,v 1.1.2.5 2003/01/30 21:43:29 easysw Exp $". +// End of "$Id: fl_color_mac.cxx,v 1.1.2.6 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_color_win32.cxx b/src/fl_color_win32.cxx index 20c1f90..b7fb3aa 100644 --- a/src/fl_color_win32.cxx +++ b/src/fl_color_win32.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_color_win32.cxx,v 1.14.2.3.2.7 2003/01/30 21:43:30 easysw Exp $" +// "$Id: fl_color_win32.cxx,v 1.14.2.3.2.8 2004/04/11 04:38:59 easysw Exp $" // // WIN32 color functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -223,5 +223,5 @@ fl_select_palette(void) #endif // -// End of "$Id: fl_color_win32.cxx,v 1.14.2.3.2.7 2003/01/30 21:43:30 easysw Exp $". +// End of "$Id: fl_color_win32.cxx,v 1.14.2.3.2.8 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_cursor.cxx b/src/fl_cursor.cxx index 152df8d..9e26a90 100644 --- a/src/fl_cursor.cxx +++ b/src/fl_cursor.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_cursor.cxx,v 1.6.2.6.2.9 2003/04/03 04:28:15 matthiaswm Exp $" +// "$Id: fl_cursor.cxx,v 1.6.2.6.2.10 2004/04/11 04:38:59 easysw Exp $" // // Mouse cursor support for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -312,5 +312,5 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) { #endif // -// End of "$Id: fl_cursor.cxx,v 1.6.2.6.2.9 2003/04/03 04:28:15 matthiaswm Exp $". +// End of "$Id: fl_cursor.cxx,v 1.6.2.6.2.10 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_curve.cxx b/src/fl_curve.cxx index bc406ed..d3549f2 100644 --- a/src/fl_curve.cxx +++ b/src/fl_curve.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_curve.cxx,v 1.4.2.4.2.5 2003/01/30 21:43:32 easysw Exp $" +// "$Id: fl_curve.cxx,v 1.4.2.4.2.6 2004/04/11 04:38:59 easysw Exp $" // // Bezier curve functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -100,5 +100,5 @@ void fl_curve(double X0, double Y0, } // -// End of "$Id: fl_curve.cxx,v 1.4.2.4.2.5 2003/01/30 21:43:32 easysw Exp $". +// End of "$Id: fl_curve.cxx,v 1.4.2.4.2.6 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_diamond_box.cxx b/src/fl_diamond_box.cxx index 1b729ce..5fd6593 100644 --- a/src/fl_diamond_box.cxx +++ b/src/fl_diamond_box.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_diamond_box.cxx,v 1.5.2.3.2.3 2003/01/30 21:43:33 easysw Exp $" +// "$Id: fl_diamond_box.cxx,v 1.5.2.3.2.4 2004/04/11 04:38:59 easysw Exp $" // // Diamond box code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -74,5 +74,5 @@ Fl_Boxtype fl_define_FL_DIAMOND_BOX() { } // -// End of "$Id: fl_diamond_box.cxx,v 1.5.2.3.2.3 2003/01/30 21:43:33 easysw Exp $". +// End of "$Id: fl_diamond_box.cxx,v 1.5.2.3.2.4 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_dnd.cxx b/src/fl_dnd.cxx index a7f4529..a2eefaa 100644 --- a/src/fl_dnd.cxx +++ b/src/fl_dnd.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_dnd.cxx,v 1.3.2.3 2003/01/30 21:43:36 easysw Exp $" +// "$Id: fl_dnd.cxx,v 1.3.2.4 2004/04/11 04:38:59 easysw Exp $" // // Drag & Drop code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -32,5 +32,5 @@ #endif // -// End of "$Id: fl_dnd.cxx,v 1.3.2.3 2003/01/30 21:43:36 easysw Exp $". +// End of "$Id: fl_dnd.cxx,v 1.3.2.4 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_dnd_mac.cxx b/src/fl_dnd_mac.cxx index 3a99457..ef9bae3 100644 --- a/src/fl_dnd_mac.cxx +++ b/src/fl_dnd_mac.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_dnd_mac.cxx,v 1.1.2.4 2003/01/30 21:43:36 easysw Exp $" +// "$Id: fl_dnd_mac.cxx,v 1.1.2.5 2004/04/11 04:38:59 easysw Exp $" // // Drag & Drop code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -81,5 +81,5 @@ int Fl::dnd() // -// End of "$Id: fl_dnd_mac.cxx,v 1.1.2.4 2003/01/30 21:43:36 easysw Exp $". +// End of "$Id: fl_dnd_mac.cxx,v 1.1.2.5 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_dnd_win32.cxx b/src/fl_dnd_win32.cxx index df2f705..b6c1c3f 100644 --- a/src/fl_dnd_win32.cxx +++ b/src/fl_dnd_win32.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_dnd_win32.cxx,v 1.5.2.15 2003/05/04 21:45:46 easysw Exp $" +// "$Id: fl_dnd_win32.cxx,v 1.5.2.16 2004/04/11 04:38:59 easysw Exp $" // // Drag & Drop code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -349,5 +349,5 @@ int Fl::dnd() // -// End of "$Id: fl_dnd_win32.cxx,v 1.5.2.15 2003/05/04 21:45:46 easysw Exp $". +// End of "$Id: fl_dnd_win32.cxx,v 1.5.2.16 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_dnd_x.cxx b/src/fl_dnd_x.cxx index 31499bb..0f76ef8 100644 --- a/src/fl_dnd_x.cxx +++ b/src/fl_dnd_x.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_dnd_x.cxx,v 1.5.2.7 2003/05/04 21:45:46 easysw Exp $" +// "$Id: fl_dnd_x.cxx,v 1.5.2.8 2004/04/11 04:38:59 easysw Exp $" // // Drag & Drop code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -168,5 +168,5 @@ int Fl::dnd() { // -// End of "$Id: fl_dnd_x.cxx,v 1.5.2.7 2003/05/04 21:45:46 easysw Exp $". +// End of "$Id: fl_dnd_x.cxx,v 1.5.2.8 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 54e8207..84b97cf 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_draw.cxx,v 1.6.2.4.2.15 2003/07/18 05:53:21 matthiaswm Exp $" +// "$Id: fl_draw.cxx,v 1.6.2.4.2.16 2004/04/11 04:38:59 easysw Exp $" // // Label drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -325,5 +325,5 @@ void fl_measure(const char* str, int& w, int& h, int draw_symbols) { } // -// End of "$Id: fl_draw.cxx,v 1.6.2.4.2.15 2003/07/18 05:53:21 matthiaswm Exp $". +// End of "$Id: fl_draw.cxx,v 1.6.2.4.2.16 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_draw_image.cxx b/src/fl_draw_image.cxx index dd48485..d387b0f 100644 --- a/src/fl_draw_image.cxx +++ b/src/fl_draw_image.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_draw_image.cxx,v 1.5.2.6.2.6 2003/01/30 21:43:41 easysw Exp $" +// "$Id: fl_draw_image.cxx,v 1.5.2.6.2.7 2004/04/11 04:38:59 easysw Exp $" // // Image drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -570,5 +570,5 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { #endif // -// End of "$Id: fl_draw_image.cxx,v 1.5.2.6.2.6 2003/01/30 21:43:41 easysw Exp $". +// End of "$Id: fl_draw_image.cxx,v 1.5.2.6.2.7 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_draw_image_mac.cxx b/src/fl_draw_image_mac.cxx index 72004ef..aecd8ae 100644 --- a/src/fl_draw_image_mac.cxx +++ b/src/fl_draw_image_mac.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_draw_image_mac.cxx,v 1.1.2.5 2003/01/30 21:43:42 easysw Exp $" +// "$Id: fl_draw_image_mac.cxx,v 1.1.2.6 2004/04/11 04:38:59 easysw Exp $" // // MacOS image drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -275,5 +275,5 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { } // -// End of "$Id: fl_draw_image_mac.cxx,v 1.1.2.5 2003/01/30 21:43:42 easysw Exp $". +// End of "$Id: fl_draw_image_mac.cxx,v 1.1.2.6 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_draw_image_win32.cxx b/src/fl_draw_image_win32.cxx index 6ac9413..ff317b8 100644 --- a/src/fl_draw_image_win32.cxx +++ b/src/fl_draw_image_win32.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_draw_image_win32.cxx,v 1.4.2.3.2.5 2003/01/30 21:43:43 easysw Exp $" +// "$Id: fl_draw_image_win32.cxx,v 1.4.2.3.2.6 2004/04/11 04:38:59 easysw Exp $" // // WIN32 image drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -258,5 +258,5 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { } // -// End of "$Id: fl_draw_image_win32.cxx,v 1.4.2.3.2.5 2003/01/30 21:43:43 easysw Exp $". +// End of "$Id: fl_draw_image_win32.cxx,v 1.4.2.3.2.6 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx index bb865a4..9e6eb56 100644 --- a/src/fl_draw_pixmap.cxx +++ b/src/fl_draw_pixmap.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.12 2003/01/30 21:43:43 easysw Exp $" +// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.13 2004/04/11 04:38:59 easysw Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -260,5 +260,5 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) { } // -// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.12 2003/01/30 21:43:43 easysw Exp $". +// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.13 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_engraved_label.cxx b/src/fl_engraved_label.cxx index 87d68ce..444b9b1 100644 --- a/src/fl_engraved_label.cxx +++ b/src/fl_engraved_label.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_engraved_label.cxx,v 1.4.2.3.2.3 2003/01/30 21:43:45 easysw Exp $" +// "$Id: fl_engraved_label.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:59 easysw Exp $" // // Engraved label drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -87,5 +87,5 @@ Fl_Labeltype fl_define_FL_EMBOSSED_LABEL() { } // -// End of "$Id: fl_engraved_label.cxx,v 1.4.2.3.2.3 2003/01/30 21:43:45 easysw Exp $". +// End of "$Id: fl_engraved_label.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:59 easysw Exp $". // diff --git a/src/fl_file_dir.cxx b/src/fl_file_dir.cxx index addde1f..89f436f 100644 --- a/src/fl_file_dir.cxx +++ b/src/fl_file_dir.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_file_dir.cxx,v 1.1.2.14 2003/01/30 21:43:46 easysw Exp $" +// "$Id: fl_file_dir.cxx,v 1.1.2.15 2004/04/11 04:39:00 easysw Exp $" // // File chooser widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -142,5 +142,5 @@ fl_dir_chooser(const char *message, // I - Message for titlebar // -// End of "$Id: fl_file_dir.cxx,v 1.1.2.14 2003/01/30 21:43:46 easysw Exp $". +// End of "$Id: fl_file_dir.cxx,v 1.1.2.15 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_font.cxx b/src/fl_font.cxx index 4227170..77e6ee7 100644 --- a/src/fl_font.cxx +++ b/src/fl_font.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_font.cxx,v 1.9.2.5.2.7 2003/01/30 21:43:47 easysw Exp $" +// "$Id: fl_font.cxx,v 1.9.2.5.2.8 2004/04/11 04:39:00 easysw Exp $" // // Font selection code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -54,5 +54,5 @@ void fl_draw(const char* str, int x, int y) { } // -// End of "$Id: fl_font.cxx,v 1.9.2.5.2.7 2003/01/30 21:43:47 easysw Exp $". +// End of "$Id: fl_font.cxx,v 1.9.2.5.2.8 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index 3fa84a2..ecc58d1 100644 --- a/src/fl_font_mac.cxx +++ b/src/fl_font_mac.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_font_mac.cxx,v 1.1.2.14 2003/05/26 14:19:50 easysw Exp $" +// "$Id: fl_font_mac.cxx,v 1.1.2.15 2004/04/11 04:39:00 easysw Exp $" // // MacOS font selection routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -195,5 +195,5 @@ void fl_draw(const char* str, int n, int x, int y) { // -// End of "$Id: fl_font_mac.cxx,v 1.1.2.14 2003/05/26 14:19:50 easysw Exp $". +// End of "$Id: fl_font_mac.cxx,v 1.1.2.15 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx index 8720856..ef91a05 100644 --- a/src/fl_font_win32.cxx +++ b/src/fl_font_win32.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_font_win32.cxx,v 1.9.2.3.2.5 2003/01/30 21:43:50 easysw Exp $" +// "$Id: fl_font_win32.cxx,v 1.9.2.3.2.6 2004/04/11 04:39:00 easysw Exp $" // // WIN32 font selection routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -156,5 +156,5 @@ void fl_draw(const char* str, int n, int x, int y) { // -// End of "$Id: fl_font_win32.cxx,v 1.9.2.3.2.5 2003/01/30 21:43:50 easysw Exp $". +// End of "$Id: fl_font_win32.cxx,v 1.9.2.3.2.6 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_font_x.cxx b/src/fl_font_x.cxx index fdcd93a..ce572d2 100644 --- a/src/fl_font_x.cxx +++ b/src/fl_font_x.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_font_x.cxx,v 1.10.2.4 2003/01/30 21:43:52 easysw Exp $" +// "$Id: fl_font_x.cxx,v 1.10.2.5 2004/04/11 04:39:00 easysw Exp $" // // Standard X11 font selection code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -250,5 +250,5 @@ void fl_draw(const char* str, int n, int x, int y) { } // -// End of "$Id: fl_font_x.cxx,v 1.10.2.4 2003/01/30 21:43:52 easysw Exp $". +// End of "$Id: fl_font_x.cxx,v 1.10.2.5 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx index aeeae3c..a37fa02 100644 --- a/src/fl_font_xft.cxx +++ b/src/fl_font_xft.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_font_xft.cxx,v 1.4.2.12 2003/07/12 04:20:48 easysw Exp $" +// "$Id: fl_font_xft.cxx,v 1.4.2.13 2004/04/11 04:39:00 easysw Exp $" // // Xft font code for the Fast Light Tool Kit (FLTK). // -// Copyright 2001-2003 Bill Spitzak and others. +// Copyright 2001-2004 Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -247,5 +247,5 @@ void fl_draw(const char *str, int n, int x, int y) { } // -// End of "$Id: fl_font_xft.cxx,v 1.4.2.12 2003/07/12 04:20:48 easysw Exp $" +// End of "$Id: fl_font_xft.cxx,v 1.4.2.13 2004/04/11 04:39:00 easysw Exp $" // diff --git a/src/fl_images_core.cxx b/src/fl_images_core.cxx index 445dfa5..48bd927 100644 --- a/src/fl_images_core.cxx +++ b/src/fl_images_core.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_images_core.cxx,v 1.1.2.5 2003/01/30 21:43:55 easysw Exp $" +// "$Id: fl_images_core.cxx,v 1.1.2.6 2004/04/11 04:39:00 easysw Exp $" // // FLTK images library core. // -// Copyright 1997-2003 by Easy Software Products. +// Copyright 1997-2004 by Easy Software Products. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -97,5 +97,5 @@ fl_check_images(const char *name, // I - Filename // -// End of "$Id: fl_images_core.cxx,v 1.1.2.5 2003/01/30 21:43:55 easysw Exp $". +// End of "$Id: fl_images_core.cxx,v 1.1.2.6 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_labeltype.cxx b/src/fl_labeltype.cxx index 0f21c57..1ce40ec 100644 --- a/src/fl_labeltype.cxx +++ b/src/fl_labeltype.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_labeltype.cxx,v 1.6.2.3.2.7 2003/01/30 21:43:56 easysw Exp $" +// "$Id: fl_labeltype.cxx,v 1.6.2.3.2.8 2004/04/11 04:39:00 easysw Exp $" // // Label drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -127,5 +127,5 @@ void Fl_Widget::draw_label(int X, int Y, int W, int H, Fl_Align a) const { #include <FL/Fl_Input_.H> // -// End of "$Id: fl_labeltype.cxx,v 1.6.2.3.2.7 2003/01/30 21:43:56 easysw Exp $". +// End of "$Id: fl_labeltype.cxx,v 1.6.2.3.2.8 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_line_style.cxx b/src/fl_line_style.cxx index c5be69e..d13b2c8 100644 --- a/src/fl_line_style.cxx +++ b/src/fl_line_style.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_line_style.cxx,v 1.3.2.3.2.13 2003/01/30 21:43:57 easysw Exp $" +// "$Id: fl_line_style.cxx,v 1.3.2.3.2.14 2004/04/11 04:39:00 easysw Exp $" // // Line style code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -104,5 +104,5 @@ void fl_line_style(int style, int width, char* dashes) { // -// End of "$Id: fl_line_style.cxx,v 1.3.2.3.2.13 2003/01/30 21:43:57 easysw Exp $". +// End of "$Id: fl_line_style.cxx,v 1.3.2.3.2.14 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_oval_box.cxx b/src/fl_oval_box.cxx index 94d4d28..3c3693f 100644 --- a/src/fl_oval_box.cxx +++ b/src/fl_oval_box.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_oval_box.cxx,v 1.4.2.3.2.3 2003/01/30 21:43:59 easysw Exp $" +// "$Id: fl_oval_box.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $" // // Oval box drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -60,5 +60,5 @@ Fl_Boxtype fl_define_FL_OVAL_BOX() { } // -// End of "$Id: fl_oval_box.cxx,v 1.4.2.3.2.3 2003/01/30 21:43:59 easysw Exp $". +// End of "$Id: fl_oval_box.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_overlay.cxx b/src/fl_overlay.cxx index 3c0117d..995981c 100644 --- a/src/fl_overlay.cxx +++ b/src/fl_overlay.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_overlay.cxx,v 1.4.2.3.2.3 2003/01/30 21:43:59 easysw Exp $" +// "$Id: fl_overlay.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $" // // Overlay support for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -66,5 +66,5 @@ void fl_overlay_rect(int x, int y, int w, int h) { } // -// End of "$Id: fl_overlay.cxx,v 1.4.2.3.2.3 2003/01/30 21:43:59 easysw Exp $". +// End of "$Id: fl_overlay.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_overlay_visual.cxx b/src/fl_overlay_visual.cxx index fecff54..cae016a 100644 --- a/src/fl_overlay_visual.cxx +++ b/src/fl_overlay_visual.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_overlay_visual.cxx,v 1.4.2.5.2.3 2003/01/30 21:44:00 easysw Exp $" +// "$Id: fl_overlay_visual.cxx,v 1.4.2.5.2.4 2004/04/11 04:39:00 easysw Exp $" // // X overlay support for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -99,5 +99,5 @@ XVisualInfo *fl_find_overlay_visual() { #endif // -// End of "$Id: fl_overlay_visual.cxx,v 1.4.2.5.2.3 2003/01/30 21:44:00 easysw Exp $". +// End of "$Id: fl_overlay_visual.cxx,v 1.4.2.5.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_plastic.cxx b/src/fl_plastic.cxx index 20570cf..8deb698 100644 --- a/src/fl_plastic.cxx +++ b/src/fl_plastic.cxx @@ -1,12 +1,12 @@ // -// "$Id: fl_plastic.cxx,v 1.1.2.19 2003/05/19 14:56:42 easysw Exp $" +// "$Id: fl_plastic.cxx,v 1.1.2.20 2004/04/11 04:39:00 easysw Exp $" // // "Plastic" drawing routines for the Fast Light Tool Kit (FLTK). // // These box types provide a cross between Aqua and KDE buttons; kindof // like translucent plastic buttons... // -// Copyright 2001-2003 by Michael Sweet. +// Copyright 2001-2004 by Michael Sweet. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -226,5 +226,5 @@ Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX() { // -// End of "$Id: fl_plastic.cxx,v 1.1.2.19 2003/05/19 14:56:42 easysw Exp $". +// End of "$Id: fl_plastic.cxx,v 1.1.2.20 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_read_image.cxx b/src/fl_read_image.cxx index 5470288..493f87c 100644 --- a/src/fl_read_image.cxx +++ b/src/fl_read_image.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_read_image.cxx,v 1.1.2.2 2003/01/30 21:44:01 easysw Exp $" +// "$Id: fl_read_image.cxx,v 1.1.2.3 2004/04/11 04:39:00 easysw Exp $" // // X11 image reading routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -393,5 +393,5 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate #endif // -// End of "$Id: fl_read_image.cxx,v 1.1.2.2 2003/01/30 21:44:01 easysw Exp $". +// End of "$Id: fl_read_image.cxx,v 1.1.2.3 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_read_image_mac.cxx b/src/fl_read_image_mac.cxx index 6b07580..262321c 100644 --- a/src/fl_read_image_mac.cxx +++ b/src/fl_read_image_mac.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_read_image_mac.cxx,v 1.1.2.4 2003/09/08 18:08:04 easysw Exp $" +// "$Id: fl_read_image_mac.cxx,v 1.1.2.5 2004/04/11 04:39:00 easysw Exp $" // // WIN32 image reading routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -116,5 +116,5 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate // -// End of "$Id: fl_read_image_mac.cxx,v 1.1.2.4 2003/09/08 18:08:04 easysw Exp $". +// End of "$Id: fl_read_image_mac.cxx,v 1.1.2.5 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_read_image_win32.cxx b/src/fl_read_image_win32.cxx index b1bdc30..f372544 100644 --- a/src/fl_read_image_win32.cxx +++ b/src/fl_read_image_win32.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_read_image_win32.cxx,v 1.1.2.3 2003/01/30 21:44:04 easysw Exp $" +// "$Id: fl_read_image_win32.cxx,v 1.1.2.4 2004/04/11 04:39:00 easysw Exp $" // // WIN32 image reading routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -66,5 +66,5 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate // -// End of "$Id: fl_read_image_win32.cxx,v 1.1.2.3 2003/01/30 21:44:04 easysw Exp $". +// End of "$Id: fl_read_image_win32.cxx,v 1.1.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx index 1914796..79a737e 100644 --- a/src/fl_rect.cxx +++ b/src/fl_rect.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_rect.cxx,v 1.10.2.4.2.10 2003/01/30 21:44:04 easysw Exp $" +// "$Id: fl_rect.cxx,v 1.10.2.4.2.11 2004/04/11 04:39:00 easysw Exp $" // // Rectangle drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -508,5 +508,5 @@ int fl_clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H){ } // -// End of "$Id: fl_rect.cxx,v 1.10.2.4.2.10 2003/01/30 21:44:04 easysw Exp $". +// End of "$Id: fl_rect.cxx,v 1.10.2.4.2.11 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_round_box.cxx b/src/fl_round_box.cxx index c825c4a..b02f825 100644 --- a/src/fl_round_box.cxx +++ b/src/fl_round_box.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_round_box.cxx,v 1.6.2.3.2.4 2003/01/30 21:44:08 easysw Exp $" +// "$Id: fl_round_box.cxx,v 1.6.2.3.2.5 2004/04/11 04:39:00 easysw Exp $" // // Round box drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -116,5 +116,5 @@ Fl_Boxtype fl_define_FL_ROUND_UP_BOX() { } // -// End of "$Id: fl_round_box.cxx,v 1.6.2.3.2.4 2003/01/30 21:44:08 easysw Exp $". +// End of "$Id: fl_round_box.cxx,v 1.6.2.3.2.5 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_rounded_box.cxx b/src/fl_rounded_box.cxx index 8b16861..7e1cef6 100644 --- a/src/fl_rounded_box.cxx +++ b/src/fl_rounded_box.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_rounded_box.cxx,v 1.4.2.3.2.3 2003/01/30 21:44:09 easysw Exp $" +// "$Id: fl_rounded_box.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $" // // Rounded box drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -93,5 +93,5 @@ Fl_Boxtype fl_define_FL_RSHADOW_BOX() { } // -// End of "$Id: fl_rounded_box.cxx,v 1.4.2.3.2.3 2003/01/30 21:44:09 easysw Exp $". +// End of "$Id: fl_rounded_box.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_scroll_area.cxx b/src/fl_scroll_area.cxx index b58e3e8..e22e917 100644 --- a/src/fl_scroll_area.cxx +++ b/src/fl_scroll_area.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_scroll_area.cxx,v 1.4.2.3.2.4 2003/01/30 21:44:12 easysw Exp $" +// "$Id: fl_scroll_area.cxx,v 1.4.2.3.2.6 2004/04/11 04:39:00 easysw Exp $" // // Scrolling routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -27,6 +27,7 @@ // a "callback" which is called to draw rectangular areas that are moved // into the drawing area. +#include <FL/Fl.H> #include <FL/x.H> // scroll a rectangle and redraw the newly exposed portions: @@ -71,6 +72,36 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy, BitBlt(fl_gc, dest_x, dest_y, src_w, src_h, fl_gc, src_x, src_y,SRCCOPY); // NYI: need to redraw areas that the source of BitBlt was bad due to // overlapped windows, probably similar to X version: + // MRS: basic code needs to redraw parts that scrolled from off-screen... + int temp, limit; + int wx, wy; + + // Compute the X position of the current window; + // this only works when scrolling in response to + // a user event; Fl_Window::x/y_root() do not work + // on WIN32... + wx = Fl::event_x_root() - Fl::event_x(); + wy = Fl::event_y_root() - Fl::event_y(); + + temp = wx + src_x; + if (temp < Fl::x()) { + draw_area(data, dest_x, dest_y, Fl::x() - temp, src_h); + } + temp = wx + src_x + src_w; + limit = Fl::x() + Fl::w(); + if (temp > limit) { + draw_area(data, dest_x + src_w - temp + limit, dest_y, temp - limit, src_h); + } + + temp = wy + src_y; + if (temp < Fl::y()) { + draw_area(data, dest_x, dest_y, src_w, Fl::y() - temp); + } + temp = wy + src_y + src_h; + limit = Fl::y() + Fl::h(); + if (temp > limit) { + draw_area(data, dest_x, dest_y + src_h - temp + limit, src_w, temp - limit); + } #elif defined(__APPLE__) Rect src = { src_y, src_x, src_y+src_h, src_x+src_w }; Rect dst = { dest_y, dest_x, dest_y+src_h, dest_x+src_w }; @@ -96,5 +127,5 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy, } // -// End of "$Id: fl_scroll_area.cxx,v 1.4.2.3.2.4 2003/01/30 21:44:12 easysw Exp $". +// End of "$Id: fl_scroll_area.cxx,v 1.4.2.3.2.6 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_set_font.cxx b/src/fl_set_font.cxx index 64ec136..5ee2c48 100644 --- a/src/fl_set_font.cxx +++ b/src/fl_set_font.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_set_font.cxx,v 1.5.2.3.2.9 2003/01/30 21:44:12 easysw Exp $" +// "$Id: fl_set_font.cxx,v 1.5.2.3.2.10 2004/04/11 04:39:00 easysw Exp $" // // Font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -81,5 +81,5 @@ void Fl::set_font(Fl_Font fnum, Fl_Font from) { const char* Fl::get_font(Fl_Font fnum) {return fl_fonts[fnum].name;} // -// End of "$Id: fl_set_font.cxx,v 1.5.2.3.2.9 2003/01/30 21:44:12 easysw Exp $". +// End of "$Id: fl_set_font.cxx,v 1.5.2.3.2.10 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_set_fonts.cxx b/src/fl_set_fonts.cxx index 5ef6220..5122c88 100644 --- a/src/fl_set_fonts.cxx +++ b/src/fl_set_fonts.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_set_fonts.cxx,v 1.6.2.5.2.7 2003/01/30 21:44:14 easysw Exp $" +// "$Id: fl_set_fonts.cxx,v 1.6.2.5.2.8 2004/04/11 04:39:00 easysw Exp $" // // More font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -40,5 +40,5 @@ #endif // WIN32 // -// End of "$Id: fl_set_fonts.cxx,v 1.6.2.5.2.7 2003/01/30 21:44:14 easysw Exp $". +// End of "$Id: fl_set_fonts.cxx,v 1.6.2.5.2.8 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_set_fonts_mac.cxx b/src/fl_set_fonts_mac.cxx index 5574e3f..fd8c021 100644 --- a/src/fl_set_fonts_mac.cxx +++ b/src/fl_set_fonts_mac.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_set_fonts_mac.cxx,v 1.1.2.9 2003/03/09 00:22:17 spitzak Exp $" +// "$Id: fl_set_fonts_mac.cxx,v 1.1.2.10 2004/04/11 04:39:00 easysw Exp $" // // MacOS font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -162,5 +162,5 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) { } // -// End of "$Id: fl_set_fonts_mac.cxx,v 1.1.2.9 2003/03/09 00:22:17 spitzak Exp $". +// End of "$Id: fl_set_fonts_mac.cxx,v 1.1.2.10 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_set_fonts_win32.cxx b/src/fl_set_fonts_win32.cxx index a6b196c..5db6dcc 100755 --- a/src/fl_set_fonts_win32.cxx +++ b/src/fl_set_fonts_win32.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_set_fonts_win32.cxx,v 1.5.2.5.2.10 2003/03/09 00:22:18 spitzak Exp $" +// "$Id: fl_set_fonts_win32.cxx,v 1.5.2.5.2.11 2004/04/11 04:39:00 easysw Exp $" // // WIN32 font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -143,5 +143,5 @@ Fl::get_font_sizes(Fl_Font fnum, int*& sizep) { // -// End of "$Id: fl_set_fonts_win32.cxx,v 1.5.2.5.2.10 2003/03/09 00:22:18 spitzak Exp $". +// End of "$Id: fl_set_fonts_win32.cxx,v 1.5.2.5.2.11 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_set_fonts_x.cxx b/src/fl_set_fonts_x.cxx index c1e41a8..a883528 100644 --- a/src/fl_set_fonts_x.cxx +++ b/src/fl_set_fonts_x.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_set_fonts_x.cxx,v 1.1.2.7 2003/03/09 00:22:20 spitzak Exp $" +// "$Id: fl_set_fonts_x.cxx,v 1.1.2.8 2004/04/11 04:39:00 easysw Exp $" // // X11 font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -344,5 +344,5 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) { } // -// End of "$Id: fl_set_fonts_x.cxx,v 1.1.2.7 2003/03/09 00:22:20 spitzak Exp $". +// End of "$Id: fl_set_fonts_x.cxx,v 1.1.2.8 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_set_fonts_xft.cxx b/src/fl_set_fonts_xft.cxx index 1a3e332..a804c19 100644 --- a/src/fl_set_fonts_xft.cxx +++ b/src/fl_set_fonts_xft.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_set_fonts_xft.cxx,v 1.1.2.4 2003/03/09 00:22:20 spitzak Exp $" +// "$Id: fl_set_fonts_xft.cxx,v 1.1.2.5 2004/04/11 04:39:00 easysw Exp $" // // More font utilities for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -124,5 +124,5 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) { } // -// End of "$Id: fl_set_fonts_xft.cxx,v 1.1.2.4 2003/03/09 00:22:20 spitzak Exp $". +// End of "$Id: fl_set_fonts_xft.cxx,v 1.1.2.5 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_set_gray.cxx b/src/fl_set_gray.cxx index 981fecb..3da5441 100644 --- a/src/fl_set_gray.cxx +++ b/src/fl_set_gray.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_set_gray.cxx,v 1.5.2.3.2.3 2003/01/30 21:44:19 easysw Exp $" +// "$Id: fl_set_gray.cxx,v 1.5.2.3.2.4 2004/04/11 04:39:00 easysw Exp $" // // Background (gray) color routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -58,5 +58,5 @@ void Fl::background2(uchar r, uchar g, uchar b) { } // -// End of "$Id: fl_set_gray.cxx,v 1.5.2.3.2.3 2003/01/30 21:44:19 easysw Exp $". +// End of "$Id: fl_set_gray.cxx,v 1.5.2.3.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_shadow_box.cxx b/src/fl_shadow_box.cxx index 299f262..7589b40 100644 --- a/src/fl_shadow_box.cxx +++ b/src/fl_shadow_box.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_shadow_box.cxx,v 1.4.2.3.2.3 2003/01/30 21:44:20 easysw Exp $" +// "$Id: fl_shadow_box.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $" // // Shadow box drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -50,5 +50,5 @@ Fl_Boxtype fl_define_FL_SHADOW_BOX() { } // -// End of "$Id: fl_shadow_box.cxx,v 1.4.2.3.2.3 2003/01/30 21:44:20 easysw Exp $". +// End of "$Id: fl_shadow_box.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index 6a5f898..e945f6f 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.12 2003/07/18 17:43:30 matthiaswm Exp $" +// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.13 2004/04/11 04:39:00 easysw Exp $" // // Shortcut support routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -201,5 +201,5 @@ int Fl_Widget::test_shortcut() { } // -// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.12 2003/07/18 17:43:30 matthiaswm Exp $". +// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.13 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_show_colormap.cxx b/src/fl_show_colormap.cxx index 6ba68d2..6c7dfa3 100644 --- a/src/fl_show_colormap.cxx +++ b/src/fl_show_colormap.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_show_colormap.cxx,v 1.5.2.4.2.4 2003/01/30 21:44:23 easysw Exp $" +// "$Id: fl_show_colormap.cxx,v 1.5.2.4.2.6 2004/04/11 04:39:00 easysw Exp $" // // Colormap color selection dialog for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -102,6 +102,7 @@ int ColorMenu::handle(int e) { case FL_Left: if (c > 0) c--; break; case FL_Right: if (c < 255) c++; break; case FL_Escape: which = initial; done = 1; return 1; + case FL_KP_Enter: case FL_Enter: done = 1; return 1; default: return 0; } @@ -150,5 +151,5 @@ Fl_Color fl_show_colormap(Fl_Color oldcol) { } // -// End of "$Id: fl_show_colormap.cxx,v 1.5.2.4.2.4 2003/01/30 21:44:23 easysw Exp $". +// End of "$Id: fl_show_colormap.cxx,v 1.5.2.4.2.6 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_symbols.cxx b/src/fl_symbols.cxx index e0d091e..1c1456a 100644 --- a/src/fl_symbols.cxx +++ b/src/fl_symbols.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_symbols.cxx,v 1.8.2.3.2.7 2003/05/21 16:58:13 easysw Exp $" +// "$Id: fl_symbols.cxx,v 1.8.2.3.2.8 2004/04/11 04:39:00 easysw Exp $" // // Symbol drawing code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -361,5 +361,5 @@ static void fl_init_symbols(void) { } // -// End of "$Id: fl_symbols.cxx,v 1.8.2.3.2.7 2003/05/21 16:58:13 easysw Exp $". +// End of "$Id: fl_symbols.cxx,v 1.8.2.3.2.8 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx index 2d19344..1fdc60f 100644 --- a/src/fl_vertex.cxx +++ b/src/fl_vertex.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_vertex.cxx,v 1.5.2.3.2.7 2003/01/30 21:44:26 easysw Exp $" +// "$Id: fl_vertex.cxx,v 1.5.2.3.2.8 2004/04/11 04:39:00 easysw Exp $" // // Portable drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -260,5 +260,5 @@ void fl_circle(double x, double y,double r) { } // -// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.7 2003/01/30 21:44:26 easysw Exp $". +// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.8 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/flstring.c b/src/flstring.c index b1e2d82..1c04f0c 100644 --- a/src/flstring.c +++ b/src/flstring.c @@ -1,9 +1,9 @@ /* - * "$Id: flstring.c,v 1.1.2.3 2003/01/30 21:44:26 easysw Exp $" + * "$Id: flstring.c,v 1.1.2.4 2004/04/11 04:39:00 easysw Exp $" * * BSD string functions for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2003 by Bill Spitzak and others. + * Copyright 1998-2004 by Bill Spitzak and others. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -101,5 +101,5 @@ fl_strlcpy(char *dst, /* O - Destination string */ /* - * End of "$Id: flstring.c,v 1.1.2.3 2003/01/30 21:44:26 easysw Exp $". + * End of "$Id: flstring.c,v 1.1.2.4 2004/04/11 04:39:00 easysw Exp $". */ diff --git a/src/flstring.h b/src/flstring.h index c2d78e2..e301401 100644 --- a/src/flstring.h +++ b/src/flstring.h @@ -1,9 +1,9 @@ /* - * "$Id: flstring.h,v 1.1.2.12 2003/04/03 04:28:15 matthiaswm Exp $" + * "$Id: flstring.h,v 1.1.2.13 2004/04/11 04:39:00 easysw Exp $" * * Common string header file for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2003 by Bill Spitzak and others. + * Copyright 1998-2004 by Bill Spitzak and others. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -101,5 +101,5 @@ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t); /* - * End of "$Id: flstring.h,v 1.1.2.12 2003/04/03 04:28:15 matthiaswm Exp $". + * End of "$Id: flstring.h,v 1.1.2.13 2004/04/11 04:39:00 easysw Exp $". */ diff --git a/src/forms_bitmap.cxx b/src/forms_bitmap.cxx index 51fc180..2eec6eb 100644 --- a/src/forms_bitmap.cxx +++ b/src/forms_bitmap.cxx @@ -1,9 +1,9 @@ // -// "$Id: forms_bitmap.cxx,v 1.4.2.3.2.3 2003/01/30 21:44:27 easysw Exp $" +// "$Id: forms_bitmap.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $" // // Forms compatible bitmap function for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -46,5 +46,5 @@ void Fl_FormsBitmap::draw() { } // -// End of "$Id: forms_bitmap.cxx,v 1.4.2.3.2.3 2003/01/30 21:44:27 easysw Exp $". +// End of "$Id: forms_bitmap.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/forms_compatability.cxx b/src/forms_compatability.cxx index d6ee4bb..554bc3d 100755 --- a/src/forms_compatability.cxx +++ b/src/forms_compatability.cxx @@ -1,9 +1,9 @@ // -// "$Id: forms_compatability.cxx,v 1.5.2.3.2.4 2003/01/30 21:44:27 easysw Exp $" +// "$Id: forms_compatability.cxx,v 1.5.2.3.2.5 2004/04/11 04:39:00 easysw Exp $" // // Forms compatibility functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -202,5 +202,5 @@ char *fl_show_simple_input(const char *str1, const char *defstr) { } // -// End of "$Id: forms_compatability.cxx,v 1.5.2.3.2.4 2003/01/30 21:44:27 easysw Exp $". +// End of "$Id: forms_compatability.cxx,v 1.5.2.3.2.5 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/forms_free.cxx b/src/forms_free.cxx index 22e0cbe..a3e838a 100644 --- a/src/forms_free.cxx +++ b/src/forms_free.cxx @@ -1,9 +1,9 @@ // -// "$Id: forms_free.cxx,v 1.4.2.4.2.3 2003/01/30 21:44:28 easysw Exp $" +// "$Id: forms_free.cxx,v 1.4.2.4.2.4 2004/04/11 04:39:00 easysw Exp $" // // Forms free widget routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -73,5 +73,5 @@ int Fl_Free::handle(int e) { } // -// End of "$Id: forms_free.cxx,v 1.4.2.4.2.3 2003/01/30 21:44:28 easysw Exp $". +// End of "$Id: forms_free.cxx,v 1.4.2.4.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/forms_fselect.cxx b/src/forms_fselect.cxx index 25186a7..87d43a0 100644 --- a/src/forms_fselect.cxx +++ b/src/forms_fselect.cxx @@ -1,9 +1,9 @@ // -// "$Id: forms_fselect.cxx,v 1.4.2.3.2.6 2003/05/04 21:45:46 easysw Exp $" +// "$Id: forms_fselect.cxx,v 1.4.2.3.2.7 2004/04/11 04:39:00 easysw Exp $" // // Forms file selection routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -61,5 +61,5 @@ char* fl_get_pattern() {return (char *)fl_pattern;} char* fl_get_filename() {return fl_filename;} // -// End of "$Id: forms_fselect.cxx,v 1.4.2.3.2.6 2003/05/04 21:45:46 easysw Exp $". +// End of "$Id: forms_fselect.cxx,v 1.4.2.3.2.7 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/forms_pixmap.cxx b/src/forms_pixmap.cxx index 5418bd0..abab10b 100644 --- a/src/forms_pixmap.cxx +++ b/src/forms_pixmap.cxx @@ -1,9 +1,9 @@ // -// "$Id: forms_pixmap.cxx,v 1.4.2.3.2.3 2003/01/30 21:44:30 easysw Exp $" +// "$Id: forms_pixmap.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $" // // Forms pixmap drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -46,5 +46,5 @@ void Fl_FormsPixmap::draw() { } // -// End of "$Id: forms_pixmap.cxx,v 1.4.2.3.2.3 2003/01/30 21:44:30 easysw Exp $". +// End of "$Id: forms_pixmap.cxx,v 1.4.2.3.2.4 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/forms_timer.cxx b/src/forms_timer.cxx index 126a42e..1d41301 100644 --- a/src/forms_timer.cxx +++ b/src/forms_timer.cxx @@ -1,9 +1,9 @@ // -// "$Id: forms_timer.cxx,v 1.4.2.3.2.5 2003/09/03 19:58:08 easysw Exp $" +// "$Id: forms_timer.cxx,v 1.4.2.3.2.6 2004/04/11 04:39:00 easysw Exp $" // // Forms timer object for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -162,5 +162,5 @@ void Fl_Timer::suspended(char d) { } // -// End of "$Id: forms_timer.cxx,v 1.4.2.3.2.5 2003/09/03 19:58:08 easysw Exp $". +// End of "$Id: forms_timer.cxx,v 1.4.2.3.2.6 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index c19d013..50599dc 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -1,9 +1,9 @@ // -// "$Id: gl_draw.cxx,v 1.7.2.5.2.11 2003/05/04 21:58:59 easysw Exp $" +// "$Id: gl_draw.cxx,v 1.7.2.5.2.12 2004/04/11 04:39:00 easysw Exp $" // // OpenGL drawing support routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -166,5 +166,5 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) { #endif // -// End of "$Id: gl_draw.cxx,v 1.7.2.5.2.11 2003/05/04 21:58:59 easysw Exp $". +// End of "$Id: gl_draw.cxx,v 1.7.2.5.2.12 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/gl_start.cxx b/src/gl_start.cxx index 931ae36..9e28cbd 100644 --- a/src/gl_start.cxx +++ b/src/gl_start.cxx @@ -1,9 +1,9 @@ // -// "$Id: gl_start.cxx,v 1.6.2.5.2.8 2003/01/30 21:44:33 easysw Exp $" +// "$Id: gl_start.cxx,v 1.6.2.5.2.9 2004/04/11 04:39:00 easysw Exp $" // // OpenGL context routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -122,5 +122,5 @@ int Fl::gl_visual(int mode, int *alist) { #endif // -// End of "$Id: gl_start.cxx,v 1.6.2.5.2.8 2003/01/30 21:44:33 easysw Exp $". +// End of "$Id: gl_start.cxx,v 1.6.2.5.2.9 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/glut_compatability.cxx b/src/glut_compatability.cxx index f2872bd..19f5282 100755 --- a/src/glut_compatability.cxx +++ b/src/glut_compatability.cxx @@ -1,9 +1,9 @@ // -// "$Id: glut_compatability.cxx,v 1.4.2.5.2.5 2003/01/30 21:44:34 easysw Exp $" +// "$Id: glut_compatability.cxx,v 1.4.2.5.2.7 2004/04/11 04:39:00 easysw Exp $" // // GLUT emulation routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -93,6 +93,13 @@ int Fl_Glut_Window::handle(int event) { if (motion) return 1; break; + case FL_MOUSEWHEEL: + button = Fl::event_dy(); + while (button < 0) {mouse(3,GLUT_DOWN,ex,ey); ++button;} + while (button > 0) {mouse(4,GLUT_DOWN,ex,ey); --button;} + return 1; + break; + case FL_RELEASE: for (button = 0; button < 3; button++) if (mouse_down & (1<<button)) { if (mouse) mouse(button,GLUT_UP,ex,ey); @@ -406,5 +413,5 @@ int glutLayerGet(GLenum type) { #endif // -// End of "$Id: glut_compatability.cxx,v 1.4.2.5.2.5 2003/01/30 21:44:34 easysw Exp $". +// End of "$Id: glut_compatability.cxx,v 1.4.2.5.2.7 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/glut_font.cxx b/src/glut_font.cxx index 46fac51..6cf1bef 100644 --- a/src/glut_font.cxx +++ b/src/glut_font.cxx @@ -1,9 +1,9 @@ // -// "$Id: glut_font.cxx,v 1.4.2.4.2.2 2003/01/30 21:44:35 easysw Exp $" +// "$Id: glut_font.cxx,v 1.4.2.4.2.3 2004/04/11 04:39:00 easysw Exp $" // // GLUT bitmap font routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2003 by Bill Spitzak and others. +// Copyright 1998-2004 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -54,5 +54,5 @@ int glutBitmapWidth(void* font, int character) { #endif // -// End of "$Id: glut_font.cxx,v 1.4.2.4.2.2 2003/01/30 21:44:35 easysw Exp $". +// End of "$Id: glut_font.cxx,v 1.4.2.4.2.3 2004/04/11 04:39:00 easysw Exp $". // diff --git a/src/numericsort.c b/src/numericsort.c index c87824f..50b7696 100644 --- a/src/numericsort.c +++ b/src/numericsort.c @@ -1,9 +1,9 @@ /* - * "$Id: numericsort.c,v 1.10.2.4.2.7 2003/01/30 21:44:36 easysw Exp $" + * "$Id: numericsort.c,v 1.10.2.4.2.8 2004/04/11 04:39:00 easysw Exp $" * * Numeric sorting routine for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2003 by Bill Spitzak and others. + * Copyright 1998-2004 by Bill Spitzak and others. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -105,5 +105,5 @@ int fl_numericsort(struct dirent **A, struct dirent **B) { } /* - * End of "$Id: numericsort.c,v 1.10.2.4.2.7 2003/01/30 21:44:36 easysw Exp $". + * End of "$Id: numericsort.c,v 1.10.2.4.2.8 2004/04/11 04:39:00 easysw Exp $". */ diff --git a/src/scandir_win32.c b/src/scandir_win32.c index 9c5612f..f02c72b 100644 --- a/src/scandir_win32.c +++ b/src/scandir_win32.c @@ -1,9 +1,9 @@ /* - * "$Id: scandir_win32.c,v 1.11.2.4.2.7 2003/05/28 16:38:09 matthiaswm Exp $" + * "$Id: scandir_win32.c,v 1.11.2.4.2.9 2004/04/11 04:39:00 easysw Exp $" * * WIN32 scandir function for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2003 by Bill Spitzak and others. + * Copyright 1998-2004 by Bill Spitzak and others. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -64,7 +64,7 @@ int fl_scandir(const char *dirname, struct dirent ***namelist, return nDir; } do { - selectDir=(struct dirent*)malloc(sizeof(struct dirent)+strlen(find.cFileName)+1); + selectDir=(struct dirent*)malloc(sizeof(struct dirent)+strlen(find.cFileName)+2); strcpy(selectDir->d_name, find.cFileName); if (find.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { // Append a trailing slash to directory names... @@ -104,5 +104,5 @@ int fl_scandir(const char *dirname, struct dirent ***namelist, #endif /* - * End of "$Id: scandir_win32.c,v 1.11.2.4.2.7 2003/05/28 16:38:09 matthiaswm Exp $". + * End of "$Id: scandir_win32.c,v 1.11.2.4.2.9 2004/04/11 04:39:00 easysw Exp $". */ diff --git a/src/vsnprintf.c b/src/vsnprintf.c index 0fa14f0..2677e15 100644 --- a/src/vsnprintf.c +++ b/src/vsnprintf.c @@ -1,5 +1,5 @@ /* - * "$Id: vsnprintf.c,v 1.3.2.5.2.3 2003/01/30 21:44:40 easysw Exp $" + * "$Id: vsnprintf.c,v 1.3.2.5.2.4 2004/04/11 04:39:00 easysw Exp $" * * vsnprintf() function for the Fast Light Tool Kit (FLTK). * @@ -17,7 +17,7 @@ * Only handles formats that are both documented in the glibc man page * for printf and also handled by your system's sprintf(). * - * Copyright 1998-2003 by Bill Spitzak and others. + * Copyright 1998-2004 by Bill Spitzak and others. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -134,6 +134,6 @@ int fl_snprintf(char* str, size_t size, const char* fmt, ...) { #endif /* - * End of "$Id: vsnprintf.c,v 1.3.2.5.2.3 2003/01/30 21:44:40 easysw Exp $". + * End of "$Id: vsnprintf.c,v 1.3.2.5.2.4 2004/04/11 04:39:00 easysw Exp $". */ |