;;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10 -*- ;;;; --------------------------------------------------------------------------- ;;;; File name: case-display-dialog.lsp ;;;; System: ;;;; Author: Shawn Nicholson ;;;; Created: June 25, 2002 07:17:05 ;;;; Purpose: ;;;; --------------------------------------------------------------------------- ;;;; Modified: Thursday, September 5, 2002 at 10:27:04 by nicholson ;;;; --------------------------------------------------------------------------- (in-package :fire-case-viewer) (defclass case-display-dialog (cg:dialog) ((case-name :accessor case-name :initform nil :initarg :case-name :documentation "The name of the case being viewed in this pane") (reasoner :accessor reasoner :initform nil :initarg :reasoner :documentation "The reasoner this pane is using") (active? :accessor active? :initform nil :initarg :active? :documentation "Indicates if this is the currently active modality. Only one case-display-dialog can be active at a given moment.") ) (:documentation "The dialog in which all case information is drawn with the exception of a case name. Specialize this class to display cases in different modalities. Your specialization must provide the functionality detailed below. Please refer to case-window-api.lsp for the API calls a display-dialog should call when any event occurs which the other modalities should know about (such as adding or removing entities/expressions")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Case Display Dialog API ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defgeneric display-case (casename case-dialog) (:documentation "Assigns case to the dialog - Once this is called, any refresh of the dialog should cause the correct case to be displayed on the dialog. This method should not, however try to force a refresh of the dialog since it will happen that this is called when your dialog is not visible, but the dialog window is (ie another modality is currently in the forview). Immediately after this call the proper dialog will be invalidated.")) (defgeneric add-entity (case-dialog entity) (:documentation "Adds the SME entity to the case, what you do with this is up to you. This will be called any time an entity is added in any of the modalities if they support the editing of cases")) (defgeneric remove-entity (case-dialog entity) (:documentation "Removes the SME entity from the case. If this entity has been saved to the dgroup it will simply be marked as deleted, it won't actually be removed.")) (defgeneric add-expression (case-dialog expr) (:documentation "Adds the SME expression to the case, what you do with this is up to you. This will be called any time an expression is added in any of the modalities if they support the editing of cases")) (defgeneric remove-expression (case-dialog expr) (:documentation "Removes the SME expression from the case. If this entity has been saved to the dgroup it will simply be marked as deleted, it won't actually be removed.")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Default methods ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defmethod display-case (casename (case-dialog t)) (declare (ignore casename))) (defmethod add-entity ((case-dialog t) entity) (declare (ignore entity))) (defmethod remove-entity ((case-dialog t) entity) (declare (ignore entity))) (defmethod add-expression ((case-dialog t) expr) (declare (ignore expr))) (defmethod remove-expression ((case-dialog t) expr) (declare (ignore expr))) (defmethod change-reasoner ((case-dialog case-display-dialog) new-reasoner) (setf (reasoner case-dialog) new-reasoner)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; End of Code