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

#include <iscrollable.hxx>

Inheritance diagram for NXWidgets::IScrollable:
Inheritance graph

Public Member Functions

virtual ~IScrollable (void)
 
virtual const int32_t getCanvasX (void) const =0
 
virtual const int32_t getCanvasY (void) const =0
 
virtual const int32_t getCanvasWidth (void) const =0
 
virtual const int32_t getCanvasHeight (void) const =0
 
virtual void scroll (int32_t dx, int32_t dy)=0
 
virtual void jump (int32_t x, int32_t y)=0
 
virtual bool allowsVerticalScroll (void) const =0
 
virtual bool allowsHorizontalScroll (void) const =0
 
virtual void setAllowsVerticalScroll (bool allow)=0
 
virtual void setAllowsHorizontalScroll (bool allow)=0
 
virtual void setCanvasWidth (const int32_t width)=0
 
virtual void setCanvasHeight (const int32_t height)=0
 

Detailed Description

Abstract class defining basic functionality of scrolling widgets. Scrolling regions are modelled as a virtual "canvas", or rectangular region, with height/width dimensions and x/y coordinates.

Definition at line 102 of file iscrollable.hxx.

Constructor & Destructor Documentation

◆ ~IScrollable()

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

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

Definition at line 112 of file iscrollable.hxx.

Member Function Documentation

◆ allowsHorizontalScroll()

virtual bool NXWidgets::IScrollable::allowsHorizontalScroll ( void  ) const
pure virtual

Returns true if horizontal scrolling is allowed.

Returns
True if horizontal scrolling is allowed.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ allowsVerticalScroll()

virtual bool NXWidgets::IScrollable::allowsVerticalScroll ( void  ) const
pure virtual

Returns true if vertical scrolling is allowed.

Returns
True if vertical scrolling is allowed.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ getCanvasHeight()

virtual const int32_t NXWidgets::IScrollable::getCanvasHeight ( void  ) const
pure virtual

Gets the height of the virtual canvas.

Returns
The height of the virtual canvas.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ getCanvasWidth()

virtual const int32_t NXWidgets::IScrollable::getCanvasWidth ( void  ) const
pure virtual

Gets the width of the virtual canvas.

Returns
The width of the virtual canvas.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ getCanvasX()

virtual const int32_t NXWidgets::IScrollable::getCanvasX ( void  ) const
pure virtual

Gets the x coordinate of the virtual canvas.

Returns
The x coordinate of the virtual canvas.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ getCanvasY()

virtual const int32_t NXWidgets::IScrollable::getCanvasY ( void  ) const
pure virtual

Gets the y coordinate of the virtual canvas.

Returns
The y coordinate of the virtual canvas.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ jump()

virtual void NXWidgets::IScrollable::jump ( int32_t  x,
int32_t  y 
)
pure virtual

Repositions the virtual canvas to the specified coordinates.

Parameters
xNew x coordinate of the virtual canvas.
yNew y coordinate of the virtual canvas.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ scroll()

virtual void NXWidgets::IScrollable::scroll ( int32_t  dx,
int32_t  dy 
)
pure virtual

Scrolls the virtual canvas by the specified amounts.

Parameters
dxDistance to scroll horizontally.
dyDistance to scroll vertically.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ setAllowsHorizontalScroll()

virtual void NXWidgets::IScrollable::setAllowsHorizontalScroll ( bool  allow)
pure virtual

Set whether or not horizontal scrolling is allowed.

Parameters
allowTrue to allow horizontal scrolling; false to deny it.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ setAllowsVerticalScroll()

virtual void NXWidgets::IScrollable::setAllowsVerticalScroll ( bool  allow)
pure virtual

Set whether or not horizontal scrolling is allowed.

Parameters
allowTrue to allow horizontal scrolling; false to deny it.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ setCanvasHeight()

virtual void NXWidgets::IScrollable::setCanvasHeight ( const int32_t  height)
pure virtual

Sets the height of the virtual canvas.

Parameters
heightThe height of the virtual canvas.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.

◆ setCanvasWidth()

virtual void NXWidgets::IScrollable::setCanvasWidth ( const int32_t  width)
pure virtual

Sets the width of the virtual canvas.

Parameters
widthThe width of the virtual canvas.

Implemented in NXWidgets::CScrollingTextBox, NXWidgets::CScrollingPanel, and NXWidgets::CScrollbarPanel.


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