return true;
}
- virtual void SetRect( Rect *r ) ;
+ virtual void Move(int x, int y, int width, int height);
protected :
OSStatus DoCreate();
if ( !(m_windowStyle & wxTE_MULTILINE) )
SetData<Boolean>( kControlEditTextPart , kControlEditTextSingleLineTag , true ) ;
- InstallControlEventHandler( m_controlRef , GetwxMacUnicodeTextControlEventHandlerUPP(),
+ ::InstallControlEventHandler( m_controlRef , GetwxMacUnicodeTextControlEventHandlerUPP(),
GetEventTypeCount(unicodeTextControlEventList), unicodeTextControlEventList, this,
NULL);
{
#ifndef __LP64__
- wxMacWindowClipper c( m_peer ) ;
+ wxMacWindowClipper c( GetWXPeer() ) ;
#endif
{
wxMacEditHelper help( m_txn ) ;
#ifndef __LP64__
- wxMacWindowClipper c( m_peer ) ;
+ wxMacWindowClipper c( GetWXPeer() ) ;
#endif
TXNSetSelection( m_txn, from, to == -1 ? kTXNEndOffset : to ) ;
void wxMacMLTEControl::Remove( long from , long to )
{
#ifndef __LP64__
- wxMacWindowClipper c( m_peer ) ;
+ wxMacWindowClipper c( GetWXPeer() ) ;
#endif
wxMacEditHelper help( m_txn ) ;
TXNSetSelection( m_txn , from , to ) ;
void wxMacMLTEControl::SetSelection( long from , long to )
{
#ifndef __LP64__
- wxMacWindowClipper c( m_peer ) ;
+ wxMacWindowClipper c( GetWXPeer() ) ;
#endif
// change the selection
GetSelection( &start , &dummy ) ;
#ifndef __LP64__
- wxMacWindowClipper c( m_peer ) ;
+ wxMacWindowClipper c( GetWXPeer() ) ;
#endif
{
void wxMacMLTEControl::Clear()
{
#ifndef __LP64__
- wxMacWindowClipper c( m_peer ) ;
+ wxMacWindowClipper c( GetWXPeer() ) ;
#endif
wxMacEditHelper st( m_txn ) ;
TXNSetSelection( m_txn , kTXNStartOffset , kTXNEndOffset ) ;
}
}
-void wxMacMLTEClassicControl::SetRect( Rect *r )
+void wxMacMLTEClassicControl::Move(int x, int y, int width, int height)
{
- wxMacControl::SetRect( r ) ;
+ wxMacControl::Move(x,y,width,height) ;
MacUpdatePosition() ;
}
{
wxString st = str ;
wxMacConvertNewlines10To13( &st ) ;
- wxMacWindowClipper clipper( m_peer ) ;
+ wxMacWindowClipper clipper( GetWXPeer() ) ;
SetTXNData( st , kTXNStartOffset, kTXNEndOffset ) ;
TXNSetSelection( m_txn, 0, 0 ) ;
}
static pascal void wxMacControlUserPaneDrawProc(ControlRef control, SInt16 part)
{
- wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
+ wxTextCtrl *textCtrl = wxDynamicCast( wxFindWindowFromWXWidget( (WXWidget) control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
win->MacControlUserPaneDrawProc( part ) ;
static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control, Point where)
{
- wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
+ wxTextCtrl *textCtrl = wxDynamicCast( wxFindWindowFromWXWidget( (WXWidget) control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
return win->MacControlUserPaneHitTestProc( where.h , where.v ) ;
static pascal ControlPartCode wxMacControlUserPaneTrackingProc(ControlRef control, Point startPt, ControlActionUPP actionProc)
{
- wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
+ wxTextCtrl *textCtrl = wxDynamicCast( wxFindWindowFromWXWidget( (WXWidget) control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
return win->MacControlUserPaneTrackingProc( startPt.h , startPt.v , (void*) actionProc ) ;
static pascal void wxMacControlUserPaneIdleProc(ControlRef control)
{
- wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
+ wxTextCtrl *textCtrl = wxDynamicCast( wxFindWindowFromWXWidget((WXWidget) control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
win->MacControlUserPaneIdleProc() ;
static pascal ControlPartCode wxMacControlUserPaneKeyDownProc(ControlRef control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers)
{
- wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
+ wxTextCtrl *textCtrl = wxDynamicCast( wxFindWindowFromWXWidget((WXWidget) control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
return win->MacControlUserPaneKeyDownProc( keyCode, charCode, modifiers ) ;
static pascal void wxMacControlUserPaneActivateProc(ControlRef control, Boolean activating)
{
- wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
+ wxTextCtrl *textCtrl = wxDynamicCast( wxFindWindowFromWXWidget( (WXWidget)control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
win->MacControlUserPaneActivateProc( activating ) ;
static pascal ControlPartCode wxMacControlUserPaneFocusProc(ControlRef control, ControlFocusPart action)
{
- wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
+ wxTextCtrl *textCtrl = wxDynamicCast( wxFindWindowFromWXWidget((WXWidget) control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
return win->MacControlUserPaneFocusProc( action ) ;
#if 0
static pascal void wxMacControlUserPaneBackgroundProc(ControlRef control, ControlBackgroundPtr info)
{
- wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
+ wxTextCtrl *textCtrl = wxDynamicCast( wxFindWindowFromWXWidget(control) , wxTextCtrl ) ;
wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
win->MacControlUserPaneBackgroundProc(info) ;
{
HIViewAddSubview( m_scrollView , m_textView ) ;
m_controlRef = m_scrollView ;
- wxPeer->MacInstallEventHandler( (WXWidget) m_textView ) ;
+ wxMacControl::MacInstallEventHandler( m_textView, wxPeer ) ;
}
else
{
AdjustCreationAttributes( *wxWHITE , true ) ;
#ifndef __LP64__
- wxMacWindowClipper c( m_peer ) ;
+ wxMacWindowClipper c( GetWXPeer() ) ;
#endif
SetTXNData( st , kTXNStartOffset, kTXNEndOffset ) ;
TXNSetSelection( m_txn, 0, 0 );
TXNShowSelection( m_txn, kTXNShowStart );
- InstallControlEventHandler( m_textView , GetwxMacTextControlEventHandlerUPP(),
+ ::InstallControlEventHandler( m_textView , GetwxMacTextControlEventHandlerUPP(),
GetEventTypeCount(eventList), eventList, this,
NULL);
}