-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IupProgressBar->VALUE #11
Comments
Value is working but as a next step need to implement the default MIN and MAX values as 0 and 1 per the documentation. |
@ewmailing There isn't an equivalent of the "MIN" property ( https://webserver2.tecgraf.puc-rio.br/iup/en/elem/iupprogressbar.html) in HTML. The HTML5 progress widget only has "value" and "max" properties as per W3 documentation: Do you think it would be problematic to skip implementation of the IupProgressBar min property? Can you think of practical uses of a non-zero min property in Iup programs? |
MIN is an important property that will break programs if you don't support it. It is a convenience feature, and I'm sure there are plenty of real-world cases that prefer to use their natural range instead of always normalizing between some artificial range, such as [0 to 1], [0 to 100], [0 to 1000], [-1 to 1], etc. Imagine an app that follows the progress of boiling water in F. That would scale would go from [32, 212]. I think this should be easy enough to fake. You just need to renormalize values between the user's specified MIN and MAX. So when they set the current VALUE (progress), that is already in their units (say Fahrenheit). So if they set 32, then you renormalize it so it is 0. And when they get the current VALUE, you convert the other way from your html widget to the user's units. So if the bar is 0, then it is 32. |
Makes perfect sense, thanks. Will implement with normalization.
…On Fri, Mar 23, 2018 at 01:32 ewmailing ***@***.***> wrote:
MIN is an important property that will break programs if you don't support
it. It is a convenience feature, and I'm sure there are plenty of
real-world cases that prefer to use their natural range instead of always
normalizing between some artificial range, such as [0 to 1], [0 to 100], [0
to 1000], [-1 to 1], etc. Imagine an app that follows the progress of
boiling water in F. That would scale would go from [32, 212].
I think this should be easy enough to fake. You just need to renormalize
values between the user's specified MIN and MAX.
So when they set the current VALUE (progress), that is already in their
units (say Fahrenheit). So if they set 32, then you renormalize it so it is
0.
And when they get the current VALUE, you convert the other way from your
html widget to the user's units. So if the bar is 0, then it is 32.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATv22jIF4BQLXUOxTTTlDfVO3jtGbolZks5thIjmgaJpZM4S4A9V>
.
|
No description provided.
The text was updated successfully, but these errors were encountered: