#include <nana/gui.hpp>
#include <nana/gui/widgets/listbox.hpp>
#include <iostream>
struct person
{
bool gender;
unsigned age;
};
{
orr << pr.name;
orr << (pr.gender ? ("Male") : ("Female"));
orr << pr.age;
return orr ;
}
{
orr << pr.name;
orr << (pr.gender ? ("Male") : ("Female"));
orr << pr.age;
return orr ;
}
{
orr >> pr.name;
orr >> gender;
pr.gender = gender == ("Male") ;
orr >> pr.age;
return orr ;
}
int main()
{
using namespace nana;
auto cat = lb.at(0);
if (cat.begin() == cat.end())
else
lb.append_header( ("Name"), 100);
lb.append_header( ("Gender"), 60);
lb.append_header( ("Age"), 60);
person pr;
pr.name = ("Peter");
pr.gender = true;
pr.age = 10;
lb.at(0).append (pr);
person prr;
lb.at(0).at(0).resolve_to( prr);
fm.show();
}