There's something odd about the API for the fltk-2 ProgressBar widget  
- specifically, the other valuator-like widgets have a setter method  
step(x) that modifies the size of the step by which the widget changes.

In ProgressBar, the setter method called step(x) does not modify the  
step parameter (called mStep in ProgressBar's case), rather, it  
modifies the present value of the progress bar slider (called  
mPresent) which seems to largely duplicate the purpose of the position 
(x) setter method.
Indeed, the mStep member variable doesn't actually seem to be used at  
all, which seems quite odd. What is it for, why is it set by the range 
(a,b,c) method and returned by the step() getter method, when it is  
not used? And why does the step() getter method not return what is  
set by the step(x) setter method? It all seems a bit uneven to me.

Anyway, I find it confusing that this widget's API is similar to, but  
different from (for example) an essentially similar slider widget - I  
assume this is just a loose end that will be tidied up before fltk-2  
finds its way into general use?

Actually, while I have my ranting hat on anyway, the ProgressBar code  
looks to violate the coding guideline, since it specifically states  
that non-public member variables should be marked by a trailing  
underscore, e.g. "step_" rather then "mStep". I imagine that's  
another loose end that will be fixed?

Confused,
-- 
Ian

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to