X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/83bab9b6adb24ca6df662788482978f5a3f6c393..ef4819bdf82dba1566c7600ba24502f74c9b2ad2:/examples/testgtk.lisp diff --git a/examples/testgtk.lisp b/examples/testgtk.lisp index 0a670b7..169e6bf 100644 --- a/examples/testgtk.lisp +++ b/examples/testgtk.lisp @@ -15,7 +15,7 @@ ;; License along with this library; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -;; $Id: testgtk.lisp,v 1.20 2005/02/27 12:44:07 espen Exp $ +;; $Id: testgtk.lisp,v 1.22 2005/02/27 14:24:49 espen Exp $ ;(use-package "GTK") @@ -452,6 +452,12 @@ ;; File chooser dialog (define-dialog create-file-chooser (dialog "File Chooser" 'file-chooser-dialog) + (file-chooser-add-filter dialog + (make-instance 'file-filter :name "All files" :pattern "*")) + (file-chooser-add-filter dialog + (make-instance 'file-filter :name "Common Lisp source code" + :patterns '("*.lisp" "*.lsp"))) + (dialog-add-button dialog "gtk-cancel" #'widget-destroy :object t) (dialog-add-button dialog "gtk-ok" #'(lambda () @@ -461,6 +467,15 @@ (widget-destroy dialog)))) +;; Font selection dialog + +(define-toplevel create-font-selection (window "Font Button" :resizable nil) + (make-instance 'h-box + :parent window :spacing 8 :border-width 8 + :child (make-instance 'label :label "Pick a font") + :child (make-instance 'font-button + :use-font t :title "Font Selection Dialog"))) + ;;; Handle box @@ -1702,7 +1717,7 @@ This one is underlined (こんにちは) in quite a funky fashion" ;; ("event watcher") ("enxpander" create-expander) ("file chooser" create-file-chooser) -;; ("font selection") + ("font selection" create-font-selection) ("handle box" create-handle-box) ("image" create-image) ("labels" create-labels)