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

Scrollbar Skin. More...

#include <SSkin.h>

Inheritance diagram for SSkinScrollbar:
SSkinImgList SSkinObjBase TObjRefImpl< SObjectImpl< ISkinObj > > SObjectImpl< ISkinObj > ISkinObj

Public Member Functions

 SSkinScrollbar ()
 Constructor for SSkinScrollbar.
 
virtual BOOL HasArrow () const
 Checks if the scrollbar supports displaying arrow heads.
 
virtual int GetIdealSize () const
 Gets the ideal size of the scrollbar.
 
- Public Member Functions inherited from SSkinImgList
 SSkinImgList ()
 Constructor for SSkinImgList.
 
virtual ~SSkinImgList ()
 Destructor for SSkinImgList.
 
SIZE GetSkinSize () SCONST OVERRIDE
 Gets the size of the skin.
 
int GetStates () SCONST OVERRIDE
 Gets the number of states in the skin.
 
void OnColorize (COLORREF cr) OVERRIDE
 Handles colorization of the skin.
 
virtual void SetStates (int nStates)
 Sets the number of states in the skin.
 
virtual bool SetImage (IBitmapS *pImg)
 Sets the image for the skin.
 
virtual IBitmapSGetImage () const
 Gets the image used by the skin.
 
virtual void SetTile (BOOL bTile)
 Sets whether the image should be tiled.
 
virtual BOOL IsTile () const
 Checks if the image is tiled.
 
virtual void SetVertical (BOOL bVertical)
 Sets whether the images are arranged vertically.
 
virtual BOOL IsVertical () const
 Checks if the images are arranged vertically.
 
- Public Member Functions inherited from SSkinObjBase
 SSkinObjBase ()
 Constructor.
 
LPCWSTR GetName () SCONST OVERRIDE
 Gets the name of the skin object.
 
void DrawByState2 (IRenderTarget *pRT, LPCRECT rcDraw, DWORD dwState, BYTE byAlpha) SCONST OVERRIDE
 Draws the skin by state with alpha blending.
 
void DrawByState (IRenderTarget *pRT, LPCRECT rcDraw, DWORD dwState) SCONST OVERRIDE
 Draws the skin by state without alpha blending.
 
void DrawByIndex2 (IRenderTarget *pRT, LPCRECT rcDraw, int iState, BYTE byAlpha) SCONST OVERRIDE
 Draws the skin by index with alpha blending.
 
void DrawByIndex (IRenderTarget *pRT, LPCRECT rcDraw, int iState) SCONST OVERRIDE
 Draws the skin by index without alpha blending.
 
SIZE GetSkinSize () SCONST OVERRIDE
 Gets the size of the skin.
 
int GetStates () SCONST OVERRIDE
 Gets the number of states supported by the skin.
 
BYTE GetAlpha () SCONST OVERRIDE
 Gets the alpha value of the skin.
 
void SetAlpha (BYTE byAlpha) OVERRIDE
 Sets the alpha value of the skin.
 
int GetScale () SCONST OVERRIDE
 Gets the scale factor of the skin.
 
void SetScale (int scale) OVERRIDE
 Sets the scale factor of the skin.
 
ISkinObjScale (int nScale) OVERRIDE
 Scales the skin.
 
void OnColorize (COLORREF cr) OVERRIDE
 Applies colorization to the skin.
 
int State2Index (DWORD dwState) const
 Converts a state to its corresponding index.
 
- Public Member Functions inherited from TObjRefImpl< SObjectImpl< ISkinObj > >
 TObjRefImpl ()
 Constructor that initializes the reference count to 1.
 
virtual ~TObjRefImpl ()
 Virtual destructor.
 
long AddRef () override
 Increments the reference count.
 
long Release () override
 Decrements the reference count and deletes the object if the count reaches zero.
 
void OnFinalRelease () override
 Deletes the object.
 
- Public Member Functions inherited from SObjectImpl< ISkinObj >
 SObjectImpl ()
 Constructor.
 
BOOL InitFromXml (IXmlNode *pXmlNode) OVERRIDE
 Initializes the object from an XML node.
 
LPCWSTR GetName () SCONST OVERRIDE
 Retrieves the object's name.
 
LPCSTR GetNameA () SCONST OVERRIDE
 Retrieves the object's name in ANSI format.
 
void SetName (LPCWSTR pszName) OVERRIDE
 Sets the object's name.
 
int GetID () SCONST OVERRIDE
 Retrieves the object's ID.
 
void SetID (int nID) OVERRIDE
 Sets the object's ID.
 
HRESULT AfterAttribute (LPCWSTR strAttribName, LPCWSTR strValue, BOOL bLoading, HRESULT hr) OVERRIDE
 Handles attribute processing after setting an attribute.
 
HRESULT SetAttributeA (LPCSTR pszAttr, LPCSTR pszValue, BOOL bLoading) OVERRIDE
 Sets an attribute using ANSI strings.
 
HRESULT SetAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading) OVERRIDE
 Sets an attribute using wide strings.
 
virtual HRESULT SetAttribute (const SStringW &strAttr, const SStringW &strValue, BOOL bLoading)
 Sets an attribute using wide strings.
 
HRESULT ISetAttribute (const IStringW *strAttr, const IStringW *strValue, BOOL bLoading) OVERRIDE
 Sets an attribute using IStringW objects.
 
LPCWSTR GetObjectClass () SCONST OVERRIDE
 Retrieves the object's class name.
 
int GetObjectType () SCONST OVERRIDE
 Retrieves the object's type.
 
BOOL IsClass (LPCWSTR lpszName) SCONST OVERRIDE
 Checks if the object is of a specific class.
 
BOOL GetAttribute (LPCWSTR strAttr, IStringW *pValue) SCONST OVERRIDE
 Retrieves an attribute value.
 
void OnInitFinished (IXmlNode *xmlNode) OVERRIDE
 Handles initialization completion.
 
void SetAttrHandler (FunAttrHandler attrHandler) OVERRIDE
 Sets the attribute handler.
 
virtual HRESULT DefAttributeProc (const SStringW &strAttr, const SStringW &strValue, BOOL bLoading)
 Default attribute processing.
 
- Public Member Functions inherited from ISkinObj
long AddRef () PURE
 Add reference.
 
long Release () PURE
 Release reference.
 
void OnFinalRelease () PURE
 Final release of the object.
 
BOOL IsClass (LPCWSTR lpszName) SCONST PURE
 Checks if the object is of a specified class type.
 
LPCWSTR GetObjectClass () SCONST PURE
 Retrieves the class name of the object.
 
int GetObjectType () SCONST PURE
 Retrieves the type of the object.
 
int GetID () SCONST PURE
 Retrieves the ID of the object.
 
void SetID (int nID) PURE
 Sets the ID of the object.
 
LPCWSTR GetName () SCONST PURE
 Retrieves the name of the object.
 
LPCSTR GetNameA () SCONST PURE
 Retrieves the name of the object as an ANSI string.
 
void SetName (LPCWSTR pszName) PURE
 Sets the name of the object.
 
BOOL InitFromXml (IXmlNode *xmlNode) PURE
 Initializes the object from an XML node.
 
void OnInitFinished (IXmlNode *xmlNode) PURE
 Handles the completion of attribute initialization.
 
HRESULT ISetAttribute (const IStringW *strAttribName, const IStringW *strValue, BOOL bLoading) PURE
 Sets an attribute of the object.
 
HRESULT SetAttributeA (LPCSTR pszAttr, LPCSTR pszValue, BOOL bLoading=FALSE) PURE
 Sets an attribute of the object using ANSI strings.
 
HRESULT SetAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading=FALSE) PURE
 Sets an attribute of the object using wide strings.
 
BOOL GetAttribute (LPCWSTR strAttr, IStringW *pValue) SCONST PURE
 Retrieves the value of an attribute by its name.
 
HRESULT AfterAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading, HRESULT hr) PURE
 Handles the completion of attribute processing.
 
void SetAttrHandler (FunAttrHandler attrHandler) PURE
 Sets the attribute handler callback function.
 
void DrawByState2 (IRenderTarget *pRT, LPCRECT rcDraw, DWORD dwState, BYTE byAlpha) SCONST PURE
 Draws the skin object to the specified render target with a given state and transparency.
 
void DrawByState (IRenderTarget *pRT, LPCRECT rcDraw, DWORD dwState) SCONST PURE
 Draws the skin object to the specified render target with a given state.
 
void DrawByIndex2 (IRenderTarget *pRT, LPCRECT rcDraw, int iState, BYTE byAlpha) SCONST PURE
 Draws the skin object to the specified render target with a given index and transparency.
 
void DrawByIndex (IRenderTarget *pRT, LPCRECT rcDraw, int iState) SCONST PURE
 Draws the skin object to the specified render target with a given index.
 
SIZE GetSkinSize () SCONST PURE
 Retrieves the default size of the skin object.
 
int GetStates () SCONST PURE
 Retrieves the number of states contained in the skin object.
 
BYTE GetAlpha () SCONST PURE
 Retrieves the transparency of the skin object.
 
void SetAlpha (BYTE byAlpha) PURE
 Sets the transparency of the skin object.
 
void OnColorize (COLORREF cr) PURE
 Adjusts the hue of the skin object based on a reference color.
 
int GetScale () SCONST PURE
 Retrieves the scaling factor of the skin object.
 
void SetScale (int scale) PURE
 Sets the scaling factor of the skin object.
 
ISkinObjScale (int nScale) PURE
 Scales the skin object by a specified factor.
 

Protected Member Functions

virtual CRect GetPartRect (int nSbCode, int nState, BOOL bVertical) const
 Gets the rectangle of a specified part in the original bitmap.
 
void _DrawByIndex (IRenderTarget *pRT, LPCRECT prcDraw, int iState, BYTE byAlpha) const override
 Draws the skin by index.
 
void _DrawByState (IRenderTarget *pRT, LPCRECT prcDraw, DWORD dwState, BYTE byAlpha) const override
 Draws the skin by state.
 
void _Scale (ISkinObj *skinObj, int nScale) override
 Scales the skin.
 
virtual HRESULT SetAttribute (const SNS::SStringW &amp;amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;amp;strValue, BOOL bLoading=FALSE)
 
- Protected Member Functions inherited from SSkinImgList
virtual UINT GetExpandMode () const
 Gets the expand mode for the skin.
 
void OnInitFinished (IXmlNode *pNode) OVERRIDE
 Called when initialization is finished.
 
HRESULT OnAttrSrc (const SStringW &value, BOOL bLoading)
 Handles the 'src' attribute.
 
- Protected Member Functions inherited from SSkinObjBase
void OnInitFinished (IXmlNode *pNode) OVERRIDE
 Called when initialization is finished.
 

Protected Attributes

int m_nMargin
 
BOOL m_bHasGripper
 
BOOL m_bHasInactive
 
- Protected Attributes inherited from SSkinImgList
int m_nStates
 
BOOL m_bTile
 
BOOL m_bAutoFit
 
BOOL m_bVertical
 
SAutoRefPtr< IBitmapSm_imgBackup
 
FilterLevel m_filterLevel
 
SAutoRefPtr< IBitmapSm_pImg
 
SStringW m_strSrc
 
BOOL m_bLazyLoad
 
- Protected Attributes inherited from SSkinObjBase
BYTE m_byAlpha
 
COLORREF m_crColorize
 
bool m_bEnableColorize
 
int m_nScale
 
bool m_bEnableScale
 
bool m_checkAsPushdown
 
SState2Index m_state2Index
 
- Protected Attributes inherited from TObjRefImpl< SObjectImpl< ISkinObj > >
LONG m_cRef
 Reference count.
 
- Protected Attributes inherited from SObjectImpl< ISkinObj >
SStringW m_strName
 
int m_nID
 
FunAttrHandler m_attrHandler
 

Additional Inherited Members

- Static Public Member Functions inherited from SObjectImpl< ISkinObj >
static int GetClassType ()
 Retrieves the class type.
 
static LPCWSTR GetClassName ()
 Retrieves the class name.
 
static LPCWSTR GetClassAlias ()
 Retrieves the class alias.
 
static void MarkAttributeHandled (SXmlAttr xmlAttr, bool bHandled)
 Marks an attribute as handled.
 
static bool IsAttributeHandled (SXmlAttr xmlAttr)
 Checks if an attribute is handled.
 

Detailed Description

Scrollbar Skin.

Description: Represents a skin for scrollbars.

Definition at line 637 of file SSkin.h.

Constructor & Destructor Documentation

◆ SSkinScrollbar()

SSkinScrollbar::SSkinScrollbar ( )

Constructor for SSkinScrollbar.

Definition at line 436 of file SSkin.cpp.

Member Function Documentation

◆ _DrawByIndex()

void SSkinScrollbar::_DrawByIndex ( IRenderTarget * pRT,
LPCRECT prcDraw,
int iState,
BYTE byAlpha ) const
inlineoverrideprotectedvirtual

Draws the skin by index.

Parameters
pRTPointer to the render target.
prcDrawRectangle to draw in.
iStateState index.
byAlphaAlpha value for transparency.

Reimplemented from SSkinImgList.

Definition at line 679 of file SSkin.h.

◆ _DrawByState()

void SSkinScrollbar::_DrawByState ( IRenderTarget * pRT,
LPCRECT prcDraw,
DWORD dwState,
BYTE byAlpha ) const
overrideprotectedvirtual

Draws the skin by state.

Parameters
pRTPointer to the render target.
prcDrawRectangle to draw in.
dwStateState identifier.
byAlphaAlpha value for transparency.

Reimplemented from SSkinObjBase.

Definition at line 486 of file SSkin.cpp.

◆ _Scale()

void SSkinScrollbar::_Scale ( ISkinObj * skinObj,
int nScale )
overrideprotectedvirtual

Scales the skin.

Parameters
skinObjPointer to the skin object.
nScaleScale factor.

Reimplemented from SSkinImgList.

Definition at line 516 of file SSkin.cpp.

◆ GetIdealSize()

int SSkinScrollbar::GetIdealSize ( ) const
virtual

Gets the ideal size of the scrollbar.

Returns
Ideal size of the scrollbar.

Definition at line 526 of file SSkin.cpp.

◆ GetPartRect()

CRect SSkinScrollbar::GetPartRect ( int nSbCode,
int nState,
BOOL bVertical ) const
protectedvirtual

Gets the rectangle of a specified part in the original bitmap.

Parameters
nSbCodeScrollbar code.
nStateState identifier.
bVerticalTRUE for vertical, FALSE for horizontal.
Returns
Rectangle of the part.

Definition at line 443 of file SSkin.cpp.

◆ HasArrow()

virtual BOOL SSkinScrollbar::HasArrow ( ) const
inlinevirtual

Checks if the scrollbar supports displaying arrow heads.

Returns
TRUE if supported, FALSE otherwise.

Definition at line 650 of file SSkin.h.

◆ SetAttribute()

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

Reimplemented from SSkinImgList.

Definition at line 704 of file SSkin.h.

Member Data Documentation

◆ m_bHasGripper

BOOL SSkinScrollbar::m_bHasGripper
protected

Definition at line 701 of file SSkin.h.

◆ m_bHasInactive

BOOL SSkinScrollbar::m_bHasInactive
protected

Definition at line 702 of file SSkin.h.

◆ m_nMargin

int SSkinScrollbar::m_nMargin
protected

Definition at line 700 of file SSkin.h.


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