如何创建一个简单的 GUI 库?
我需要创建一个仅基于原始帧缓冲区的简单 GUI 工具包。
有没有例子或论文描述这样的事情?
显然我可以实现 X,但我认为这有点超出了范围:)
I need to create a simple gui toolkit based on only a raw framebuffer.
Are there any examples or papers describing such a thing?
Obviously I could implement X but I think that's a little beyond the scope :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是针对 Linux 帧缓冲区的吗? SDL 是一个值得一看的图形库。它是一个成熟的开源项目,这使得它成为一个很好的学习和借鉴的项目。文档也非常好。与许多 GUI 工具包一样,它具有大量 API 集,但您不必使用所有这些 API,而可以专注于您感兴趣的内容。开发 GUI 工具包可能是一项复杂的任务。
Is this for a Linux framebuffer? SDL is a graphics library worth looking at. It is a mature open source project, which makes it a good project to study and learn from. The documentation is also pretty good. Like many GUI toolkits it has a large API set, but you don't have to use all of it and can focus on just what you are interested. Developing a GUI toolkit can be a complex task.
最好的例子是其他 GUI 库。
看看X、GTK、微软的WPF 和WinForms。
此外,您可能还想了解其他 UI 技术,例如 HTML 和 CSS。
在更简单的方面,有像 Curses 和 Mono 的 gui.cs 之类的东西。
弄清楚事情是如何完成的,以及如何做得更好,并创建一个设计。然后扔掉并创建一个新设计,因为创建一个好的设计需要迭代。
The best examples would be other GUI libraries out there.
Take a look at X, GTK, Microsoft's WPF and WinForms.
Also, you might want to look at other UI technologies, like HTML and CSS.
On the more minimal side, there's things like Curses and Mono's gui.cs.
Figure out how things are done, and how they could do better, and create a design. Then throw it away and create a new design, because creating a good design requires iteration.