We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
我建议先学习 C API。
GTKmm 做了很多方便的魔法,很高兴拥有,但它也隐藏了一些您应该理解的细节。许多新手问题都来自内存管理、浮动和引用计数以及对象的销毁。
这本书非常适合初学者
I would recommend to learn the C API first.
GTKmm does a lot of convenience magic that is nice to have but it also hides some details that you should understand. A lot of newbie problems are from memory management, floating and reference counting and destruction of objects.
This book is very good for beginners
如果您专注于 C++,我会坚持使用 GTKmm,暂时不关心 GTK+ C API。它足够不同,并且可能会让您感到困惑,特别是如果您没有很强的 C 语言背景。
不幸的是,GTKmm 的第 3 方文档有点缺乏。我认为他们的教程书是一流的。我会剪切/粘贴,然后编译他们的示例程序。检查源代码是学习它的最好方法。以第 4 章(按钮)为例,查看示例程序 这里。
请小心遵循适合您的 GTK 版本的正确教程(GTK2.4 与 GTK2.4) GTK3.0)。 GTK3(和 GTKmm 3)刚刚发布。
If you are focused on C++, I would stick with GTKmm and not bother with GTK+ C API for now. It's different enough and will probably just confuse you, especially if you do not have a strong C background.
Unfortunately, the 3rd-party documentation of GTKmm is a little lacking. Their tutorial book though I think is top-notch. I would cut/paste, then compile their sample programs. Examining the source is the best way to learn it. For example with Chapter 4 (Buttons), look at the example program here.
Be careful to follow the right tutorial for your version of GTK (GTK2.4 vs. GTK3.0). GTK3 (and GTKmm 3) was just released.