;;;;
;;;; F r a m e . s t k 	  --  Frame class definition
;;;;
;;;; Copyright (C) 1993,1994,1995 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;; 
;;;; Permission to use, copy, and/or distribute this software and its
;;;; documentation for any purpose and without fee is hereby granted, provided
;;;; that both the above copyright notice and this permission notice appear in
;;;; all copies and derived works.  Fees for distribution or use of this
;;;; software or derived works may only be charged with express written
;;;; permission of the copyright holder.  
;;;; This software is provided ``as is'' without express or implied warranty.
;;;;
;;;;           Author: Erick Gallesio [eg@kaolin.unice.fr]
;;;;    Creation date: 30-Mar-1993 15:39
;;;; Last file update: 27-May-1995 00:13

(require "Basics")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; <Frame> class
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define-class <Frame> (<Tk-simple-widget> <Tk-sizeable>)
  ((geometry :accessor 	   geometry 
	     :init-keyword :geometry 
	     :allocation   :tk-virtual)
   ;; Fictive slot
   (class    :allocation    :virtual
	     :init-keyword  :class
	     :slot-ref      (lambda (o)
			      (symbol->string (Tk:winfo 'class (slot-ref o'Id))))
	     :slot-set!     (lambda (o v)
			      (error "Class of a frame cannot be changed")))))

(define-method tk-constructor ((self <Frame>))
  Tk:frame)


;;;; Hack the tk-valid-option slot so that user could think that class 
;;;; is a tk-pseudo slot
(slot-set! <Frame> 'tk-valid-options 
	   	   `(#(:class  :class class)
		     ,@(slot-ref <Frame> 'tk-valid-options)))

(provide "Frame")
