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

Gradient Skin. More...

#include <SSkin.h>

Inheritance diagram for SSkinGradation:
SSkinObjBase TObjRefImpl< SObjectImpl< ISkinObj > > SObjectImpl< ISkinObj > ISkinObj

Public Member Functions

 SSkinGradation ()
 Constructor for SSkinGradation.
 
void SetColorFrom (COLORREF crFrom)
 Sets the starting color of the gradient.
 
void SetColorTo (COLORREF crTo)
 Sets the ending color of the gradient.
 
void SetVertical (BOOL bVertical)
 Sets whether the gradient is vertical.
 
ISkinObjScale (int nScale) OVERRIDE
 Scales the skin.
 
- 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

void _DrawByIndex (IRenderTarget *pRT, LPCRECT prcDraw, int iState, BYTE byAlpha) const override
 Draws the skin by index.
 
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 SSkinObjBase
void OnInitFinished (IXmlNode *pNode) OVERRIDE
 Called when initialization is finished.
 
virtual void _Scale (ISkinObj *pObj, int nScale)
 Scales the skin object.
 
virtual void _DrawByState (IRenderTarget *pRT, LPCRECT rcDraw, DWORD dwState, BYTE byAlpha) const
 Draws the skin by state with alpha blending.
 

Protected Attributes

COLORREF m_crFrom
 
COLORREF m_crTo
 
BOOL m_bVert
 
- 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

Gradient Skin.

Description: Represents a skin with a gradient fill.

Definition at line 410 of file SSkin.h.

Constructor & Destructor Documentation

◆ SSkinGradation()

SSkinGradation::SSkinGradation ( )

Constructor for SSkinGradation.

Definition at line 339 of file SSkin.cpp.

Member Function Documentation

◆ _DrawByIndex()

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

Draws the skin by index.

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

Implements SSkinObjBase.

Definition at line 346 of file SSkin.cpp.

◆ Scale()

ISkinObj * SSkinGradation::Scale ( int nScale)

Scales the skin.

Parameters
nScaleScale factor.
Returns
Pointer to the scaled skin object.

Definition at line 352 of file SSkin.cpp.

◆ SetAttribute()

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

Reimplemented from SSkinObjBase.

Definition at line 469 of file SSkin.h.

◆ SetColorFrom()

void SSkinGradation::SetColorFrom ( COLORREF crFrom)
inline

Sets the starting color of the gradient.

Parameters
crFromStarting color.

Definition at line 423 of file SSkin.h.

◆ SetColorTo()

void SSkinGradation::SetColorTo ( COLORREF crTo)
inline

Sets the ending color of the gradient.

Parameters
crToEnding color.

Definition at line 432 of file SSkin.h.

◆ SetVertical()

void SSkinGradation::SetVertical ( BOOL bVertical)
inline

Sets whether the gradient is vertical.

Parameters
bVerticalTRUE for vertical, FALSE for horizontal.

Definition at line 441 of file SSkin.h.

Member Data Documentation

◆ m_bVert

BOOL SSkinGradation::m_bVert
protected

Definition at line 467 of file SSkin.h.

◆ m_crFrom

COLORREF SSkinGradation::m_crFrom
protected

Definition at line 465 of file SSkin.h.

◆ m_crTo

COLORREF SSkinGradation::m_crTo
protected

Definition at line 466 of file SSkin.h.


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