开发者

what architecture for implementing a richtext editor?

开发者 https://www.devze.com 2022-12-28 18:48 出处:网络
Can someone give me some hints on how a clean implementation (designwise) of a richtext editor could look like that allows for things like setting fonts, setting character colors and so on? And when a

Can someone give me some hints on how a clean implementation (designwise) of a richtext editor could look like that allows for things like setting fonts, setting character colors and so on? And when and how are characters rendered? are characters rendered only once and the bitmap representation is cached?

Is there any article or book covering what software desi开发者_如何学编程gn would be appropriate for that?

background is that we're working on a text editing software for a language that cannot be displayed with unicode

any hint is appreciated!

thanks!


I'd have a look at the Java Swing source code (e.g. Java source code), the Qt source code and the Gtk source code. All those frameworks have rich text editors, and the implementations are there to be admired :)


Definitely check out the GoF Design Patterns book, which is a catalog of design patterns, but those are shown on example of a rich text editor. The design is language agnostic, but the examples are in C++. This will teach you some good design, you would have read a classic pattern book and you will get your richtext editor example.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号