寻找一个支持ANSI转义码的UserControl [英] Looking for a UserControl which supports ANSI escape codes

查看:93
本文介绍了寻找一个支持ANSI转义码的UserControl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望处理具有ANSI转义码的传入telnet文本.为了获得奖励,我正在寻找一个完整的实现,可以将文本追加到缓冲区的末尾.该控件应该是可滚动的,但在用户滚动到视图之外时仍能够处理附加文本,光标定位等.

I am looking to handle incoming telnet text that has ANSI escape codes. For the bounty I am looking for a full implementation where I can just append text to the end of a buffer. The control should be scrollable, yet still be able to handle appending text, cursor positioning, etc.. while the user is scrolled out of view.

例如

"\e[0;32mHello \e[0;37mWorld"

将显示绿色的"Hello"和白色的"World"

Would display a green "Hello" and a white "World"

因为这将需要处理光标定位,所以设置每行默认80个字符(80列)会很好,但是还需要处理其他列大小.能够更改字体也很好.

As this would need to handle cursor positioning, setting a default 80 characters per row (80 columns) would be fine, but also needs to handle other column sizes. Would be nice to be able to change the font as well.

有关更多信息,请参见 Wikipedia ANSI转义代码.

See Wikipedia ANSI Escape Codes for more information.

推荐答案

看看 Dart的Vt. NET控制(假设VTxxx仿真与ansi仿真足够接近).

Take a look at Dart's Vt.NET control (assuming that a VTxxx emulation is close enough to an ansi emulation).

这篇关于寻找一个支持ANSI转义码的UserControl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆