gtkmm

Gtkmm is the C interface for the free component library GTK . The name stands for gtk gtkmm - ( gtk minus minus), the original name of the project.

The gtkmm library is under the free license LGPL and is therefore a free solution for graphic closed-source applications available for Linux and Unix.

Changes from GTK

The library encapsulates including the GObject system in a functionally equivalent C class hierarchy. In the C version of GLib, glibmm, functions and structures are largely replaced by equivalents from the C standard library.

Realized Typesafe callback functions (signal - slot concept ) gtkmm about the library libsigc .

Programming Example

The following example creates a window with a label field (label) and a button (Button). The latter is connected using the libsigc with the quit function, so that the program is terminated at a click of the button. The two widgets are then housed in a Gtk typical container, a vertical box. This box is finally displayed in the window.

# include using namespace Gtk;   int main (int argc, char * argv [ ]) {      Main kit ( argc, argv );        Window window;      window.set_title ("Example ");      window.set_border_width (15);        Label hello ( "Hello World! ");      Button quit_button ( Stock :: QUIT);     . quit_button.signal_clicked connect () ( sigc :: ptr_fun ( & Gtk :: Main :: quit) );        VBox box (false, 15);      box.add ( hello );      box.add ( quit_button );        window.add (box);      window.show_all ();      Main :: run (window );      return 0; } User interfaces can be created with gtkmm either explicitly programmed, or, as already Gtk surfaces, with the help of the Glade program.

Use

In gtkmm programs written to run on all platforms on which also Gtk runs (including Mac OS X and Microsoft Windows ), the Toolkit is not primarily intended for cross-platform development, but in the area of ​​Unix derivatives (such as Linux) is located.

One popular application that uses gtkmm, Inkscape is.

Alternatives

The functionality of the gtkmm library is comparable to that of the more famous library Qt in about. Unlike Qt, however, it does not contain features that go beyond the GUI programming.

Comparable written in C graphics libraries are also, with similar functionality, wxWidgets. FLTK is much smaller in scope.

284044
de