CODLineProperties Class

class CODLineProperties: public CODProperty, public CPropertyContainer< IODPropertyContainer, sfl::CPropertyAccessor< CODLineProperties > >

A collection of properties that define how the lines will be drawn for a component.

This class is both a property and a container for properties. It implements the IODPropertyContainer interface for getting and setting values that it contains. Each sub-property contained by line property objects has a unique identifier (see Line Property Identifiers) for getting and setting each value. There are also methods to directly set each property.

Defined in: OdLineProp.h

Class Members

VIEWS_API CODLineProperties(int nId = OD_PROP_LINE)

Constructor.

VIEWS_API CODLineProperties(const CODLineProperties& propLine)

Copy constructor.

VIEWS_API virtual ~CODLineProperties()

Destructor.

COLORREF m_crColor

The line color.

BOOL m_bTransparent

TRUE if the line is transparent.

int m_nPointSize

The line width in points.

int m_nWidth

The line width in logical units.

int m_nStyle

The line style.

CPen* m_pPen

Cached GDI pen.

VIEWS_API COLORREF GetColor() const

Gets the line color.

VIEWS_API void SetColor(const COLORREF crColor)

Sets the line color.

VIEWS_API BOOL GetTransparent() const

Gets the transparent setting.

VIEWS_API void SetTransparent(const BOOL bTransparent)

Sets the transparency.

VIEWS_API int GetPointSize() const

Gets the point size of the font.

VIEWS_API void SetPointSize(const int nPointSize, CDC* pDC = NULL)

Sets the point size of the font.

VIEWS_API int GetWidth() const

Gets the line width.

VIEWS_API void SetWidth(const int nWidth, CDC* pDC = NULL)

Sets the line width.

VIEWS_API int GetStyle() const

Gets the line style.

VIEWS_API void SetStyle(const int nPenStyle)

Sets the line style.

VIEWS_API virtual BOOL CompareId(const int nId) const

Compare the property identifier with another identifier.

VIEWS_API CODLineProperties& operator=(const CODLineProperties& propLine)

Sets this set of line properties equal to another.

VIEWS_API BOOL operator==(const CODLineProperties propLine) const

Determines if another set of line properties is equal to this one.

VIEWS_API CPen* CreatePen(CDC* pDC = NULL) const

Creates a GDI pen object. The caller is responsible for freeing this memory!

VIEWS_API CPen* GetPen(CDC* pDC = NULL)

Returns a pointer to the cached GDI pen object.

VIEWS_API void ReleasePen()

Releases the cached pen object.

VIEWS_API virtual CODProperty* Dup()

Makes a copy of this properties object.

VIEWS_API virtual void Merge(CODProperty* pProperty, DWORD dwChangeFlags = OD_CHANGE_ALL)

Merges another set of properties with this one.

VIEWS_API virtual BOOL IsEqual(CODProperty* pProp)

Determines if another set of properties is equal to this one.

VIEWS_API ULONG STDMETHODCALLTYPE AddRef()

Add a reference to this object.

VIEWS_API ULONG STDMETHODCALLTYPE Release()

Release a reference to this object.

VIEWS_API virtual BOOL GetValue(const int nPropId, CString& strValue) const

Gets the value of the given string property.

VIEWS_API virtual BOOL GetValue(const int nPropId, int& nValue) const

Gets the value of the given integer property.

VIEWS_API virtual BOOL GetValue(const int nPropId, UINT& nValue) const

Gets the value of the given unsigned integer property.

VIEWS_API virtual BOOL GetValue(const int nPropId, DWORD& dwValue) const

Gets the value of the given DWORD property.

VIEWS_API virtual BOOL GetValue(const int nPropId, float& fValue) const

Gets the value of the given float property.

VIEWS_API virtual BOOL SetValue(const int nPropId, LPCTSTR lpszValue)

Sets the value of the given string property.

VIEWS_API virtual BOOL SetValue(const int nPropId, const int nValue)

Sets the value of the given integer property.

VIEWS_API virtual BOOL SetValue(const int nPropId, const UINT nValue)

Sets the value of the given unsigned integer property.

VIEWS_API virtual BOOL SetValue(const int nPropId, const DWORD dwValue)

Sets the value of the given unsigned DWORD property.

VIEWS_API virtual BOOL SetValue(const int nPropId, const float fValue)

Sets the value of the given float property.

VIEWS_API virtual void Serialize(CArchive& ar)

Serializes the line properties.