]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/notebook.cpp
rtti api mods added
[wxWidgets.git] / src / generic / notebook.cpp
index 0f6f0036aa4d5338dbb20fa3f2a35a3542ef4917..4034ee21571a6002c06c9699940206220a716980 100644 (file)
@@ -16,7 +16,7 @@
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "notebook.h"
 #endif
 
 #pragma implementation "notebook.h"
 #endif
 
@@ -56,7 +56,6 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl)
     EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent)
     EVT_SET_FOCUS(wxNotebook::OnSetFocus)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
     EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent)
     EVT_SET_FOCUS(wxNotebook::OnSetFocus)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
-//    EVT_IDLE(wxNotebook::OnIdle)
 END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
 END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
@@ -457,8 +456,11 @@ void wxNotebook::OnSize(wxSizeEvent& event)
 // This was supposed to cure the non-display of the notebook
 // until the user resizes the window.
 // What's going on?
 // This was supposed to cure the non-display of the notebook
 // until the user resizes the window.
 // What's going on?
-void wxNotebook::OnIdle(wxIdleEvent& event)
+void wxNotebook::OnInternalIdle()
 {
 {
+    wxWindow::OnInternalIdle();
+
+#if 0    
     static bool s_bFirstTime = TRUE;
     if ( s_bFirstTime ) {
       /*
     static bool s_bFirstTime = TRUE;
     if ( s_bFirstTime ) {
       /*
@@ -478,7 +480,7 @@ void wxNotebook::OnIdle(wxIdleEvent& event)
       */
       s_bFirstTime = FALSE;
     }
       */
       s_bFirstTime = FALSE;
     }
-    event.Skip();
+#endif
 }
 
 // Implementation: calculate the layout of the view rect
 }
 
 // Implementation: calculate the layout of the view rect
@@ -524,9 +526,9 @@ bool wxNotebook::RefreshLayout(bool force)
         unsigned int nCount = m_pages.Count();
         for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
             wxNotebookPage *pPage = m_pages[nPage];
         unsigned int nCount = m_pages.Count();
         for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
             wxNotebookPage *pPage = m_pages[nPage];
+            wxRect clientRect = GetAvailableClientSize();
             if (pPage->IsShown())
             {
             if (pPage->IsShown())
             {
-                wxRect clientRect = GetAvailableClientSize();
                 pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height);
                 if ( pPage->GetAutoLayout() )
                    pPage->Layout();
                 pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height);
                 if ( pPage->GetAutoLayout() )
                    pPage->Layout();