
I started from tabs that are not on the beginning of lines, and in several places I did further cleanings. If you're worried about knowing who wrote some code, for example, if you get to this commit in "git blame", then note that you can use the "-w" flag in many git commands to ignore whitespaces. For example, to see per-line authors, use "git blame -w <file>". Another example: to see the (*much* smaller) non-whitespace changes in this (or any other) commit, use "git log -p -w -1 <sha1>".
34 lines
1.1 KiB
Racket
34 lines
1.1 KiB
Racket
#lang racket/unit
|
|
(require mzlib/class
|
|
"drsig.rkt"
|
|
framework)
|
|
|
|
(import)
|
|
(export drracket:text^)
|
|
(define text<%>
|
|
(interface (racket:text<%>)
|
|
printing-on
|
|
printing-off
|
|
is-printing-on?))
|
|
|
|
(define text%
|
|
(class* racket:text% (text<%>)
|
|
(define printing? #f)
|
|
(define/public (is-printing-on?) printing?)
|
|
(define/public (printing-on) (set! printing? #t))
|
|
(define/public (printing-off) (set! printing? #f))
|
|
; (rename [super-on-paint on-paint])
|
|
; (inherit get-filename)
|
|
; (override
|
|
; [on-paint
|
|
; (λ (before? dc left top right bottom dx dy draw-caret)
|
|
; (super-on-paint before? dc left top right bottom dx dy draw-caret)
|
|
; (let ([str (string-append
|
|
; (mzlib:date:date->string (seconds->date (current-seconds)))
|
|
; " "
|
|
; (if (string? (get-filename))
|
|
; (get-filename)
|
|
; "Untitled"))])
|
|
; (send dc draw-text str dx dy)))])
|
|
(super-new)))
|