Skip to content

Commit

Permalink
canvas (trace): support opts="clip=x,y-x,y", "clip=x,y+w,h"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Mar 1, 2021
1 parent 4bdfdbf commit 61ce90c
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 84 deletions.
4 changes: 3 additions & 1 deletion memo/ChangeLog.md
Expand Up @@ -61,7 +61,7 @@
- decode (rlfunc): work around incomplete bytes in keyseq (reported by onelittlehope) `#D1483` 3559658 beb0383 37363be
- main: fix a bug that unset `IFS` is not correctly restored `#D1489` 808f6f7
- edit: fix error messages on accessing undo records in emacs mode (reported by rux616) `#D1497` 61a57c0 e9be69e
- canvas: fix a glitch that SGR at the end of command line is applied to new lines `#D1498` 0000000
- canvas: fix a glitch that SGR at the end of command line is applied to new lines `#D1498` 4bdfdbf

## Compatibility

Expand All @@ -85,6 +85,8 @@
- decode: move `{keymap/*. => lib/core-decode.*-}rlfunc.txt` and clean up files `#D1486` f7323b4
- Makefile: fix up f7323b4: restore rule for `keymap/*.txt` `#D1496` 054e5c1
- util, etc: ensure each function to work with arbitrary `IFS` `#D1490` `#D1491` 5f9adfe
- tui, canvas (`ble/canvas/trace`): support `opts=clip` `#D1493` 0000000


<!---------------------------------------------------------------------------->
# ble-0.4.0-devel2
Expand Down
38 changes: 34 additions & 4 deletions note.txt
Expand Up @@ -1353,7 +1353,7 @@ bash_tips

2020-11-30

* color: face editor の TUI の様な物を作っても良いのかもしれない
* tui: face editor の TUI の様な物を作っても良いのかもしれない [#T0007]
というより fish の Web interface の様な物を TUI で提供しても良いのでは。

作るとしたら先ずは Color Picker?
Expand Down Expand Up @@ -1389,6 +1389,29 @@ bash_tips

これに関しては内部 buffer の表現方法に工夫が必要になる。

取り敢えず何も考えず少し実装してみた。clip に関しては redraw の側で適当に処
理する事にした。また、trace に於いても clip 機能を実装した (#D1493)

invalidate 範囲を記録できる様にしたい。

更に、要素のサイズが変更された時、移動した時には親の該当範囲も一緒に
invalidate する必要がある。


自身の内容が変化した時、自身に被っている別の要素も一緒に更新する必要が出て
くる事に注意する。

a 上に物が被っていない時には clip 領域を勝手に広げて描画しても良いのではな
いか。描画範囲を広げても良いかどうかについては render.draw の呼び出し元か
ら指定できる様にすると良いのかもしれない。

c 或いは、そもそも被らない様にするか、被っている時には更新しない様にすると
いう手もある。

d 或いは、render.draw の呼び出し元で一旦シーケンスを取り出して、その上でそ
れを再度 trace によって clip するという手もあるかもしれない。然し、これは
描画内容が大量にある場合にとても遅いので実は避けたい。

2020-11-20

* bash: declare -c や ${var~} 等は 5.2 で削除するとしているが本当だろうか
Expand Down Expand Up @@ -2501,7 +2524,7 @@ bash_tips
何れにしても theme というのは紛らわしいかもしれない。
注意書きを書いておく必要があるかもしれない。

* TUI 設定画面?
* tui: TUI 設定画面?
fish はユーザフレンドリーを謳っている。
ブラウザで設定できるなど (リモートの場合には使えない気がするが)。
ble.sh ではブラウザでなくても TUI で設定画面を用意しても良いのかもしれない。
Expand Down Expand Up @@ -3429,7 +3452,7 @@ bash_tips

2016-06-22

* prompt-toolkit という物がある様だ。ちょっと観察してみるのも良い。
* tui: prompt-toolkit という物がある様だ。ちょっと観察してみるのも良い。

基本的には補完候補を勝手に出すという事と、
表示の仕方が emacs auto-complete と同様に
Expand All @@ -3450,7 +3473,7 @@ bash_tips
bash で実現する事ができる。今まで余り考えたくないとして避けていたことだが、
この方法ならば楽である。

* GUI Window System を整える? Window を出したり消したりだとかそういう事。
* tui: GUI Window System を整える? Window を出したり消したりだとかそういう事。

2016-04-05

Expand Down Expand Up @@ -3973,6 +3996,13 @@ bash_tips

取り敢えず現在は c の方針で回避する事にする。

* 2021-02-06 tui: trace に clip 機能を実装する [#D1493]
Ref #T0007

Note: これは元々 tui 計画の一部として実装した物だったが prompt_status_line
や prompt_rps1 の為の align 実装に使う為に、trace を大幅に拡張したいという
事で、独立な commit として適用する事にした。

2021-02-22

* prompt: status line が最初の起動時に表示されていない [#D1492]
Expand Down

0 comments on commit 61ce90c

Please sign in to comment.