+ 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++ ;
+ }
+
+ if ( style.HasTabs() )
+ {
+ const wxArrayInt& tabarray = style.GetTabs();
+ // unfortunately Mac only applies a tab distance, not individually different tabs
+ controlTags[controlAttrCount] = kTXNTabSettingsTag;
+ if ( tabarray.size() > 0 )
+ controlData[controlAttrCount].tabValue.value = wxConvertToTXN(tabarray[0]);
+ else
+ controlData[controlAttrCount].tabValue.value = 72 ;
+
+ controlData[controlAttrCount].tabValue.tabType = kTXNLeftTab;
+ controlAttrCount++ ;
+ }
+
+ // unfortunately the relayout is not automatic
+ if ( controlAttrCount > 0 )
+ {
+ verify_noerr( TXNSetTXNObjectControls (m_txn, false /* don't clear all */, controlAttrCount,
+ controlTags, controlData) );
+ relayout = true;
+ }
+
+ if ( typeAttrCount > 0 )
+ {
+ verify_noerr( TXNSetTypeAttributes( m_txn , typeAttrCount, typeAttr, from , to ) );
+ relayout = true;
+ }
+
+ if ( tabs != NULL )
+ {
+ delete[] tabs;
+ }
+
+ if ( relayout )