#include <WtHome.h>
|
| WtHome (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 () override |
|
virtual std::unique_ptr< WWidget > | createQuoteForm () override |
|
virtual std::unique_ptr< WWidget > | sourceViewer (const std::string &internalPath) override |
|
virtual std::string | filePrefix () const override |
|
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 WtHome.h.
◆ WtHome()
WtHome::WtHome |
( |
const WEnvironment & |
env, |
|
|
Dbo::SqlConnectionPool & |
blogDb |
|
) |
| |
Definition at line 29 of file WtHome.C.
30 :
Home(env, blogDb,
"Wt, C++ Web Toolkit",
"wt-home",
"css/wt")
36 char* wtExamplePath = getenv(
"WT_EXAMPLE_PATH");
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 wtExamplePath_
◆ chartExample()
std::unique_ptr< WWidget > WtHome::chartExample |
( |
| ) |
|
|
private |
Definition at line 59 of file WtHome.C.
61 return example(
"home.examples.chart",
"charts");
std::unique_ptr< WWidget > example(const char *textKey, const std::string &sourceDir)
◆ chatExample()
std::unique_ptr< WWidget > WtHome::chatExample |
( |
| ) |
|
|
private |
Definition at line 79 of file WtHome.C.
81 return example(
"home.examples.chat",
"simplechat");
◆ composerExample()
std::unique_ptr< WWidget > WtHome::composerExample |
( |
| ) |
|
|
private |
Definition at line 84 of file WtHome.C.
86 return example(
"home.examples.composer",
"composer");
◆ createQuoteForm()
std::unique_ptr< WWidget > WtHome::createQuoteForm |
( |
| ) |
|
|
overrideprotectedvirtual |
Implements Home.
Definition at line 153 of file WtHome.C.
155 #ifdef WT_EMWEB_BUILD
156 return std::make_unique<QuoteForm>(QuoteForm::Wt);
◆ example()
std::unique_ptr< WWidget > WtHome::example |
( |
const char * |
textKey, |
|
|
const std::string & |
sourceDir |
|
) |
| |
|
private |
Definition at line 45 of file WtHome.C.
47 auto result = std::make_unique<WContainerWidget>();
48 WText *w = result->addWidget(std::make_unique<WText>(
tr(textKey)));
49 w->setInternalPathEncoding(
true);
51 return std::move(result);
std::unique_ptr< WWidget > linkSourceBrowser(const std::string &examplePath)
WString tr(const char *key)
◆ examples()
std::unique_ptr< WWidget > WtHome::examples |
( |
| ) |
|
|
overrideprotectedvirtual |
Implements Home.
Definition at line 99 of file WtHome.C.
101 auto result = std::make_unique<WContainerWidget>();
103 auto intro = std::make_unique<WText>(
tr(
"home.examples"));
104 intro->setInternalPathEncoding(
true);
105 result->addWidget(std::move(intro));
107 examplesMenu_ = result->addWidget(std::make_unique<WTabWidget>());
109 WAnimation animation(AnimationEffect::SlideInFromRight, TimingFunction::EaseIn);
110 examplesMenu_->contentsStack()->setTransitionAnimation(animation,
true);
128 tr(
"hello-world"))->setPathComponent(
"");
130 tr(
"widget-gallery"));
142 tr(
"mail-composer"));
150 return std::move(result);
WTabWidget * examplesMenu_
void googleAnalyticsLogger()
std::unique_ptr< WWidget > wrapView(std::unique_ptr< WWidget >(WtHome::*createFunction)())
std::unique_ptr< WWidget > composerExample()
std::unique_ptr< WWidget > widgetGalleryExample()
std::unique_ptr< WWidget > treeviewExample()
std::unique_ptr< WWidget > chartExample()
std::unique_ptr< WWidget > chatExample()
std::unique_ptr< WWidget > homepageExample()
std::unique_ptr< WWidget > gitExample()
std::unique_ptr< WWidget > hangmanExample()
std::unique_ptr< WWidget > helloWorldExample()
◆ filePrefix()
virtual std::string WtHome::filePrefix |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ gitExample()
std::unique_ptr< WWidget > WtHome::gitExample |
( |
| ) |
|
|
private |
Definition at line 74 of file WtHome.C.
76 return example(
"home.examples.git",
"gitmodel");
◆ hangmanExample()
std::unique_ptr< WWidget > WtHome::hangmanExample |
( |
| ) |
|
|
private |
Definition at line 94 of file WtHome.C.
96 return example(
"home.examples.hangman",
"hangman");
◆ helloWorldExample()
std::unique_ptr< WWidget > WtHome::helloWorldExample |
( |
| ) |
|
|
private |
Definition at line 54 of file WtHome.C.
56 return example(
"home.examples.hello",
"hello");
◆ homepageExample()
std::unique_ptr< WWidget > WtHome::homepageExample |
( |
| ) |
|
|
private |
Definition at line 64 of file WtHome.C.
66 return example(
"home.examples.wt",
"wt-homepage");
◆ sourceViewer()
std::unique_ptr< WWidget > WtHome::sourceViewer |
( |
const std::string & |
internalPath | ) |
|
|
overrideprotectedvirtual |
Implements Home.
Definition at line 162 of file WtHome.C.
164 return std::make_unique<ExampleSourceViewer>(deployPath,
wtExamplePath_ +
"/",
"CPP");
◆ treeviewExample()
std::unique_ptr< WWidget > WtHome::treeviewExample |
( |
| ) |
|
|
private |
Definition at line 69 of file WtHome.C.
71 return example(
"home.examples.treeview",
"treeview-dragdrop");
◆ widgetGalleryExample()
std::unique_ptr< WWidget > WtHome::widgetGalleryExample |
( |
| ) |
|
|
private |
Definition at line 89 of file WtHome.C.
91 return example(
"home.examples.widgetgallery",
"widgetgallery");
◆ wrapView()
std::unique_ptr< WWidget > WtHome::wrapView |
( |
std::unique_ptr< WWidget >(WtHome::*)() |
createFunction | ) |
|
|
private |
Definition at line 167 of file WtHome.C.
std::unique_ptr< Wt::WApplication > createWidget(const Wt::WEnvironment &env, SimpleChatServer &server)
◆ wtExamplePath_
std::string WtHome::wtExamplePath_ |
|
private |
The documentation for this class was generated from the following files:
- C:/_/M/mingw-w64-wt/src/wt-4.5.0/examples/wt-homepage/WtHome.h
- C:/_/M/mingw-w64-wt/src/wt-4.5.0/examples/wt-homepage/WtHome.C