GetPeer()->VisibilityChanged( MacIsReallyShown() ) ;
}
-void wxTextCtrl::MacEnabledStateChanged()
-{
-}
-
void wxTextCtrl::MacCheckSpelling(bool check)
{
GetPeer()->CheckSpelling(check);
else
{
from = wxMin(textLength,wxMax(from,0)) ;
- to = wxMax(0,wxMin(textLength,to)) ;
+ if ( to == -1 )
+ to = textLength;
+ else
+ to = wxMax(0,wxMin(textLength,to)) ;
}
sel.selStart = from ;
TXNBackground tback;
tback.bgType = kTXNBackgroundTypeRGB;
- tback.bg.color = MAC_WXCOLORREF( background.GetPixel() );
+ background.GetRGBColor( &tback.bg.color );
TXNSetBackground( m_txn , &tback );
TXNBackground tback;
tback.bgType = kTXNBackgroundTypeRGB;
- tback.bg.color = MAC_WXCOLORREF( brush.GetColour().GetPixel() );
+ brush.GetColour().GetRGBColor(&tback.bg.color);
TXNSetBackground( m_txn , &tback );
}
if ( style.HasTextColour() )
{
wxASSERT( typeAttrCount < WXSIZEOF(typeAttr) );
- color = MAC_WXCOLORREF(style.GetTextColour().GetPixel()) ;
-
+ style.GetTextColour().GetRGBColor( &color );
typeAttr[typeAttrCount].tag = kTXNQDFontColorAttribute ;
typeAttr[typeAttrCount].size = kTXNQDFontColorAttributeSize ;
typeAttr[typeAttrCount].data.dataPtr = (void*) &color ;
wxMacWindowClipper c( m_peer ) ;
#endif
- TXNSetSelection( m_txn, from, to ) ;
+ TXNSetSelection( m_txn, from, to == -1 ? kTXNEndOffset : to ) ;
TXNClear( m_txn ) ;
SetTXNData( value, kTXNUseCurrentSelection, kTXNUseCurrentSelection ) ;
}
if ((from == -1) && (to == -1))
TXNSelectAll( m_txn );
else
- TXNSetSelection( m_txn, from, to );
+ TXNSetSelection( m_txn, from, to == -1 ? kTXNEndOffset : to );
TXNShowSelection( m_txn, kTXNShowStart );
}
return ;
Rect bounds ;
- UMAGetControlBoundsInWindowCoords( m_controlRef, &bounds );
+ GetRectInWindowCoords( &bounds );
wxRect visRect = textctrl->MacGetClippedClientRect() ;
Rect visBounds = { visRect.y , visRect.x , visRect.y + visRect.height , visRect.x + visRect.width } ;
SetControlData(m_controlRef, kControlEntireControl, kControlUserPaneFocusProcTag, sizeof(gTPFocusProc), &gTPFocusProc);
// calculate the rectangles used by the control
- UMAGetControlBoundsInWindowCoords( m_controlRef, &bounds );
+ GetRectInWindowCoords( &bounds );
m_txnControlBounds = bounds ;
m_txnVisBounds = bounds ;
#if 0
CGColorSpaceRef rgbSpace = CGColorSpaceCreateDeviceRGB();
- RGBColor col = MAC_WXCOLORREF(brush.GetColour().GetPixel()) ;
+ RGBColor col;
+ brush.GetColour().GetRGBColor(&col) ;
float component[4] ;
component[0] = col.red / 65536.0 ;