I propose to extend vslider (and hslider) to reverse the value direction, if minimum and maximum value are swapped.
:::Haskell
wxSL_INVERSE :: Int
wxSL_INVERSE = 0x1000
vslider :: Window a -> Bool -> Int -> Int -> [Prop (Slider ())] -> IO (Slider ())
vslider parentW showLabels top bottom props =
let (minV, maxV, dirFlags) =
if top < bottom
then (top, bottom, 0)
else (bottom, top, wxSL_INVERSE)
in sliderEx parentW minV maxV (wxVERTICAL .+. dirFlags .+. (if showLabels then wxSL_LABELS else 0)) props
At least, wxSL_INVERSE should be defined.
Diff:
Changed formatting