[mcclim-cvs] CVS update: mcclim/Examples/menutest.lisp
Andy Hefner
ahefner at common-lisp.net
Tue Feb 1 03:28:54 UTC 2005
Update of /project/mcclim/cvsroot/mcclim/Examples
In directory common-lisp.net:/tmp/cvs-serv25606
Modified Files:
menutest.lisp
Log Message:
Minor fixes to menutest - Define commands within the menutest command
so that they are not shown as disabled in the menus. Direct output
to the CLIM window rather than *error-output*, and set the text style
to sans-serif.
Date: Mon Jan 31 19:28:52 2005
Author: ahefner
Index: mcclim/Examples/menutest.lisp
diff -u mcclim/Examples/menutest.lisp:1.10 mcclim/Examples/menutest.lisp:1.11
--- mcclim/Examples/menutest.lisp:1.10 Fri Mar 21 13:37:00 2003
+++ mcclim/Examples/menutest.lisp Mon Jan 31 19:28:51 2005
@@ -23,42 +23,43 @@
(in-package :menutest)
(defun menutest ()
- (loop for port in climi::*all-ports*
- do (destroy-port port))
- (setq climi::*all-ports* nil)
(let ((frame (make-application-frame 'menutest)))
(run-frame-top-level frame)
frame))
-(define-command com-file ()
- (format *error-output* "you pressed the File button~%")
- (finish-output *error-output*))
-
-(define-command com-hello ()
- (format *error-output* "you pressed the Hello button~%")
- (finish-output *error-output*))
-
-(define-command com-hi ()
- (format *error-output* "you pressed the Hi button~%")
- (finish-output *error-output*))
+(define-application-frame menutest ()
+ ()
+ (:menu-bar menubar-command-table)
+ (:panes
+ (screen :application
+ :display-time nil
+ :text-style (make-text-style :sans-serif :roman :normal)))
+ (:layouts
+ (defaults (vertically () screen)))
+ #+nil
+ (:top-level (menutest-frame-top-level)))
+
+(define-menutest-command com-file ()
+ (format *standard-output* "You pressed the File button.~%")
+ (finish-output *standard-output*))
+
+(define-menutest-command com-hello ()
+ (format *standard-output* "You pressed the Hello button.~%")
+ (finish-output *standard-output*))
+
+(define-menutest-command com-hi ()
+ (format *standard-output* "You pressed the Hi button.~%")
+ (finish-output *standard-output*))
(make-command-table 'buffer-command-table
:errorp nil
:menu '(("Hello there" :command com-hello)
- ("Hi there" :command com-hi)))
+ ("Hi there" :command com-hi)))
(make-command-table 'menubar-command-table
:errorp nil
:menu '(("Buffer" :menu buffer-command-table)
- ("File" :command com-file)))
+ ("File" :command com-file)))
+
-(define-application-frame menutest ()
- ()
- (:menu-bar menubar-command-table)
- (:panes
- (screen :application))
- (:layouts
- (defaults (vertically () screen)))
- #+nil
- (:top-level (menutest-frame-top-level)))
More information about the Mcclim-cvs
mailing list