carbon cfm / classic fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b28aeea5ca
commit
542f604ff6
@ -427,57 +427,65 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacWindowEventHandler )
|
|||||||
static pascal void wxMacControlUserPaneDrawProc(ControlRef control, SInt16 part)
|
static pascal void wxMacControlUserPaneDrawProc(ControlRef control, SInt16 part)
|
||||||
{
|
{
|
||||||
wxWindow * win = wxFindControlFromMacControl(control) ;
|
wxWindow * win = wxFindControlFromMacControl(control) ;
|
||||||
wxCHECK_RET( win , wxT("Callback from unkown control") ) ;
|
if ( win )
|
||||||
win->MacControlUserPaneDrawProc(part) ;
|
win->MacControlUserPaneDrawProc(part) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control, Point where)
|
static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control, Point where)
|
||||||
{
|
{
|
||||||
wxWindow * win = wxFindControlFromMacControl(control) ;
|
wxWindow * win = wxFindControlFromMacControl(control) ;
|
||||||
wxCHECK_MSG( win , kControlNoPart , wxT("Callback from unkown control") ) ;
|
if ( win )
|
||||||
return win->MacControlUserPaneHitTestProc(where.h , where.v) ;
|
return win->MacControlUserPaneHitTestProc(where.h , where.v) ;
|
||||||
|
else
|
||||||
|
return kControlNoPart ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pascal ControlPartCode wxMacControlUserPaneTrackingProc(ControlRef control, Point startPt, ControlActionUPP actionProc)
|
static pascal ControlPartCode wxMacControlUserPaneTrackingProc(ControlRef control, Point startPt, ControlActionUPP actionProc)
|
||||||
{
|
{
|
||||||
wxWindow * win = wxFindControlFromMacControl(control) ;
|
wxWindow * win = wxFindControlFromMacControl(control) ;
|
||||||
wxCHECK_MSG( win , kControlNoPart , wxT("Callback from unkown control") ) ;
|
if ( win )
|
||||||
return win->MacControlUserPaneTrackingProc( startPt.h , startPt.v , (void*) actionProc) ;
|
return win->MacControlUserPaneTrackingProc( startPt.h , startPt.v , (void*) actionProc) ;
|
||||||
|
else
|
||||||
|
return kControlNoPart ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pascal void wxMacControlUserPaneIdleProc(ControlRef control)
|
static pascal void wxMacControlUserPaneIdleProc(ControlRef control)
|
||||||
{
|
{
|
||||||
wxWindow * win = wxFindControlFromMacControl(control) ;
|
wxWindow * win = wxFindControlFromMacControl(control) ;
|
||||||
wxCHECK_RET( win , wxT("Callback from unkown control") ) ;
|
if ( win )
|
||||||
win->MacControlUserPaneIdleProc() ;
|
win->MacControlUserPaneIdleProc() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pascal ControlPartCode wxMacControlUserPaneKeyDownProc(ControlRef control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers)
|
static pascal ControlPartCode wxMacControlUserPaneKeyDownProc(ControlRef control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers)
|
||||||
{
|
{
|
||||||
wxWindow * win = wxFindControlFromMacControl(control) ;
|
wxWindow * win = wxFindControlFromMacControl(control) ;
|
||||||
wxCHECK_MSG( win , kControlNoPart , wxT("Callback from unkown control") ) ;
|
if ( win )
|
||||||
return win->MacControlUserPaneKeyDownProc(keyCode,charCode,modifiers) ;
|
return win->MacControlUserPaneKeyDownProc(keyCode,charCode,modifiers) ;
|
||||||
|
else
|
||||||
|
return kControlNoPart ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pascal void wxMacControlUserPaneActivateProc(ControlRef control, Boolean activating)
|
static pascal void wxMacControlUserPaneActivateProc(ControlRef control, Boolean activating)
|
||||||
{
|
{
|
||||||
wxWindow * win = wxFindControlFromMacControl(control) ;
|
wxWindow * win = wxFindControlFromMacControl(control) ;
|
||||||
wxCHECK_RET( win , wxT("Callback from unkown control") ) ;
|
if ( win )
|
||||||
win->MacControlUserPaneActivateProc(activating) ;
|
win->MacControlUserPaneActivateProc(activating) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pascal ControlPartCode wxMacControlUserPaneFocusProc(ControlRef control, ControlFocusPart action)
|
static pascal ControlPartCode wxMacControlUserPaneFocusProc(ControlRef control, ControlFocusPart action)
|
||||||
{
|
{
|
||||||
wxWindow * win = wxFindControlFromMacControl(control) ;
|
wxWindow * win = wxFindControlFromMacControl(control) ;
|
||||||
wxCHECK_MSG( win , kControlNoPart , wxT("Callback from unkown control") ) ;
|
if ( win )
|
||||||
return win->MacControlUserPaneFocusProc(action) ;
|
return win->MacControlUserPaneFocusProc(action) ;
|
||||||
|
else
|
||||||
|
return kControlNoPart ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pascal void wxMacControlUserPaneBackgroundProc(ControlRef control, ControlBackgroundPtr info)
|
static pascal void wxMacControlUserPaneBackgroundProc(ControlRef control, ControlBackgroundPtr info)
|
||||||
{
|
{
|
||||||
wxWindow * win = wxFindControlFromMacControl(control) ;
|
wxWindow * win = wxFindControlFromMacControl(control) ;
|
||||||
wxCHECK_RET( win , wxT("Callback from unkown control") ) ;
|
if ( win )
|
||||||
win->MacControlUserPaneBackgroundProc(info) ;
|
win->MacControlUserPaneBackgroundProc(info) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMac::MacControlUserPaneDrawProc(wxInt16 part)
|
void wxWindowMac::MacControlUserPaneDrawProc(wxInt16 part)
|
||||||
@ -1942,28 +1950,27 @@ wxString wxWindowMac::GetTitle() const
|
|||||||
|
|
||||||
bool wxWindowMac::Show(bool show)
|
bool wxWindowMac::Show(bool show)
|
||||||
{
|
{
|
||||||
|
bool former = MacIsReallyShown() ;
|
||||||
if ( !wxWindowBase::Show(show) )
|
if ( !wxWindowBase::Show(show) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// TODO use visibilityChanged Carbon Event for OSX
|
// TODO use visibilityChanged Carbon Event for OSX
|
||||||
if ( m_peer )
|
if ( m_peer )
|
||||||
{
|
{
|
||||||
bool former = MacIsReallyShown() ;
|
|
||||||
|
|
||||||
m_peer->SetVisibility( show , true ) ;
|
m_peer->SetVisibility( show , true ) ;
|
||||||
if ( former != MacIsReallyShown() )
|
|
||||||
MacPropagateVisibilityChanged() ;
|
|
||||||
}
|
}
|
||||||
|
if ( former != MacIsReallyShown() )
|
||||||
|
MacPropagateVisibilityChanged() ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindowMac::Enable(bool enable)
|
bool wxWindowMac::Enable(bool enable)
|
||||||
{
|
{
|
||||||
wxASSERT( m_peer->Ok() ) ;
|
wxASSERT( m_peer->Ok() ) ;
|
||||||
|
bool former = MacIsReallyEnabled() ;
|
||||||
if ( !wxWindowBase::Enable(enable) )
|
if ( !wxWindowBase::Enable(enable) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
bool former = MacIsReallyEnabled() ;
|
|
||||||
m_peer->Enable( enable ) ;
|
m_peer->Enable( enable ) ;
|
||||||
|
|
||||||
if ( former != MacIsReallyEnabled() )
|
if ( former != MacIsReallyEnabled() )
|
||||||
|
Loading…
Reference in New Issue
Block a user