soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
ISkinObj Struct Reference

Interface for Skin Objects. More...

#include <SSkinobj-i.h>

Inheritance diagram for ISkinObj:
SObjectImpl< ISkinObj > TObjRefImpl< SObjectImpl< ISkinObj > > SSkinObjBase SSKinGroup SSkinButton SSkinColorRect SSkinGradation SSkinGradation2 SSkinImgList SSkinImgCenter SSkinImgFrame SSkinScrollbar SSkinImgFrame2

Public Member Functions

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.
 

Detailed Description

Interface for Skin Objects.

This interface defines the methods for skin objects, which are used for rendering graphical elements with various states and properties such as transparency and scaling.

Definition at line 28 of file SSkinobj-i.h.

Member Function Documentation

◆ AddRef()

long ISkinObj::AddRef ( )

Add reference.

Increments the reference count of the object.

Returns
long The new reference count.

◆ AfterAttribute()

HRESULT ISkinObj::AfterAttribute ( LPCWSTR pszAttr,
LPCWSTR pszValue,
BOOL bLoading,
HRESULT hr )

Handles the completion of attribute processing.

Parameters
pszAttrName of the attribute.
pszValueValue of the attribute.
bLoadingFlag indicating if the object is being created by the system.
hrResult of the attribute processing.
Returns
HRESULT Result of the attribute processing.

◆ DrawByIndex()

void ISkinObj::DrawByIndex ( IRenderTarget * pRT,
LPCRECT rcDraw,
int iState )

Draws the skin object to the specified render target with a given index.

Parameters
pRTPointer to the render target where the skin will be drawn.
rcDrawRectangle defining the drawing area.
iStateIndex of the skin state to draw.

Uses the alpha value obtained from the skin object's GetAlpha method.

◆ DrawByIndex2()

void ISkinObj::DrawByIndex2 ( IRenderTarget * pRT,
LPCRECT rcDraw,
int iState,
BYTE byAlpha )

Draws the skin object to the specified render target with a given index and transparency.

Parameters
pRTPointer to the render target where the skin will be drawn.
rcDrawRectangle defining the drawing area.
iStateIndex of the skin state to draw.
byAlphaTransparency level (0-255).

◆ DrawByState()

void ISkinObj::DrawByState ( IRenderTarget * pRT,
LPCRECT rcDraw,
DWORD dwState )

Draws the skin object to the specified render target with a given state.

Parameters
pRTPointer to the render target where the skin will be drawn.
rcDrawRectangle defining the drawing area.
dwStateState of the skin to draw.

Uses the alpha value obtained from the skin object's GetAlpha method.

◆ DrawByState2()

void ISkinObj::DrawByState2 ( IRenderTarget * pRT,
LPCRECT rcDraw,
DWORD dwState,
BYTE byAlpha )

Draws the skin object to the specified render target with a given state and transparency.

Parameters
pRTPointer to the render target where the skin will be drawn.
rcDrawRectangle defining the drawing area.
dwStateState of the skin to draw.
byAlphaTransparency level (0-255).

◆ GetAlpha()

BYTE ISkinObj::GetAlpha ( )

Retrieves the transparency of the skin object.

Returns
BYTE The transparency level (0-255).

◆ GetAttribute()

BOOL ISkinObj::GetAttribute ( LPCWSTR strAttr,
IStringW * pValue )

Retrieves the value of an attribute by its name.

Parameters
strAttrName of the attribute.
pValuePointer to receive the attribute value.
Returns
BOOL TRUE if the attribute is successfully retrieved, FALSE otherwise.

◆ GetID()

int ISkinObj::GetID ( )

Retrieves the ID of the object.

Returns
int ID of the object.

◆ GetName()

LPCWSTR ISkinObj::GetName ( )

Retrieves the name of the object.

Returns
LPCWSTR Name of the object.

◆ GetNameA()

LPCSTR ISkinObj::GetNameA ( )

Retrieves the name of the object as an ANSI string.

Returns
LPCSTR Name of the object.

◆ GetObjectClass()

LPCWSTR ISkinObj::GetObjectClass ( )

Retrieves the class name of the object.

Returns
LPCWSTR Class name of the object.

This is a virtual function. Note the difference between this and GetClassName.

◆ GetObjectType()

int ISkinObj::GetObjectType ( )

Retrieves the type of the object.

Returns
int Type of the object.

This is a virtual function. Note the difference between this and GetClassType.

◆ GetScale()

int ISkinObj::GetScale ( )

Retrieves the scaling factor of the skin object.

Returns
int The scaling factor.

◆ GetSkinSize()

SIZE ISkinObj::GetSkinSize ( )

Retrieves the default size of the skin object.

Returns
SIZE The default size of the skin object.

Derived classes should implement this method based on the characteristics of the skin.

◆ GetStates()

int ISkinObj::GetStates ( )

Retrieves the number of states contained in the skin object.

Returns
int The number of states.

Default is 1.

◆ InitFromXml()

BOOL ISkinObj::InitFromXml ( IXmlNode * xmlNode)

Initializes the object from an XML node.

Parameters
xmlNodeXML node containing the initialization data.
Returns
BOOL TRUE if initialization is successful, FALSE otherwise.

◆ IsClass()

BOOL ISkinObj::IsClass ( LPCWSTR lpszName)

Checks if the object is of a specified class type.

Parameters
lpszNameName of the class type to test.
Returns
BOOL TRUE if the object is of the specified class type, FALSE otherwise.

◆ ISetAttribute()

HRESULT ISkinObj::ISetAttribute ( const IStringW * strAttribName,
const IStringW * strValue,
BOOL bLoading )

Sets an attribute of the object.

Parameters
strAttribNameName of the attribute.
strValueValue of the attribute.
bLoadingFlag indicating if the object is being created by the system.
Returns
HRESULT Result of the attribute setting operation.

◆ OnColorize()

void ISkinObj::OnColorize ( COLORREF cr)

Adjusts the hue of the skin object based on a reference color.

Parameters
crThe reference color.

Default implementation does nothing.

◆ OnFinalRelease()

void ISkinObj::OnFinalRelease ( )

Final release of the object.

Final release of the object, performing cleanup if necessary.

◆ OnInitFinished()

void ISkinObj::OnInitFinished ( IXmlNode * xmlNode)

Handles the completion of attribute initialization.

Parameters
xmlNodeXML node containing the attribute data.

◆ Release()

long ISkinObj::Release ( )

Release reference.

Decrements the reference count of the object.

Returns
long The new reference count.

◆ Scale()

ISkinObj * ISkinObj::Scale ( int nScale)

Scales the skin object by a specified factor.

Parameters
nScaleThe scaling factor.
Returns
ISkinObj* Pointer to the scaled skin object.

◆ SetAlpha()

void ISkinObj::SetAlpha ( BYTE byAlpha)

Sets the transparency of the skin object.

Parameters
byAlphaThe transparency level (0-255).

◆ SetAttrHandler()

void ISkinObj::SetAttrHandler ( FunAttrHandler attrHandler)

Sets the attribute handler callback function.

Parameters
attrHandlerCallback function for attribute handling.

◆ SetAttribute()

HRESULT ISkinObj::SetAttribute ( LPCWSTR pszAttr,
LPCWSTR pszValue,
BOOL bLoading = FALSE )

Sets an attribute of the object using wide strings.

Parameters
pszAttrName of the attribute.
pszValueValue of the attribute.
bLoadingFlag indicating if the object is being created by the system.
Returns
HRESULT Result of the attribute setting operation.

◆ SetAttributeA()

HRESULT ISkinObj::SetAttributeA ( LPCSTR pszAttr,
LPCSTR pszValue,
BOOL bLoading = FALSE )

Sets an attribute of the object using ANSI strings.

Parameters
pszAttrName of the attribute.
pszValueValue of the attribute.
bLoadingFlag indicating if the object is being created by the system.
Returns
HRESULT Result of the attribute setting operation.

◆ SetID()

void ISkinObj::SetID ( int nID)

Sets the ID of the object.

Parameters
nIDID to set for the object.

◆ SetName()

void ISkinObj::SetName ( LPCWSTR pszName)

Sets the name of the object.

Parameters
pszNameName to set for the object.

◆ SetScale()

void ISkinObj::SetScale ( int scale)

Sets the scaling factor of the skin object.

Parameters
scaleThe scaling factor.

This is an internal interface and should not be called in the business layer.


The documentation for this struct was generated from the following file: