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

Manages named colors. More...

#include <SNamedValue.h>

Inheritance diagram for SNamedColor:
SNamedValue< COLORREF, SColorParser >

Public Member Functions

BOOL Get (const SStringW &strValue, COLORREF &cr) const
 Retrieves a color value by name, automatically converting named colors.
 
COLORREF Get (int idx) const
 Retrieves a color value by index.
 
- Public Member Functions inherited from SNamedValue< COLORREF, SColorParser >
virtual BOOL Init (SXmlNode xmlNode)
 Initializes the named values from an XML node.
 
COLORREF String2Value (const SStringW &strName) const
 Converts a string name to its corresponding value.
 
BOOL FindValue (const SStringW &strName, COLORREF &value) const
 Finds the value associated with a given name.
 
COLORREF GetAt (const int idx) const
 Retrieves the value at a specific index.
 
size_t Merge (const SNamedValue &src)
 Merges the named values from another SNamedValue object.
 
UINT GetCount () const
 Retrieves the number of named values.
 

Additional Inherited Members

- Public Types inherited from SNamedValue< COLORREF, SColorParser >
typedef TNAMEDVALUE< COLORREF > NAMEDVALUE
 
- Static Protected Member Functions inherited from SNamedValue< COLORREF, SColorParser >
static int Compare (const void *p1, const void *p2)
 Comparison function for sorting and searching.
 
- Protected Attributes inherited from SNamedValue< COLORREF, SColorParser >
SArray< NAMEDVALUEm_lstNamedValue
 

Detailed Description

Manages named colors.

Definition at line 237 of file SNamedValue.h.

Member Function Documentation

◆ Get() [1/2]

BOOL SNamedColor::Get ( const SStringW & strValue,
COLORREF & cr ) const

Retrieves a color value by name, automatically converting named colors.

Parameters
strValueName of the color.
crVariable to store the retrieved color value.
Returns
TRUE if the color is found, FALSE otherwise.

Definition at line 124 of file SNamedValue.cpp.

◆ Get() [2/2]

COLORREF SNamedColor::Get ( int idx) const
inline

Retrieves a color value by index.

Parameters
idxIndex of the color.
Returns
Color value at the specified index.

Definition at line 252 of file SNamedValue.h.


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