#include <sgline2.h>
Inheritance diagram for LineWidthItem:
Public Member Functions | |
LineWidthItem (double nPointWidth, const String &strDescription) | |
Constructs a user-interface item representing a line's width. | |
Private Member Functions | |
virtual void | SetAttributes (RenderRegion *pRegion) const |
Sets the line-width attributes in the given render-region to render this item correctly. | |
virtual NodeAttribute * | CreateNewAttribute (BOOL fIsAdjust) const |
virtual MILLIPOINT | GetWidth () const |
Called by the line gallery formatting code. | |
virtual CCRuntimeClass ** | GetAttribRuntimeClasses () const |
Used when searching for display items representing the selection's current attributes. | |
virtual BOOL | IsEqualValueToAny (NodeAttribute **ppOtherAttribs) const |
Used when searching for display items representing the selection's current attributes. | |
Private Attributes | |
MILLIPOINT | m_nWidth |
Definition at line 122 of file sgline2.h.
|
Constructs a user-interface item representing a line's width.
Definition at line 129 of file sgline2.cpp. 00130 : LineAttrItem(strDescription, LEFT), 00131 m_nWidth((MILLIPOINT) (nPointWidth * 1000.0)) 00132 { 00133 // Empty. 00134 }
|
|
Implements LineAttrItem. Definition at line 179 of file sgline2.cpp. 00180 { 00181 AttrLineWidth* pAttr = new AttrLineWidth; 00182 if (pAttr != NULL) pAttr->Value.LineWidth = m_nWidth; 00183 return pAttr; 00184 }
|
|
Used when searching for display items representing the selection's current attributes.
Implements LineAttrItem. Definition at line 223 of file sgline2.cpp. 00224 { 00225 static CCRuntimeClass* aprtc[] = 00226 { 00227 CC_RUNTIME_CLASS(AttrLineWidth), 00228 NULL 00229 }; 00230 00231 return aprtc; 00232 }
|
|
Called by the line gallery formatting code.
Reimplemented from LineAttrItem. Definition at line 201 of file sgline2.cpp. 00202 { 00203 return 2 * LineAttrItem::GetWidth() / 3; 00204 }
|
|
Used when searching for display items representing the selection's current attributes.
Implements LineAttrItem. Definition at line 251 of file sgline2.cpp. 00252 { 00253 AttrLineWidth* pattr = (AttrLineWidth*) *ppOtherAttribs; 00254 return pattr != NULL && pattr->Value.LineWidth == m_nWidth; 00255 }
|
|
Sets the line-width attributes in the given render-region to render this item correctly.
Implements LineAttrItem. Definition at line 152 of file sgline2.cpp. 00153 { 00154 // Set the line width (this overrides the "default" line width set by the caller). 00155 pRegion->SetLineWidth(m_nWidth); 00156 00157 // If the line is only a pixel thick then draw it in red, to distinguish it from 00158 // other very thin lines. 00159 if (m_nWidth == 0) pRegion->SetLineColour(COLOUR_RED); 00160 }
|
|
|