Wt examples  4.10.4
Functions
DemoTreeList.C File Reference
#include <Wt/WApplication.h>
#include <Wt/WText.h>
#include <Wt/WImage.h>
#include <Wt/WPushButton.h>
#include "DemoTreeList.h"
#include "TreeNode.h"
#include "IconPair.h"

Go to the source code of this file.

Functions

std::unique_ptr< WApplicationcreateApplication (const WEnvironment &env)
 
int main (int argc, char **argv)
 

Function Documentation

◆ createApplication()

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

Definition at line 178 of file DemoTreeList.C.

179 {
180  auto app
181  = std::make_unique<WApplication>(env);
182  app->root()->addWidget(std::make_unique<DemoTreeList>());
183 
184  /*
185  * The look & feel of the tree node is configured using a CSS style sheet.
186  * If you are not familiar with CSS, you can use the WCssDecorationStyle
187  * class ...
188  */
189  WCssDecorationStyle treeNodeLabelStyle;
190  treeNodeLabelStyle.font().setFamily(FontFamily::Serif, "Helvetica");
191  app->styleSheet().addRule(".treenodelabel", treeNodeLabelStyle);
192 
193  /*
194  * ... or if you speak CSS fluently, you can add verbatim rules.
195  */
196  app->styleSheet().addRule(".treenodechildcount",
197  "color:blue; font-family:Helvetica,serif;");
198 
199  return app;
200 }
void setFamily(FontFamily genericFamily, const WString &specificFamilies=WString())

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 202 of file DemoTreeList.C.

203 {
204  return WRun(argc, argv, &createApplication);
205 }
std::unique_ptr< WApplication > createApplication(const WEnvironment &env)
Definition: DemoTreeList.C:178