Scrollbar Handler. More...
#include <SScrollBarHandler.h>
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 | |
| ISwndContainer * | GetContainer () |
| 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. | |
Scrollbar Handler.
Description: Manages the behavior and appearance of scrollbars.
Definition at line 125 of file SScrollBarHandler.h.
| anonymous enum |
Definition at line 131 of file SScrollBarHandler.h.
| SNSBEGIN SScrollBarHandler::SScrollBarHandler | ( | IScrollBarHost * | pCB, |
| bool | bVert = false ) |
Constructor for SScrollBarHandler.
| pCB | Pointer to the scrollbar host. |
| bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 6 of file SScrollBarHandler.cpp.
|
protected |
Gets the alpha value for a part of the scrollbar.
| iPart | Part identifier. |
Definition at line 367 of file SScrollBarHandler.cpp.
| int SScrollBarHandler::GetClickPart | ( | ) | const |
Gets the clicked part of the scrollbar.
Definition at line 401 of file SScrollBarHandler.cpp.
|
protected |
Gets the container for the scrollbar.
Definition at line 115 of file SScrollBarHandler.cpp.
|
protected |
Gets the fade step for the scrollbar.
Definition at line 382 of file SScrollBarHandler.cpp.
| int SScrollBarHandler::GetHitPart | ( | ) | const |
Gets the hit part of the scrollbar.
Definition at line 396 of file SScrollBarHandler.cpp.
|
protected |
Gets the interpolator for the scrollbar.
Definition at line 120 of file SScrollBarHandler.cpp.
| CRect SScrollBarHandler::GetPartRect | ( | int | iPart | ) | const |
Gets the rectangle of a scrollbar part.
| iPart | Part identifier. |
Definition at line 38 of file SScrollBarHandler.cpp.
|
protected |
Gets the state of a part of the scrollbar.
| iPart | Part identifier. |
Definition at line 406 of file SScrollBarHandler.cpp.
| int SScrollBarHandler::HitTest | ( | CPoint | pt | ) | const |
Performs hit testing on the scrollbar.
| pt | Point to test. |
Definition at line 126 of file SScrollBarHandler.cpp.
| bool SScrollBarHandler::IsVertical | ( | ) | const |
Checks if the scrollbar is vertical.
Definition at line 110 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::OnContainerChanged | ( | ISwndContainer * | pOldContainer, |
| ISwndContainer * | pNewContainer ) |
Handles container change events.
| pOldContainer | Pointer to the old container. |
| pNewContainer | Pointer to the new container. |
Definition at line 421 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::OnDestroy | ( | ) |
Handles destruction events.
Definition at line 174 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::OnDraw | ( | IRenderTarget * | pRT, |
| int | iPart ) const |
Draws a part of the scrollbar.
| pRT | Pointer to the render target. |
| iPart | Part identifier to draw. |
Definition at line 140 of file SScrollBarHandler.cpp.
| bool SScrollBarHandler::OnMouseDown | ( | CPoint | pt | ) |
Handles mouse down events.
| pt | Point where the mouse button was pressed. |
Definition at line 330 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::OnMouseHover | ( | CPoint | pt | ) |
Handles mouse hover events.
| pt | Point where the mouse is hovering. |
Definition at line 183 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::OnMouseLeave | ( | ) |
Handles mouse leave events.
Definition at line 207 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::OnMouseMove | ( | CPoint | pt | ) |
Handles mouse move events.
| pt | Point where the mouse moved. |
Definition at line 238 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::OnMouseUp | ( | CPoint | pt | ) |
Handles mouse up events.
| pt | Point where the mouse button was released. |
Definition at line 300 of file SScrollBarHandler.cpp.
|
protected |
Handles the next frame in the timeline.
Definition at line 23 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::OnTimer | ( | char | id | ) |
Handles timer events.
| id | Timer identifier. |
Definition at line 150 of file SScrollBarHandler.cpp.
| void SScrollBarHandler::SetVertical | ( | bool | bVert | ) |
Sets the orientation of the scrollbar.
| bVert | TRUE for vertical, FALSE for horizontal. |
Definition at line 18 of file SScrollBarHandler.cpp.