File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
namespace eval ::codeView {
2
2
# TODO: also don't hardcode this? Or make it in meters once that's simple
3
3
variable marginInPx 10
4
+ variable defaults { widthScale 1 heightScale 1 textScale 0.6 }
4
5
5
6
proc getEmAndAdvance {textScale} {
6
7
set em [expr {$textScale * 25}]
@@ -32,10 +33,13 @@ namespace eval ::codeView {
32
33
}
33
34
}
34
35
36
+ When /someone/ claims /view/ is a code view {
37
+ Claim $view is a code view with {*}$codeView::defaults
38
+ }
39
+
35
40
# initial setup
36
41
When /view/ is a code view with /...options/ {
37
- set defaults { widthScale 1 heightScale 1 textScale 0.6 }
38
- set options [dict merge $defaults $options]
42
+ set options [dict merge $codeView::defaults $options]
39
43
40
44
# select which program the view is viewing
41
45
When $view points up at /program/ {
You can’t perform that action at this time.
0 commit comments