m_param1 = p1 ;
}
- ~wxMacObjectFunctor1() {}
+ virtual ~wxMacObjectFunctor1() {}
virtual void* operator()()
{
{
public :
wxMacTextControl( wxTextCtrl *peer ) ;
- ~wxMacTextControl() ;
+ virtual ~wxMacTextControl() ;
virtual wxString GetStringValue() const = 0 ;
virtual void SetStringValue( const wxString &val ) = 0 ;
const wxString& str,
const wxPoint& pos,
const wxSize& size, long style ) ;
- ~wxMacMLTEHIViewControl() ;
+ virtual ~wxMacMLTEHIViewControl() ;
virtual OSStatus SetFocus( ControlFocusPart focusPart ) ;
virtual bool HasFocus() const ;
const wxString& str,
const wxPoint& pos,
const wxSize& size, long style ) ;
- ~wxMacUnicodeTextControl();
+ virtual ~wxMacUnicodeTextControl();
virtual void VisibilityChanged(bool shown);
virtual wxString GetStringValue() const ;
const wxString& str,
const wxPoint& pos,
const wxSize& size, long style ) ;
- ~wxMacMLTEClassicControl() ;
+ virtual ~wxMacMLTEClassicControl() ;
virtual void VisibilityChanged(bool shown) ;
virtual void SuperChangedPosition() ;
if ( !(m_windowStyle & wxTE_MULTILINE) )
{
- wxWindow *parent = GetParent();
- while ( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL )
+ wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
+ if ( tlw && tlw->GetDefaultItem() )
{
- parent = parent->GetParent() ;
- }
-
- if ( parent && parent->GetDefaultItem() )
- {
- wxButton *def = wxDynamicCast(parent->GetDefaultItem(), wxButton);
+ wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton);
if ( def && def->IsEnabled() )
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() );
// This is necessary (don't know why);
// otherwise the tab will not be inserted.
WriteText(wxT("\t"));
+ eat_key = true;
}
break;
wxMacWindowClipper cl( textctrl ) ;
#ifdef __WXMAC_OSX__
- bool isCompositing = textctrl->MacGetTopLevelWindow()->MacUsesCompositing() ;
if ( m_sbHorizontal || m_sbVertical )
{
int w = bounds.right - bounds.left ;
sbBounds.right = w + 1 ;
sbBounds.bottom = h + 1 ;
- if ( !isCompositing )
- OffsetRect( &sbBounds , m_txnControlBounds.left , m_txnControlBounds.top ) ;
-
SetControlBounds( m_sbHorizontal , &sbBounds ) ;
SetControlViewSize( m_sbHorizontal , w ) ;
}
sbBounds.right = w + 1 ;
sbBounds.bottom = m_sbHorizontal ? h - 14 : h + 1 ;
- if ( !isCompositing )
- OffsetRect( &sbBounds , m_txnControlBounds.left , m_txnControlBounds.top ) ;
-
SetControlBounds( m_sbVertical , &sbBounds ) ;
SetControlViewSize( m_sbVertical , h ) ;
}
else
{
// sometimes we get the coords also in control local coordinates, therefore test again
- if ( textctrl->MacGetTopLevelWindow()->MacUsesCompositing() )
- {
- int x = 0 , y = 0 ;
- textctrl->MacClientToRootWindow( &x , &y ) ;
- where.h += x ;
- where.v += y ;
- }
+ int x = 0 , y = 0 ;
+ textctrl->MacClientToRootWindow( &x , &y ) ;
+ where.h += x ;
+ where.v += y ;
if (PtInRect( where, &m_txnControlBounds ))
result = kControlEditTextPart ;
if ( (textctrl != NULL) && textctrl->MacIsReallyShown() )
{
Point startPt = { y , x } ;
+
// for compositing, we must convert these into toplevel window coordinates, because hittesting expects them
- if ( textctrl->MacGetTopLevelWindow()->MacUsesCompositing() )
- {
- int x = 0 , y = 0 ;
- textctrl->MacClientToRootWindow( &x , &y ) ;
- startPt.h += x ;
- startPt.v += y ;
- }
+ int x = 0 , y = 0 ;
+ textctrl->MacClientToRootWindow( &x , &y ) ;
+ startPt.h += x ;
+ startPt.v += y ;
switch (MacControlUserPaneHitTestProc( startPt.h , startPt.v ))
{