Opened 13 years ago
Last modified 8 years ago
#7996 assigned enhancement
[BSlider] Range slider capability
Reported by: | jwlh172 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Interface Kit | Version: | R1/alpha3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
I've enhanced the BSlider control to allow its use as a range slider; rather than only one movable thumb area, there are two, allowing the setting of an offset (starting point) and an end point.
In order to create the range slider, one can either set the final variable "dualMode" in the BSlider constructor to "true", or, after creation, can call the SetDualMode(true) member function.
SetOffsetValue(int32) and int32 OffsetValue() can be used to set and retrieve the new offset value, which, by default, is set to the slider's minimum value, while the end point value can still be set and retrieved using SetValue and Value.
Attachments (1)
Change History (8)
by , 13 years ago
Attachment: | InterfaceKit-RangeSlider-20110922.diff added |
---|
comment:1 by , 13 years ago
patch: | 0 → 1 |
---|
comment:3 by , 13 years ago
Replying to anevilyak:
Unfortunately, this patch cannot be applied as is ; it breaks binary compatibility in a number of ways:
Why not make a BRangeSlider class instead. That certainly would get around the binary compatibility issues.
comment:5 by , 10 years ago
Milestone: | R1 → Unscheduled |
---|
comment:6 by , 9 years ago
patch: | 1 → 0 |
---|
comment:7 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Unfortunately, this patch cannot be applied as is ; it breaks binary compatibility in a number of ways:
1) It changes the signature of the existing constructor, which will result in symbol resolution failures since this results in the mangled name changing. In general, you cannot change the signature of existing public functions.
2) It adds an extra virtual ; one cannot change the number or order of virtual functions due to the fragile base class problem. BSlider has several reserved virtual slots for exactly this reason, you would need to instead replace the first one of those with your new virtual, and also add a compat placeholder to dispatch the old name.
3) It changes the size of the class by adding that boolean. There is a block of reserved data at the end of the class for precisely this reason, you would need to remove a byte from there and add your boolean in its place.