NXWidgets  1.19
Public Member Functions | List of all members
NXWidgets::ISlider Class Referenceabstract

#include <islider.hxx>

Inheritance diagram for NXWidgets::ISlider:
Inheritance graph

Public Member Functions

virtual ~ISlider (void)
 
virtual const int getMinimumValue (void) const =0
 
virtual const int getMaximumValue (void) const =0
 
virtual const int getValue (void) const =0
 
virtual const nxgl_coord_t getPageSize (void) const =0
 
virtual void setMinimumValue (const int value)=0
 
virtual void setMaximumValue (const int value)=0
 
virtual void setValue (const int value)=0
 
virtual void setValueWithBitshift (const int32_t value)=0
 
virtual void setPageSize (const nxgl_coord_t pageSize)=0
 

Detailed Description

Defines the interface for slider widgets.

Definition at line 99 of file islider.hxx.

Constructor & Destructor Documentation

◆ ~ISlider()

virtual NXWidgets::ISlider::~ISlider ( void  )
inlinevirtual

A virtual destructor is required in order to override the ISlider destructor. We do this because if we delete ISlider, we want the destructor of the class that inherits from ISlider to run, not this one.

Definition at line 109 of file islider.hxx.

Member Function Documentation

◆ getMaximumValue()

virtual const int NXWidgets::ISlider::getMaximumValue ( void  ) const
pure virtual

Get the largest value that the slider can represent.

Returns
The largest value.

Implemented in NXWidgets::CSliderVertical, NXWidgets::CSliderHorizontal, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.

◆ getMinimumValue()

virtual const int NXWidgets::ISlider::getMinimumValue ( void  ) const
pure virtual

Get the smallest value that the slider can represent.

Returns
The smallest value.

Implemented in NXWidgets::CSliderVertical, NXWidgets::CSliderHorizontal, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.

◆ getPageSize()

virtual const nxgl_coord_t NXWidgets::ISlider::getPageSize ( void  ) const
pure virtual

Get the value represented by the height of the grip. For sliders, this would typically be 1 (so each new grip position is worth 1). For scrollbars, this would be the height of the scrolling widget.

Returns
The page size.

Implemented in NXWidgets::CSliderHorizontal, NXWidgets::CSliderVertical, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.

◆ getValue()

virtual const int NXWidgets::ISlider::getValue ( void  ) const
pure virtual

Get the current value of the slider.

return The current slider value.

Implemented in NXWidgets::CSliderHorizontal, NXWidgets::CSliderVertical, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.

◆ setMaximumValue()

virtual void NXWidgets::ISlider::setMaximumValue ( const int  value)
pure virtual

Set the largest value that the slider can represent.

Parameters
valueThe largest value.

Implemented in NXWidgets::CSliderHorizontal, NXWidgets::CSliderVertical, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.

◆ setMinimumValue()

virtual void NXWidgets::ISlider::setMinimumValue ( const int  value)
pure virtual

Set the smallest value that the slider can represent.

Parameters
valueThe smallest value.

Implemented in NXWidgets::CSliderHorizontal, NXWidgets::CSliderVertical, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.

◆ setPageSize()

virtual void NXWidgets::ISlider::setPageSize ( const nxgl_coord_t  pageSize)
pure virtual

Set the page size represented by the grip.

Parameters
pageSizeThe page size.
See also
getPageSize().

Implemented in NXWidgets::CSliderHorizontal, NXWidgets::CSliderVertical, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.

◆ setValue()

virtual void NXWidgets::ISlider::setValue ( const int  value)
pure virtual

Set the value that of the slider. This will reposition and redraw the grip.

Parameters
valueThe new value.

Implemented in NXWidgets::CSliderHorizontal, NXWidgets::CSliderVertical, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.

◆ setValueWithBitshift()

virtual void NXWidgets::ISlider::setValueWithBitshift ( const int32_t  value)
pure virtual

Set the value that of the slider. This will reposition and redraw the grip. The supplied value should be bitshifted left 16 places. This ensures greater accuracy than the standard setValue() method if the slider is being used as a scrollbar.

Parameters
valueThe new value.

Implemented in NXWidgets::CSliderHorizontal, NXWidgets::CSliderVertical, NXWidgets::CGlyphSliderHorizontal, NXWidgets::CScrollbarHorizontal, and NXWidgets::CScrollbarVertical.


The documentation for this class was generated from the following file: