Wt examples: filetreetable/FileTreeExample.C File Reference

Wt examples 4.10.4

Loading...
Searching...
No Matches
Functions
FileTreeExample.C File Reference
`#include <Wt/WApplication.h>`
`#include <Wt/WContainerWidget.h>`
`#include <Wt/WTree.h>`
`#include <Wt/WTreeTableNode.h>`
`#include "FileTreeTable.h"`

Go to the source code of this file.

## Functions
std::unique_ptr< WApplication > | createApplication (const WEnvironment &env)
int | main (int argc, char **argv)

## Function Documentation

## ◆ createApplication()

std::unique_ptr< WApplication > createApplication | ( | const WEnvironment & | env | ) |

Definition at line 16 of file FileTreeExample.C.

17{
18 auto app = std::make_unique<WApplication>(env);
19 app->setTitle("File explorer example");
20 app->useStyleSheet("filetree.css");
21
22 std::unique_ptr<FileTreeTable> treeTable
23 = std::make_unique<FileTreeTable>(".");
24 treeTable->resize(500, 300);
25 treeTable->tree()->setSelectionMode(SelectionMode::Extended);
26 treeTable->treeRoot()->setNodeVisible(false);
27 treeTable->treeRoot()->setChildCountPolicy(ChildCountPolicy::Enabled);
28
29 app->root()->addWidget(std::move(treeTable));
30
31 return app;
32}

## ◆ main()

int main | ( | int | argc,
|  | char ** | argv )

Definition at line 34 of file FileTreeExample.C.

35{
36 return WRun(argc, argv, &createApplication);
37}
createApplication
std::unique_ptr< WApplication > createApplication(const WEnvironment &env)
Definition FileTreeExample.C:16