I am choosing a GUI toolkit for C++ to learn. I have done some searching online and most people suggest GTKmm for C++ over GTK+. Despite that fact, I have seen some C++ applications made using GTK+.
Therefore, I just want to know the specific reasons for this:
1. Why GTKmm is preferred for C++?
2. What are the limitations I will face if I use GTK+ for C++ applications instead of GTKmm?
Language BindingsGTK is written in C but has been designed to support a wide range of languages such as Python, JavaScript, C++, Rust and many more.
GTK is entirely written in C and the GTK+ software that we commonly use in Linux are also written in C. The desktop managers, such as GENOME and XFCE, also are built using GTK.
Many high quality GUI were written in C with, for example, Windows API. There's no particular reason why not, but object oriented programming was very successful in modeling interactive graphics. GUI elements somehow map naturally into C++ objects that can encapsulate complex behavior behind a simple interface.
gtk_button_set_text(GTK_BUTTON(button), "sometext");
gtkmm C++ code is shorter and clearer. For instance: button.set_text("sometext");
Source: http://live.gnome.org/gtkmm/FAQ
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With