]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
reduce the margins around bitmaps to avoid truncating the label unnecessarily
[wxWidgets.git] / src / common / appbase.cpp
index a02e091ff1575b84454f4997b9b9dff2f473cd7a..a358cf0ddebd4cc9aa9cb5313e7f2ae7d563fe88 100644 (file)
@@ -385,6 +385,9 @@ void wxAppConsoleBase::WakeUpIdle()
 
 bool wxAppConsoleBase::ProcessIdle()
 {
+    // process pending wx events before sending idle events
+    ProcessPendingEvents();
+
     wxIdleEvent event;
 
     event.SetEventObject(this);
@@ -413,6 +416,20 @@ wxAppConsoleBase::HandleEvent(wxEvtHandler *handler,
     (handler->*func)(event);
 }
 
+void wxAppConsoleBase::CallEventHandler(wxEvtHandler *handler,
+                                        wxEventFunctor& functor,
+                                        wxEvent& event) const
+{
+    // If the functor holds a method then, for backward compatibility, call
+    // HandleEvent():
+    wxEventFunction eventFunction = functor.GetMethod();
+
+    if ( eventFunction )
+        HandleEvent(handler, eventFunction, event);
+    else
+        functor(handler, event);
+}
+
 void wxAppConsoleBase::OnUnhandledException()
 {
 #ifdef __WXDEBUG__