;;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10 -*- ;;;; --------------------------------------------------------------------------- ;;;; File name: display-registration.lsp ;;;; System: ;;;; Author: Shawn Nicholson ;;;; Created: July 5, 2002 13:01:02 ;;;; Purpose: Allows systems to add a new view type to the manager ;;;; ;;;; --------------------------------------------------------------------------- ;;;; Modified: Friday, July 26, 2002 at 14:04:42 by nicholson ;;;; --------------------------------------------------------------------------- (in-package :fire-case-viewer) (defparameter *registered-case-display-panes* nil) ;;; ;;; Display panes are defined in their own package in whatever system decides they ;;; want to provide another method for interacting with a case. ;;; ;;; In order to let the case-viewer know about these display panes, the system ;;; defining the new display pane must register with the case-viewer system. ;;; ;;; RULES: ;;; 1) A display pane must subclass off of the class: case-display-dialog ;;; And provide a small set of required methods specialized on their subclass ;;; (See: case-display-dialog.lsp for more information on these required methods) ;;; ;;; 2) The system defining a display pane must call the following procedure and ;;; provide the appropriate information ;;; ;;; (register-case-display-pane name display-pane-class &optional pane-constructor-function) ;;; ;;; name = the name of the case display pane - should be a :name type of parameter ;;; display-plane-class = your class of display dialog (Subclassed off case-display-dialog) ;;; pane-constructor-function = if provided this method will be called instead of ;;; cg:make-window - note it must support any and all window keyword argument pairs ;;; ;;; 3) If your system is defining a new case display pane it is your responsibility ;;; to load the code defining it (after loading the case-viewer system) ;;; ;;; (defclass case-display-pane-registration () ((name :accessor name :initform nil :initarg :name) (pane-class :accessor pane-class :initform nil :initarg :pane-class) (constructor-func :accessor constructor-func :initform nil :initarg :constructor-func) )) (defun register-case-display-pane (name display-pane-class &optional (pane-constructor-function nil)) (pushnew (make-instance 'case-display-pane-registration :name name :pane-class display-pane-class :constructor-func pane-constructor-function) *registered-case-display-panes* :test #'(lambda (reg1 reg2) (equal (name reg1) (name reg2))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; End of Code