adjusts
parent
09297e0cad
commit
522057f692
@ -1,8 +1,8 @@
|
||||
#lang br
|
||||
(require racket/draw)
|
||||
(provide buttons)
|
||||
(provide make-jsonic-buttons)
|
||||
|
||||
(define buttons
|
||||
(define make-jsonic-buttons
|
||||
(list (let ([label "Insert expression"]
|
||||
[bitmap (make-object bitmap% 16 16)]
|
||||
[callback (λ (drr-frame)
|
@ -1,27 +1,14 @@
|
||||
#lang br/quicklang
|
||||
(module reader br
|
||||
(require "reader.rkt")
|
||||
(provide read-syntax))
|
||||
|
||||
#|
|
||||
Demonstrate:
|
||||
+ contracts
|
||||
+ unit tests
|
||||
+ color lexing
|
||||
+ indentation
|
||||
+ toolbar buttons
|
||||
+ docs
|
||||
+ info.rkt
|
||||
|#
|
||||
|
||||
|
||||
(define (get-info . _)
|
||||
(λ (key default)
|
||||
(require "reader.rkt" "colorer.rkt"
|
||||
"indenter.rkt" "buttons.rkt")
|
||||
(provide read-syntax get-info)
|
||||
(define (get-info port mod line col pos)
|
||||
(define (handle-query key default)
|
||||
(case key
|
||||
[(color-lexer)
|
||||
(dynamic-require 'br/demo/jsonic/color-lexer 'color-lexer (λ () #f))]
|
||||
[(drracket:indentation)
|
||||
(dynamic-require 'br/demo/jsonic/indenter 'indenter (λ () #f))]
|
||||
[(drracket:toolbar-buttons)
|
||||
(dynamic-require 'br/demo/jsonic/toolbar 'buttons (λ () #f))]
|
||||
[else default])))
|
||||
[(color-lexer) color-jsonic]
|
||||
[(drracket:indentation) indent-jsonic]
|
||||
[(drracket:toolbar-buttons) make-jsonic-buttons]
|
||||
[else default]))
|
||||
handle-query))
|
||||
|
||||
|
Loading…
Reference in New Issue