Wt examples 3.3.12
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.
WCssStyleSheet & styleSheet()
WContainerWidget * root() const
WCssTextRule * addRule(const std::string &selector, const WString &declarations, const std::string &ruleName=std::string())
void setFamily(GenericFamily genericFamily, const WString &specificFamilies=WString())

◆ 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)

Generated on Fri May 17 2024 for the C++ Web Toolkit (Wt) by doxygen 1.9.8