Author: AlbrechtS
Date: 2010-12-15 05:02:36 -0800 (Wed, 15 Dec 2010)
New Revision: 8035
Log:
Redefined NORMAL_INPUT_MOVE in src/Fl_Input.cxx to reflect the new option
Fl::option(Fl::OPTION_ARROW_FOCUS). Maybe this could improved, but this is
the shortest way to make the option work always.
Improved tooltips in test/preferences.fl for users and system managers.
Modified:
branches/branch-1.3/src/Fl_Input.cxx
branches/branch-1.3/test/preferences.fl
Modified: branches/branch-1.3/src/Fl_Input.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Input.cxx 2010-12-15 12:21:55 UTC (rev
8034)
+++ branches/branch-1.3/src/Fl_Input.cxx 2010-12-15 13:02:36 UTC (rev
8035)
@@ -62,11 +62,19 @@
return up_down_position(p, Fl::event_state(FL_SHIFT));
}
-// If you define this symbol as zero you will get the peculiar fltk
+// Old text from FLTK 1.1 for reference:
+// If you define NORMAL_INPUT_MOVE as zero you will get the peculiar fltk
// behavior where moving off the end of an input field will move the
// cursor into the next field:
// define it as 1 to prevent cursor movement from going to next field:
-#define NORMAL_INPUT_MOVE 0
+//
+// Note: this has been replaced by Fl::option(Fl::OPTION_ARROW_FOCUS)
+// in FLTK 1.3. This option has "inverted" values:
+// 1 = Arrow keys move focus (previously 0)
+// 0 = Arrow keys don't move focus (previously 1)
+// Hence we define ...
+//
+#define NORMAL_INPUT_MOVE (Fl::option(Fl::OPTION_ARROW_FOCUS) ? 0 : 1)
#define ctrl(x) ((x)^0x40)
Modified: branches/branch-1.3/test/preferences.fl
===================================================================
--- branches/branch-1.3/test/preferences.fl 2010-12-15 12:21:55 UTC (rev
8034)
+++ branches/branch-1.3/test/preferences.fl 2010-12-15 13:02:36 UTC (rev
8035)
@@ -104,7 +104,7 @@
If visible focus is switched on, FLTK will draw a dotted rectangle inside the
widget that will receive the next keystroke. If switched off, no such indicator
will be drawn and keyboard navigation is disabled.
-On by default.} xywh {245 40 100 25} down_box BORDER_BOX
+Default is on.} xywh {245 40 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
@@ -128,7 +128,7 @@
opt[Fl::OPTION_ARROW_FOCUS][mode] = wArrowFocus->value();} open
tooltip {OPTION_ARROW_FOCUS
-When switched on, moving the text cursor beyond the start or end of a text in
a text widget will change focus to the next text widgt. When switched off, the
cursor will stop at the end of the text. Pressing Tab or Ctrl-Tab will advance
the keyboard focus.
+When switched on, moving the text cursor beyond the start or end of the text
in a text widget will change focus to the next widget. When switched off, the
cursor will stop at the end of the text. Pressing Tab or Ctrl-Tab will advance
the keyboard focus. Switch this on, if you want the old behavior of FLTK 1.1.
Default is off.} xywh {245 75 100 25} down_box BORDER_BOX
} {
@@ -159,7 +159,7 @@
opt[Fl::OPTION_SHOW_TOOLTIPS][mode] = wShowTooltips->value();} open
tooltip {OPTION_SHOW_TOOLTIPS
-If tooltips are enabled, hovering the mouse over a widget with a tooltip text
will open a little tootip window until the mouse leaves the widget. If
disabled, no tooltip is shown.
+If tooltips are enabled, hovering the mouse over a widget with a tooltip text
will open a little tooltip window until the mouse leaves the widget. If
disabled, no tooltip is shown.
Default is on.} xywh {245 150 100 25} down_box BORDER_BOX
} {
@@ -213,7 +213,7 @@
}
Fl_Choice wUserOrSystem {
callback {refreshUI();} open
- tooltip {Change settings for the current user, or for all users of this
computer.} xywh {14 275 141 25} down_box BORDER_BOX
+ tooltip {Change settings for the current user, or default values for all
users of this computer. Individual users can override system options, if they
set their options to specific values (not 'default'). } xywh {14 275 141 25}
down_box BORDER_BOX
} {
MenuItem {} {
label {User Settings}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit