Nana is a cross-platform library for GUI programming in modern C++ style. Learn more...

  • LANGUAGE C++11/14
  • COMPILER Any Standard C++ compiler(Visual C++ 2013, GCC/MinGW and Clang)
  • PLATFORM Windows/Linux(X11)
#include <nana/gui.hpp>
#include <nana/gui/widgets/label.hpp>
#include <nana/gui/widgets/button.hpp>

int main()
    using namespace nana;

    //Define a form.
    form fm;

    //Define a label and display a text.
    label lab{fm, "Hello, <bold blue size=16>Nana C++ Library</>"};

    //Define a button and answer the click event.
    button btn{fm, "Quit"};[&fm]{

    //Layout management
    fm.div("vert <><<><weight=80% text><>><><weight=24<><button><>><>");
    fm["button"] << btn;
    //Show the form;

    //Start to event loop process, it blocks until the form is closed.
Screenshots See applications using Nana

Troubleshooting Key Press Event in Form

The form may not respond to the key press event, the only reason is that the form has lost the keyboard focus. But the form is ...

The Easiest Way to Install Nana for Visual Studio

I'm happy to announce that vcpkg has added Nana 1.4.1. Vcpkg is a tool released by Microsoft to simplifies acquiring and building C++ ...

Summary of Nana 2016 Survey

Thank you to 103 people who responded the survery! We're thankful for all the great feedback. What's the status that you use ...

>>> More