Colin's Blog

Recent content on Colin's Blog

马上订阅 Colin's Blog RSS 更新: https://blog.oyyko.com/index.xml

Texmacs/Mogan Note 2

finalwind42@gmail.com (Oyyko)
2023年7月13日 08:00

23_15

1(get-init-tree "text-at-halign")

这个与缓存有关。缓存位置在~/.Texmacs/。如果不更改缓存,更改源代码不会生效。

23_7

 1(tm-define (graphics-release-left x y) 2  ;;(display* "Graphics] Release-left " x ", " y "\n") 3  (if (inside-graphical-text?) 4      (with-innermost t graphical-text-context? 5        (let* ((ps (select-first (s2f x) (s2f y))) 6               (p (and ps (car ps)))) 7          (if (and p (list-starts? p (tree->path t))) 8              (go-to p) 9              (tree-go-to t :start))))10      (edit_left-button (car (graphics-mode)) x y)))
1(tm-define (get-keyboard-modifiers)2  the-keyboard-modifiers)34(tm-define (set-keyboard-modifiers mods)5  (set! the-keyboard-modifiers mods))

结论:https://github.com/XmacsLabs/mogan/pull/796

问题

  1. .ts文件怎么使用
  2. C++代码中有很多字符串类型的东西可以用枚举类型来替代,可以重构一下?
  3. 绘图模式有没有给座标系标注1、2、3的模式

编译时候出现问题

1generating scheme glueA glue_font ... ok2generating scheme glueA glue_analyze ... ok3generating scheme glueA glue_drd ... ok4installing libmogan ..5error: install failed, method 'trim' is not callable (a nil value)

看起来是lua语言中的trim方法无法调用。结论:有一个环境变量字符串被设置为nil,之后在他的上面调用trim方法则报错。

23_14

edit_interface_rep::handle_mouse 处理鼠标事件。

1edit_interface_rep::handle_mouse (string kind, SI x, SI y, int m, time_t t,2                                  array<double> data)

kind的类型可以有move, press-left, release-left, press-right 等。

 1else { 2    string rew= kind; 3    SI dist= (SI) (5 * PIXEL / magf);...

剩余内容已隐藏

查看完整文章以阅读更多