]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/control.cpp
docstrings
[wxWidgets.git] / src / gtk / control.cpp
index cc203cb5613a29e85eb29d10ba4ce7594aae9705..f940e07bdb355389915ca4ca2f7f9650669c9e8f 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/log.h"
+    #include "wx/settings.h"
 #endif
 
 #include "wx/fontutil.h"
-#include "wx/settings.h"
 #include "wx/gtk/private.h"
 
 // ============================================================================
@@ -34,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxControl, wxWindow)
 
 wxControl::wxControl()
 {
-    m_needParent = TRUE;
+    m_needParent = true;
 }
 
 bool wxControl::Create( wxWindow *parent,
@@ -82,7 +82,7 @@ void wxControl::PostCreation(const wxSize& size)
     gtk_widget_ensure_style(m_widget);
 
     ApplyWidgetStyle();
-    SetInitialBestSize(size);
+    SetInitialSize(size);
 }
 
 // ----------------------------------------------------------------------------
@@ -366,4 +366,24 @@ wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new,
     return attr;
 }
 
+// ----------------------------------------------------------------------------
+// idle handling
+// ----------------------------------------------------------------------------
+
+void wxControl::OnInternalIdle()
+{
+    if ( GtkShowFromOnIdle() )
+        return;
+
+    if ( GTK_WIDGET_REALIZED(m_widget) )
+    {
+        GTKUpdateCursor();
+
+        GTKSetDelayedFocusIfNeeded();
+    }
+
+    if ( wxUpdateUIEvent::CanUpdate(this) )
+        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
+}
+
 #endif // wxUSE_CONTROLS