Nana C++
Developer(s) | Jin Hao |
---|---|
Initial release | 2007 |
Stable release |
1.4.1
/ September 25, 2016 |
Written in | C++ |
Operating system | Windows and Linux with X11 |
Type | user interface library |
License | Boost Software License |
Website |
nanapro |
Nana is a cross-platform C++ library for creating graphical user interfaces. It uses a platform-independent API and currently supports Windows and Linux(X11) platforms.[1]
Nana is free and open-source software, licensed under the Boost Software License.
Architecture and design
Nana is an object-oriented widget toolkit using generic programming[2] and written in Standard C++. It can therefore be compiled by any Standard C++ compiler (VC2013, GCC/MinGW, Clang).
The primary design goal of Nana is to make things simple and intuitive to C++ developpers: it therefore uses many advanced C++ features, such as templates, standard libraries, exception and RTTI. It fully supports C++11 since 2012,[3] giving the developers the freedom to use various modern C++ features such as lambda functions, smart pointers and the standard library.
Language bindings
Nana was written in C++ and targets only this language.
The following Nana example[4] creates a window with a "Hello, World" caption and a "Quit" button:
#include <nana/gui/wvl.hpp>
#include <nana/gui/widgets/button.hpp>
int main()
{
using namespace nana;
form fm; // The form is a window with title bar and a sizable border frame,
fm.caption("Hello World");
button btn(fm, nana::rectangle(20, 20, 150, 30));
btn.caption("Quit");
btn.events().click(API::exit); // API::exit is a function that is triggered on click
fm.show();
exec();
}
Versions
The current version 1.4.0 was released on July 19th, 2016.
According to the project's SourceForge repository:[5]
- In 2015, 10 versions 1.x.x were released.
- Between mid 2013 and begin 2015, 24 versions 0.x.x were released, .
The SourceForge repository of the alpha release[6] of the project, traces the first release 0.1.0 back to December 4, 2007.
See also
- gtkmm (C++ binding of GTK+)
- FLTK
- FOX toolkit
- Juce
- Qt
- VCF
- wxWidgets - cross platform open source C++ widgets toolkit developed by community
- Ultimate++
- List of widget toolkits
References
- ↑ "What is Nana ?".
- ↑ "Nana C++ Library on GitHub".
- ↑ "Nana's Mill:Nana C++ Library for C++11 is available now".
- ↑ "Nana C++ reference: examples".
- ↑ Jin Hao. "SourceForge Nana C++ - A modern C++ GUI library". SourceForge. Retrieved 17 January 2016.
- ↑ Jin Hao. "SourceForge Nana C++ alpha". SoruceForge. Retrieved 17 January 2016.