Using gtkmm and gtk+ in one application



   Hi!

I am a C++ programmer, thus I like gtkmm much better than gtk+ from a
programming point of view. So I use it for new gui code I write. However I'd
like to extend an existing gtk+ application that consists of lots of C/gtk+
code. My plan would be to make a plugin to the gtk+ application and use gtkmm
to implement the plugins gui.

To see if that would work, I've tried to use a gtk+ hello world, written in C.
Then I added a file written in C++, which would create a Gtk::Main object
(after gtk_init was called by the C application), and then some widgets. That
seemed to work. Both, widgets created by the C part and widgets created by the
C++ part appeared to function.

So... is it possible to extend gtk+/C applications with gtkmm code, or are
there any problems that I should be aware of when mixing both?

   Cu... Stefan
-- 
Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]