mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 15:32:12 +08:00
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
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
CHANGES IN FLTK 1.1.2
|
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
|
- Fl_Button, Fl_Choice, and Fl_Menu_Button incorrectly
|
||||||
activated the button/menu when the spacebar was
|
activated the button/menu when the spacebar was
|
||||||
pressed in conjunction with shift, control, alt, or
|
pressed in conjunction with shift, control, alt, or
|
||||||
|
|||||||
@@ -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).
|
// 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); // add an (unchecked) item
|
||||||
int add(char *s, int b); // add an item and set checked
|
int add(char *s, int b); // add an item and set checked
|
||||||
// both return the new nitems()
|
// 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
|
void clear(); // delete all items
|
||||||
int nitems() const { return nitems_; }
|
int nitems() const { return nitems_; }
|
||||||
int nchecked() const { return nchecked_; }
|
int nchecked() const { return nchecked_; }
|
||||||
@@ -86,6 +91,6 @@ class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ {
|
|||||||
#endif // Fl_Check_Browser_H
|
#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 $".
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|||||||
@@ -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).
|
// File_Input header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_File_Input.H>
|
#include <FL/Fl_File_Input.H>
|
||||||
|
#include <FL/Fl_Window.H>
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "flstring.h"
|
#include "flstring.h"
|
||||||
@@ -184,8 +185,8 @@ Fl_File_Input::handle(int event) // I - Event
|
|||||||
case FL_MOVE :
|
case FL_MOVE :
|
||||||
case FL_ENTER :
|
case FL_ENTER :
|
||||||
if (active_r()) {
|
if (active_r()) {
|
||||||
if (Fl::event_y() < (y() + DIR_HEIGHT)) fl_cursor(FL_CURSOR_DEFAULT);
|
if (Fl::event_y() < (y() + DIR_HEIGHT)) window()->cursor(FL_CURSOR_DEFAULT);
|
||||||
else fl_cursor(FL_CURSOR_INSERT);
|
else window()->cursor(FL_CURSOR_INSERT);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
+5
-4
@@ -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).
|
// Common input widget routines for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_Input_.H>
|
#include <FL/Fl_Input_.H>
|
||||||
|
#include <FL/Fl_Window.H>
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include <FL/fl_ask.H>
|
#include <FL/fl_ask.H>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@@ -655,11 +656,11 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) {
|
|||||||
switch (event) {
|
switch (event) {
|
||||||
|
|
||||||
case FL_ENTER:
|
case FL_ENTER:
|
||||||
if (active_r()) fl_cursor(FL_CURSOR_INSERT);
|
if (active_r()) window()->cursor(FL_CURSOR_INSERT);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case FL_LEAVE:
|
case FL_LEAVE:
|
||||||
if (active_r()) fl_cursor(FL_CURSOR_DEFAULT);
|
if (active_r()) window()->cursor(FL_CURSOR_DEFAULT);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case FL_FOCUS:
|
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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -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.
|
// Copyright 2001-2002 by Bill Spitzak and others.
|
||||||
// Original code Copyright Mark Edel. Permission to distribute under
|
// Original code Copyright Mark Edel. Permission to distribute under
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_Text_Buffer.H>
|
#include <FL/Fl_Text_Buffer.H>
|
||||||
#include <FL/Fl_Text_Display.H>
|
#include <FL/Fl_Text_Display.H>
|
||||||
|
#include <FL/Fl_Window.H>
|
||||||
|
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
@@ -2949,8 +2950,8 @@ int Fl_Text_Display::handle(int event) {
|
|||||||
case FL_ENTER:
|
case FL_ENTER:
|
||||||
case FL_MOVE:
|
case FL_MOVE:
|
||||||
if (active_r()) {
|
if (active_r()) {
|
||||||
if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) fl_cursor(FL_CURSOR_INSERT);
|
if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT);
|
||||||
else fl_cursor(FL_CURSOR_DEFAULT);
|
else window()->cursor(FL_CURSOR_DEFAULT);
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -2959,7 +2960,7 @@ int Fl_Text_Display::handle(int event) {
|
|||||||
case FL_LEAVE:
|
case FL_LEAVE:
|
||||||
case FL_HIDE:
|
case FL_HIDE:
|
||||||
if (active_r()) {
|
if (active_r()) {
|
||||||
fl_cursor(FL_CURSOR_DEFAULT);
|
window()->cursor(FL_CURSOR_DEFAULT);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} 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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user