From d7896289d12652039443e1bf512d7ae521542d6f Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 13 Dec 2014 18:33:53 +1000 Subject: Updates to the slider to fix positioning issues. Also fixes negative ranges, ranges > 65536 and very small ranges. --- src/gwin/sys_options.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/gwin/sys_options.h') diff --git a/src/gwin/sys_options.h b/src/gwin/sys_options.h index 199cad5b..bb7e3598 100644 --- a/src/gwin/sys_options.h +++ b/src/gwin/sys_options.h @@ -286,6 +286,34 @@ #ifndef GWIN_PROGRESSBAR_AUTO #define GWIN_PROGRESSBAR_AUTO FALSE #endif + /** + * @brief Should the slider avoid snapping to a fixed position when the mouse is released + * @details Defaults to FALSE + * @note If FALSE the slider will snap to the closest set-able position when the + * mouse is released. If TRUE it will maintain the position the + * mouse was released at, except when at the minimum and maximum slider values. + */ + #ifndef GWIN_SLIDER_NOSNAP + #define GWIN_SLIDER_NOSNAP FALSE + #endif + /** + * @brief The number of pixels of dead-band at each end of the slider + * @details Defaults to 5 + * @note A dead-band is required because fingers can often cannot + * accurately control the slider peg at the edges of the slider + */ + #ifndef GWIN_SLIDER_DEAD_BAND + #define GWIN_SLIDER_DEAD_BAND 5 + #endif + /** + * @brief How many toggles it takes to go from minimum to maximum value on a slider + * @details Defaults to 20 + * @note When the slider is being operated by a toggle device this setting describes + * how many toggles are required to go from end to end. + */ + #ifndef GWIN_SLIDER_TOGGLE_INC + #define GWIN_SLIDER_TOGGLE_INC 20 + #endif /** @} */ #endif /* _GWIN_OPTIONS_H */ -- cgit v1.2.3