-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add flag for enum parameters #358
Conversation
Adds a CLAP_PARAM_IS_ENUM flag to clap_param_info_flags to denote an enum parameter. This flag tells the host when a parameter represents a set of named options mapped to integers, which can help the host decide how to present the parameter to users in its UI.
I think this is really useful PR. |
Maybe it needs a comment to say that the enum isn't allowed to have "holes" between min and max? |
Maybe, although it should be totally clear. You can't have holes in a normal parameter, too. |
Maybe I could add this wording?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the param have IS_ENUM
then it must have IS_STEPPED
.
I prefer to say it that way rather than implies.
Maybe I'd put the comment like this. // Indicates that this parameter represents an enumerated value.
// If you set this flag, then you must set CLAP_PARAM_IS_STEPPED too.
// All values from min to max must have a non blank value_to_text(). |
Thank you 👍 |
Oh this is great and I'll use it all the time! |
See the proposal here: #357
This PR adds a
CLAP_PARAM_IS_ENUM
flag toclap_param_info_flags
to denote an enum parameter.This flag tells the host when a parameter represents a set of named options mapped to integers, which can help the host decide how to present the parameter to users in its UI.