AttrTxtBold Class Reference

AttrTxtBold specifies if text is bold or not. More...

#include <txtattr.h>

Inheritance diagram for AttrTxtBold:

AttrTxtBase NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrTxtBold ()
 Default constructor for AttrTxtBold class.
 AttrTxtBold (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a AttrTxtBold 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 bold attribute to the new file format filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)

Public Attributes

TxtBoldAttribute Value

Private Member Functions

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

Detailed Description

AttrTxtBold specifies if text is bold or not.

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

Definition at line 899 of file txtattr.h.


Constructor & Destructor Documentation

AttrTxtBold::AttrTxtBold  ) 
 

Default constructor for AttrTxtBold class.

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

Errors: -

See also:
-

Definition at line 4152 of file txtattr.cpp.

04153 {
04154 }

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

Creates a AttrTxtBold Attribute.

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

Errors: -

See also:
-

Definition at line 4127 of file txtattr.cpp.

04133              : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
04134 {                         
04135 } 


Member Function Documentation

void AttrTxtBold::CopyNodeContents AttrTxtBold 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 4274 of file txtattr.cpp.

04275 {
04276     // Let the base class do its bit
04277     NodeAttribute::CopyNodeContents( NodeCopy );
04278     
04279     //Copy contents specific to derived class here
04280     NodeCopy->Value.BoldOn = Value.BoldOn;
04281 } 

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

Reimplemented from NodeAttribute.

Definition at line 921 of file txtattr.h.

00921 { return ATTR_TXTBOLD; }

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

Reimplemented from NodeAttribute.

Definition at line 929 of file txtattr.h.

00929 { return &Value; }

UINT32 AttrTxtBold::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 4250 of file txtattr.cpp.

04251 {
04252     return (_R(IDS_BOLD)); 
04253 }  

void AttrTxtBold::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 4340 of file txtattr.cpp.

04341 {
04342     NodeAttribute::GetDebugDetails( Str );
04343 
04344     String_256 TempStr;
04345     TCHAR* p;
04346 
04347     (Value.BoldOn) ? (p = _T("TRUE")) : (p = _T("FALSE"));
04348     TempStr._MakeMsg( TEXT("\r\nBold=#1%s\r\n"), p);
04349     (*Str) += TempStr;
04350 }

UINT32 AttrTxtBold::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 4322 of file txtattr.cpp.

04323 {     
04324     return (sizeof(AttrTxtBold)); 
04325 }

INT32 AttrTxtBold::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 AttrTxtBold [INPUTS]
- [OUTPUTS]
Returns:
-

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

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 4225 of file txtattr.cpp.

04226 {
04227     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtBold)), 
04228         "Trying to compare two objects with different types"); 
04229     AttrTxtBold* Attr = (AttrTxtBold*) &Attrib;
04230     return (Attr->Value.BoldOn == Value.BoldOn); 
04231 } 

void AttrTxtBold::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 4296 of file txtattr.cpp.

04297 {
04298     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
04299     ENSURE(IS_A(pNodeCopy, AttrTxtBold), "PolyCopyNodeContents given wrong dest node type");
04300 
04301     if (IS_A(pNodeCopy, AttrTxtBold))
04302         CopyNodeContents((AttrTxtBold*)pNodeCopy);
04303 }

void AttrTxtBold::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 4172 of file txtattr.cpp.

04173 {
04174     pRegion->SetTxtBold(&Value, FALSE);
04175 }

Node * AttrTxtBold::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 4198 of file txtattr.cpp.

04199 {
04200     AttrTxtBold* NodeCopy = new AttrTxtBold();
04201     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
04202     CopyNodeContents(NodeCopy);
04203     return NodeCopy;
04204 } 

BOOL AttrTxtBold::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 4376 of file txtattr.cpp.

04377 {
04378 #ifdef DO_EXPORT
04379     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
04380 
04381     return CXaraFileTxtBold::WritePreChildrenNative(pFilter, this);
04382 #else
04383     return FALSE;
04384 #endif
04385 }

BOOL AttrTxtBold::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Saves the text bold 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 4365 of file txtattr.cpp.

04366 {
04367 #ifdef DO_EXPORT
04368     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
04369 
04370     return CXaraFileTxtBold::WritePreChildrenWeb(pFilter, this);
04371 #else
04372     return FALSE;
04373 #endif
04374 }


Member Data Documentation

TxtBoldAttribute AttrTxtBold::Value
 

Definition at line 942 of file txtattr.h.


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