mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 16:46:52 +08:00
Take focus when the user presses a shortcut.
Call the callback when the user clicks or drags in a readonly input field. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
CHANGES IN FLTK 1.1.1
|
||||
|
||||
- Fl_Output now calls its callback when the user clicks
|
||||
or drags in the widget.
|
||||
- Shortcuts now cause buttons to take focus when visible
|
||||
focus is enabled.
|
||||
- fl_filename_relative() didn't check that the path was
|
||||
absolute under WIN32.
|
||||
- fl_filename_relative() didn't check that the path was
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.16 2002/08/09 01:09:48 easysw Exp $"
|
||||
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.17 2002/10/10 19:39:48 easysw Exp $"
|
||||
//
|
||||
// Button widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -103,6 +103,9 @@ int Fl_Button::handle(int event) {
|
||||
case FL_SHORTCUT:
|
||||
if (!(shortcut() ?
|
||||
Fl::test_shortcut(shortcut()) : test_shortcut())) return 0;
|
||||
|
||||
if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
|
||||
|
||||
if (type() == FL_RADIO_BUTTON && !value_) {
|
||||
setonly();
|
||||
if (when() & FL_WHEN_CHANGED) do_callback();
|
||||
@@ -145,5 +148,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.16 2002/08/09 01:09:48 easysw Exp $".
|
||||
// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.17 2002/10/10 19:39:48 easysw Exp $".
|
||||
//
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Input.cxx,v 1.10.2.15.2.13 2002/08/09 01:09:49 easysw Exp $"
|
||||
// "$Id: Fl_Input.cxx,v 1.10.2.15.2.14 2002/10/10 19:39:49 easysw Exp $"
|
||||
//
|
||||
// Input widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -337,6 +337,9 @@ int Fl_Input::handle(int event) {
|
||||
position(drag_start, drag_start);
|
||||
drag_start = -1;
|
||||
}
|
||||
// For output widgets, do the callback so the app knows the user
|
||||
// did something with the mouse...
|
||||
if (readonly()) do_callback();
|
||||
return 1;
|
||||
|
||||
case FL_DND_ENTER:
|
||||
@@ -393,5 +396,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.13 2002/08/09 01:09:49 easysw Exp $".
|
||||
// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.14 2002/10/10 19:39:49 easysw Exp $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user