wxWidgets is a mature, open-source C++ GUI framework for building native desktop applications on Windows, Linux, and macOS from a single codebase.
Features
-
Native look and feel (uses the platform's native widgets)
-
Cross-platform
-
Written in C++
-
Event-driven architecture
-
Large collection of controls
-
OpenGL support
-
Printing support
-
Networking classes
-
XML support
-
SQLite support (through libraries)
-
Unicode support
-
Internationalization (i18n)
Common Controls
-
wxFrame
-
wxDialog
-
wxPanel
-
wxButton
-
wxTextCtrl
-
wxListCtrl
-
wxTreeCtrl
-
wxNotebook
-
wxGrid
-
wxDataViewCtrl
-
wxMenuBar
-
wxToolBar
-
wxStatusBar
-
wxSplitterWindow
-
wxAuiNotebook
Simple Example
Compile
Linux
or
CMake
Layout Managers (Sizers)
Instead of absolute positioning, use sizers:
Common Classes
| Purpose | Class |
|---|
| Main Window | wxFrame |
| Dialog | wxDialog |
| Text Box | wxTextCtrl |
| List | wxListCtrl |
| Tree | wxTreeCtrl |
| Table | wxGrid |
| Menus | wxMenuBar |
| Toolbar | wxToolBar |
| Status Bar | wxStatusBar |
| Images | wxBitmap, wxImage |
| Timers | wxTimer |
| Threads | wxThread |
| Networking | wxSocket, wxWebRequest |
| File Dialog | wxFileDialog |
Advantages
-
Excellent C++ API
-
Very stable (25+ years)
-
Native widgets rather than custom-drawn controls
-
Commercial-friendly license
-
Good documentation
-
Large collection of samples
-
Works well with CMake
Best Uses
-
Database front ends
-
Business applications
-
CAD utilities
-
IDEs
-
File managers
-
Scientific applications
-
Administrative tools
-
Industrial control software
For someone with a C++ background, wxWidgets is one of the strongest choices for desktop application development because it provides native performance, a familiar object-oriented API, and broad cross-platform support without requiring a separate runtime.