From: Dmitry Kalyanov Date: Tue, 17 Mar 2009 21:42:20 +0000 (+0300) Subject: added layout-containers X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=f8e29849b2c16860261744c85b5021a0a7a2859f;p=cl-gtk2.git added layout-containers --- diff --git a/generating.lisp b/generating.lisp index 23eda4d..d91ec78 100644 --- a/generating.lisp +++ b/generating.lisp @@ -158,4 +158,8 @@ (:cffi gtk::preview-text gtk::font-selection-dialog-preview-text :string "gtk_font_selection_dialog_get_preview_text" "gtk_font_selection_dialog_set_preview_text") (:cffi gtk::apply-button gtk::font-selection-dialog-apply-button g-object "gtk_font_selection_dialog_get_apply_button" nil) (:cffi gtk::cancel-button gtk::font-selection-dialog-cancel-button g-object "gtk_font_selection_dialog_get_cancel_button" nil) - (:cffi gtk::ok-button gtk::font-selection-dialog-ok-button g-object "gtk_font_selection_dialog_get_ok_button" nil)))))) \ No newline at end of file + (:cffi gtk::ok-button gtk::font-selection-dialog-ok-button g-object "gtk_font_selection_dialog_get_ok_button" nil)) + ("GtkFixed" + (:cffi gtk::has-window gtk::fixed-has-window :boolean "gtk_fixed_get_has_window" "gtk_gixed_set_has_window")) + ("GtkLayout" + (:cffi gtk::bin-window gtk::layout-bin-window g-object "gtk_layout_get_bin_window" nil)))))) \ No newline at end of file diff --git a/gtk/gtk.asd b/gtk/gtk.asd index 44ca155..0ef428d 100644 --- a/gtk/gtk.asd +++ b/gtk/gtk.asd @@ -30,6 +30,7 @@ (:file "gtk.menu") (:file "gtk.ui-manager") (:file "gtk.selectors") + (:file "gtk.layout-containers") (:file "gtk.dialog.example") diff --git a/gtk/gtk.demo.lisp b/gtk/gtk.demo.lisp index 5055ced..62eaa2e 100644 --- a/gtk/gtk.demo.lisp +++ b/gtk/gtk.demo.lisp @@ -18,7 +18,8 @@ #:test-color-button #:test-color-selection #:test-file-chooser - #:test-font-chooser)) + #:test-font-chooser + #:test-notebook)) (in-package :gtk-demo) @@ -421,4 +422,23 @@ (container-add window v-box) (box-pack-start v-box button) (gtk-widget-show-all window) + (gtk-main))) + +(defun test-notebook () + (let ((window (make-instance 'gtk-window :title "Notebook" :type :toplevel :window-position :center :default-width 100 :default-height 100)) + (expander (make-instance 'expander :expanded t :label "notebook")) + (notebook (make-instance 'notebook :enable-popup t))) + (g-signal-connect window "destroy" (lambda (w) (declare (ignore w)) (gtk-main-quit))) + (iter (for i from 0 to 5) + (for page = (make-instance 'label :label (format nil "Label for page ~A" i))) + (for tab-label = (make-instance 'label :label (format nil "Tab ~A" i))) + (for tab-button = (make-instance 'button :use-stock t :label "gtk-close" :relief :none)) + (for tab-hbox = (make-instance 'h-box)) + (box-pack-start tab-hbox tab-label) + (box-pack-start tab-hbox tab-button) + (gtk-widget-show-all tab-hbox) + (notebook-add-page notebook page tab-hbox)) + (container-add window expander) + (container-add expander notebook) + (gtk-widget-show-all window) (gtk-main))) \ No newline at end of file diff --git a/gtk/gtk.functions.lisp b/gtk/gtk.functions.lisp index cb746e5..0539e28 100644 --- a/gtk/gtk.functions.lisp +++ b/gtk/gtk.functions.lisp @@ -35,21 +35,4 @@ (defun text-buffer-insert (buffer iter text) (declare (ignore iter)) - (gtk-text-buffer-insert buffer (null-pointer) text (length text))) - -(define-g-flags "GtkAttachOptions" attach-options () :expand :shrink :fill) - -(defcfun gtk-table-attach :void - (table (g-object table)) - (child (g-object widget)) - (left-attach :uint) - (right-attach :uint) - (top-attach :uint) - (bottom-attach :uint) - (x-options attach-options) - (y-options attach-options) - (x-padding :uint) - (y-padding :uint)) - -(defun table-attach (table widget left right top bottom &key (x-options '(:expand :fill)) (y-options '(:expand :fill)) (x-padding 0) (y-padding 0)) - (gtk-table-attach table widget left right top bottom x-options y-options x-padding y-padding)) \ No newline at end of file + (gtk-text-buffer-insert buffer (null-pointer) text (length text))) \ No newline at end of file diff --git a/gtk/gtk.generated-classes.lisp b/gtk/gtk.generated-classes.lisp index edb5d2d..777937f 100644 --- a/gtk/gtk.generated-classes.lisp +++ b/gtk/gtk.generated-classes.lisp @@ -1497,6 +1497,12 @@ :type-initializer "gtk_recent_chooser_widget_get_type") nil) +(define-g-object-class "GtkFileChooserDefault" file-chooser-default + (:superclass v-box :export t :interfaces + ("AtkImplementorIface" "GtkBuildable" "GtkFileChooser" + "GtkFileChooserEmbed")) + nil) + (define-g-object-class "GtkHBox" h-box (:superclass box :export t :interfaces ("AtkImplementorIface" "GtkBuildable") @@ -1542,7 +1548,9 @@ (:superclass container :export t :interfaces ("AtkImplementorIface" "GtkBuildable") :type-initializer "gtk_fixed_get_type") - nil) + ((:cffi has-window fixed-has-window :boolean + "gtk_fixed_get_has_window" + "gtk_gixed_set_has_window"))) (define-g-object-class "GtkPaned" paned (:superclass container :export t :interfaces @@ -1577,7 +1585,9 @@ (vadjustment layout-vadjustment "vadjustment" "GtkAdjustment" t t) (width layout-width "width" "guint" t t) - (height layout-height "height" "guint" t t))) + (height layout-height "height" "guint" t t) + (:cffi bin-window layout-bin-window g-object + "gtk_layout_get_bin_window" nil))) (define-g-object-class "GtkSocket" socket (:superclass container :export t :interfaces @@ -1668,6 +1678,12 @@ (sort-type c-list-sort-type "sort-type" "GtkSortType" t t))) +(define-g-object-class "GtkPathBar" path-bar + (:superclass container :export t :interfaces + ("AtkImplementorIface" "GtkBuildable") + :type-initializer "gtk_path_bar_get_type") + nil) + (define-g-object-class "GtkMisc" misc (:superclass widget :export t :interfaces ("AtkImplementorIface" "GtkBuildable") @@ -1861,6 +1877,12 @@ "update-policy" "GtkSpinButtonUpdatePolicy" t t) (value spin-button-value "value" "gdouble" t t))) +(define-g-object-class "GtkFileChooserEntry" file-chooser-entry + (:superclass entry :export t :interfaces + ("AtkImplementorIface" "GtkBuildable" "GtkCellEditable" + "GtkEditable")) + nil) + (define-g-object-class "GtkRuler" ruler (:superclass widget :export t :interfaces ("AtkImplementorIface" "GtkBuildable") diff --git a/gtk/gtk.package.lisp b/gtk/gtk.package.lisp index 56cd5b6..55c7515 100644 --- a/gtk/gtk.package.lisp +++ b/gtk/gtk.package.lisp @@ -10,8 +10,7 @@ #:container-add #:dialog-run #:object-destroy - #:text-buffer-insert - #:table-attach)) + #:text-buffer-insert)) (defpackage :gtk-examples (:use :cl :gtk :gdk :gobject)