User can select from list of options
// construct top level window gui& form = wex::topWindow(); form.move({ 50,50,400,400}); form.text("Menu demo"); int clicked = -1; menu m; m.append("test",[&] { clicked = 1; }); m.append("second",[&] { clicked = 2; }); m.append("third",[&] { clicked = 3; }); m.popup( form, 200,200 ); msgbox( form,std::string("item ") + std::to_string(clicked) + " clicked"); form.show();
void append( const std::string& title, const std::function<void(void)>& f) Add menu item with finction to run when item selected.
void append( const std::string& title, const std::function<void(void)>& f)
void popup( gui& parent, int x, int y) Display menu at a location in the parent window.
void popup( gui& parent, int x, int y)
There was an error while loading. Please reload this page.