Numworks Epsilon  1.4.1
Graphing Calculator Operating System
ScrollView Class Reference

#include <scroll_view.h>

Inheritance diagram for ScrollView:
View ScrollableView TableView Calculation::ScrollableExpressionView Calculation::ScrollableOutputExpressionsView TextInput SelectableTableView TextArea TextField Calculation::CalculationSelectableTableView Calculation::TextField

Public Member Functions

 ScrollView (View *contentView, ScrollViewDataSource *dataSource)
 
void drawRect (KDContext *ctx, KDRect rect) const override
 
void setTopMargin (KDCoordinate m)
 
KDCoordinate topMargin () const
 
void setRightMargin (KDCoordinate m)
 
KDCoordinate rightMargin () const
 
void setBottomMargin (KDCoordinate m)
 
KDCoordinate bottomMargin () const
 
void setLeftMargin (KDCoordinate m)
 
KDCoordinate leftMargin () const
 
void setMargins (KDCoordinate top, KDCoordinate right, KDCoordinate bottom, KDCoordinate left)
 
void setMargins (KDCoordinate m)
 
void setCommonMargins ()
 
void setShowsIndicators (bool s)
 
bool showsIndicators () const
 
void setColorsBackground (bool c)
 
bool colorsBackground () const
 
void setBackgroundColor (KDColor c)
 
KDColor backgroundColor () const
 
ScrollViewIndicatorverticalScrollIndicator ()
 
ScrollViewIndicatorhorizontalScrollIndicator ()
 
void setIndicatorThickness (KDCoordinate t)
 
KDCoordinate indicatorThickness () const
 
void setContentOffset (KDPoint offset, bool forceRelayout=false)
 
KDPoint contentOffset () const
 
void scrollToContentPoint (KDPoint p, bool allowOverscroll=false)
 
void scrollToContentRect (KDRect rect, bool allowOverscroll=false)
 
- Public Member Functions inherited from View
 View ()
 
virtual ~View ()
 
 View (const View &other)=delete
 
 View (View &&other)=delete
 
Viewoperator= (const View &other)=delete
 
Viewoperator= (View &&other)=delete
 
void resetSuperview ()
 
void setSize (KDSize size)
 
void setFrame (KDRect frame)
 
KDPoint pointFromPointInView (View *view, KDPoint point)
 
KDRect bounds () const
 
Viewsubview (int index)
 
virtual KDSize minimalSizeForOptimalDisplay () const
 

Protected Member Functions

KDCoordinate maxContentWidthDisplayableWithoutScrolling ()
 
KDCoordinate maxContentHeightDisplayableWithoutScrolling ()
 
KDRect visibleContentRect ()
 
void layoutSubviews () override
 
void updateScrollIndicator ()
 
KDSize contentSize ()
 
- Protected Member Functions inherited from View
void markRectAsDirty (KDRect rect)
 

Protected Attributes

Viewm_contentView
 
- Protected Attributes inherited from View
KDRect m_frame
 

Detailed Description

Definition at line 8 of file scroll_view.h.

Constructor & Destructor Documentation

◆ ScrollView()

ScrollView::ScrollView ( View contentView,
ScrollViewDataSource dataSource 
)

Definition at line 9 of file scroll_view.cpp.

Member Function Documentation

◆ backgroundColor()

KDColor ScrollView::backgroundColor ( ) const
inline

Definition at line 33 of file scroll_view.h.

◆ bottomMargin()

KDCoordinate ScrollView::bottomMargin ( ) const
inline

Definition at line 18 of file scroll_view.h.

◆ colorsBackground()

bool ScrollView::colorsBackground ( ) const
inline

Definition at line 31 of file scroll_view.h.

◆ contentOffset()

KDPoint ScrollView::contentOffset ( ) const
inline

Definition at line 41 of file scroll_view.h.

◆ contentSize()

KDSize ScrollView::contentSize ( )
protected

Definition at line 195 of file scroll_view.cpp.

◆ drawRect()

void ScrollView::drawRect ( KDContext ctx,
KDRect  rect 
) const
overridevirtual

Reimplemented from View.

Definition at line 64 of file scroll_view.cpp.

◆ horizontalScrollIndicator()

ScrollViewIndicator* ScrollView::horizontalScrollIndicator ( )
inline

Definition at line 36 of file scroll_view.h.

◆ indicatorThickness()

KDCoordinate ScrollView::indicatorThickness ( ) const
inline

Definition at line 38 of file scroll_view.h.

◆ layoutSubviews()

void ScrollView::layoutSubviews ( )
overrideprotectedvirtual

Reimplemented from View.

Reimplemented in TableView, and ScrollableView.

Definition at line 129 of file scroll_view.cpp.

◆ leftMargin()

KDCoordinate ScrollView::leftMargin ( ) const
inline

Definition at line 20 of file scroll_view.h.

◆ maxContentHeightDisplayableWithoutScrolling()

KDCoordinate ScrollView::maxContentHeightDisplayableWithoutScrolling ( )
protected

Definition at line 209 of file scroll_view.cpp.

◆ maxContentWidthDisplayableWithoutScrolling()

KDCoordinate ScrollView::maxContentWidthDisplayableWithoutScrolling ( )
protected

Definition at line 205 of file scroll_view.cpp.

◆ rightMargin()

KDCoordinate ScrollView::rightMargin ( ) const
inline

Definition at line 16 of file scroll_view.h.

◆ scrollToContentPoint()

void ScrollView::scrollToContentPoint ( KDPoint  p,
bool  allowOverscroll = false 
)

Definition at line 80 of file scroll_view.cpp.

◆ scrollToContentRect()

void ScrollView::scrollToContentRect ( KDRect  rect,
bool  allowOverscroll = false 
)

Definition at line 115 of file scroll_view.cpp.

◆ setBackgroundColor()

void ScrollView::setBackgroundColor ( KDColor  c)
inline

Definition at line 32 of file scroll_view.h.

◆ setBottomMargin()

void ScrollView::setBottomMargin ( KDCoordinate  m)
inline

Definition at line 17 of file scroll_view.h.

◆ setColorsBackground()

void ScrollView::setColorsBackground ( bool  c)
inline

Definition at line 30 of file scroll_view.h.

◆ setCommonMargins()

void ScrollView::setCommonMargins ( )

Definition at line 27 of file scroll_view.cpp.

◆ setContentOffset()

void ScrollView::setContentOffset ( KDPoint  offset,
bool  forceRelayout = false 
)

Definition at line 199 of file scroll_view.cpp.

◆ setIndicatorThickness()

void ScrollView::setIndicatorThickness ( KDCoordinate  t)
inline

Definition at line 37 of file scroll_view.h.

◆ setLeftMargin()

void ScrollView::setLeftMargin ( KDCoordinate  m)
inline

Definition at line 19 of file scroll_view.h.

◆ setMargins() [1/2]

void ScrollView::setMargins ( KDCoordinate  top,
KDCoordinate  right,
KDCoordinate  bottom,
KDCoordinate  left 
)
inline

Definition at line 22 of file scroll_view.h.

◆ setMargins() [2/2]

void ScrollView::setMargins ( KDCoordinate  m)
inline

Definition at line 25 of file scroll_view.h.

◆ setRightMargin()

void ScrollView::setRightMargin ( KDCoordinate  m)
inline

Definition at line 15 of file scroll_view.h.

◆ setShowsIndicators()

void ScrollView::setShowsIndicators ( bool  s)
inline

Definition at line 28 of file scroll_view.h.

◆ setTopMargin()

void ScrollView::setTopMargin ( KDCoordinate  m)
inline

Definition at line 13 of file scroll_view.h.

◆ showsIndicators()

bool ScrollView::showsIndicators ( ) const
inline

Definition at line 29 of file scroll_view.h.

◆ topMargin()

KDCoordinate ScrollView::topMargin ( ) const
inline

Definition at line 14 of file scroll_view.h.

◆ updateScrollIndicator()

void ScrollView::updateScrollIndicator ( )
protected

Definition at line 171 of file scroll_view.cpp.

◆ verticalScrollIndicator()

ScrollViewIndicator* ScrollView::verticalScrollIndicator ( )
inline

Definition at line 35 of file scroll_view.h.

◆ visibleContentRect()

KDRect ScrollView::visibleContentRect ( )
protected

Definition at line 120 of file scroll_view.cpp.

Member Data Documentation

◆ m_contentView

View* ScrollView::m_contentView
protected

Definition at line 56 of file scroll_view.h.


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