#include <sgline2.h>
Inheritance diagram for LineDashItem:
Public Member Functions | |
LineDashItem (StockDash nDashType, const String &strDescription) | |
Constructs a user-interface item representing a line's dash pattern. | |
Private Member Functions | |
virtual void | SetAttributes (RenderRegion *pRegion) const |
Sets the dash-pattern attributes in the given render-region to render this item correctly. | |
virtual NodeAttribute * | CreateNewAttribute (BOOL fIsAdjust) const |
virtual MILLIPOINT | GetHeight () const |
Overrides the default height of items in the line gallery for dash pattern items, so they are half the usual height. | |
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 | |
StockDash | m_nDashType |
Definition at line 151 of file sgline2.h.
|
Constructs a user-interface item representing a line's dash pattern.
Definition at line 273 of file sgline2.cpp. 00274 : LineAttrItem(strDescription, NO_LABEL), 00275 m_nDashType(nDashType) 00276 { 00277 // Empty. 00278 }
|
|
Implements LineAttrItem. Definition at line 320 of file sgline2.cpp. 00321 { 00322 AttrDashPattern* pAttr = new AttrDashPattern; 00323 if (pAttr != NULL) pAttr->Value.SetStockDashPattern(m_nDashType); 00324 return pAttr; 00325 }
|
|
Used when searching for display items representing the selection's current attributes.
Implements LineAttrItem. Definition at line 365 of file sgline2.cpp. 00366 { 00367 static CCRuntimeClass* aprtc[] = 00368 { 00369 CC_RUNTIME_CLASS(AttrDashPattern), 00370 NULL 00371 }; 00372 00373 return aprtc; 00374 }
|
|
Overrides the default height of items in the line gallery for dash pattern items, so they are half the usual height.
Reimplemented from LineAttrItem. Definition at line 343 of file sgline2.cpp. 00344 { 00345 return LineAttrItem::GetHeight() / 2; 00346 }
|
|
Used when searching for display items representing the selection's current attributes.
Implements LineAttrItem. Definition at line 393 of file sgline2.cpp. 00394 { 00395 DashPatternAttribute dpa; 00396 dpa.SetStockDashPattern(m_nDashType); 00397 AttrDashPattern* pattr = (AttrDashPattern*) *ppOtherAttribs; 00398 return pattr != NULL && pattr->Value.DashPattern == dpa.DashPattern; 00399 }
|
|
Sets the dash-pattern attributes in the given render-region to render this item correctly.
Implements LineAttrItem. Definition at line 296 of file sgline2.cpp. 00297 { 00298 // Set the dash pattern. 00299 pRegion->SetLineWidth(c_nDefaultLineWidth / 2); 00300 pRegion->SetDashPattern(m_nDashType); 00301 }
|
|
|