move default OnInternalIdle processing to wxWindowBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -100,8 +100,6 @@ public:
|
||||
// returns toplevel window the window belongs to
|
||||
wxNonOwnedWindow *GetTLW() const { return m_tlw; }
|
||||
|
||||
void OnInternalIdle();
|
||||
|
||||
virtual bool IsDoubleBuffered() const { return true; }
|
||||
|
||||
protected:
|
||||
|
@@ -46,8 +46,6 @@ public:
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const;
|
||||
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
void PostCreation(const wxSize& size);
|
||||
|
@@ -59,8 +59,6 @@ public:
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
void OnInternalIdle();
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
@@ -89,8 +89,6 @@ public:
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
void OnInternalIdle();
|
||||
|
||||
protected:
|
||||
virtual void DoFreeze();
|
||||
virtual void DoThaw();
|
||||
|
@@ -138,9 +138,6 @@ public:
|
||||
void ClearUpdateRegion() { m_updateRegion.Clear(); }
|
||||
void SetUpdateRegion(const wxRegion& region) { m_updateRegion = region; }
|
||||
|
||||
// Process idle (send update events)
|
||||
void OnInternalIdle();
|
||||
|
||||
// post-creation activities
|
||||
void PostCreation();
|
||||
|
||||
|
@@ -156,8 +156,6 @@ public:
|
||||
static long MacRemoveBordersFromStyle( long style ) ;
|
||||
|
||||
public:
|
||||
void OnInternalIdle();
|
||||
|
||||
// For implementation purposes:
|
||||
// sometimes decorations make the client area smaller
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
@@ -1370,7 +1370,7 @@ public:
|
||||
|
||||
// virtual function for implementing internal idle
|
||||
// behaviour
|
||||
virtual void OnInternalIdle() {}
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// call internal idle recursively
|
||||
// void ProcessInternalIdle() ;
|
||||
|
@@ -2600,6 +2600,16 @@ void wxWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
|
||||
Show(event.GetShown());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Idle processing
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxWindowBase::OnInternalIdle()
|
||||
{
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// dialog units translations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -1054,17 +1054,6 @@ void wxWindowDFB::HandleKeyEvent(const wxDFBWindowEvent& event_)
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// idle events processing
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
void wxWindowDFB::OnInternalIdle()
|
||||
{
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
}
|
||||
|
||||
|
||||
// Find the wxWindow at the current mouse position, returning the mouse
|
||||
// position.
|
||||
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
|
||||
|
@@ -314,17 +314,4 @@ wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new,
|
||||
return attr;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// idle handling
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxControl::OnInternalIdle()
|
||||
{
|
||||
if ( GTKShowFromOnIdle() )
|
||||
return;
|
||||
|
||||
if ( wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen() )
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
}
|
||||
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
@@ -747,20 +747,6 @@ void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxToolBar idle handling
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxToolBar::OnInternalIdle()
|
||||
{
|
||||
// Check if we have to show window now
|
||||
if (GTKShowFromOnIdle()) return;
|
||||
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// static
|
||||
|
@@ -1144,7 +1144,7 @@ wxSize& wxTopLevelWindowGTK::GetCachedDecorSize()
|
||||
|
||||
void wxTopLevelWindowGTK::OnInternalIdle()
|
||||
{
|
||||
wxWindow::OnInternalIdle();
|
||||
wxTopLevelWindowBase::OnInternalIdle();
|
||||
|
||||
// Synthetize activate events.
|
||||
if ( g_sendActivateEvent != -1 )
|
||||
|
@@ -2615,8 +2615,7 @@ void wxWindowGTK::OnInternalIdle()
|
||||
m_needsStyleChange = false;
|
||||
}
|
||||
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
wxWindowBase::OnInternalIdle();
|
||||
}
|
||||
|
||||
void wxWindowGTK::DoGetSize( int *width, int *height ) const
|
||||
|
@@ -2960,8 +2960,7 @@ void wxWindowGTK::OnInternalIdle()
|
||||
}
|
||||
}
|
||||
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
wxWindowBase::OnInternalIdle();
|
||||
}
|
||||
|
||||
void wxWindowGTK::DoGetSize( int *width, int *height ) const
|
||||
|
@@ -1206,14 +1206,3 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
|
||||
window_t *wnd = MGL_wmGetWindowAtPosition(g_winMng, pt.x, pt.y);
|
||||
return (wxWindow*)wnd->userData;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// idle events processing
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
void wxWindowMGL::OnInternalIdle()
|
||||
{
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
}
|
||||
|
@@ -1652,14 +1652,6 @@ void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
void wxWindow::OnInternalIdle()
|
||||
{
|
||||
// This calls the UI-update mechanism (querying windows for
|
||||
// menu/toolbar/control state information)
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// accelerators
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -1507,8 +1507,7 @@ void wxWindowMSW::OnInternalIdle()
|
||||
}
|
||||
#endif // !HAVE_TRACKMOUSEEVENT
|
||||
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
wxWindowBase::OnInternalIdle();
|
||||
}
|
||||
|
||||
// Set this window to be the child of 'parent'.
|
||||
|
@@ -1087,8 +1087,6 @@ void wxWindowOS2::OnIdle(
|
||||
(void)HandleWindowEvent(rEvent);
|
||||
}
|
||||
}
|
||||
if (wxUpdateUIEvent::CanUpdate(this))
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
} // end of wxWindowOS2::OnIdle
|
||||
|
||||
//
|
||||
|
@@ -1683,14 +1683,6 @@ wxWindow *wxWindowBase::DoFindFocus()
|
||||
return wxFindWindowFromWXWidget(wxWidgetImpl::FindFocus());
|
||||
}
|
||||
|
||||
void wxWindowMac::OnInternalIdle()
|
||||
{
|
||||
// This calls the UI-update mechanism (querying windows for
|
||||
// menu/toolbar/control state information)
|
||||
if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
}
|
||||
|
||||
// Raise the window to the top of the Z order
|
||||
void wxWindowMac::Raise()
|
||||
{
|
||||
|
@@ -1318,10 +1318,7 @@ void wxWindowX11::OnInternalIdle()
|
||||
// Update invalidated regions.
|
||||
Update();
|
||||
|
||||
// This calls the UI-update mechanism (querying windows for
|
||||
// menu/toolbar/control state information)
|
||||
if (wxUpdateUIEvent::CanUpdate((wxWindow*) this) && IsShownOnScreen())
|
||||
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
|
||||
wxWindowBase::OnInternalIdle();
|
||||
|
||||
// Set the input focus if couldn't do it before
|
||||
if (m_needsInputFocus)
|
||||
|
Reference in New Issue
Block a user