soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SScrollView Class Reference

Scrollable Panel. More...

#include <SPanel.h>

Public Member Functions

 SScrollView ()
 Constructor for SScrollView.
 
virtual ~SScrollView ()
 Destructor for SScrollView.
 
void GetViewSize (SIZE *szView) SCONST OVERRIDE
 Gets the size of the view.
 
void SetViewSize (SIZE szView) OVERRIDE
 Sets the size of the view.
 
void GetViewOrigin (POINT *ptOri) SCONST OVERRIDE
 Gets the origin of the view.
 
void SetViewOrigin (POINT pt) OVERRIDE
 Sets the origin of the view.
 

Protected Member Functions

virtual void OnViewSizeChanged (CSize szOld, CSize szNew)
 Called when the view size changes.
 
virtual void OnViewOriginChanged (CPoint ptOld, CPoint ptNew)
 Called when the view origin changes.
 
void GetChildrenLayoutRect (RECT *prc) SCONST OVERRIDE
 Gets the layout rectangle of the children.
 
void UpdateChildrenPosition () OVERRIDE
 Updates the position of the children.
 
virtual BOOL OnScroll (BOOL bVertical, UINT uCode, int nPos)
 Handles scroll events.
 
virtual void UpdateScrollBar ()
 Updates the scrollbar.
 
HRESULT OnAttrViewSize (const SStringW &strValue, BOOL bLoading)
 Handles the view size attribute.
 
virtual HRESULT SetAttribute (const SNS::SStringW &amp;amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;amp;strValue, BOOL bLoading=FALSE)
 
void UpdateViewSize ()
 Updates the view size.
 
void OnSize (UINT nType, CSize size)
 Handles the WM_SIZE message.
 

Protected Attributes

SLayoutSize m_viewSize [2]
 
CPoint m_ptOrigin
 
SIZE m_szView
 

Detailed Description

Scrollable Panel.

Description: Implements a scrollable panel that supports scrolling content.

Definition at line 469 of file SPanel.h.

Constructor & Destructor Documentation

◆ SScrollView()

SScrollView::SScrollView ( )

Constructor for SScrollView.

Definition at line 666 of file SPanel.cpp.

◆ ~SScrollView()

virtual SScrollView::~SScrollView ( )
inlinevirtual

Destructor for SScrollView.

Definition at line 481 of file SPanel.h.

Member Function Documentation

◆ GetChildrenLayoutRect()

void SScrollView::GetChildrenLayoutRect ( RECT * prc)
protected

Gets the layout rectangle of the children.

Parameters
prcPointer to receive the layout rectangle.

Definition at line 946 of file SPanel.cpp.

◆ GetViewOrigin()

void SScrollView::GetViewOrigin ( POINT * ptOri)

Gets the origin of the view.

Parameters
ptOriPointer to receive the origin of the view.

Definition at line 728 of file SPanel.cpp.

◆ GetViewSize()

void SScrollView::GetViewSize ( SIZE * szView)

Gets the size of the view.

Parameters
szViewPointer to receive the view size.

Definition at line 745 of file SPanel.cpp.

◆ OnAttrViewSize()

HRESULT SScrollView::OnAttrViewSize ( const SStringW & strValue,
BOOL bLoading )
protected

Handles the view size attribute.

Parameters
strValueString value of the attribute.
bLoadingTRUE if loading, FALSE otherwise.
Returns
Result of the attribute handling.

Definition at line 931 of file SPanel.cpp.

◆ OnScroll()

BOOL SScrollView::OnScroll ( BOOL bVertical,
UINT uCode,
int nPos )
protectedvirtual

Handles scroll events.

Parameters
bVerticalTRUE for vertical scrollbar, FALSE for horizontal scrollbar.
uCodeScroll code.
nPosPosition for the scroll.
Returns
TRUE if handled, FALSE otherwise.

Reimplemented from SPanel.

Definition at line 843 of file SPanel.cpp.

◆ OnSize()

void SScrollView::OnSize ( UINT nType,
CSize size )
protected

Handles the WM_SIZE message.

Parameters
nTypeType of size change.
sizeNew size of the window.

Definition at line 679 of file SPanel.cpp.

◆ OnViewOriginChanged()

void SScrollView::OnViewOriginChanged ( CPoint ptOld,
CPoint ptNew )
protectedvirtual

Called when the view origin changes.

Parameters
ptOldOld origin of the view.
ptNewNew origin of the view.

Definition at line 685 of file SPanel.cpp.

◆ OnViewSizeChanged()

void SScrollView::OnViewSizeChanged ( CSize szOld,
CSize szNew )
protectedvirtual

Called when the view size changes.

Parameters
szOldOld size of the view.
szNewNew size of the view.

Definition at line 694 of file SPanel.cpp.

◆ SetAttribute()

virtual HRESULT SScrollView::SetAttribute ( const SNS::SStringW &amp;amp;amp;amp; strAttribName,
const SNS::SStringW &amp;amp;amp;amp; strValue,
BOOL bLoading = FALSE )
inlineprotectedvirtual

Reimplemented from SPanel.

Definition at line 560 of file SPanel.h.

◆ SetViewOrigin()

void SScrollView::SetViewOrigin ( POINT pt)

Sets the origin of the view.

Parameters
ptNew origin of the view.

Definition at line 702 of file SPanel.cpp.

◆ SetViewSize()

void SScrollView::SetViewSize ( SIZE szView)

Sets the size of the view.

Parameters
szViewNew size of the view.

Definition at line 734 of file SPanel.cpp.

◆ UpdateChildrenPosition()

void SScrollView::UpdateChildrenPosition ( )
protected

Updates the position of the children.

Definition at line 957 of file SPanel.cpp.

◆ UpdateScrollBar()

void SScrollView::UpdateScrollBar ( )
protectedvirtual

Updates the scrollbar.

Definition at line 751 of file SPanel.cpp.

◆ UpdateViewSize()

void SScrollView::UpdateViewSize ( )
protected

Updates the view size.

Definition at line 871 of file SPanel.cpp.

Member Data Documentation

◆ m_ptOrigin

CPoint SScrollView::m_ptOrigin
protected

Definition at line 585 of file SPanel.h.

◆ m_szView

SIZE SScrollView::m_szView
protected

Definition at line 586 of file SPanel.h.

◆ m_viewSize

SLayoutSize SScrollView::m_viewSize[2]
protected

Definition at line 584 of file SPanel.h.


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