/[mcclim]/mcclim/frames.lisp
ViewVC logotype

Diff of /mcclim/frames.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.93 by moore, Fri Apr 23 19:29:48 2004 UTC revision 1.94 by moore, Tue May 18 10:47:46 2004 UTC
# Line 48  Line 48 
48       (declare (special *frame-manager*))       (declare (special *frame-manager*))
49       (locally ,@body)))       (locally ,@body)))
50    
51    ;;; XXX These should force the redisplay of the menu bar. They don't
52    ;;; yet.
53    
54    (defmethod note-command-enabled (frame-manager frame command-name)
55      (declare (ignore frame-manager frame command-name))
56      nil)
57    
58    (defmethod note-command-disabled (frame-manager frame command-name)
59      (declare (ignore frame-manager frame command-name))
60      nil)
61    
62  ;;; Application-Frame class  ;;; Application-Frame class
63  ;;; XXX All these slots should move to a mixin or to standard-application-frame.  ;;; XXX All these slots should move to a mixin or to standard-application-frame.
64  ;;; -- moore  ;;; -- moore
# Line 203  input focus. This is a McCLIM extension. Line 214  input focus. This is a McCLIM extension.
214                    :initarg :calling-frame                    :initarg :calling-frame
215                    :initform nil                    :initform nil
216                    :documentation "The frame that is the parent of this                    :documentation "The frame that is the parent of this
217  frame, if any")))  frame, if any")
218       (disabled-commands :accessor disabled-commands
219                          :initform nil
220                          :documentation "A list of command names that have been
221                                          disabled in this frame")))
222    
223  ;;; Support the :input-buffer initarg for compatibility with "real CLIM"  ;;; Support the :input-buffer initarg for compatibility with "real CLIM"
224    
# Line 547  frame, if any"))) Line 562  frame, if any")))
562  (defmethod execute-frame-command ((frame application-frame) command)  (defmethod execute-frame-command ((frame application-frame) command)
563    (apply (command-name command) (command-arguments command)))    (apply (command-name command) (command-arguments command)))
564    
565    (defmethod command-enabled (command-name (frame standard-application-frame))
566      (and (command-accessible-in-command-table-p command-name
567                                                  (frame-command-table frame))
568           (not (member command-name (disabled-commands frame)))))
569    
570    (defmethod (setf command-enabled)
571        (enabled command-name (frame standard-application-frame))
572      (unless (command-accessible-in-command-table-p command-name
573                                                     (frame-command-table frame))
574        (return-from command-enabled nil))
575      (with-accessors ((disabled-commands disabled-commands))
576          frame
577        (if enabled
578            (progn
579              (setf disabled-commands (delete command-name disabled-commands))
580              (note-command-enabled (frame-manager frame)
581                                    frame
582                                    command-name)
583              enabled)
584            (progn
585              (pushnew command-name disabled-commands)
586              (note-command-disabled (frame-manager frame)
587                                     frame
588                                     command-name)
589              nil))))
590    
591    
592  (defmethod make-pane-1 :around (fm (frame standard-application-frame) type  (defmethod make-pane-1 :around (fm (frame standard-application-frame) type
593                                  &rest args                                  &rest args
594                                  &key (input-buffer nil input-buffer-p)                                  &key (input-buffer nil input-buffer-p)

Legend:
Removed from v.1.93  
changed lines
  Added in v.1.94

  ViewVC Help
Powered by ViewVC 1.1.5