WxWidgets
A reader requests expansion of this book to include more material. You can help by adding new material (learn how) or ask for assistance in the reading room. |
Introduction
editwxWidgets formerly known as wxWindows is a framework for developing cross-platform GUI applications in C++. Julian Smart started the framework in 1992 at the Artificial Intelligence Applications Institute, University of Edinburgh. In 1995, a port to Xt was released by Markus Holzem. In May 1997, the Windows and the GTK+ ports were merged and put into a CVS repository.
What is wxWidgets
editwxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms. Link it with the appropriate library for your platform (Windows/Unix/Mac) and compiler (almost any popular C++ compiler), and your application will adopt the look and feel appropriate to that platform. On top of the great GUI functionality, wxWindows gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.
Who should use wxWidgets
editwxWidgets is a framework very much similar to MFC, except for a few negative points of its own. Those MFC programmers who are aware of the growing number of Linux users and who want to write cross platform GUI applications can use wxWidgets. With wxWidgets, it is very easy to use a framework based on C++ and it has a proven record of 13 years. In fact, wxWidgets is very stable and is supported on:
- Windows 3.1, Windows 95/98, Windows NT, Windows 2000/XP, Windows ME, Windows CE.
- Linux and other UNIX platforms with GTK+.
- UNIX with Motif or the free Motif clone Lesstif.
- Mac OS.
- Embedded platforms are being investigated. See the wxUniversal project.
- An OS/2 port is in progress, and you can also compile wxWidgets for GTK+ or Motif on OS/2.
Why use wxWidgets
editThere are a number of options available for writing cross platform GUI development, like: JAVA, Mono.NET, Qt, etc. Java has failed to prove itself as an efficient alternative. Qt is good but commercial and nobody knows its future. Mono.NET seems to be good but is largely driven by Microsoft, it seems like a copy of the work done by Microsoft and it has not yet proved itself as a successful alternative. Also, people would not like to use an extra burden of layer for highly efficient software. As wxWidgets does not use any middle layer and uses only the native controls available on the platform, it gives a nice look and feel to the application.
* It is very complete. There are many utility classes like : wxRegEx, wxFTP, wxSplashScreen, wxZipInputStream, etc. * It is still heavily developed, and has a lot of support from the open source community. * Many compilers and platforms are supported : Windows, Linux, Mac, Unix. * There's a lot of documentation available on the internet, forums, wxBook. * It's free for personal and commercial use, and is more flexible than the LGPL license. * Whenever possible, wxWindows uses the platform SDK. This means that a program compiled on Windows will have the look and feel of a Windows program, and when compiled on a Linux machine, it will have the look and feel of a Linux program. * Ease of learning, it has the same Event tables and similar API and classes like that of WINAPI and MFC. * A lot of sample is provided in the samples directory of the installation, which contains how to use the basic controls, multi threading, MDI, drag and drop, sockets, printing and lots more. * A lot of ready to use classes are available, like: wxGenericDirCtrl, wxCalendarCtrl, wxDatePickerCtrl, wxTipWindow, wxStyledTextCtrl, wxStaticPicture, wxLEDNumberCtrl, wxEditableListBox, wxFoldPanelBar, wxGIFAnimationCtrl, wxSplashScreen, OGL (Object Graphics Library), FL (Frame Layout), etc. This is one of the main repository. * A lot of add on libraries are available to make the programming task easier: o wxMozilla. o wxIndustrialControls. o wxCURL. o ToasterBox. o wxVTK. o wxDockIt. o wxIFM. o wxMathPlot. o wxTreeMultiCtrl. o wxAUI. o wxPropertyGrid. o wxSMTP. o wxResizeableControl. o wxOTL. o wxReportWriter. o wxHyperlinkCtrl. o wxSQLite. o wxIE. o wxCTB. o AWX. o wxSpellChecker. o wxArt2D. o wxImprola. o wxHTML. o wxStEdit. o wxLCDWindow. o mmwx. o LitWindow. o Keybinder. o wxBetterDialog. o wxBZipStream. o wxCrashReport. o wxHTTPServer. o wxRarInputStream. o wxSheet. o wxStreamMerger.
Main features
edit* Multi threading. * Clipboard and drag and drop. * Network programming, like: wxSMTP, wxHTTP, wxFTP. * Image loading and saving in a variety of popular formats. * Streams (ZIP, Network, File, etc.), like: wxRarInputStream. * Database support, like: wxDao. * HTML viewing and printing, like: wxMozilla, wxIE. * XML based resource, multi language/Unicode support. * Default style themes available with the OS (e.g.: XP style themes).