+ wxASSERT( typeAttrCount < WXSIZEOF(typeAttr) );
+ style.GetTextColour().GetRGBColor( &color );
+ typeAttr[typeAttrCount].tag = kTXNQDFontColorAttribute ;
+ typeAttr[typeAttrCount].size = kTXNQDFontColorAttributeSize ;
+ typeAttr[typeAttrCount].data.dataPtr = (void*) &color ;
+ typeAttrCount++ ;
+ }
+
+ if ( style.HasAlignment() )
+ {
+ wxASSERT( controlAttrCount < WXSIZEOF(controlTags) );
+ SInt32 align;
+
+ switch ( style.GetAlignment() )
+ {
+ case wxTEXT_ALIGNMENT_LEFT:
+ align = kTXNFlushLeft;
+ break;
+ case wxTEXT_ALIGNMENT_CENTRE:
+ align = kTXNCenter;
+ break;
+ case wxTEXT_ALIGNMENT_RIGHT:
+ align = kTXNFlushRight;
+ break;
+ case wxTEXT_ALIGNMENT_JUSTIFIED:
+ align = kTXNFullJust;
+ break;
+ default :
+ case wxTEXT_ALIGNMENT_DEFAULT:
+ align = kTXNFlushDefault;
+ break;
+ }
+
+ controlTags[controlAttrCount] = kTXNJustificationTag ;
+ controlData[controlAttrCount].sValue = align ;
+ controlAttrCount++ ;
+ }
+
+ if ( style.HasLeftIndent() || style.HasRightIndent() )
+ {
+ wxASSERT( controlAttrCount < WXSIZEOF(controlTags) );
+ controlTags[controlAttrCount] = kTXNMarginsTag;
+ controlData[controlAttrCount].marginsPtr = &margins;
+ verify_noerr( TXNGetTXNObjectControls (m_txn, 1 ,
+ &controlTags[controlAttrCount], &controlData[controlAttrCount]) );
+ if ( style.HasLeftIndent() )
+ {
+ margins.leftMargin = wxConvertToTXN(style.GetLeftIndent());
+ }
+ if ( style.HasRightIndent() )
+ {
+ margins.rightMargin = wxConvertToTXN(style.GetRightIndent());
+ }
+ controlAttrCount++ ;
+ }