.
original commit: 0e2a1e38916935ef053931d1e818dd5884967e40
This commit is contained in:
parent
af016863c7
commit
accfdc0b84
|
@ -1327,13 +1327,17 @@
|
|||
"@flink editor:get-standard-style-list %"
|
||||
".")
|
||||
|
||||
(editor:update-standard-style
|
||||
(-> (-> (is-a?/c style-delta%) void?) void?)
|
||||
(change-delta)
|
||||
"Calls \\var{change-delta} with the \"Standard\" style delta from"
|
||||
"the result of"
|
||||
"@flink editor:get-standard-style-list %"
|
||||
(editor:set-default-font-color
|
||||
(-> (is-a?/c color%) void?)
|
||||
(color)
|
||||
"Sets the color of the style named"
|
||||
"@flink editor:get-default-color-style-name %"
|
||||
".")
|
||||
(editor:get-default-color-style-name
|
||||
(-> string?)
|
||||
"The name of the style (in the list returned by "
|
||||
"@flink editor:get-standard-style-list %"
|
||||
") that holds the default color.")
|
||||
(editor:set-standard-style-list-delta
|
||||
(string? (is-a?/c style-delta%) . -> . void?)
|
||||
(name delta)
|
||||
|
|
|
@ -210,8 +210,8 @@
|
|||
vp
|
||||
'framework:paren-match-color)
|
||||
(build-text-foreground-selection-panel vp
|
||||
'framework:default-text-color
|
||||
"Standard"
|
||||
'framework:default-text-color
|
||||
(editor:get-default-color-style-name)
|
||||
(string-constant default-text-color))))))
|
||||
|
||||
(define (build-text-foreground-selection-panel parent pref-sym style-name example-text)
|
||||
|
|
|
@ -46,7 +46,9 @@
|
|||
backward-containing-sexp
|
||||
forward-match
|
||||
insert-close-paren
|
||||
classify-position))
|
||||
classify-position
|
||||
|
||||
get-colorer-blank-style))
|
||||
|
||||
(define text-mixin
|
||||
(mixin (text:basic<%>) (-text<%>)
|
||||
|
@ -134,7 +136,8 @@
|
|||
|
||||
(inherit change-style begin-edit-sequence end-edit-sequence highlight-range
|
||||
get-style-list in-edit-sequence? get-start-position get-end-position
|
||||
local-edit-sequence? get-styles-fixed has-focus?)
|
||||
local-edit-sequence? get-styles-fixed has-focus?
|
||||
get-fixed-style)
|
||||
|
||||
(define/private (reset-tokens)
|
||||
(send tokens reset-tree)
|
||||
|
@ -187,12 +190,12 @@
|
|||
(when (and should-color? (should-color-type? type) (not frozen?))
|
||||
(set! colors
|
||||
(cons
|
||||
(let ((color (send (get-style-list) find-named-style
|
||||
(token-sym->style type)))
|
||||
(sp (+ in-start-pos (sub1 new-token-start)))
|
||||
(ep (+ in-start-pos (sub1 new-token-end))))
|
||||
(let* ([style-name (token-sym->style type)]
|
||||
(color (send (get-style-list) find-named-style style-name))
|
||||
(sp (+ in-start-pos (sub1 new-token-start)))
|
||||
(ep (+ in-start-pos (sub1 new-token-end))))
|
||||
(lambda ()
|
||||
(change-style color sp ep #f)))
|
||||
(change-style color sp ep #f)))
|
||||
colors)))
|
||||
(insert-last! tokens (new token-tree% (length len) (data type)))
|
||||
(send parens add-token data len)
|
||||
|
@ -323,8 +326,7 @@
|
|||
(set! stopped? #t)
|
||||
(when (and clear-colors (not frozen?))
|
||||
(begin-edit-sequence #f #f)
|
||||
(change-style (send (get-style-list) find-named-style "Standard")
|
||||
start-pos end-pos #f)
|
||||
(change-style (get-fixed-style) start-pos end-pos #f)
|
||||
(end-edit-sequence))
|
||||
(match-parens #t)
|
||||
(reset-tokens)
|
||||
|
@ -332,6 +334,8 @@
|
|||
(set! token-sym->style #f)
|
||||
(set! get-token #f)))
|
||||
|
||||
(define/public (get-colorer-blank-style) (send (get-style-list) find-named-style "Standard"))
|
||||
|
||||
(define/public (is-frozen?) frozen?)
|
||||
|
||||
;; See docs
|
||||
|
@ -385,8 +389,7 @@
|
|||
((and should-color? (not on?))
|
||||
(set! should-color? on?)
|
||||
(begin-edit-sequence #f #f)
|
||||
(change-style (send (get-style-list) find-named-style "Standard")
|
||||
start-pos end-pos #f)
|
||||
(change-style (get-fixed-style) start-pos end-pos #f)
|
||||
(end-edit-sequence))))
|
||||
|
||||
;; see docs
|
||||
|
|
Loading…
Reference in New Issue
Block a user