[mcclim-cvs] CVS mcclim/Apps/Listener
thenriksen
thenriksen at common-lisp.net
Wed Jan 9 17:19:47 UTC 2008
Update of /project/mcclim/cvsroot/mcclim/Apps/Listener
In directory clnet:/tmp/cvs-serv3396/Apps/Listener
Modified Files:
dev-commands.lisp
Log Message:
Added Display Image command to Listener.
Note that, by default, it only loads the libraries for XPM reading.
--- /project/mcclim/cvsroot/mcclim/Apps/Listener/dev-commands.lisp 2007/09/04 20:45:54 1.43
+++ /project/mcclim/cvsroot/mcclim/Apps/Listener/dev-commands.lisp 2008/01/09 17:19:47 1.44
@@ -1417,6 +1417,18 @@
((object 'pathname :prompt "pathname"))
(show-file object))
+(define-command (com-display-image :name t :command-table filesystem-commands
+ :menu t)
+ ((image-pathname 'pathname
+ :default (user-homedir-pathname) :insert-default t))
+ (if (probe-file image-pathname)
+ (handler-case
+ (with-room-for-graphics ()
+ (draw-design *standard-output* (mcclim-images:load-image image-pathname)))
+ (mcclim-images:unsupported-image-format (c)
+ (format t "Image format ~A not recognized" (mcclim-images:image-format c))))
+ (format t "No such file: ~A" image-pathname)))
+
(define-command (com-edit-definition :name "Edit Definition"
:command-table lisp-commands
:menu t
More information about the Mcclim-cvs
mailing list