;;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10 -*- ;;;; --------------------------------------------------------------------------- ;;;; File name: tab-completable-text-edit.lsp ;;;; System: ;;;; Author: Shawn Nicholson ;;;; Created: July 11, 2002 17:43:54 ;;;; Purpose: ;;;; --------------------------------------------------------------------------- ;;;; Modified: Thursday, July 11, 2002 at 17:52:41 by nicholson ;;;; --------------------------------------------------------------------------- (in-package :fire-case-viewer) (defclass tab-completable-text-edit (cg:comtab-mixin cg:editable-text) ()) (defgeneric tab-complete (window) (:documentation "Performs tab-completion on the contents of the window")) (defmethod tab-complete (window) (format t "Tab completing~%")) (defmethod make-instance ((class-name (eql 'tab-completable-text-edit)) &rest initargs) (let ((control (call-next-method)) (my-comtab (make-instance 'cg:comtab :name :my-comtab :inherit-from nil))) (cg:set-event-function my-comtab cg:vk-f8 #'(lambda (window) (tab-complete window))) (setf (cg:comtab control) my-comtab) control)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; End of Code