#include <JWtHome.h>
|
| JWtHome (const WEnvironment &env, Dbo::SqlConnectionPool &blogDb) |
|
| Home (const WEnvironment &env, Dbo::SqlConnectionPool &blogDb, const std::string &title, const std::string &resourceBundle, const std::string &cssPath) |
|
virtual | ~Home () |
|
void | googleAnalyticsLogger () |
|
|
virtual std::unique_ptr< WWidget > | examples () |
|
virtual std::unique_ptr< WWidget > | createQuoteForm () |
|
virtual std::unique_ptr< WWidget > | sourceViewer (const std::string &deployPath) |
|
virtual std::string | filePrefix () const |
|
std::unique_ptr< WWidget > | wrapView (std::unique_ptr< WWidget >(JWtHome::*createFunction)()) |
|
virtual std::unique_ptr< WWidget > | examples ()=0 |
|
virtual std::unique_ptr< WWidget > | createQuoteForm ()=0 |
|
virtual std::unique_ptr< WWidget > | sourceViewer (const std::string &deployPath)=0 |
|
virtual std::string | filePrefix () const =0 |
|
void | init () |
|
void | addLanguage (const Lang &l) |
|
std::unique_ptr< WWidget > | linkSourceBrowser (const std::string &examplePath) |
|
WString | tr (const char *key) |
|
std::string | href (const std::string &url, const std::string &description) |
|
void | readReleases (WTable *releaseTable) |
|
Definition at line 16 of file JWtHome.h.
◆ JWtHome()
JWtHome::JWtHome |
( |
const WEnvironment & |
env, |
|
|
Dbo::SqlConnectionPool & |
blogDb |
|
) |
| |
Definition at line 27 of file JWtHome.C.
29 "JWt, Java Web Toolkit",
30 "jwt-home", "css/jwt")
31{
33
34 char* jwtExamplePath = getenv("JWT_EXAMPLE_PATH");
35 if (jwtExamplePath)
37 else
39
41}
Home(const WEnvironment &env, Dbo::SqlConnectionPool &blogDb, const std::string &title, const std::string &resourceBundle, const std::string &cssPath)
void addLanguage(const Lang &l)
std::string jwtExamplePath_
◆ chartExample()
std::unique_ptr< WWidget > JWtHome::chartExample |
( |
| ) |
|
|
private |
Definition at line 119 of file JWtHome.C.
120{
121 return std::move(
example(
"home.examples.chart",
"charts"));
122}
std::unique_ptr< WWidget > example(const char *textKey, const std::string &sourceDir)
◆ chatExample()
std::unique_ptr< WWidget > JWtHome::chatExample |
( |
| ) |
|
|
private |
Definition at line 134 of file JWtHome.C.
135{
136 return std::move(
example(
"home.examples.chat",
"simplechat"));
137}
◆ composerExample()
std::unique_ptr< WWidget > JWtHome::composerExample |
( |
| ) |
|
|
private |
Definition at line 129 of file JWtHome.C.
130{
131 return std::move(
example(
"home.examples.composer",
"composer"));
132}
◆ createQuoteForm()
std::unique_ptr< WWidget > JWtHome::createQuoteForm |
( |
| ) |
|
|
protectedvirtual |
Implements Home.
Definition at line 92 of file JWtHome.C.
93{
94#ifdef WT_EMWEB_BUILD
95 return std::make_unique<QuoteForm>(QuoteForm::JWt);
96#else
97 return nullptr;
98#endif
99}
◆ example()
std::unique_ptr< WWidget > JWtHome::example |
( |
const char * |
textKey, |
|
|
const std::string & |
sourceDir |
|
) |
| |
|
private |
Definition at line 106 of file JWtHome.C.
107{
108 std::unique_ptr<WContainerWidget> result = std::make_unique<WContainerWidget>();
109 result->addWidget(std::make_unique<WText>(
tr(textKey)));
111 return std::move(result);
112}
std::unique_ptr< WWidget > linkSourceBrowser(const std::string &examplePath)
WString tr(const char *key)
◆ examples()
std::unique_ptr< WWidget > JWtHome::examples |
( |
| ) |
|
|
protectedvirtual |
Implements Home.
Definition at line 43 of file JWtHome.C.
44{
45 std::unique_ptr<WContainerWidget> result(std::make_unique<WContainerWidget>());
46
47 std::unique_ptr<WText> intro(std::make_unique<WText>(
tr(
"home.examples")));
48 intro->setInternalPathEncoding(true);
49 result->addWidget(std::move(intro));
50
51 examplesMenu_ = result->addWidget(std::make_unique<WTabWidget>());
52 WAnimation animation(AnimationEffect::SlideInFromRight, TimingFunction::EaseIn);
53 examplesMenu_->contentsStack()->setTransitionAnimation(animation,
true);
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
71 tr(
"hello-world"))->setPathComponent(
"");
73 tr(
"widget-gallery"));
84
85
88
89 return std::move(result);
90}
WTabWidget * examplesMenu_
void googleAnalyticsLogger()
std::unique_ptr< WWidget > helloWorldExample()
std::unique_ptr< WWidget > figtreeExample()
std::unique_ptr< WWidget > chartExample()
std::unique_ptr< WWidget > chatExample()
std::unique_ptr< WWidget > treeviewExample()
std::unique_ptr< WWidget > widgetGalleryExample()
std::unique_ptr< WWidget > wrapView(std::unique_ptr< WWidget >(JWtHome::*createFunction)())
std::unique_ptr< WWidget > composerExample()
◆ figtreeExample()
std::unique_ptr< WWidget > JWtHome::figtreeExample |
( |
| ) |
|
|
private |
Definition at line 139 of file JWtHome.C.
140{
141 std::unique_ptr<WContainerWidget> result(std::make_unique<WContainerWidget>());
142 WText *text = result->addWidget(std::make_unique<WText>(
tr(
"home.examples.figtree")));
143 text->setInternalPathEncoding(true);
144 return std::move(result);
145}
◆ filePrefix()
virtual std::string JWtHome::filePrefix |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ helloWorldExample()
std::unique_ptr< WWidget > JWtHome::helloWorldExample |
( |
| ) |
|
|
private |
Definition at line 114 of file JWtHome.C.
115{
116 return std::move(
example(
"home.examples.hello",
"hello"));
117}
◆ sourceViewer()
std::unique_ptr< WWidget > JWtHome::sourceViewer |
( |
const std::string & |
deployPath | ) |
|
|
protectedvirtual |
Implements Home.
Definition at line 101 of file JWtHome.C.
102{
103 return std::make_unique<ExampleSourceViewer>(deployPath,
jwtExamplePath_ +
"/",
"JAVA");
104}
◆ treeviewExample()
std::unique_ptr< WWidget > JWtHome::treeviewExample |
( |
| ) |
|
|
private |
Definition at line 124 of file JWtHome.C.
125{
126 return std::move(
example(
"home.examples.treeview",
"treeviewdragdrop"));
127}
◆ widgetGalleryExample()
std::unique_ptr< WWidget > JWtHome::widgetGalleryExample |
( |
| ) |
|
|
private |
Definition at line 147 of file JWtHome.C.
148{
149 return std::move(
example(
"home.examples.widgetgallery",
"widgetgallery"));
150}
◆ wrapView()
std::unique_ptr< WWidget > JWtHome::wrapView |
( |
std::unique_ptr< WWidget >(JWtHome::*)() |
createFunction | ) |
|
|
protected |
Definition at line 152 of file JWtHome.C.
153{
155}
std::unique_ptr< Wt::WApplication > createWidget(const Wt::WEnvironment &env, SimpleChatServer &server)
◆ jwtExamplePath_
std::string JWtHome::jwtExamplePath_ |
|
private |
The documentation for this class was generated from the following files:
- C:/M/mingw-w64-wt/src/wt-4.7.1/examples/wt-homepage/JWtHome.h
- C:/M/mingw-w64-wt/src/wt-4.7.1/examples/wt-homepage/JWtHome.C