Panel with Scrollbar Support. More...
#include <SPanel.h>
Public Member Functions | |
SPanel () | |
Constructor for SPanel. | |
virtual | ~SPanel () |
Destructor for SPanel. | |
BOOL | ShowScrollBar (int wBar, BOOL bShow) OVERRIDE |
Shows or hides a scrollbar. | |
BOOL | EnableScrollBar (int wBar, BOOL bEnable) OVERRIDE |
Enables or disables a scrollbar. | |
BOOL | IsScrollBarEnable (BOOL bVertical) SCONST OVERRIDE |
Checks if a scrollbar is enabled. | |
void | SetScrollInfo (SCROLLINFO si, BOOL bVertical) OVERRIDE |
Sets the scroll information for a scrollbar. | |
BOOL | SetScrollPos (BOOL bVertical, int nNewPos, BOOL bRedraw) OVERRIDE |
Sets the scroll position for a scrollbar. | |
int | GetScrollPos (BOOL bVertical) SCONST OVERRIDE |
Gets the scroll position for a scrollbar. | |
BOOL | SetScrollRange (BOOL bVertical, int nMinPos, int nMaxPos, BOOL bRedraw) OVERRIDE |
Sets the scroll range for a scrollbar. | |
BOOL | GetScrollRange (BOOL bVertical, LPINT lpMinPos, LPINT lpMaxPos) SCONST OVERRIDE |
Gets the scroll range for a scrollbar. | |
BOOL | HasScrollBar (BOOL bVertical) SCONST OVERRIDE |
Checks if a scrollbar is present. | |
virtual void WINAPI | GetClientRect (LPRECT pRect) const |
Gets the client rectangle. | |
virtual CRect | GetClientRect () const |
Gets the client rectangle. | |
Protected Member Functions | |
CRect | GetScrollBarRect (BOOL bVert) SCONST OVERRIDE |
Gets the rectangle of a scrollbar. | |
ISkinObj * | GetScrollBarSkin (BOOL bVert) SCONST OVERRIDE |
Gets the skin for a scrollbar. | |
const SCROLLINFO * | GetScrollBarInfo (BOOL bVert) SCONST OVERRIDE |
Gets the scroll information for a scrollbar. | |
int | GetScrollBarArrowSize (BOOL bVert) SCONST OVERRIDE |
Gets the arrow size for a scrollbar. | |
void | OnScrollUpdatePart (BOOL bVert, int iPart) OVERRIDE |
Updates a part of the scrollbar. | |
void | OnScrollUpdateThumbTrack (BOOL bVert, int nPos) OVERRIDE |
Updates the thumb track of the scrollbar. | |
ISwndContainer * | GetScrollBarContainer () OVERRIDE |
Gets the container for the scrollbar. | |
void | OnScrollCommand (BOOL bVert, int iCmd, int nPos) OVERRIDE |
Handles scroll commands. | |
void | OnScrollSetTimer (BOOL bVert, char id, UINT uElapse) OVERRIDE |
Sets a timer for the scrollbar. | |
void | OnScrollKillTimer (BOOL bVert, char id) OVERRIDE |
Kills a timer for the scrollbar. | |
const IInterpolator * | GetScrollInterpolator () SCONST OVERRIDE |
Gets the interpolator for the scrollbar. | |
int | GetScrollFadeFrames () SCONST OVERRIDE |
Gets the number of fade frames for the scrollbar. | |
BYTE | GetScrollThumbTrackMinAlpha () SCONST OVERRIDE |
Gets the minimum alpha value for the scrollbar thumb track. | |
virtual int | GetScrollLineSize (BOOL bVertical) |
Gets the line size for scrolling. | |
virtual BOOL | OnScroll (BOOL bVertical, UINT uCode, int nPos) |
Handles scroll events. | |
virtual void | OnColorize (COLORREF cr) |
Handles colorization events. | |
virtual void | OnScaleChanged (int nScale) |
Handles scale change events. | |
virtual void | OnContainerChanged (ISwndContainer *pOldContainer, ISwndContainer *pNewContainer) |
Handles container change events. | |
int | GetSbWidth () const |
Gets the width of the scrollbar. | |
void | ScrollUpdate () |
Updates the scrollbar. | |
HRESULT | OnAttrScrollbarSkin (SStringW strValue, BOOL bLoading) |
Handles the scrollbar skin attribute. | |
virtual HRESULT | SetAttribute (const SNS::SStringW &amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;strValue, BOOL bLoading=FALSE) |
int | OnCreate (LPVOID) |
Handles the WM_CREATE message. | |
void | OnDestroy () |
Handles the WM_DESTROY message. | |
void | OnNcPaint (IRenderTarget *pRT) |
Handles the WM_NCPAINT message. | |
virtual BOOL | OnNcHitTest (CPoint pt) |
Handles the WM_NCHITTEST message. | |
void | OnNcLButtonDown (UINT nFlags, CPoint point) |
Handles the WM_NCLBUTTONDOWN message. | |
void | OnNcLButtonUp (UINT nFlags, CPoint pt) |
Handles the WM_NCLBUTTONUP message. | |
void | OnNcMouseMove (UINT nFlags, CPoint point) |
Handles the WM_NCMOUSEMOVE message. | |
void | OnNcMouseLeave () |
Handles the WM_NCMOUSELEAVE message. | |
LRESULT | OnNcCalcSize (BOOL bCalcValidRects, LPARAM lParam) |
Handles the WM_NCCALCSIZE message. | |
BOOL | OnMouseWheel (UINT nFlags, short zDelta, CPoint pt) |
Handles the WM_MOUSEWHEEL message. | |
void | OnTimer (char cTimerID) |
Handles the WM_TIMER message. | |
void | OnShowWindow (BOOL bShow, UINT nStatus) |
Handles the WM_SHOWWINDOW message. | |
void | OnEnable (BOOL bEnable, UINT uStatus) |
Handles the WM_ENABLE message. | |
void | OnVScroll (UINT nSBCode, UINT nPos, HWND hwnd) |
Handles the WM_VSCROLL message. | |
void | OnHScroll (UINT nSBCode, UINT nPos, HWND hwnd) |
Handles the WM_HSCROLL message. | |
![]() | |
CRect | GetScrollBarRect (BOOL bVert) SCONST PURE |
Gets the rectangle of the scrollbar. | |
ISkinObj * | GetScrollBarSkin (BOOL bVert) SCONST PURE |
Gets the skin for the scrollbar. | |
const SCROLLINFO * | GetScrollBarInfo (BOOL bVert) SCONST PURE |
Gets the scroll information for the scrollbar. | |
int | GetScrollBarArrowSize (BOOL bVert) SCONST PURE |
Gets the arrow size for the scrollbar. | |
void | OnScrollUpdatePart (BOOL bVert, int iPart) PURE |
Updates a part of the scrollbar. | |
void | OnScrollUpdateThumbTrack (BOOL bVert, int nPos) PURE |
Updates the thumb track of the scrollbar. | |
ISwndContainer * | GetScrollBarContainer () PURE |
Gets the container for the scrollbar. | |
BOOL | IsScrollBarEnable (BOOL bVertical) SCONST PURE |
Checks if the scrollbar is enabled. | |
void | OnScrollCommand (BOOL bVert, int iCmd, int nPos) PURE |
Handles scroll commands. | |
void | OnScrollSetTimer (BOOL bVert, char id, UINT uElapse) PURE |
Sets a timer for the scrollbar. | |
void | OnScrollKillTimer (BOOL bVert, char id) PURE |
Kills a timer for the scrollbar. | |
const IInterpolator * | GetScrollInterpolator () SCONST PURE |
Gets the interpolator for the scrollbar. | |
int | GetScrollFadeFrames () SCONST PURE |
Gets the number of fade frames for the scrollbar. | |
BYTE | GetScrollThumbTrackMinAlpha () SCONST PURE |
Gets the minimum alpha value for the scrollbar thumb track. | |
Protected Attributes | |
SCROLLINFO | m_siVer |
SCROLLINFO | m_siHoz |
SAutoRefPtr< SSkinScrollbar > | m_pSkinSb |
CRect | m_rcClient |
SLayoutSize | m_nSbLeft |
SLayoutSize | m_nSbRight |
SLayoutSize | m_nSbTop |
SLayoutSize | m_nSbBottom |
ScrollBarID | m_dragSb |
ScrollBarID | m_hitSb |
UINT | m_wBarVisible |
UINT | m_wBarEnable |
SScrollBarHandler | m_sbVert |
SScrollBarHandler | m_sbHorz |
DWORD | m_dwUpdateTime |
DWORD | m_dwUpdateInterval |
short | m_zDelta |
int | m_nScrollSpeed |
SAutoRefPtr< IInterpolator > | m_fadeInterpolator |
int | m_fadeFrames |
BYTE | m_bySbThumbTrackMinAlpha |
Additional Inherited Members | |
![]() | |
enum | kSbConst { Timer_Wait = 100 , Timer_Go = 101 , kTime_Wait = 200 , kTime_Go = 100 } |
Panel with Scrollbar Support.
Description: Implements a panel with support for scrollbars in the non-client area.
SPanel::SPanel | ( | ) |
Constructor for SPanel.
Definition at line 165 of file SPanel.cpp.
|
inlinevirtual |
BOOL SPanel::EnableScrollBar | ( | int | wBar, |
BOOL | bEnable ) |
Enables or disables a scrollbar.
wBar | Scrollbar identifier (SB_HORZ or SB_VERT). |
bEnable | TRUE to enable the scrollbar, FALSE to disable it. |
Definition at line 202 of file SPanel.cpp.
|
virtual |
Gets the client rectangle.
Reimplemented from SWindow.
Definition at line 368 of file SPanel.cpp.
|
virtual |
Gets the client rectangle.
pRect | Pointer to receive the client rectangle. |
Definition at line 363 of file SPanel.cpp.
|
protected |
|
protected |
Gets the arrow size for a scrollbar.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 62 of file SPanel.cpp.
|
protected |
Gets the container for the scrollbar.
Definition at line 109 of file SPanel.cpp.
|
protected |
Gets the scroll information for a scrollbar.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 57 of file SPanel.cpp.
|
protected |
Gets the rectangle of a scrollbar.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 11 of file SPanel.cpp.
|
protected |
Gets the skin for a scrollbar.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 52 of file SPanel.cpp.
|
protected |
Gets the number of fade frames for the scrollbar.
Definition at line 155 of file SPanel.cpp.
|
protected |
Gets the interpolator for the scrollbar.
Definition at line 146 of file SPanel.cpp.
|
protectedvirtual |
Gets the line size for scrolling.
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Reimplemented in SMCListView, STileView, and STreeView.
Definition at line 616 of file SPanel.cpp.
int SPanel::GetScrollPos | ( | BOOL | bVertical | ) |
Gets the scroll position for a scrollbar.
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 276 of file SPanel.cpp.
BOOL SPanel::GetScrollRange | ( | BOOL | bVertical, |
LPINT | lpMinPos, | ||
LPINT | lpMaxPos ) |
Gets the scroll range for a scrollbar.
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
lpMinPos | Pointer to receive the minimum scroll position. |
lpMaxPos | Pointer to receive the maximum scroll position. |
Definition at line 303 of file SPanel.cpp.
|
protected |
Gets the minimum alpha value for the scrollbar thumb track.
Definition at line 160 of file SPanel.cpp.
BOOL SPanel::HasScrollBar | ( | BOOL | bVertical | ) |
Checks if a scrollbar is present.
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 313 of file SPanel.cpp.
BOOL SPanel::IsScrollBarEnable | ( | BOOL | bVertical | ) |
Checks if a scrollbar is enabled.
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 221 of file SPanel.cpp.
|
protected |
Handles the scrollbar skin attribute.
strValue | String value of the attribute. |
bLoading | TRUE if loading, FALSE otherwise. |
Definition at line 607 of file SPanel.cpp.
|
protectedvirtual |
Handles colorization events.
cr | Color reference. |
Reimplemented from SWindow.
Reimplemented in SMCListView, STileView, and STreeView.
Definition at line 631 of file SPanel.cpp.
|
protectedvirtual |
Handles container change events.
pOldContainer | Pointer to the old container. |
pNewContainer | Pointer to the new container. |
Reimplemented from SWindow.
Definition at line 658 of file SPanel.cpp.
|
protected |
Handles the WM_CREATE message.
lp | Create structure. |
Definition at line 318 of file SPanel.cpp.
|
protected |
Handles the WM_DESTROY message.
Definition at line 326 of file SPanel.cpp.
|
protected |
Handles the WM_ENABLE message.
bEnable | TRUE if the window is enabled, FALSE if disabled. |
uStatus | Status of the window. |
Definition at line 598 of file SPanel.cpp.
|
protected |
Handles the WM_HSCROLL message.
nSBCode | Scroll code. |
nPos | Position for the scroll. |
hwnd | Handle to the window. |
Definition at line 626 of file SPanel.cpp.
|
protected |
Handles the WM_MOUSEWHEEL message.
nFlags | Flags for the message. |
zDelta | Delta value for the mouse wheel. |
pt | Point where the mouse wheel was scrolled. |
Definition at line 484 of file SPanel.cpp.
|
protected |
Handles the WM_NCCALCSIZE message.
bCalcValidRects | TRUE if valid rectangle calculation is required. |
lParam | LPARAM for the message. |
Definition at line 472 of file SPanel.cpp.
|
protectedvirtual |
Handles the WM_NCHITTEST message.
pt | Point to test. |
Reimplemented from SWindow.
Definition at line 373 of file SPanel.cpp.
|
protected |
Handles the WM_NCLBUTTONDOWN message.
nFlags | Flags for the message. |
point | Point where the button was pressed. |
Definition at line 380 of file SPanel.cpp.
|
protected |
Handles the WM_NCLBUTTONUP message.
nFlags | Flags for the message. |
pt | Point where the button was released. |
Definition at line 391 of file SPanel.cpp.
|
protected |
Handles the WM_NCMOUSELEAVE message.
Definition at line 452 of file SPanel.cpp.
|
protected |
Handles the WM_NCMOUSEMOVE message.
nFlags | Flags for the message. |
point | Point where the mouse moved. |
Definition at line 403 of file SPanel.cpp.
|
protected |
Handles the WM_NCPAINT message.
pRT | Pointer to the render target. |
Definition at line 333 of file SPanel.cpp.
|
protectedvirtual |
Handles scale change events.
nScale | New scale value. |
Reimplemented from SWindow.
Reimplemented in SListBox, SMCListView, SRichEdit, STileView, and STreeView.
Definition at line 638 of file SPanel.cpp.
|
protectedvirtual |
Handles scroll events.
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
uCode | Scroll code. |
nPos | Position for the scroll. |
Reimplemented in SListCtrl, SMCListView, SRichEdit, SScrollView, STileView, and STreeView.
Definition at line 517 of file SPanel.cpp.
|
protected |
Handles scroll commands.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
iCmd | Command identifier. |
nPos | Position for the command. |
Definition at line 130 of file SPanel.cpp.
|
protected |
Kills a timer for the scrollbar.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
id | Timer identifier. |
Definition at line 141 of file SPanel.cpp.
|
protected |
Sets a timer for the scrollbar.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
id | Timer identifier. |
uElapse | Elapse time for the timer. |
Definition at line 136 of file SPanel.cpp.
|
protected |
Updates a part of the scrollbar.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
iPart | Part to update. |
Definition at line 72 of file SPanel.cpp.
|
protected |
Updates the thumb track of the scrollbar.
bVert | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
nPos | New position of the thumb. |
Definition at line 114 of file SPanel.cpp.
|
protected |
Handles the WM_SHOWWINDOW message.
bShow | TRUE if the window is shown, FALSE if hidden. |
nStatus | Status of the window. |
Definition at line 589 of file SPanel.cpp.
|
protected |
Handles the WM_TIMER message.
cTimerID | Timer identifier. |
Definition at line 569 of file SPanel.cpp.
|
protected |
Handles the WM_VSCROLL message.
nSBCode | Scroll code. |
nPos | Position for the scroll. |
hwnd | Handle to the window. |
Definition at line 621 of file SPanel.cpp.
|
protected |
Updates the scrollbar.
Definition at line 579 of file SPanel.cpp.
|
inlineprotectedvirtual |
void SPanel::SetScrollInfo | ( | SCROLLINFO | si, |
BOOL | bVertical ) |
Sets the scroll information for a scrollbar.
si | Scroll information structure. |
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
Definition at line 226 of file SPanel.cpp.
BOOL SPanel::SetScrollPos | ( | BOOL | bVertical, |
int | nNewPos, | ||
BOOL | bRedraw ) |
Sets the scroll position for a scrollbar.
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
nNewPos | New scroll position. |
bRedraw | TRUE to redraw the scrollbar, FALSE otherwise. |
Definition at line 251 of file SPanel.cpp.
BOOL SPanel::SetScrollRange | ( | BOOL | bVertical, |
int | nMinPos, | ||
int | nMaxPos, | ||
BOOL | bRedraw ) |
Sets the scroll range for a scrollbar.
bVertical | TRUE for vertical scrollbar, FALSE for horizontal scrollbar. |
nMinPos | Minimum scroll position. |
nMaxPos | Maximum scroll position. |
bRedraw | TRUE to redraw the scrollbar, FALSE otherwise. |
Definition at line 282 of file SPanel.cpp.
BOOL SPanel::ShowScrollBar | ( | int | wBar, |
BOOL | bShow ) |
Shows or hides a scrollbar.
wBar | Scrollbar identifier (SB_HORZ or SB_VERT). |
bShow | TRUE to show the scrollbar, FALSE to hide it. |
Definition at line 191 of file SPanel.cpp.
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |