#include <attrbev.h>
Inheritance diagram for AttrBevelIndent:
Public Member Functions | |
AttrBevelIndent () | |
Default constructor for Line Width Attribute class. | |
AttrBevelIndent (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates a bValue Attribute. | |
void | Render (RenderRegion *pRender) |
'Renders' a Line Width attribute. | |
virtual CCRuntimeClass * | GetAttributeType () |
virtual AttributeValue * | GetAttributeValue () |
virtual AttrIndex | GetAttributeIndex () |
Node * | SimpleCopy () |
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes. | |
virtual INT32 | operator== (const NodeAttribute &NodeAttrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual UINT32 | GetAttrNameID (void) |
Returns back a string resource ID describing the attribute. | |
void | ShowDebugTreeDetails () const |
Displays debugging info of the tree. | |
void | GetDebugDetails (StringBase *Str) |
For obtaining debug information about the Node. | |
virtual UINT32 | GetNodeSize () const |
For finding the size of the node. | |
virtual void | Transform (TransformBase &) |
Scale the Line Width. | |
virtual BOOL | EffectsParentBounds () |
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes the line width record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
void | SetValue (INT32 NewValue) |
BOOL | Blend (BlendAttrParam *pBlendParam) |
Blends this indent to another. | |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
Public Attributes | |
BevelAttributeValueIndent | Value |
Private Member Functions | |
void | CopyNodeContents (AttrBevelIndent *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 179 of file attrbev.h.
|
Default constructor for Line Width Attribute class.
Definition at line 250 of file attrbev.cpp.
|
|
Creates a bValue Attribute.
Definition at line 225 of file attrbev.cpp. 00231 : AttrBevel(ContextNode, Direction, Locked, Mangled, Marked, Selected) 00232 { 00233 }
|
|
Blends this indent to another.
Reimplemented from NodeAttribute. Definition at line 508 of file attrbev.cpp. 00509 { 00510 AttrBevelIndent * pBlendedAttr = NULL; 00511 00512 // assign the other attribute we're looking at 00513 AttrBevelIndent * pOtherAttr = (AttrBevelIndent *)pBlendParam->GetOtherAttr(); 00514 00515 // split at the half way mark 00516 if (pBlendParam->GetBlendRatio() <= 0.5) 00517 { 00518 pBlendedAttr = (AttrBevelIndent *)SimpleCopy(); 00519 } 00520 else 00521 { 00522 pBlendedAttr = (AttrBevelIndent *)pOtherAttr->SimpleCopy(); 00523 } 00524 00525 // set the blended attribute 00526 pBlendParam->SetBlendedAttr(pBlendedAttr); 00527 00528 if (!pBlendedAttr) 00529 return FALSE; 00530 00531 double Indent1 = Value.m_Indent; 00532 double Indent2 = pOtherAttr->Value.m_Indent; 00533 double NewIndent = ((Indent2 - Indent1) * pBlendParam->GetBlendRatio()) + Indent1; 00534 00535 // set the blended attribute's values 00536 pBlendedAttr->Value.m_Indent = (MILLIPOINT)NewIndent; 00537 00538 return TRUE; 00539 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 409 of file attrbev.cpp. 00410 { 00411 NodeAttribute::CopyNodeContents( NodeCopy ); 00412 00413 NodeCopy->Value = Value; 00414 }
|
|
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
Reimplemented from NodeAttribute. Definition at line 208 of file attrbev.h. 00208 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 195 of file attrbev.h. 00195 { return ATTR_BEVELINDENT; }
|
|
Reimplemented from NodeAttribute. Definition at line 193 of file attrbev.h. 00193 { return CC_RUNTIME_CLASS(AttrBevelIndent); }
|
|
Reimplemented from NodeAttribute. Definition at line 194 of file attrbev.h. 00194 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 385 of file attrbev.cpp. 00386 { 00387 return (_R(IDS_BEVEL_INDENT_ID)); 00388 }
|
|
For obtaining debug information about the Node.
Reimplemented from NodeRenderable. Definition at line 459 of file attrbev.cpp. 00460 { 00461 #ifdef _DEBUG 00462 NodeAttribute::GetDebugDetails( Str ); 00463 00464 String_256 TempStr; 00465 TempStr._MakeMsg( TEXT("\r\nValue=#1%d\r\n"), Value.m_Indent ); 00466 (*Str) += TempStr; 00467 #else 00468 if (Str) 00469 { 00470 *Str = wxT(""); 00471 } 00472 #endif 00473 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 492 of file attrbev.cpp. 00493 { 00494 return (sizeof(AttrBevelIndent)); 00495 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from NodeAttribute. Definition at line 360 of file attrbev.cpp. 00361 { 00362 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrBevelIndent)), 00363 "Trying to compare two objects with different types"); 00364 AttrBevelIndent * Attr = (AttrBevelIndent *) &Attrib; 00365 return (Attr->Value.m_Indent == Value.m_Indent); 00366 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 428 of file attrbev.cpp. 00429 { 00430 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 00431 ENSURE(IS_A(pNodeCopy, AttrBevelIndent), "PolyCopyNodeContents given wrong dest node type"); 00432 00433 if (IS_A(pNodeCopy, AttrBevelIndent)) 00434 CopyNodeContents((AttrBevelIndent*)pNodeCopy); 00435 }
|
|
'Renders' a Line Width attribute.
Reimplemented from NodeAttribute. Definition at line 269 of file attrbev.cpp.
|
|
Definition at line 214 of file attrbev.h.
|
|
Displays debugging info of the tree.
Definition at line 449 of file attrbev.cpp. 00450 { 00451 // Display a bit of debugging info 00452 // For now, we will just call the base class version 00453 #ifdef _DEBUG 00454 NodeAttribute::ShowDebugTreeDetails(); 00455 #endif 00456 }
|
|
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.
Reimplemented from NodeAttribute. Definition at line 332 of file attrbev.cpp. 00333 { 00334 AttrBevelIndent* NodeCopy = new AttrBevelIndent(); 00335 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 00336 CopyNodeContents(NodeCopy); 00337 NodeCopy->Value.m_Indent = Value.m_Indent; 00338 return NodeCopy; 00339 }
|
|
Scale the Line Width.
Reimplemented from NodeRenderable. Definition at line 285 of file attrbev.cpp. 00286 { 00287 INT32 OldIndent = Value.m_Indent; 00288 00289 // Find out the equivalent scale factor 00290 FIXED16 ScaleFactor = Trans.GetScalar(); 00291 00292 // no scaling then lets leave 00293 if (ScaleFactor.MakeDouble() == 1.0) 00294 return; 00295 00296 // And scale the line width 00297 Value.m_Indent= labs( INT32(ScaleFactor.MakeDouble() * ((double)Value.m_Indent)) ); 00298 00299 // MRH - 3/7/00 - Added a quick check to see if the indent is greater than the slider limit. 00300 // If so then reset the value to the limit! ERROR3 For Debugging - can be taken out if anouying! 00301 if (Value.m_Indent > 250000) 00302 { 00303 ERROR3("Bevel Indent > Max Value! Setting to Max Value!"); 00304 Value.m_Indent = 250000; 00305 } 00306 00307 if (OldIndent < 0) 00308 { 00309 Value.m_Indent = -Value.m_Indent; 00310 } 00311 }
|
|
Reimplemented from Node. Definition at line 564 of file attrbev.cpp. 00565 { 00566 #ifdef DO_EXPORT 00567 return WritePreChildrenWeb(pFilter); 00568 #else 00569 return FALSE; 00570 #endif 00571 }
|
|
Writes the line width record to the filter. > virtual BOOL AttrBevelIndent::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 556 of file attrbev.cpp. 00557 { 00558 return TRUE; 00559 }
|
|
|