
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: 1.0.1
Gtk version(s) known to work with current Gtk--: gtk+ 1.1.16, gtk+ from cvs.
Gtk version(s) known to NOT work with Gtk--: <1.0.5
FEATURE FREEZE! Gtk-- has been feature freezed beginning at Dec.15.
No new features are allowed before we split cvs tree to stable and
unstable branch. (there's still many bugs that needs to be fixed
before 1.0 release :)
FEATURE FREEZE was broken 26 Jan 1999, because of too important
change that must go to gtk--1.0 and it did not seem to break
too many things. The freeze continues immediately after the
large breakage has been fixed. Karl Nelson made really nice patch
which makes gtk-- look like a nice library, instead of piece of generated
messy code. Library size also decreased by 15% and there's still chances
to get 10% more later.
What changed in Gtk-- from the last release?
See Release notes.
You'll also find information about known bugs, workarounds and kludges
from release notes. It's very useful to read release notes before
trying source installation of newest Gtk--.
What tools are required to compile gtk--
- gtk+
- GNU m4 (get)
- 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--.
- instructions of how to use gtk--'s signal system without 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--.
- simple drawing tool -example by Taeho Oh.
- Examples of uses of different gtk-- widgets.
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.
How do I create a patch
Easiest way is to first take the code from cvs and modify that version. After
modifications work and compile fine, do the following:
cvs diff -u > my_fix.patch
This creates unified diff that can be easily applied to the source tree.
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
- C++ interface for low level drawing
- C++ interface for gdk
What does gtk--'s design try to archieve?
(in addition to what gtk+ provides)
- Avoiding unnecessary dependencies between user code and gtk--.
This is why we dont have our own string class or container classes,
but we try to encourage use of standard string and container classes,
while not forcing their use. Advantages of this is more reusable code
that does not rely on gtk--. The signal system is also one tool to
avoid unnecessary dependencies between gtk-- and user code. (see Dependency Inversion
Principle)
- Compile time type safety
We try to keep all our interfaces compile time typesafe. Internals of
gtk-- should be typesafe where possible to make maintaining it
easier. This is recommended for applications using gtk-- too. This
will sometimes make using gtk-- harder, but we believe it is worth the
effort.
- Simpler abstractions
We try to make all interfaces simpler and easier to use and extend. If
someone comes with better method of doing something, it'll probably be
used, instead of using inferior solution.
- Separation of user interface and functionality
We recommend that you use designs like
Model-View-Controller, Abstract
partners, bridge patterns, abstract baseclasses or something else
to avoid dependencies to gtk-- on your applications. Including gtk--
header files to your module causes it to depend on gtk--. This can
make your module less reusable.
Things to improve before Gtk--1.0
- Gtk-- requires gnu make to compile correctly
- Documentation
- The following 1.1 signals/methods are missing (listed here are
only those which implementation is not straightforward) :
- most of Gtk_CTree
- some Gtk_CList signals
- (s) Gtk_Widget::add_accelerator()
- (s) Gtk_Widget::remove_accelerator()
- (s) Gtk_TipsQuery::widget_entered()
- (s) Gtk_TipsQuery::widget_selected()
- The following interfaces are not perfect:
- combo interface (set_popdown_strings is the main problem)
- Many accessors for some gtk structs fields are missing
- gtk_signal_emit bug (we should not call it)
- makefile magic to create rpm's and dep's
- 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.
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,
Havoc Pennington
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
Tero Pulkkinen (terop@assari.cc.tut.fi)
|