Skip to content

Instantly share code, notes, and snippets.

@mer30hamid
Created June 22, 2014 19:36
Show Gist options
  • Save mer30hamid/79bf699e467cf347b50d to your computer and use it in GitHub Desktop.
Save mer30hamid/79bf699e467cf347b50d to your computer and use it in GitHub Desktop.
For example, answering an event
#include <nana/gui/wvl.hpp>
#include <nana/gui/widgets/button.hpp>
void clicked(const nana::gui::eventinfo&)
{
//When the window corresponds to fm is clicked,
//this function will be “called”.
}
int main()
{
using namespace nana::gui;
form fm;
fm.make_event<events::click>(clicked);
fm.show();
exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment