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

Scrollbar Handler. More...

#include <SScrollBarHandler.h>

Inheritance diagram for SScrollBarHandler:
ITimelineHandler

Public Types

enum  { kSbRail = 100 }
 

Public Member Functions

 SScrollBarHandler (IScrollBarHost *pCB, bool bVert=false)
 Constructor for SScrollBarHandler.
 
CRect GetPartRect (int iPart) const
 Gets the rectangle of a scrollbar part.
 
int GetHitPart () const
 Gets the hit part of the scrollbar.
 
int GetClickPart () const
 Gets the clicked part of the scrollbar.
 
bool IsVertical () const
 Checks if the scrollbar is vertical.
 
void SetVertical (bool bVert)
 Sets the orientation of the scrollbar.
 
void OnMouseHover (CPoint pt)
 Handles mouse hover events.
 
bool OnMouseDown (CPoint pt)
 Handles mouse down events.
 
void OnMouseUp (CPoint pt)
 Handles mouse up events.
 
void OnMouseMove (CPoint pt)
 Handles mouse move events.
 
void OnMouseLeave ()
 Handles mouse leave events.
 
void OnDraw (IRenderTarget *pRT, int iPart) const
 Draws a part of the scrollbar.
 
void OnTimer (char id)
 Handles timer events.
 
void OnDestroy ()
 Handles destruction events.
 
int HitTest (CPoint pt) const
 Performs hit testing on the scrollbar.
 
void OnContainerChanged (ISwndContainer *pOldContainer, ISwndContainer *pNewContainer)
 Handles container change events.
 
- Public Member Functions inherited from ITimelineHandler
void OnNextFrame () PURE
 下一个动画帧处理接口
 

Protected Member Functions

ISwndContainerGetContainer ()
 Gets the container for the scrollbar.
 
const IInterpolator * GetInterpolator () const
 Gets the interpolator for the scrollbar.
 
BYTE GetAlpha (int iPart) const
 Gets the alpha value for a part of the scrollbar.
 
int GetFadeStep () const
 Gets the fade step for the scrollbar.
 
DWORD GetPartState (int iPart) const
 Gets the state of a part of the scrollbar.
 
void OnNextFrame () OVERRIDE
 Handles the next frame in the timeline.
 

Detailed Description

Scrollbar Handler.

Description: Manages the behavior and appearance of scrollbars.

Definition at line 125 of file SScrollBarHandler.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 131 of file SScrollBarHandler.h.

Constructor & Destructor Documentation

◆ SScrollBarHandler()

SNSBEGIN SScrollBarHandler::SScrollBarHandler ( IScrollBarHost * pCB,
bool bVert = false )

Constructor for SScrollBarHandler.

Parameters
pCBPointer to the scrollbar host.
bVertTRUE for vertical scrollbar, FALSE for horizontal scrollbar.

Definition at line 6 of file SScrollBarHandler.cpp.

Member Function Documentation

◆ GetAlpha()

BYTE SScrollBarHandler::GetAlpha ( int iPart) const
protected

Gets the alpha value for a part of the scrollbar.

Parameters
iPartPart identifier.
Returns
Alpha value.

Definition at line 367 of file SScrollBarHandler.cpp.

◆ GetClickPart()

int SScrollBarHandler::GetClickPart ( ) const

Gets the clicked part of the scrollbar.

Returns
Clicked part identifier.

Definition at line 401 of file SScrollBarHandler.cpp.

◆ GetContainer()

ISwndContainer * SScrollBarHandler::GetContainer ( )
protected

Gets the container for the scrollbar.

Returns
Pointer to the scrollbar container.

Definition at line 115 of file SScrollBarHandler.cpp.

◆ GetFadeStep()

int SScrollBarHandler::GetFadeStep ( ) const
protected

Gets the fade step for the scrollbar.

Returns
Fade step.

Definition at line 382 of file SScrollBarHandler.cpp.

◆ GetHitPart()

int SScrollBarHandler::GetHitPart ( ) const

Gets the hit part of the scrollbar.

Returns
Hit part identifier.

Definition at line 396 of file SScrollBarHandler.cpp.

◆ GetInterpolator()

const IInterpolator * SScrollBarHandler::GetInterpolator ( ) const
protected

Gets the interpolator for the scrollbar.

Returns
Pointer to the interpolator.

Definition at line 120 of file SScrollBarHandler.cpp.

◆ GetPartRect()

CRect SScrollBarHandler::GetPartRect ( int iPart) const

Gets the rectangle of a scrollbar part.

Parameters
iPartPart identifier.
Returns
Rectangle of the part.

Definition at line 38 of file SScrollBarHandler.cpp.

◆ GetPartState()

DWORD SScrollBarHandler::GetPartState ( int iPart) const
protected

Gets the state of a part of the scrollbar.

Parameters
iPartPart identifier.
Returns
State of the part.

Definition at line 406 of file SScrollBarHandler.cpp.

◆ HitTest()

int SScrollBarHandler::HitTest ( CPoint pt) const

Performs hit testing on the scrollbar.

Parameters
ptPoint to test.
Returns
Hit part identifier.

Definition at line 126 of file SScrollBarHandler.cpp.

◆ IsVertical()

bool SScrollBarHandler::IsVertical ( ) const

Checks if the scrollbar is vertical.

Returns
TRUE if vertical, FALSE if horizontal.

Definition at line 110 of file SScrollBarHandler.cpp.

◆ OnContainerChanged()

void SScrollBarHandler::OnContainerChanged ( ISwndContainer * pOldContainer,
ISwndContainer * pNewContainer )

Handles container change events.

Parameters
pOldContainerPointer to the old container.
pNewContainerPointer to the new container.

Definition at line 421 of file SScrollBarHandler.cpp.

◆ OnDestroy()

void SScrollBarHandler::OnDestroy ( )

Handles destruction events.

Definition at line 174 of file SScrollBarHandler.cpp.

◆ OnDraw()

void SScrollBarHandler::OnDraw ( IRenderTarget * pRT,
int iPart ) const

Draws a part of the scrollbar.

Parameters
pRTPointer to the render target.
iPartPart identifier to draw.

Definition at line 140 of file SScrollBarHandler.cpp.

◆ OnMouseDown()

bool SScrollBarHandler::OnMouseDown ( CPoint pt)

Handles mouse down events.

Parameters
ptPoint where the mouse button was pressed.
Returns
TRUE if handled, FALSE otherwise.

Definition at line 330 of file SScrollBarHandler.cpp.

◆ OnMouseHover()

void SScrollBarHandler::OnMouseHover ( CPoint pt)

Handles mouse hover events.

Parameters
ptPoint where the mouse is hovering.

Definition at line 183 of file SScrollBarHandler.cpp.

◆ OnMouseLeave()

void SScrollBarHandler::OnMouseLeave ( )

Handles mouse leave events.

Definition at line 207 of file SScrollBarHandler.cpp.

◆ OnMouseMove()

void SScrollBarHandler::OnMouseMove ( CPoint pt)

Handles mouse move events.

Parameters
ptPoint where the mouse moved.

Definition at line 238 of file SScrollBarHandler.cpp.

◆ OnMouseUp()

void SScrollBarHandler::OnMouseUp ( CPoint pt)

Handles mouse up events.

Parameters
ptPoint where the mouse button was released.

Definition at line 300 of file SScrollBarHandler.cpp.

◆ OnNextFrame()

void SScrollBarHandler::OnNextFrame ( )
protected

Handles the next frame in the timeline.

Definition at line 23 of file SScrollBarHandler.cpp.

◆ OnTimer()

void SScrollBarHandler::OnTimer ( char id)

Handles timer events.

Parameters
idTimer identifier.

Definition at line 150 of file SScrollBarHandler.cpp.

◆ SetVertical()

void SScrollBarHandler::SetVertical ( bool bVert)

Sets the orientation of the scrollbar.

Parameters
bVertTRUE for vertical, FALSE for horizontal.

Definition at line 18 of file SScrollBarHandler.cpp.


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