AttrTxtUnderline Class Reference

AttrTxtUnderline specifies if text is underlined or not. More...

#include <txtattr.h>

Inheritance diagram for AttrTxtUnderline:

AttrTxtBase NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrTxtUnderline ()
 Default constructor for AttrTxtUnderline class.
 AttrTxtUnderline (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a AttrTxtUnderline Attribute.
void Render (RenderRegion *pRender)
 'Renders' a Line Width attribute.
NodeSimpleCopy ()
 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.
virtual AttrIndex GetAttributeIndex ()
void GetDebugDetails (StringBase *Str)
 Used for debugging purposes during developement. Override in your own class and output suitable debugging details.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual AttributeValueGetAttributeValue ()
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Saves the text underline attribute to the new file format filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)

Public Attributes

TxtUnderlineAttribute Value

Private Member Functions

void CopyNodeContents (AttrTxtUnderline *NodeCopy)
 This method copies the node's contents to the node pointed to by NodeCopy.

Detailed Description

AttrTxtUnderline specifies if text is underlined or not.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/03/95

Definition at line 1013 of file txtattr.h.


Constructor & Destructor Documentation

AttrTxtUnderline::AttrTxtUnderline  ) 
 

Default constructor for AttrTxtUnderline class.

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

Errors: -

See also:
-

Definition at line 5022 of file txtattr.cpp.

05023 {
05024 }

AttrTxtUnderline::AttrTxtUnderline Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
 

Creates a AttrTxtUnderline Attribute.

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

Errors: -

See also:
-

Definition at line 4997 of file txtattr.cpp.

05003              : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
05004 {                         
05005 } 


Member Function Documentation

void AttrTxtUnderline::CopyNodeContents AttrTxtUnderline NodeCopy  )  [private]
 

This method copies the node's contents to the node pointed to by NodeCopy.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/93
Parameters:
[INPUTS] 
A copy of this node [OUTPUTS]
Returns:
-

Errors: An assertion failure will occur if NodeCopy is NULL

Scope: protected

Definition at line 5144 of file txtattr.cpp.

05145 {
05146     // Let the base class do its bit
05147     AttrTxtBase::CopyNodeContents( NodeCopy );
05148     
05149     //Copy contents specific to derived class here
05150     NodeCopy->Value.Underlined = Value.Underlined;
05151 } 

virtual AttrIndex AttrTxtUnderline::GetAttributeIndex  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1035 of file txtattr.h.

01035 { return ATTR_TXTUNDERLINE; }

virtual AttributeValue* AttrTxtUnderline::GetAttributeValue  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1043 of file txtattr.h.

01043 { return &Value; }

UINT32 AttrTxtUnderline::GetAttrNameID void   )  [virtual]
 

Returns back a string resource ID describing the attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Attribute description ID

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 5120 of file txtattr.cpp.

05121 {
05122     return (_R(IDS_UNDERLINE)); 
05123 }  

void AttrTxtUnderline::GetDebugDetails StringBase Str  )  [virtual]
 

Used for debugging purposes during developement. Override in your own class and output suitable debugging details.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/04/94
Parameters:
- [INPUTS]

Reimplemented from NodeRenderable.

Definition at line 5209 of file txtattr.cpp.

05210 {
05211     NodeAttribute::GetDebugDetails( Str );
05212 
05213     String_256 TempStr;
05214     TCHAR* p;
05215     (Value.Underlined) ? (p=_T("TRUE")) : (p=_T("FALSE"));
05216     TempStr._MakeMsg( TEXT("\r\nUnderline=#1%s\r\n"), p);
05217     (*Str) += TempStr;
05218 }

UINT32 AttrTxtUnderline::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 5192 of file txtattr.cpp.

05193 {     
05194     return (sizeof(AttrTxtUnderline)); 
05195 }

INT32 AttrTxtUnderline::operator== const NodeAttribute Attrib  )  [virtual]
 

A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
Atrib,: The attribute to compare, which must be an AttrLineWidth [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: An ENSURE failure will occur if Attrib does not have a AttrTxtUnderline runtime class.

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 5095 of file txtattr.cpp.

05096 {
05097     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtUnderline)), 
05098         "Trying to compare two objects with different types"); 
05099     AttrTxtUnderline* Attr = (AttrTxtUnderline*) &Attrib;
05100     return (Attr->Value.Underlined == Value.Underlined); 
05101 } 

void AttrTxtUnderline::PolyCopyNodeContents NodeRenderable pNodeCopy  )  [virtual]
 

Polymorphically copies the contents of this node to another.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/12/2003
Parameters:
- [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

Reimplemented from NodeRenderable.

Definition at line 5166 of file txtattr.cpp.

05167 {
05168     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
05169     ENSURE(IS_A(pNodeCopy, AttrTxtUnderline), "PolyCopyNodeContents given wrong dest node type");
05170 
05171     if (IS_A(pNodeCopy, AttrTxtUnderline))
05172         CopyNodeContents((AttrTxtUnderline*)pNodeCopy);
05173 }

void AttrTxtUnderline::Render RenderRegion pRegion  )  [virtual]
 

'Renders' a Line Width attribute.

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

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 5042 of file txtattr.cpp.

05043 {
05044     pRegion->SetTxtUnderline(&Value, FALSE);
05045 }

Node * AttrTxtUnderline::SimpleCopy void   )  [virtual]
 

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.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
- [INPUTS]
[OUTPUTS] 
Returns:
A copy of the node, or NULL if memory runs out

Errors: If memory runs out when trying to copy, then ERROR is called with an out of memory error and the function returns NULL.

Scope: protected

Reimplemented from NodeAttribute.

Definition at line 5068 of file txtattr.cpp.

05069 {
05070     AttrTxtUnderline* NodeCopy = new AttrTxtUnderline();
05071     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
05072     CopyNodeContents(NodeCopy);
05073     return NodeCopy;
05074 } 

BOOL AttrTxtUnderline::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 5244 of file txtattr.cpp.

05245 {
05246 #ifdef DO_EXPORT
05247     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
05248 
05249     return CXaraFileTxtUnderline::WritePreChildrenNative(pFilter, this);
05250 #else
05251     return FALSE;
05252 #endif
05253 }

BOOL AttrTxtUnderline::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Saves the text underline attribute to the new file format filter.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/07/96
Parameters:
pFilter - new camelot filter to save to [INPUTS]
Returns:
TRUE if successful, FALSE otherwise

Reimplemented from Node.

Definition at line 5233 of file txtattr.cpp.

05234 {
05235 #ifdef DO_EXPORT
05236     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
05237 
05238     return CXaraFileTxtUnderline::WritePreChildrenWeb(pFilter, this);
05239 #else
05240     return FALSE;
05241 #endif
05242 }


Member Data Documentation

TxtUnderlineAttribute AttrTxtUnderline::Value
 

Definition at line 1056 of file txtattr.h.


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