]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/notebook.cpp
Derive wxWebViewEvent from wxNotifyEvent.
[wxWidgets.git] / src / gtk1 / notebook.cpp
index 5b2099a4e643879c3da745b82334d15855d98576..9018d387024c98844609c8d67052dcca4205dcb8 100644 (file)
@@ -100,14 +100,14 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
 
     if (notebook->m_skipNextPageChangeEvent)
     {
-        // this event was programatically generated by ChangeSelection() and thus must
+        // this event was programmatically generated by ChangeSelection() and thus must
         // be skipped
         notebook->m_skipNextPageChangeEvent = false;
 
         // make wxNotebook::GetSelection() return the correct (i.e. consistent
         // with wxBookCtrlEvent::GetSelection()) value even though the page is
         // not really changed in GTK+
-        notebook->m_selection = page;
+        notebook->SetSelection(page);
     }
     else
     {
@@ -121,7 +121,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
             // make wxNotebook::GetSelection() return the correct (i.e. consistent
             // with wxBookCtrlEvent::GetSelection()) value even though the page is
             // not really changed in GTK+
-            notebook->m_selection = page;
+            notebook->SetSelection(page);
 
             notebook->SendPageChangedEvent(old);
         }
@@ -280,8 +280,6 @@ static void wxInsertChildInNotebook( wxNotebook* parent, wxWindow* child )
 // wxNotebook
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxBookCtrlBase)
-
 BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
 END_EVENT_TABLE()
@@ -292,7 +290,6 @@ void wxNotebook::Init()
     m_inSwitchPage = false;
 
     m_imageList = NULL;
-    m_selection = -1;
     m_themeEnabled = true;
 }
 
@@ -375,8 +372,8 @@ int wxNotebook::GetSelection() const
             gpointer cur = notebook->cur_page;
             if ( cur != NULL )
             {
-                wxConstCast(this, wxNotebook)->m_selection =
-                    g_list_index( nb_pages, cur );
+                const_cast<wxNotebook *>(this)->
+                    SetSelection(g_list_index( nb_pages, cur ));
             }
         }
     }