On 15.12.2010 21:02, Greg Ercolano wrote: > Albrecht Schlosser wrote: >>> I made the methods 'private' so that we don't change the >>> public api. >> >> Hmm, maybe protected would be useful (but then we must document >> them, too). Oh, and maybe also virtual... > > We could always open them up. > I just didn't want to get into an 11th hour API design session ;)
Agreed (however we can't make anything /virtual/ once we released 1.3 because of ABI changes). > I figure the global option would be the most useful though; > it seems like something that works best if it's consistently > set across the entire app. And it'd be the odd case where the > app programmer wants one multiline to act differently. > > I imagine the best situation is a combo of a global setting > with per-widget controls to override the global setting, > similar to what we now have for the global Fl::scrollbar_size(), > and per-widget settings with<AnyWidget>::scrollbar_size(). > > This way one could control global, individual, or combos. Sure, that's fine if we want to support an option from now on in the future. But we do also say that Fl_Multiline_Input is deprecated, and we shouldn't add options over options to control something that is deprecated. That's why I suggest this: >> [...] what keeps us from adding a method >> to set a flag to Fl_[Multiline_]Input to change the tab behavior? > > That would certainly be the easiest thing to add. > > Note this is /only/ an issue for Fl_Multiline_Input. > Fl_Input and friends don't have this issue; Tab operates > 'normally' in those. Let's assume that we want to keep Fl_Multiline_Input compatible with FLTK 1.1 for backwards compatibility w/o any code changes. We recommend using Fl_Text_Editor for new programs, but we do also offer a new method for Fl_Multiline_Input to change the TAB behavior to /normal/ (but different than in FLTK 1.1), if someone needs it. I don't think that there are so many of these widgets used, so that it wouldn't be too much effort to change the behavior *if* someone wants. > Only Fl_Multiline_Input is the odd one of the bunch > that by default interprets tabs like a text editor. Yes, I see. >> - no need for a /global/ option >> - compatibility with older software (default) >> - optional per-widget change to use TAB for navigation >> - still being able to use ^I for TAB internally >> - the "new generation Fl_Multiline_Input" widget (Fl_Text_Editor) >> won't be affected and will use TAB always internally > > See above sugg regarding a global with per-widget control > vis a vis Fl::scrollbar_size() Yes, this would be the optimal way to implement it, but I wouldn't want to have yet another option for a deprecated widget. And in contrast to such useful options like scrollbar_size that concern many widgets, this would be only for one deprecated widget. > But I'm fine either way, as long as there's "some" way to > get "normal" focus nav behavior, ... Me too ;-) Let's see what others think about it... Albrecht _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
