+ ((case page
+ (:first 0)
+ (:last -1)
+ (t page)) int))
+
+
+(defbinding %notebook-get-current-page () int
+ (notebook notebook))
+
+(defun notebook-current-page-num (notebook)
+ (let ((num (%notebook-get-current-page notebook)))
+ (when (>= num 0)
+ num)))
+
+(defun notebook-current-page (notebook)
+ (let ((page-num (notebook-current-page-num notebook)))
+ (when page-num
+ (notebook-nth-page-child notebook page-num))))
+
+(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) (copy-of 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) (copy-of 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
+ (notebook notebook)
+ ((%notebook-child notebook page) widget)