1 #include <Wt/WAnchor.h> 2 #include <Wt/WContainerWidget.h> 3 #include <Wt/WLink.h> 4 5 SAMPLE_BEGIN(Anchor) 6 7 // Create an anchor that links to a URL through clickable text. 8 Wt::WLink link = Wt::WLink("https://www.webtoolkit.eu/"); 9 link.setTarget(Wt::LinkTarget::NewWindow); 10 11 std::unique_ptr<Wt::WAnchor> anchor = 12 std::make_unique<Wt::WAnchor>(link, 13 "Wt homepage (in a new window)"); 14 15 SAMPLE_END(return std::move(anchor)) 16