-; (defbinding (notebook-tab-label "gtk_notebook_get_tab_label")
-; (notebook ref) widget
-; (notebook notebook)
-; ((if (typep ref 'widget)
-; ref
-; (notebook-nth-page-child notebook ref))
-; widget))
-
-; (defbinding %notebook-set-tab-label () nil
-; (notebook notebook)
-; (reference widget)
-; (tab-label widget))
-
-; (defun (setf notebook-tab-label) (tab-label notebook reference)
-; (let ((tab-label-widget (if (stringp tab-label)
-; (label-new tab-label)
-; tab-label)))
-; (%notebook-set-tab-label
-; notebook
-; (if (typep reference 'widget)
-; reference
-; (notebook-nth-page-child notebook reference))
-; tab-label-widget)
-; tab-label-widget))
-
-; (defbinding (notebook-menu-label "gtk_notebook_get_menu_label")
-; (notebook ref) widget
-; (notebook notebook)
-; ((if (typep ref 'widget)
-; ref
-; (notebook-nth-page-child notebook ref))
-; widget))
-
-; (defbinding %notebook-set-menu-label () nil
-; (notebook notebook)
-; (reference widget)
-; (menu-label widget))
-
-; (defun (setf notebook-menu-label) (menu-label notebook reference)
-; (let ((menu-label-widget (if (stringp menu-label)
-; (label-new menu-label)
-; menu-label)))
-; (%notebook-set-menu-label
-; notebook
-; (if (typep reference 'widget)
-; reference
-; (notebook-nth-page-child notebook reference))
-; menu-label-widget)
-; menu-label-widget))
-
-(defbinding notebook-query-tab-label-packing (notebook ref) nil
+(defbinding (notebook-nth-page-child "gtk_notebook_get_nth_page")
+ (notebook page) widget
+ (notebook notebook)
+ ((case page
+ (:first 0)
+ (:last -1)
+ (t page)) int))
+
+(defbinding (notebook-current-page-num "gtk_notebook_get_current_page") () int
+ (notebook notebook))
+
+(defun notebook-current-page (notebook)
+ (notebook-nth-page-child notebook (notebook-current-page-num notebook)))
+
+(defbinding %notebook-set-current-page () nil
+ (notebook notebook)
+ (page-num int))
+
+(defun (setf notebook-current-page) (page notebook)
+ (%notebook-set-current-page notebook (%notebook-position notebook page))
+ page)
+
+
+;; (defbinding (notebook-tab-label "gtk_notebook_get_tab_label")
+;; (notebook page) widget
+;; (notebook notebook)
+;; ((%notebook-child notebook page) widget))
+
+;; (defbinding (notebook-tab-label-text "gtk_notebook_get_tab_label_text")
+;; (notebook page) string
+;; (notebook notebook)
+;; ((%notebook-child notebook page) widget))
+
+;; (defbinding %notebook-set-tab-label () nil
+;; (notebook notebook)
+;; (page widget)
+;; (tab-label widget))
+
+;; (defun (setf notebook-tab-label) (tab-label notebook page)
+;; (let ((widget (if (stringp tab-label)
+;; (make-instance 'label :label tab-label)
+;; tab-label)))
+;; (%notebook-set-tab-label notebook (%notebook-child notebook page) widget)
+;; widget))
+
+
+;; (defbinding (notebook-menu-label "gtk_notebook_get_menu_label")
+;; (notebook page) widget
+;; (notebook notebook)
+;; ((%notebook-child notebook page) widget))
+
+;; (defbinding (notebook-menu-label-text "gtk_notebook_get_menu_label_text")
+;; (notebook page) string
+;; (notebook notebook)
+;; ((%notebook-child notebook page) widget))
+
+;; (defbinding %notebook-set-menu-label () nil
+;; (notebook notebook)
+;; (page widget)
+;; (menu-label widget))
+
+;; (defun (setf notebook-menu-label) (menu-label notebook page)
+;; (let ((widget (if (stringp menu-label)
+;; (make-instance 'label :label menu-label)
+;; menu-label)))
+;; (%notebook-set-menu-label notebook (%notebook-child notebook page) widget)
+;; widget))
+
+
+(defbinding notebook-query-tab-label-packing (notebook page) nil