Project

General

Profile

Bug #1172 ยป tool-tip.cpp

Anonymous, 02/26/2012 09:44 PM

 

#include <string>

#include <Wt/WApplication>
#include <Wt/WText>
#include <Wt/WRandom>
#include <Wt/WBreak>

using namespace Wt;

class TipApp : public WApplication {
public:
TipApp(const WEnvironment& env):
WApplication(env) {
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 5; j++) {
WText* t = new WText(WRandom::generateId(), root());
std::string s;
for (int k = 0; k < 30; k++) {
s += WRandom::generateId() + "<br />";
}
t->setToolTip(s, XHTMLText);
new WText(" ", root());
}
new WBreak(root());
}
}
};

WApplication* createTipApplication(const WEnvironment& env) {
return new TipApp(env);
}

int main(int argc, char** argv) {
return WRun(argc, argv, &createTipApplication);
}

    (1-1/1)