]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Added wxComboCtrlBase::m_hasTcBgCol. Re-using base wxWindow::m_hasBgCol was trouble.
[wxWidgets.git] / src / common / wincmn.cpp
index 82e0f7a3ee686a8ab7489cb4395e24233c4d1fd8..eca7dd157accf992d93be8b2922de4ffd75939c8 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/common/window.cpp
+// Name:        src/common/wincmn.cpp
 // Purpose:     common (to all ports) wxWindow functions
 // Author:      Julian Smart, Vadim Zeitlin
 // Modified by:
@@ -853,6 +853,16 @@ wxSize wxWindowBase::GetWindowBorderSize() const
     return size*2;
 }
 
+bool
+wxWindowBase::InformFirstDirection(int direction,
+                                   int size,
+                                   int availableOtherDir)
+{
+    return GetSizer() && GetSizer()->InformFirstDirection(direction,
+                                                          size,
+                                                          availableOtherDir);
+}
+
 wxSize wxWindowBase::GetEffectiveMinSize() const
 {
     // merge the best size with the min size, giving priority to the min size
@@ -2604,6 +2614,34 @@ void wxWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
 // Idle processing
 // ----------------------------------------------------------------------------
 
+// Send idle event to window and all subwindows
+bool wxWindowBase::SendIdleEvents(wxIdleEvent& event)
+{
+    bool needMore = false;
+
+    OnInternalIdle();
+
+    // should we send idle event to this window?
+    if (wxIdleEvent::GetMode() == wxIDLE_PROCESS_ALL ||
+        HasExtraStyle(wxWS_EX_PROCESS_IDLE))
+    {
+        event.SetEventObject(this);
+        HandleWindowEvent(event);
+
+        if (event.MoreRequested())
+            needMore = true;
+    }
+    wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
+    for (; node; node = node->GetNext())
+    {
+        wxWindow* child = node->GetData();
+        if (child->SendIdleEvents(event))
+            needMore = true;
+    }
+
+    return needMore;
+}
+
 void wxWindowBase::OnInternalIdle()
 {
     if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())