default painting back to OnPaint handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2b43d5885d
commit
ff3795eeaf
@ -144,6 +144,7 @@ public:
|
||||
// event handlers
|
||||
// --------------
|
||||
void OnSetFocus(wxFocusEvent& event) ;
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnNcPaint(wxNcPaintEvent& event);
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
void OnMouseEvent( wxMouseEvent &event ) ;
|
||||
|
@ -81,7 +81,9 @@ extern wxList wxPendingDelete;
|
||||
BEGIN_EVENT_TABLE(wxWindowMac, wxWindowBase)
|
||||
EVT_NC_PAINT(wxWindowMac::OnNcPaint)
|
||||
EVT_ERASE_BACKGROUND(wxWindowMac::OnEraseBackground)
|
||||
// TODO EVT_PAINT(wxWindowMac::OnPaint)
|
||||
#if TARGET_API_MAC_OSX
|
||||
EVT_PAINT(wxWindowMac::OnPaint)
|
||||
#endif
|
||||
EVT_SET_FOCUS(wxWindowMac::OnSetFocus)
|
||||
EVT_KILL_FOCUS(wxWindowMac::OnSetFocus)
|
||||
EVT_MOUSE_EVENTS(wxWindowMac::OnMouseEvent)
|
||||
@ -2582,6 +2584,7 @@ void wxWindowMac::OnSetFocus(wxFocusEvent& event)
|
||||
|
||||
if ( MacGetTopLevelWindow() && m_peer->NeedsFocusRect() )
|
||||
{
|
||||
#if !wxMAC_USE_CORE_GRAPHICS
|
||||
wxMacWindowStateSaver sv( this ) ;
|
||||
|
||||
int w , h ;
|
||||
@ -2613,6 +2616,9 @@ void wxWindowMac::OnSetFocus(wxFocusEvent& event)
|
||||
DisposeRgn(updateOuter) ;
|
||||
DisposeRgn(updateInner) ;
|
||||
}
|
||||
#else
|
||||
GetParent()->Refresh() ;
|
||||
#endif
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
@ -2870,21 +2876,12 @@ bool wxWindowMac::MacDoRedraw( WXHRGN updatergnr , long time )
|
||||
if ( !m_updateRegion.Empty() )
|
||||
{
|
||||
// paint the window itself
|
||||
|
||||
wxPaintEvent event;
|
||||
event.SetTimestamp(time);
|
||||
event.SetEventObject(this);
|
||||
handled = GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
// we have to call the default built-in handler, as otherwise our frames will be drawn and immediately erased afterwards
|
||||
if ( !handled )
|
||||
{
|
||||
if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL )
|
||||
{
|
||||
CallNextEventHandler((EventHandlerCallRef)wxTheApp->MacGetCurrentEventHandlerCallRef() , (EventRef) wxTheApp->MacGetCurrentEvent() ) ;
|
||||
handled = true ;
|
||||
}
|
||||
}
|
||||
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
handled = true ;
|
||||
}
|
||||
|
||||
// now we cannot rely on having its borders drawn by a window itself, as it does not
|
||||
@ -3233,6 +3230,14 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
|
||||
}
|
||||
}
|
||||
|
||||
void wxWindowMac::OnPaint( wxPaintEvent & event )
|
||||
{
|
||||
if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL )
|
||||
{
|
||||
CallNextEventHandler((EventHandlerCallRef)wxTheApp->MacGetCurrentEventHandlerCallRef() , (EventRef) wxTheApp->MacGetCurrentEvent() ) ;
|
||||
}
|
||||
}
|
||||
|
||||
void wxWindowMac::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED( mouseStillDown ) )
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user