43 this->setLayoutSizeAware(
true);
47 text = this->addNew<Wt::WTextArea>();
49 text->resize(
"95%",
"95%");
50 text->setStyleClass(
"save-middle");
52 auto downloadButton = this->addWidget(std::make_unique< Wt::WPushButton>(
"Update"));
53 downloadButton->setMargin(10, Wt::Side::Top);
54 downloadButton->setStyleClass(
"btn-primary");
56 downloadButton->clicked().connect([=]
59 std::ostringstream oss;
61 std::string filePath = oss.str() +
".txt";
64 std::ifstream fileStream(filePath);
65 if (!fileStream.is_open()) {
66 std::cerr <<
"Unable to open file for reading." << std::endl;
70 std::getline(fileStream, content,
'\0');
73 text->setText(content);
75 if (std::remove(filePath.c_str()) == 0) {
76 std::cout <<
"File successfully deleted." << std::endl;
79 std::cerr <<
"Error deleting file." << std::endl;
std::shared_ptr< dyno::SceneGraph > getScene()