如何更改 Squeak 或 Pharo 中的文本光标?
我想配置一个不闪烁的盒装文本光标,在 Squeak 或 Pharo 中可以吗?
I would like to configure a boxed text cursor without blinking, it is possible in Squeak or Pharo?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,光标的形状可以改变。我以前做过这个。
渲染光标的代码位于
NewParagraph>>displaySelectionInLine: line on: aCanvas
(参见下面的代码 SelectionStart = SelectionStop ifTrue: [... )
Yes, the shape of cursor could be changed. I did this before.
The code to render a cursor is located in
NewParagraph>>displaySelectionInLine: line on: aCanvas
(see the code below selectionStart = selectionStop ifTrue: [... )
Pharo 1.2 及更高版本:“设置浏览器 > 代码浏览器 > 编辑”具有与光标相关的各种首选项:“闪烁文本光标”、“哑铃形文本光标”和“沿着显示线行走”。
此外,您可以通过评估“NewParagraph insertPointColor:红色”来更改光标的颜色,不知道为什么没有设置。
Pharo 1.2 and later: "Settings Browser > Code Browser > Editing" has various preferences related to the cursor: "Blinking text cursor", "Dumbbell-shaped text cursor", and "Walk along displayed line".
Additionally you can change the color of the cursor by evaluating "NewParagraph insertionPointColor: Color red", not sure why there is no setting.
我相信你可以(因为前段时间它没有眨眼),但我不知道怎么哈哈哈。检查#onBlinkCursor 方法以及 TextMorph 类中 bliking 类别中的所有方法。
另外请参阅:http://code.google.com/p/pharo /问题/详细信息?id=1039
I am sure you can (becasue some time ago it was without bliking), but I have no idea how hahaha. Check the methods #onBlinkCursor and all those in the category bliking in the class TextMorph.
In adddition see: http://code.google.com/p/pharo/issues/detail?id=1039