Class demonstrating drag and drop in Wt.
More...
#include <DragExample.h>
Class demonstrating drag and drop in Wt.
Definition at line 15 of file DragExample.h.
◆ DragExample()
DragExample::DragExample |
( |
| ) |
|
Definition at line 34 of file DragExample.C.
37 this->addWidget(std::make_unique<WText>(
"<p>Help these people with their decision by dragging one of "
40 if (!wApp->environment().javaScript()) {
41 this->addWidget(std::make_unique<WText>(
"<i>This examples requires that javascript support is "
45 WContainerWidget *pills = this->addWidget(std::make_unique<WContainerWidget>());
46 pills->setContentAlignment(AlignmentFlag::Center);
49 "icons/blue-pill-small.png",
52 "icons/red-pill-small.png",
55 WContainerWidget *dropSites = this->addWidget(std::make_unique<WContainerWidget>());
57 dropSites->addWidget(std::make_unique<Character>(
"Neo"));
58 dropSites->addWidget(std::make_unique<Character>(
"Morpheus"));
59 dropSites->addWidget(std::make_unique<Character>(
"Trinity"));
WImage * createDragImage(const char *url, const char *smallurl, const char *mimeType, WContainerWidget *p)
Create an image which can be dragged.
The documentation for this class was generated from the following files: