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