# wxGTK Homepage

# "wxWindows for the GTK" Homepage

### Current version

15th May '98: wxGTK v0.12 (alpha-)

This release is hardly more stable than the one before, but it has many new features. It's main purpose is actually to prepare the final merge of the Windows port and the GTK port source trees into a common tree, developed using CVS. The growing number of demos which compile and run with wxGTK "although" being written for wxMSW shows that we seem to be on the right track. One nice new feature for many potential users is that wxGTK no longer needs any extra libraries to be installed, other than the GTK.

If you have a compiler better than gcc 2.7.2.2 then you can uncomment a line in src/common/prntbase.cpp which defines __GOOD_COMPILER__. This should make the printing demo work. I haven't got such a compiler, so I actually don't know. Somebody reported problems with version 2.7.2.3 as well.

### Acknowledgements

I'd like to thank the Freiburg Linux User Group for kindly providing this site and Christian Wetzel in particular for helping me with this site's administration.

### What is wxWindows?

wxWindows is a C++ cross-platform GUI toolkit written mainly by Julian Smart. More information about wxWindows can be found at the wxWindows Homepage.

The current version of wxWindows (v1.68) supports Windows ('95 and NT), Motif and XView (aka OpenLook). There is another port (wxXt) available, which uses the free-ware widget set from the Free Widget Foundation (FSF). Ports have been started for the Mac, OS/2 and NextStep.

For different reasons, it was decided to start a complete rewrite of wxWindows, which will then be called wxWindows 2.0. For a list of new features and changes from the current version, you may read the wxWindows Homepage (see above).

Currently, work is being done on four ports of wxWindows 2.0:

- Windows (wxMSW, main author Julian Smart)
- Unix, Motif (wxMotif, main author Markus Holzhem)
- Unix, GIMP Toolkit (wxGTK, main author Robert Roebling)
- Macintosh (wxMac, main author Greg Whitehead)

wxWindows provides a rich set of classes which help to make cross-platform GUI programming easy. In many aspect, it is modelled after MFC, making transition from MFC to wxWindows relatively painless. The main technical difference between most other free or commercial cross platform libraries is that wxWindows is a wrapper around existing widget sets, whereas the other toolkits (Qt, Tk, Java, Amulet, OPaC, JX, Fresko) draw their widgets themselves, which results in applications having a different look than native applications for that specific platform.

There are classes for the following categories

- Window classes: wxWindow, wxFrame, wxDialogBox, wxPanel, wxCanvas etc.
- Widget classes: wxButton, wxCheckbox, wxChoice, wxListBox, wxListCtrl, wxText, wxGauge etc.
- Data structures: wxList, wxString, wxHashTable, wxDate etc.
- Layout/constraint system
- GDI classes: wxPen, wxBrush, wxFont, wxBitmap etc.
- Events: wxCommandEvent, wxMouseEvent, wxKeyEvent etc.
- Devices contexts: wxCanvasDC, wxPostScriptDC, wxMemoryDC, wxPrinterDC
- Base classes for runtime-type information: wxObject
- Interprocess communication: wxClient, wxConnection, wxSocket, wxServer etc.
- Document-view architecture: wxDocument, wxView, wxDocManager etc.
- Printing framework: wxPreviewFrame, wxPrintDialog, wxPrinter etc.
- Many helper classes, wxApplication, wxTypeTree, wxPathList etc.
- Classes for internationalization
- Built-in memory leak checking, log-files
- A multitude of functions and macros

### Copyright

The choice of a suitable copyright has been subject to endless discussions. It has always been the aim, to put wxWindows under a copyright, which protects the work of its authors while at the same time encouraging the use of wxWindows in as many projects as possible.

The (so far) last decision has been to put the whole of wxWindows under a modified (less restrictive) version of the GNU library general public license.

The only exception is that wxGTK now contains code (gdk_imlib) which is under the GNU library general public license. When you make changes to this part of wxGTK, you'll have to make these changes public (in contrast to changes to the rest).

It is obviously encouraged that anybody who uses wxWindows and who makes any improvements to it will make these changes available to wxWindows' authors.

### What can I do with wxWindows 2.0?

wxWindows is still in alpha stage, which means that there are still bugs waiting for you and several features are not yet (fully) implemented, but you can expect the interface to be more or less stable, so no major modifications will have to be made to your source code. wxGTK is already used in a number of medium sized projects and is it being developped in close cooperation with the authors of these applications.

### Can I write a GNOME application with wxGTK 2.0?

Good question. The idea to use wxGTK for the GNOME desktop environment is quite obvious. When this topic came up on the GNOME mailing list, the GNOME people have shown an amazingly negative opinion about wxWindows. One reason might be that several of the main authors of the GNOME-project consider C++ a "broken language". I don't share that view and I am sure many people find C++ easier to handle and better suited for GUI programming than C.

Just recently, the topic of C++ in general and wxGTK in particular appeared again on the GNOME list. It has shown that - at least - the opinion on C++ on the GNOME list is split.

There is already a C++ wrapper for the GTK called GTK-- written by Tero Pulkkinen. It is very small and adds very little overhead to the GTK. If platform independence is no issue for you and you want to write a small tool for Linux, you should probably use GTK--. Of course you can use wxGTK for that, too :-)

### Screenshots

What would a home page of a GUI be without a screenshot? Well, as wxWindows is a wrapper around existing widget/item sets, a wxWindows application will look like any other native Windows, Motif, GTK or Mac application.

But for those of you, who wouldn't download wxGTK only because there is no screenshot, here it comes.

### Download 1.68

Go to the FTP section directly.

There is documentation for version 1.68 in html available. here. Not yet.

You can download current wxWindows version 1.68 for Windows, Motif and XView from here. Not yet.

You can download wxXt 1.66d from here.

### Download 2.0 alpha

There is documentation for version 2.0 in html available. here.

You can download the first alpha for wxWindows 2.0 for Windows from here. Not yet.

You can download the current alpha for wxWindows 2.0 for GTK from here.

### News from wxGTK 0.12

PNG, zlib and gdk_imlib code included.

MDI implementation. More a basis for further testing than of real value.

Split "--with-debug" option into two options: "--with-debug_info" and "--with-debug_flag". The first one sets the "-g" flag when compiling, the second defines "DEBUG" in setup.h (which is included from defs.h).

Merged DocView framework. The sample doesn't compile yet, because it uses features from wxTextCtrl, which I haven't implemented yet.

Merged TabCtrl. Doesn't look perfect, but it seems to work.

Merged remaining classes from the newest wxMSW alpha. (wxDynArray, wxModule etc.).

Further updates, bug fixes or additions:

- wxYield() (again)
- postscript support for bitmaps
- spline code merged
- several bug fixes
- new samples

### Known problems

Missing implementation of:

- Impossible to set new font in GTK's widgets
- Items containing bitmaps
- Masks, bitmap handlers (partially done)
- Gauge
- Combobox
- Palettes (colormaps)
- Keyboard accelerators for menus
- Validation
- Clipboard functions
- Resources (for use with wxIDE-to-be)
- Drag and Drop
- Threads, Interprocess communication
- Sockets
- Database classes

### Installation of wxGTK under Linux

GTK requires an up-to-date version of the

- GTK (GIMP ToolKit)

to be installed as a shared lib on your system. wxGTK is being developped with version 1.0.1 and it is known not to work with earlier versions. The GTK library is available from somewhere here (gtk.org). After having typed "make install" the GTK header files should be in "/usr/local/include". Correct me, if I am wrong.

Compilation itself works as usual with autoconf:

- Unpack it to a suitable subdirectory, let's say ~/wxGTK
- Type "cd wxGTK"
- Type "configure"
- Type "make"

Some demos use files stored in the source directory of those demos (e.g. internat uses files in samples/internat) whereas the binaries will end up in samples/internat/linux. You'll have to copy the binaries down or call them like "linux/test" from samples/internat. This is also the case for wxTest (which should display a horse).

You can create a shared library by adding the option "--with-shared" to the "configure" command. Afterwards, you'll have to copy the library ~/wxGTK/lib/linux (if you have Linux) to a directory in your LDPATH (e.g. /usr/X11R6/lib) and run "ldconfig".

### Mailing list for wxGTK

The mailing list (as well as this page) is called wxxt for more or less historical reasons.

You can subsribe to the mailing list by sending a mail to majordomo@wesley.informatik.uni-freiburg.de. This mail must contain the text "subscribe wxxt" in the body (not the subject) of the mail. You will then get a confirmation that somebody asked majordomo to put you on the list and you will have to confirm this once again by sending back the authentisation, which comes in the confirmation mail. The last step is also described in the actual confirmation mail (I think).

You can send a mail to the mailing list to the address wxxt@www.freiburg.linux.de.

Unsubscribe by sending "unsubscribe wxxt" to majordomo (see above). Not to the actual mailing list.