#include <txtattr.h>
Inheritance diagram for AttrTxtFontTypeface:
Public Member Functions | |
AttrTxtFontTypeface () | |
Default constructor for AttrTxtFontTypeface class. | |
AttrTxtFontTypeface (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates a AttrTxtFontTypeface Attribute. | |
void | Render (RenderRegion *pRender) |
'Renders' a Line Width attribute. | |
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. | |
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 AttributeValue * | GetAttributeValue () |
void | SetBold (BOOL State) |
void | SetItalic (BOOL State) |
BOOL | IsBold () |
BOOL | IsItalic () |
BOOL | IsATypeface () const |
void | UpdateCachedData () |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Saves the text font typeface attribute to the new file format filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Public Attributes | |
TxtFontTypefaceAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (AttrTxtFontTypeface *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 833 of file txtattr.h.
|
Default constructor for AttrTxtFontTypeface class.
Definition at line 3836 of file txtattr.cpp.
|
|
Creates a AttrTxtFontTypeface Attribute.
Definition at line 3811 of file txtattr.cpp. 03817 : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected) 03818 { 03819 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 3960 of file txtattr.cpp. 03961 { 03962 // Let the base class do its bit 03963 AttrTxtBase::CopyNodeContents( NodeCopy ); 03964 03965 //Copy contents specific to derived class here 03966 NodeCopy->Value.HTypeface = Value.HTypeface; 03967 NodeCopy->Value.IsBold = Value.IsBold; 03968 NodeCopy->Value.IsItalic = Value.IsItalic; 03969 }
|
|
Reimplemented from NodeAttribute. Definition at line 855 of file txtattr.h. 00855 { return ATTR_TXTFONTTYPEFACE; }
|
|
Reimplemented from NodeAttribute. Definition at line 863 of file txtattr.h. 00863 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 3936 of file txtattr.cpp. 03937 { 03938 return (_R(IDS_FONTTYPEFACE)); 03939 }
|
|
Used for debugging purposes during developement. Override in your own class and output suitable debugging details.
Reimplemented from NodeRenderable. Definition at line 4028 of file txtattr.cpp. 04029 { 04030 NodeAttribute::GetDebugDetails( Str ); 04031 String_64 FontName; 04032 if (FONTMANAGER->GetFontName(Value.HTypeface, FontName)) 04033 { 04034 FontClass Class = FONTMANAGER->GetFontClass(Value.HTypeface); 04035 04036 TCHAR buf[255]; 04037 04038 camSnprintf( buf, 255, _T("\r\nFontName = %s\r\n"), (TCHAR*)(FontName) ); 04039 (*Str) += buf; 04040 04041 camSnprintf( buf, 256, _T("\r\nFont Handle = %ld\r\n"), Value.HTypeface ); 04042 (*Str) += buf; 04043 04044 switch (Class) 04045 { 04046 case FC_ATM: 04047 camSnprintf( buf, 255, _T("Type = ATM Type1\r\n") ); 04048 break; 04049 case FC_TRUETYPE: 04050 camSnprintf( buf, 255, _T("Type = TrueType\r\n") ); 04051 break; 04052 default: 04053 camSnprintf( buf, 255, _T("Type = Unknown\r\n") ); 04054 break; 04055 } 04056 04057 (*Str) += buf; 04058 camSnprintf( buf, 255, _T("Bold = %s\r\n"), Value.IsBold ? _T("TRUE"):_T("FALSE")); 04059 (*Str) += buf; 04060 camSnprintf( buf, 255, _T("Italic = %s\r\n"), Value.IsItalic ? _T("TRUE"):_T("FALSE")); 04061 (*Str) += buf; 04062 camSnprintf( buf, 255, _T("Replaced = %s\r\n"), FONTMANAGER->IsFontReplaced(&FontName, Class) ? _T("TRUE"):_T("FALSE")); 04063 (*Str) += buf; 04064 } 04065 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 4010 of file txtattr.cpp. 04011 { 04012 return (sizeof(AttrTxtFontTypeface)); 04013 }
|
|
Reimplemented from Node. Definition at line 869 of file txtattr.h. 00869 { return TRUE; }
|
|
Definition at line 867 of file txtattr.h.
|
|
Definition at line 868 of file txtattr.h.
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from NodeAttribute. Definition at line 3909 of file txtattr.cpp. 03910 { 03911 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtFontTypeface)), 03912 "Trying to compare two objects with different types"); 03913 AttrTxtFontTypeface* Attr = (AttrTxtFontTypeface*) &Attrib; 03914 return (Attr->Value.HTypeface == Value.HTypeface && 03915 Attr->Value.IsBold == Value.IsBold && 03916 Attr->Value.IsItalic == Value.IsItalic ); 03917 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 3984 of file txtattr.cpp. 03985 { 03986 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 03987 ENSURE(IS_A(pNodeCopy, AttrTxtFontTypeface), "PolyCopyNodeContents given wrong dest node type"); 03988 03989 if (IS_A(pNodeCopy, AttrTxtFontTypeface)) 03990 CopyNodeContents((AttrTxtFontTypeface*)pNodeCopy); 03991 }
|
|
'Renders' a Line Width attribute.
Reimplemented from NodeAttribute. Definition at line 3856 of file txtattr.cpp. 03857 { 03858 pRegion->SetTxtFontTypeface(&Value, FALSE); 03859 }
|
|
Definition at line 865 of file txtattr.h.
|
|
Definition at line 866 of file txtattr.h.
|
|
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 3882 of file txtattr.cpp. 03883 { 03884 AttrTxtFontTypeface* NodeCopy = new AttrTxtFontTypeface(); 03885 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 03886 CopyNodeContents(NodeCopy); 03887 return NodeCopy; 03888 }
|
|
|
|
Reimplemented from Node. Definition at line 4091 of file txtattr.cpp. 04092 { 04093 #ifdef DO_EXPORT 04094 ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL."); 04095 04096 return CXaraFileTxtFontTypeface::WritePreChildrenNative(pFilter, this); 04097 #else 04098 return FALSE; 04099 #endif 04100 }
|
|
Saves the text font typeface attribute to the new file format filter.
Reimplemented from Node. Definition at line 4080 of file txtattr.cpp. 04081 { 04082 #ifdef DO_EXPORT 04083 ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL."); 04084 04085 return CXaraFileTxtFontTypeface::WritePreChildrenWeb(pFilter, this); 04086 #else 04087 return FALSE; 04088 #endif 04089 }
|
|
|