stk/STklos/Tk/Composite/Schemetext.stklos

56 lines
1.7 KiB
Plaintext
Raw Normal View History

1998-09-30 07:11:02 -04:00
;;;;
;;;; S c h e m e - t e x t . s t k l o s -- A mini font-lock package
;;;;
;;;; Copyright <20> 1997-1998 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.
;;;;
1999-02-02 06:13:40 -05:00
;;;; $Id: Schemetext.stklos 1.2 Mon, 28 Dec 1998 23:05:11 +0100 eg $
1998-09-30 07:11:02 -04:00
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 16-Jan-1997 12:10
1999-02-02 06:13:40 -05:00
;;;; Last file update: 27-Dec-1998 12:07
1998-09-30 07:11:02 -04:00
(require "Tk-classes")
1999-02-02 06:13:40 -05:00
(require "font-lock")
1998-09-30 07:11:02 -04:00
(select-module STklos+Tk)
1999-02-02 06:13:40 -05:00
;;;;
;;;; Resources
;;;;
1998-09-30 07:11:02 -04:00
1999-02-02 06:13:40 -05:00
(option 'add "*SchemeText*Text*Background" "white" "widgetDefault")
1998-09-30 07:11:02 -04:00
;=============================================================================
;
; < S c h e m e - T e x t >
;
;=============================================================================
1999-02-02 06:13:40 -05:00
(option 'add "*SchemeText*Text*Background" "white" "widgetDefault")
1998-09-30 07:11:02 -04:00
(define-class <Scheme-Text> (<Scroll-Text>)
1999-02-02 06:13:40 -05:00
((class :init-keyword :class
:init-form "SchemeText")))
1998-09-30 07:11:02 -04:00
(define-method initialize ((self <Scheme-text>) initargs)
(next-method)
1999-02-02 06:13:40 -05:00
(make-fontifiable (Id self))
(fontify-whole-buffer (Id self)))
1998-09-30 07:11:02 -04:00
#|
Usage:
(define t (make <Scheme-Text>
:value "(define A (make <B> :key \"aa\")); comment"))
(pack t :fill "both" :expand #t)
1999-02-02 06:13:40 -05:00
1998-09-30 07:11:02 -04:00
|#
1999-02-02 06:13:40 -05:00