WXWIDGETS
In computing, 'wxWidgets' (formerly known as 'wxWindows') is a widget toolkit intended to create graphical user interfaces (GUIs) for cross-platform applications. WxWidgets enables a program's GUI code to compile and run on several computer platforms with minimal or no code changes. It covers systems like Microsoft Windows, Mac OS, Linux/Unix (X11, Motif, and GTK+), OpenVMS, and OS/2. A version for embedded systems is under development. wxEmbedded: wxWidgets for embedded applications
WxWidgets was started in 1992 by Julian Smart, who is still a core developer. The toolkit is free software, released under the permissive, OSI-approved wxWidgets licence.
| Contents |
| Implementation |
| wxWidgets project |
| Licensing |
| Hello World |
| Software using wxWidgets |
| RAD tools and IDEs for wxWidgets |
| See also |
| References |
| External links |
Implementation
The wxWidgets library is implemented in C++, but bindings are available for many commonly used programming languages, among them, Python (wxPython), Lua (wxLua), Perl (wxPerl), Ruby (wxRuby), Smalltalk (wxSqueak), Java (wx4j) and even JavaScript (wxJS). For a complete list, with links to the respective project sites, see the external references at the end of this article. -- PLT Scheme uses an incompatible branch of wxWindows (version 1), created in 1995. The toolkit is deeply integrated with the language run-time (garbage collection, resource administration) unlike in other languages, which simply provide a library binding.
WxWidgets is best described as a native mode toolkit: instead of emulating the display of widgets using graphic primitives on the different supported platforms, wxWidgets provides a thin abstraction to the native widgets. In other words, the underlying wxWidgets code prefers calling a native widget on the platform, instead of reimplementing custom widgets. This leads to a more native looking interface when compared to toolkits like Swing (for Java).
The toolkit is not restricted to GUI development; it also has a built in ODBC-based database library, an inter-process communication layer, socket networking functionality, and more.
wxWidgets project
On February 20th, 2004, the developers of wxWindows announced that the project was changing its name to ''wxWidgets'', as a result of pressures from Microsoft on Julian Smart to respect Microsoft's United Kingdom trademark of the term ''Windows''.
Licensing
The wxWidgets license provides essentially the same freedoms as the GNU Lesser General Public License, with an exception stating that derived works in binary form may be distributed on the user's own terms.
Hello World
A simple example of wxWidgets in C++, creating a window with a menu and a dialog box.
/
★
★ http://www.wxwidgets.org/docs/tutorials/hworld.txt
★ Hello world sample by Robert Roebling
★ /
#include "wx/wx.h"
class MyApp: public wxApp
{
virtual bool OnInit();
};
class MyFrame: public wxFrame
{
public:
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
};
enum
{
ID_Quit = 1,
ID_About,
};
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(ID_Quit, MyFrame::OnQuit)
EVT_MENU(ID_About, MyFrame::OnAbout)
END_EVENT_TABLE()
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
MyFrame
★ frame = new MyFrame( _T("Hello World"), wxPoint(50,50), wxSize(450,340) );
frame->Show(TRUE);
SetTopWindow(frame);
return TRUE;
}
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame
★ )NULL, -1, title, pos, size)
{
wxMenu
★ menuFile = new wxMenu;
menuFile->Append( ID_About, _T("&About...") );
menuFile->AppendSeparator();
menuFile->Append( ID_Quit, _T("E&xit") );
wxMenuBar
★ menuBar = new wxMenuBar;
menuBar->Append( menuFile, _T("&File") );
SetMenuBar( menuBar );
CreateStatusBar();
SetStatusText( _T("Welcome to wxWindows!") );
}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox(_T("This is a wxWindows Hello world sample"),
_T("About Hello World"), wxOK | wxICON_INFORMATION, this);
}
Software using wxWidgets
★ aMule - 'All-platform' P2P client based on eMule
★ Audacity - a free/open source sound editor
★ Audiobook Cutter - A user-friendly MP3 audiobook splitter.
★ Chandler - Personal Information Manager (PIM) integrating calendar, emails, contacts, tasks and instant messaging
★ - A free/open source, cross platform C++ IDE
★ e - Collaborative Text Editor for Windows
★ Fityk - An OpenSource, cross-platform scientific curve-fitting tool
★ Juice, an aggregator application that is used to download podcast media files
★ Monolith - tool to distribute copyrighted data
★ MUTE - anonymous file sharing
★ VLC media player - cross platform multimedia player
★ WASTE - secure P2P software for small networks
★ wxCommunicator - cross platform SIP softphone
RAD tools and IDEs for wxWidgets
★ Boa Constructor (Python)
★ (via wxSmith plugin)
★ VisualWx
★ wxDev-C++
★ wxFormBuilder
★ wxGlade
See also
★ Object Windows Library
★ Visual Component Library
★ VCF
★ Microsoft Foundation Class Library
★ Widget toolkit
★ Qt
★ GTK+
★ Tk
★ Gtkmm
★ FLTK
★ FOX toolkit
★ Juce
References
External links
★ Official Website
This article provided by Wikipedia. To edit the contents of this article, click here for original source.
psst.. try this: add to faves
Featured Companies
| Dancing Moon Travel | |
| Alpine Interface Inc. | |
| Travelbugs, LLC | |
| Golf Holidays International |

العربية
中国
Français
Deutsch
Ελληνική
हिन्दी
Italiano
日本語
Português
Русский
Español



