Wt examples 3.3.12
ChartsApplication.C
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
3 *
4 * See the LICENSE file for terms of use.
5 */
6
7#include <Wt/WApplication>
8#include "ChartsExample.h"
9
10using namespace Wt;
11
13{
14public:
17 {
18 setTitle("Charts example");
19
20 setCssTheme("polished");
21 messageResourceBundle().use(appRoot() + "charts");
22
23 root()->setPadding(10);
25
26 new ChartsExample(root());
27
28 /*
29 * Set our style sheet last, so that it loaded after the ext stylesheets.
30 */
31 useStyleSheet("charts.css");
32 }
33};
34
36{
37 WApplication *app = new ChartsApplication(env);
38
39 return app;
40}
41
42int main(int argc, char **argv)
43{
44 return WRun(argc, argv, &createApplication);
45}
WApplication * createApplication(const WEnvironment &env)
int main(int argc, char **argv)
ChartsApplication(const WEnvironment &env)
A widget that demonstrates various aspects of the charting lib.
void setCssTheme(const std::string &name)
WEnvironment & env()
WMessageResourceBundle & messageResourceBundle()
WContainerWidget * root() const
void setTitle(const WString &title)
static std::string appRoot()
void useStyleSheet(const WLink &link, const std::string &media="all")
void setPadding(const WLength &padding, WFlags< Side > sides=All)
static WLength Auto
void use(const std::string &path, bool loadInMemory=true)
virtual void resize(const WLength &width, const WLength &height)

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