GTK-- Homepage
Gtk--
Gtk-- is a C++ interface for popular GUI library gtk+. Gtk-- provides
convenient interface for C++ programmers to create graphical user
interfaces with Gtk's flexible OO framework. Highlights include
type safe callbacks, widgets extensible using inheritance and over 60
classes that can be freely combined to quickly create complex user
interfaces. Gtk-- is free software distributed under GNU Library
General Public License(LGPL).
Now, where can I get latest version of Gtk--?
Current Gtk-- version: 0.9.14
Gtk version(s) known to work with current Gtk--: 1.0.0 .. 1.0.4
(some 1.1.* Gtk's might also work, but no guarantees as it is moving target)
Gtk version(s) known to NOT work with Gtk--: <1.0.0
What did change in Gtk-- from last release?
See Release notes
What tools are required to compile gtk--
- gtk+
- GNU m4 (especially solaris m4 does not work :)
- GNU make
The package requires gtk+, where can I find it?
Where's all the documentation for Gtk--?
- A hello world in Gtk--: hello.cc
- A FAQ
- A Gtk-- tutorial (coming soon)
- A Gtk-- reference
- A tar package of the reference. (you can generate this with "cd docgen; make docs" from the distribution).
- screenshots
- A tutorial of signal framework used in Gtk--.
- A document about available signals and connect() function signatures.
- A tiny document about how C's function and class names map to C++'s naming convention used in Gtk--.
- An article about design of the new signal system. (not tutorial for use ; it doesnt have everything exactly like Gtk-- has, but read if you want to modify Gtk-- or for deep
understanding of Gtk--'s signals)
- A porting.txt file describes how to port a Qt/KDE application to use Gtk--.
- Check www.gtk.org for further documentation.
- See range.gen_h example of how to create C++ wrapper for your C widget.
- See news items to see what magazines think of Gtk--.
- examples of how to build custom widgets, how to use and document them. (this is from Christof Petig)
- simple drawing tool -example by Taeho Oh.
What other very useful Gtk-- widgets are available?
(if you've done some cool widget with Gtk--, let me know)
Where do I send bug reports or patches?
There is mailing list for gtk-- development at gtkmm@modeemi.cs.tut.fi. To
subscribe, send 'subscribe gtkmm' in message body to
majordomo@modeemi.cs.tut.fi. (you need to be subscribed to send messages to it)
You can also mail bug reports or patches to terop@assari.cc.tut.fi
General discussion should be directed to gtk-list -mailinglist.
Should I send a bug report?
Always send a bug report:
- If you get sigsegv and you think it might be problem with gtk--.
- If you cannot compile gtk--.
- If you have a good idea of how to make gtk-- better.
Never send a bug report:
- If release notes or this web page mentiones the bug. (a patch would be neat though)
Always include necessary information to reproduce the bug and possible
stack dumps on sigsegv's. (gdb ./proggy ; run ; *crash* ; where)
What services does Gtk-- provide?
- Type safe signal system for callbacks
- OO for C widgets in native C++
- Support for user defined C++ widgets
- C++ interface for all widgets available in latest stable gtk release(1.0.*)
- C++ interface for gnome widgets
- C++ interface for gtk1.1 widgets.
Things to improve before Gtk--1.0
- Gtk-- requires gnu make to compile correctly
- Documentation
- gnome widget support to gensig (fixed on 0.9.10)
- The following interfaces are not perfect:
- menufactory interface(fixed on 0.9.7)
- container interface(fixed on 0.9.9..0.9.10)
- list interface (still has minor problems on 0.9.11)
- toolbar interface(fixed on 0.9.9)
- combo interface (set_popdown_strings is the main problem)
- timeout and idle interface in Gtk_Main. (fixed on 0.9.9)
- gtk_signal_emit bug (we should not call it)
- makefile magic to create rpm's and dep's
- gtkmm-config utility and AM_PATH_GTKMM for automake(0.9.12)
- example project that uses automake independently of Gtk--.
- inputdialog does not work because of constructor requires that
some gtk objects are available and they become only available afterwards.
- Gtk-- objects can be made smaller by moving some data about signals to
static data instead of keeping them in objects. (maybe can do that
only when we can move to >2.8.0 gcc.)
What would be neat, but not necessary for 1.0
- gdk C++ interface
- gnome widgets C++ interface
- container-add() methods to have versions which move ownership to the
container.
Some smaller problems with Gtk--
- See examples/testme.cc, it shows the problem, the return value of delete_event signal is not returned correctly, as when you close the file selection dialog, it should NOT delete the C object, but it does that -- next time opening the fileselection dialog will show black window instead of file selection dialog... Also happens with dialogs..
- deleting widgets without first hiding them causes odd behavior. We should somehow handle it automatically. (adding hide() to destructor will not work, it needs to be before destructor..)
Which people have been developing Gtk--?
Elliot Lee <sopwith@redhat.com>
Tero Pulkkinen <terop@assari.cc.tut.fi>
Guillaume Laurent <glaurent@worldnet.fr>
Phil Dawes, Stephan Kulow, Erik Andersen,
Bibek Sahu, Chris Cannam, Karl Nelson, Mirko Streckenbach
Marcus Brinkmann is maintaining debian package of Gtk--.
There has been many patches, bug fixes and improvements got from
a lot of people, thanks to them.
CVS
You can get current cvs version from the anonymous cvs:
export CVSROOT=:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome
mkdir foo
cd foo
cvs login (press return on password)
cvs -z3 co gtk--
The cvs tree is also available at jimpick.com. (Snapshots can be downloaded here)
Other resources