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

Go to the source code of this file.

Functions

WApplicationcreateApplication (const WEnvironment &env)
 
int main (int argc, char **argv)
 

Function Documentation

◆ createApplication()

WApplication* createApplication ( const WEnvironment env)

Definition at line 157 of file DemoTreeList.C.

158 {
159  WApplication *app = new WApplication(env);
160  new DemoTreeList(app->root());
161 
162  /*
163  * The look & feel of the tree node is configured using a CSS style sheet.
164  * If you are not familiar with CSS, you can use the WCssDecorationStyle
165  * class ...
166  */
167  WCssDecorationStyle treeNodeLabelStyle;
168  treeNodeLabelStyle.font().setFamily(WFont::Serif, "Helvetica");
169  app->styleSheet().addRule(".treenodelabel", treeNodeLabelStyle);
170 
171  /*
172  * ... or if you speak CSS fluently, you can add verbatim rules.
173  */
174  app->styleSheet().addRule(".treenodechildcount",
175  "color:blue; font-family:Helvetica,serif;");
176 
177  return app;
178 }
A demonstration of the treelist.
Definition: DemoTreeList.h:27
WContainerWidget * root() const
void setFamily(FontFamily genericFamily, const WString &specificFamilies=WString())
WCssTextRule * addRule(const std::string &selector, const WString &declarations, const std::string &ruleName=std::string())
WCssStyleSheet & styleSheet()

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 180 of file DemoTreeList.C.

181 {
182  return WRun(argc, argv, &createApplication);
183 }
WApplication * createApplication(const WEnvironment &env)
Definition: DemoTreeList.C:157

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13