LineCapItem Class Reference

Represents a line-cap user-interface item within the line gallery. More...

#include <sgline2.h>

Inheritance diagram for LineCapItem:

LineAttrItem SGDisplayItem SGDisplayNode CCObject SimpleCCObject List of all members.

Public Member Functions

 LineCapItem (LineCapType nCapType, const String &strDescription)
 Constructs an line-cap user-interface item.

Private Member Functions

virtual void SetAttributes (RenderRegion *pRegion) const
 Sets the line-cap attributes in the given render-region to render this item correctly.
virtual NodeAttributeCreateNewAttribute (BOOL fIsAdjust) const
 A pointer to a NodeAttribute-derivative that this user-interface item represents, ie. a line-cap attribute that can be passed to the attribute manager.
virtual CCRuntimeClass ** GetAttribRuntimeClasses () const
 Used when searching for display items representing the selection's current attributes.
virtual BOOL IsEqualValueToAny (NodeAttribute **pOtherAttribs) const
 Used when searching for display items representing the selection's current attributes.

Private Attributes

LineCapType m_nCapType

Detailed Description

Represents a line-cap user-interface item within the line gallery.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
See also:
-

Definition at line 295 of file sgline2.h.


Constructor & Destructor Documentation

LineCapItem::LineCapItem LineCapType  nCapType,
const String strDescription
 

Constructs an line-cap user-interface item.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
nCapType an enum representing a stock line-cap [INPUTS] strDescription text description of this user-interface item
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 994 of file sgline2.cpp.

00995   : LineAttrItem(strDescription, NO_LABEL),
00996     m_nCapType(nCapType)
00997 {
00998     // Empty.
00999 }


Member Function Documentation

NodeAttribute * LineCapItem::CreateNewAttribute BOOL  fIsAdjust  )  const [private, virtual]
 

A pointer to a NodeAttribute-derivative that this user-interface item represents, ie. a line-cap attribute that can be passed to the attribute manager.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Implements LineAttrItem.

Definition at line 1043 of file sgline2.cpp.

01044 {
01045     AttrStartCap* pAttr = new AttrStartCap;
01046     if (pAttr != NULL) pAttr->Value.StartCap = m_nCapType;
01047     return pAttr;
01048 }

CCRuntimeClass ** LineCapItem::GetAttribRuntimeClasses  )  const [private, virtual]
 

Used when searching for display items representing the selection's current attributes.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The run-time class of the line attribute this type of display item represents.

Errors: -

See also:
LineAttrItem::UpdateCurrentAttribStatus

Implements LineAttrItem.

Definition at line 1068 of file sgline2.cpp.

01069 {
01070     static CCRuntimeClass* aprtc[] =
01071     {
01072         CC_RUNTIME_CLASS(AttrStartCap),
01073         NULL
01074     };
01075 
01076     return aprtc;
01077 }

BOOL LineCapItem::IsEqualValueToAny NodeAttribute **  ppOtherAttribs  )  const [private, virtual]
 

Used when searching for display items representing the selection's current attributes.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/4/95
Parameters:
pOtherAttrib the attribute value to compare this item to [INPUTS]
- [OUTPUTS]
Returns:
TRUE if this item represents the same attribute value as the given attribute.

Errors: -

See also:
LineAttrItem::UpdateCurrentAttribStatus

Implements LineAttrItem.

Definition at line 1096 of file sgline2.cpp.

01097 {
01098     AttrStartCap* pattr = (AttrStartCap*) *ppOtherAttribs;
01099     return pattr != NULL && pattr->Value.StartCap == m_nCapType;
01100 }

void LineCapItem::SetAttributes RenderRegion pRegion  )  const [private, virtual]
 

Sets the line-cap attributes in the given render-region to render this item correctly.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
pRegion pointer to the render-region to draw into [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Implements LineAttrItem.

Definition at line 1017 of file sgline2.cpp.

01018 {
01019     // Call the SetStartCap function (there are no 'end' caps) and make lines thick.
01020     StartCapAttribute* pAttr = new StartCapAttribute;
01021     pAttr->StartCap = m_nCapType;
01022     pRegion->SetStartCap(pAttr, TRUE);
01023     pRegion->SetLineWidth(c_nHorzSizeOfItem / 2);
01024 }


Member Data Documentation

LineCapType LineCapItem::m_nCapType [private]
 

Definition at line 309 of file sgline2.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:56 2007 for Camelot by  doxygen 1.4.4