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