[fltk.bugs] [MOD] STR #2939: Fl_Tabs not honoroing when(FL_WHEN_NOT_CHANGED)

2013-03-25 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2939
Version: 1.3.3


testalucida posted on fltk.general today:
using Fl_Tabs, wanting to make a single tab group,
and wants to receive callbacks whenever the one tab is clicked.

I was going to offer setting when(FL_WHEN_NOT_CHANGED)
should do this, but does not.

Suggesting a patch here to fix.


Link: http://www.fltk.org/str.php?L2939
Version: 1.3.3Index: Fl_Tabs.cxx
===
--- Fl_Tabs.cxx (revision 9847)
+++ Fl_Tabs.cxx (working copy)
@@ -173,11 +173,14 @@
 Fl::focus(this);
 redraw_tabs();
   }
-  if (o  value(o)) {
-Fl_Widget_Tracker wp(o);
-set_changed();
-   do_callback();
-   if (wp.deleted()) return 1;
+  if (o) {
+int change = value(o);
+if (change || (when()  FL_WHEN_NOT_CHANGED)) {
+ Fl_Widget_Tracker wp(o);
+ if (change) set_changed();
+ do_callback();
+ if (wp.deleted()) return 1;
+   }
   }
   Fl_Tooltip::current(o);
 } else {
___
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs


Re: [fltk.bugs] [MOD] STR #2939: Fl_Tabs not honoroing when(FL_WHEN_NOT_CHANGED)

2013-03-25 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2939
Version: 1.3.3


Also attaching a patch suggestion for Fl_Widget's when() docs
to elaborate on the use of FL_WHEN_NOT_CHANGED.


Link: http://www.fltk.org/str.php?L2939
Version: 1.3.3Index: Fl_Widget.H
===
--- Fl_Widget.H (revision 9844)
+++ Fl_Widget.H (working copy)
@@ -615,6 +615,11 @@
  \li 0: The callback is not done, but changed() is turned on.
  \li FL_WHEN_CHANGED: The callback is done each time the text is
  changed by the user.
+ \li FL_WHEN_NOT_CHANGED: Do the callback whenever user interacts
+ with the widget. Some widgets normally won't do a callback
+if there's no change (ie. clicking a tab that's already open
+or a radio button already selected). Setting this flag causes
+the callback to be done regardless if there's a change.
  \li FL_WHEN_RELEASE: The callback will be done when this widget loses 
  the focus, including when the window is unmapped. This is a useful 
 value for text fields in a panel where doing the callback on every
___
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs


[fltk.bugs] [LOW] STR #2940: Docs for label() '@' symbols need some improvement

2013-03-25 Thread Greg Ercolano
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2940
Version: 1.3.3


There are some behaviors of @ symbols that aren't documented but
should be in this section: http://fltk.org/doc-1.3/common.html

I posted a bit about this in fltk.development on 03/23/13
in the thread FLTK '#' symbols question.

Would like to suggest adding to the docs something along
the lines of:

---
'@' symbols in labels can appear only *at the very beginning*
or *very end* of a string, or can be at both ends at once.
They cannot appear in the middle of a string, which yields
undefined behavior. In the presence of multiline strings, symbols
will scale up to match the height of all the lines. Examples:

[symbol-examples.png goes here]
---


Link: http://www.fltk.org/str.php?L2940
Version: 1.3.3attachment: symbol-examples.png___
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs


Re: [fltk.bugs] [MOD] STR #2939: Fl_Tabs not honoring when(FL_WHEN_NOT_CHANGED)

2013-03-25 Thread Greg Ercolano

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2939
Version: 1.3.2


Taking ownership, fixed subject typo.

Put an RFC on fltk.development to see if implementing all the when()
behavior of radio buttons makes sense here.


Link: http://www.fltk.org/str.php?L2939
Version: 1.3.2

___
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs