Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WWidget* Menu ()
- {
- wApp->internalPathChanged().connect(this, &Dialog::OnPathChanged);
- auto menu = new WMenu(Vertical);
- menu->setRenderAsList(true);
- menu->setInternalPathEnabled("/page");
- menu->itemSelected().connect (this, &Dialog::OnMenuClicked);
- menu->addItem(WString("Boooom!"), nullptr)->setPathComponent("boom");
- return menu;
- }
- void OnPathChanged (const std::string& path)
- {
- WMessageBox::show(__FUNCTION__, path, Ok);
- }
- void OnMenuClicked ()
- {
- WMessageBox::show(__FUNCTION__, "I got the click :-)", Ok);
- }
Advertisement
Add Comment
Please, Sign In to add comment