;;;;
;;;;
;;;; header.stk         -- Header bar GTK widget
;;;;
;;;; Copyright © 2021 Erick Gallesio - I3S-CNRS/Polytech Nice-Sophia <eg@unice.fr>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;;; GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this program; if not, write to the Free Software
;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;;; USA.
;;;;
;;;;           Author: Erick Gallesio [eg@unice.fr]
;;;;    Creation date: 29-Jun-2021 14:09
;;;;


;;;
;;; GTK bindings
;;;
(define-gtk gtk-header-bar-new () #:pointer "gtk_header_bar_new")

;;======================================================================
;;
;;                 C l a s s    < h e a d e r - b a r >
;;
;;======================================================================

(define-class <header-bar> (<gtk-container>)
  ((title                  #:accessor     title
                           #:init-keyword #:title
                           #:allocation   #:gtk-property)
   (subtitle               #:accessor     subtitle
                           #:init-keyword #:subtitle
                           #:allocation   #:gtk-property)
   (decoration-layout      #:accessor     decoration-layout
                           #:init-keyword #:decoration-layout
                           #:allocation   #:gtk-property)
   (decoration-layout-set  #:accessor     decoration-layout-set
                           #:init-keyword #:decoration-layout-set
                           #:allocation   #:gtk-property)
   (has-subtitle           #:accessor     has-subtitle
                           #:init-keyword #:has-subtitle
                           #:allocation   #:gtk-property)
   (show-close-button      #:accessor     show-close-button
                           #:init-keyword #:show-close-button
                           #:allocation   #:gtk-property)))

(define-method realize-widget ((self <header-bar>) initargs)
  (let ((f (gtk-header-bar-new)))
    (cpointer-type-set! f 'gtk-header-bar)
    (slot-set! self 'wid f)))

;;;
;;; Exports
;;;
(export <header-bar>
        title subtitle decoration-layout decoration-layout has-subtitle show-close-button)

;; Local Variables:
;; compile-command: "make -C .."
;; End:
