]> git.saurik.com Git - wxWidgets.git/commitdiff
Add a private GetNotebookWidget() accessor to wxGTK.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Mar 2012 17:55:49 +0000 (17:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Mar 2012 17:55:49 +0000 (17:55 +0000)
This is similar to the other existing functions and allows to access
GtkNotebook-specific style.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/private.h
src/gtk/private.cpp

index 63dd666e3cc0979b388824d234e38d3345f46cde..96deaf28b329a5bf8169c76734d8d2babb97ad70 100644 (file)
@@ -106,6 +106,7 @@ WXDLLIMPEXP_CORE GtkWidget *GetEntryWidget();
 WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidgetFirst();
 WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidgetLast();
 WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidget();
+WXDLLIMPEXP_CORE GtkWidget *GetNotebookWidget();
 WXDLLIMPEXP_CORE GtkWidget *GetRadioButtonWidget();
 WXDLLIMPEXP_CORE GtkWidget *GetSplitterWidget();
 WXDLLIMPEXP_CORE GtkWidget *GetTextEntryWidget();
index 08ebaae77e28a4432fc425c45239028337440061..7b7003705f53e0fca4e4da78df937281898fb4eb 100644 (file)
@@ -64,6 +64,20 @@ GtkWidget *GetButtonWidget()
     return s_button;
 }
 
+GtkWidget *GetNotebookWidget()
+{
+    static GtkWidget *s_notebook = NULL;
+
+    if ( !s_notebook )
+    {
+        s_notebook = gtk_notebook_new();
+        gtk_container_add(GetContainer(), s_notebook);
+        gtk_widget_realize(s_notebook);
+    }
+
+    return s_notebook;
+}
+
 GtkWidget *GetCheckButtonWidget()
 {
     static GtkWidget *s_button = NULL;