diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-14 21:05:22 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-14 21:05:22 +0000 |
| commit | 7a89877eee6709c1ec042351e63ad964415141f0 (patch) | |
| tree | 9e35e7482df08dec4e1f9e7dd2d95a84b6493bc8 | |
| parent | 0bd7960c79b4eaafd0f7b92515f75bb1a99350c0 (diff) | |
Add const char * add methods to Fl_Check_Browser.
Fix cursor code in text widgets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2840 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | FL/Fl_Check_Browser.H | 9 | ||||
| -rw-r--r-- | src/Fl_File_Input.cxx | 9 | ||||
| -rw-r--r-- | src/Fl_Input_.cxx | 9 | ||||
| -rw-r--r-- | src/Fl_Text_Display.cxx | 11 |
5 files changed, 27 insertions, 15 deletions
@@ -1,5 +1,9 @@ CHANGES IN FLTK 1.1.2 + - The cursor could be set for the wrong window in the + text widgets. + - Fl_Check_Browser didn't provide const char * add + methods as documented. - Fl_Button, Fl_Choice, and Fl_Menu_Button incorrectly activated the button/menu when the spacebar was pressed in conjunction with shift, control, alt, or diff --git a/FL/Fl_Check_Browser.H b/FL/Fl_Check_Browser.H index e137b89ca..b0e3f0531 100644 --- a/FL/Fl_Check_Browser.H +++ b/FL/Fl_Check_Browser.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Check_Browser.H,v 1.1.2.4 2002/08/14 16:49:37 easysw Exp $" +// "$Id: Fl_Check_Browser.H,v 1.1.2.5 2002/11/14 21:05:20 easysw Exp $" // // Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK). // @@ -71,6 +71,11 @@ class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ { int add(char *s); // add an (unchecked) item int add(char *s, int b); // add an item and set checked // both return the new nitems() + + // inline const char * methods to avoid breaking binary compatibility... + int add(const char *s) { return add((char *)s); } + int add(const char *s, int b) { return add((char *)s, b); } + void clear(); // delete all items int nitems() const { return nitems_; } int nchecked() const { return nchecked_; } @@ -86,6 +91,6 @@ class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ { #endif // Fl_Check_Browser_H // -// End of "$Id: Fl_Check_Browser.H,v 1.1.2.4 2002/08/14 16:49:37 easysw Exp $". +// End of "$Id: Fl_Check_Browser.H,v 1.1.2.5 2002/11/14 21:05:20 easysw Exp $". // diff --git a/src/Fl_File_Input.cxx b/src/Fl_File_Input.cxx index e21278e2a..84593e630 100644 --- a/src/Fl_File_Input.cxx +++ b/src/Fl_File_Input.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_File_Input.cxx,v 1.1.2.6 2002/08/09 01:09:48 easysw Exp $" +// "$Id: Fl_File_Input.cxx,v 1.1.2.7 2002/11/14 21:05:21 easysw Exp $" // // File_Input header file for the Fast Light Tool Kit (FLTK). // @@ -26,6 +26,7 @@ #include <FL/Fl.H> #include <FL/Fl_File_Input.H> +#include <FL/Fl_Window.H> #include <FL/fl_draw.H> #include <stdio.h> #include "flstring.h" @@ -184,8 +185,8 @@ Fl_File_Input::handle(int event) // I - Event case FL_MOVE : case FL_ENTER : if (active_r()) { - if (Fl::event_y() < (y() + DIR_HEIGHT)) fl_cursor(FL_CURSOR_DEFAULT); - else fl_cursor(FL_CURSOR_INSERT); + if (Fl::event_y() < (y() + DIR_HEIGHT)) window()->cursor(FL_CURSOR_DEFAULT); + else window()->cursor(FL_CURSOR_INSERT); } return 1; @@ -270,5 +271,5 @@ Fl_File_Input::handle_button(int event) // I - Event // -// End of "$Id: Fl_File_Input.cxx,v 1.1.2.6 2002/08/09 01:09:48 easysw Exp $". +// End of "$Id: Fl_File_Input.cxx,v 1.1.2.7 2002/11/14 21:05:21 easysw Exp $". // diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 1c7034279..1ca17f358 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.24 2002/08/13 22:43:59 spitzak Exp $" +// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.25 2002/11/14 21:05:21 easysw Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -30,6 +30,7 @@ #include <FL/Fl.H> #include <FL/Fl_Input_.H> +#include <FL/Fl_Window.H> #include <FL/fl_draw.H> #include <FL/fl_ask.H> #include <math.h> @@ -655,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()) fl_cursor(FL_CURSOR_INSERT); + if (active_r()) window()->cursor(FL_CURSOR_INSERT); return 1; case FL_LEAVE: - if (active_r()) fl_cursor(FL_CURSOR_DEFAULT); + if (active_r()) window()->cursor(FL_CURSOR_DEFAULT); return 1; case FL_FOCUS: @@ -851,5 +852,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.24 2002/08/13 22:43:59 spitzak Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.25 2002/11/14 21:05:21 easysw Exp $". // diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index b61e44798..df730fe5f 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Display.cxx,v 1.12.2.36 2002/11/12 22:48:36 matthiaswm Exp $" +// "$Id: Fl_Text_Display.cxx,v 1.12.2.37 2002/11/14 21:05:22 easysw Exp $" // // Copyright 2001-2002 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -31,6 +31,7 @@ #include <FL/Fl.H> #include <FL/Fl_Text_Buffer.H> #include <FL/Fl_Text_Display.H> +#include <FL/Fl_Window.H> #undef min #undef max @@ -2949,8 +2950,8 @@ int Fl_Text_Display::handle(int event) { case FL_ENTER: case FL_MOVE: if (active_r()) { - if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) fl_cursor(FL_CURSOR_INSERT); - else fl_cursor(FL_CURSOR_DEFAULT); + if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT); + else window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { return 0; @@ -2959,7 +2960,7 @@ int Fl_Text_Display::handle(int event) { case FL_LEAVE: case FL_HIDE: if (active_r()) { - fl_cursor(FL_CURSOR_DEFAULT); + window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { @@ -3029,5 +3030,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.36 2002/11/12 22:48:36 matthiaswm Exp $". +// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.37 2002/11/14 21:05:22 easysw Exp $". // |
