diff options
Diffstat (limited to 'NxWidgets/libnxwidgets/src')
-rw-r--r-- | NxWidgets/libnxwidgets/src/cglyphsliderhorizontal.cxx | 13 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cscaledbitmap.cxx | 2 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cscrollbarhorizontal.cxx | 14 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cscrollbarvertical.cxx | 16 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/csliderhorizontal.cxx | 4 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cslidervertical.cxx | 4 |
6 files changed, 26 insertions, 27 deletions
diff --git a/NxWidgets/libnxwidgets/src/cglyphsliderhorizontal.cxx b/NxWidgets/libnxwidgets/src/cglyphsliderhorizontal.cxx index 786cbec9f..0430a541f 100644 --- a/NxWidgets/libnxwidgets/src/cglyphsliderhorizontal.cxx +++ b/NxWidgets/libnxwidgets/src/cglyphsliderhorizontal.cxx @@ -1,4 +1,3 @@ - /**************************************************************************** * NxWidgets/libnxwidgets/src/cglyphsliderhorizontal.cxx * @@ -142,20 +141,19 @@ CGlyphSliderHorizontal::CGlyphSliderHorizontal(CWidgetControl * pWidgetControl, } /** - * Set the value that of the slider. This will reposition - * and redraw the grip. + * Set the value of the slider. This will reposition and redraw the grip. * * @param value The new value. */ -void CGlyphSliderHorizontal::setValue(const nxgl_coord_t value) +void CGlyphSliderHorizontal::setValue(const int value) { - setValueWithBitshift((int32_t) value << 16); + setValueWithBitshift((int32_t)value << 16); } /** * Set the value that of the slider. This will reposition and redraw - * the grip. The supplied value should be bitshifted left 16 places. + * the grip. The supplied value should be shifted left 16 places. * This ensures greater accuracy than the standard setValue() method if * the slider is being used as a scrollbar. * @@ -260,7 +258,7 @@ nxgl_coord_t CGlyphSliderHorizontal::getMinimumStep(void) const * Get the maximum possible value that the slider can represent. Useful when * using the slider as a scrollbar, as the height of the grip prevents the full * range of values being accessed (intentionally). - * The returned value is bitshfted left 16 places for more accuracy in fixed-point + * The returned value is shifted left 16 places for more accuracy in fixed-point * calculations. * * @return The maximum possible value that the slider can represent. @@ -499,5 +497,6 @@ void CGlyphSliderHorizontal::onClick(nxgl_coord_t x, nxgl_coord_t y) setValueWithBitshift(m_value - (m_pageSize << 16)); } + redraw(); } diff --git a/NxWidgets/libnxwidgets/src/cscaledbitmap.cxx b/NxWidgets/libnxwidgets/src/cscaledbitmap.cxx index ad0bd1953..eb8217434 100644 --- a/NxWidgets/libnxwidgets/src/cscaledbitmap.cxx +++ b/NxWidgets/libnxwidgets/src/cscaledbitmap.cxx @@ -1,7 +1,7 @@ /**************************************************************************** * NxWidgets/libnxwidgets/src/cscaledbitmap.hxx * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without diff --git a/NxWidgets/libnxwidgets/src/cscrollbarhorizontal.cxx b/NxWidgets/libnxwidgets/src/cscrollbarhorizontal.cxx index 236ab4594..90c28d2d4 100644 --- a/NxWidgets/libnxwidgets/src/cscrollbarhorizontal.cxx +++ b/NxWidgets/libnxwidgets/src/cscrollbarhorizontal.cxx @@ -1,7 +1,7 @@ /**************************************************************************** * NxWidgets/libnxwidgets/include/cscrollbarhorizontal.hxx * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -162,7 +162,7 @@ CScrollbarHorizontal::CScrollbarHorizontal(CWidgetControl *pWidgetControl, * @return The smallest value. */ -const nxgl_coord_t CScrollbarHorizontal::getMinimumValue(void) const +const int CScrollbarHorizontal::getMinimumValue(void) const { return m_slider->getMinimumValue(); } @@ -173,7 +173,7 @@ const nxgl_coord_t CScrollbarHorizontal::getMinimumValue(void) const * @return The largest value. */ -const nxgl_coord_t CScrollbarHorizontal::getMaximumValue(void) const +const int CScrollbarHorizontal::getMaximumValue(void) const { return m_slider->getMaximumValue(); } @@ -184,7 +184,7 @@ const nxgl_coord_t CScrollbarHorizontal::getMaximumValue(void) const * @return The current slider value. */ -const nxgl_coord_t CScrollbarHorizontal::getValue(void) const +const int CScrollbarHorizontal::getValue(void) const { return m_slider->getValue(); } @@ -209,7 +209,7 @@ const nxgl_coord_t CScrollbarHorizontal::getPageSize(void) const * @param value The smallest value. */ -void CScrollbarHorizontal::setMinimumValue(const nxgl_coord_t value) +void CScrollbarHorizontal::setMinimumValue(const int value) { m_slider->setMinimumValue(value); } @@ -220,7 +220,7 @@ void CScrollbarHorizontal::setMinimumValue(const nxgl_coord_t value) * @param value The largest value. */ -void CScrollbarHorizontal::setMaximumValue(const nxgl_coord_t value) +void CScrollbarHorizontal::setMaximumValue(const int value) { m_slider->setMaximumValue(value); } @@ -232,7 +232,7 @@ void CScrollbarHorizontal::setMaximumValue(const nxgl_coord_t value) * @param value The new value. */ -void CScrollbarHorizontal::setValue(const nxgl_coord_t value) +void CScrollbarHorizontal::setValue(const int value) { m_slider->setValue(value); } diff --git a/NxWidgets/libnxwidgets/src/cscrollbarvertical.cxx b/NxWidgets/libnxwidgets/src/cscrollbarvertical.cxx index e287b14f2..307f6bc2a 100644 --- a/NxWidgets/libnxwidgets/src/cscrollbarvertical.cxx +++ b/NxWidgets/libnxwidgets/src/cscrollbarvertical.cxx @@ -1,7 +1,7 @@ /**************************************************************************** * NxWidgets/libnxwidgets/include/cscrollbarhorizontal.hxx * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -160,7 +160,7 @@ CScrollbarVertical::CScrollbarVertical(CWidgetControl *pWidgetControl, * @return The smallest value. */ -const nxgl_coord_t CScrollbarVertical::getMinimumValue(void) const +const int CScrollbarVertical::getMinimumValue(void) const { return m_slider->getMinimumValue(); } @@ -171,7 +171,7 @@ const nxgl_coord_t CScrollbarVertical::getMinimumValue(void) const * @return The largest value. */ -const nxgl_coord_t CScrollbarVertical::getMaximumValue(void) const +const int CScrollbarVertical::getMaximumValue(void) const { return m_slider->getMaximumValue(); } @@ -182,7 +182,7 @@ const nxgl_coord_t CScrollbarVertical::getMaximumValue(void) const * @return The current slider value. */ -const nxgl_coord_t CScrollbarVertical::getValue(void) const +const int CScrollbarVertical::getValue(void) const { return m_slider->getValue(); } @@ -207,7 +207,7 @@ const nxgl_coord_t CScrollbarVertical::getPageSize(void) const * @param value The smallest value. */ -void CScrollbarVertical::setMinimumValue(const nxgl_coord_t value) +void CScrollbarVertical::setMinimumValue(const int value) { m_slider->setMinimumValue(value); } @@ -218,7 +218,7 @@ void CScrollbarVertical::setMinimumValue(const nxgl_coord_t value) * @param value The largest value. */ -void CScrollbarVertical::setMaximumValue(const nxgl_coord_t value) +void CScrollbarVertical::setMaximumValue(const int value) { m_slider->setMaximumValue(value); } @@ -230,7 +230,7 @@ void CScrollbarVertical::setMaximumValue(const nxgl_coord_t value) * @param value The new value. */ -void CScrollbarVertical::setValue(const nxgl_coord_t value) +void CScrollbarVertical::setValue(const int value) { m_slider->setValue(value); } @@ -381,7 +381,7 @@ void CScrollbarVertical::onResize(nxgl_coord_t width, nxgl_coord_t height) { // Remember current values - nxgl_coord_t value = getValue(); + int value = getValue(); bool events = raisesEvents(); // Disable event raising diff --git a/NxWidgets/libnxwidgets/src/csliderhorizontal.cxx b/NxWidgets/libnxwidgets/src/csliderhorizontal.cxx index 4462d6e74..b1444828b 100644 --- a/NxWidgets/libnxwidgets/src/csliderhorizontal.cxx +++ b/NxWidgets/libnxwidgets/src/csliderhorizontal.cxx @@ -1,7 +1,7 @@ /**************************************************************************** * NxWidgets/libnxwidgets/src/csliderhorizontal.cxx * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -137,7 +137,7 @@ CSliderHorizontal::CSliderHorizontal(CWidgetControl *pWidgetControl, * @param value The new value. */ -void CSliderHorizontal::setValue(const nxgl_coord_t value) +void CSliderHorizontal::setValue(const int value) { setValueWithBitshift((int32_t)value << 16); } diff --git a/NxWidgets/libnxwidgets/src/cslidervertical.cxx b/NxWidgets/libnxwidgets/src/cslidervertical.cxx index 9b9b0f91a..a9f40a68c 100644 --- a/NxWidgets/libnxwidgets/src/cslidervertical.cxx +++ b/NxWidgets/libnxwidgets/src/cslidervertical.cxx @@ -1,7 +1,7 @@ /**************************************************************************** * NxWidgets/libnxwidgets/src/cslidervertical.cxx * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -138,7 +138,7 @@ CSliderVertical::CSliderVertical(CWidgetControl *pWidgetControl, * @param value The new value. */ -void CSliderVertical::setValue(const nxgl_coord_t value) +void CSliderVertical::setValue(const int value) { setValueWithBitshift((int32_t)value << 16); } |