Wt examples: wt-homepage/WtHome.h Source File

Wt examples 4.10.4

Loading...
Searching...
No Matches
WtHome.h
Go to the documentation of this file.
1// This may look like C code, but it's really -*- C++ -*-
2/*
3 * Copyright (C) 2008 Emweb bv, Herent, Belgium.
4 *
5 * See the LICENSE file for terms of use.
6 */
7#ifndef WT_HOME_H_
8#define WT_HOME_H_
9
10#include <Wt/WApplication.h>
11
12#include "Home.h"
13
14using namespace Wt;
15
16 class WtHome : public Home
17{
18public:
19 WtHome(const WEnvironment& env, Dbo::SqlConnectionPool& blogDb);
20
21protected:
22 virtual std::unique_ptr<WWidget> examples() override;
23 virtual std::unique_ptr<WWidget> createQuoteForm() override;
24 virtual std::unique_ptr<WWidget> sourceViewer(const std::string &internalPath) override;
25 virtual std::string filePrefix() const override { return "wt-"; }
26
27private:
28 std::string wtExamplePath_;
29
30 std::unique_ptr<WWidget> example(const char *textKey, const std::string& sourceDir);
31
32 std::unique_ptr<WWidget> helloWorldExample();
33 std::unique_ptr<WWidget> chartExample();
34 std::unique_ptr<WWidget> homepageExample();
35 std::unique_ptr<WWidget> treeviewExample();
36 std::unique_ptr<WWidget> gitExample();
37 std::unique_ptr<WWidget> chatExample();
38 std::unique_ptr<WWidget> composerExample();
39 std::unique_ptr<WWidget> widgetGalleryExample();
40 std::unique_ptr<WWidget> hangmanExample();
41
42 std::unique_ptr<WWidget> wrapView(std::unique_ptr<WWidget> (WtHome::*createFunction)());
43};
44
45std::unique_ptr<WApplication> createWtHomeApplication(const WEnvironment& env,
46 Dbo::SqlConnectionPool *blogDb);
47
48#endif // WT_HOME_H_
Home.h
createWtHomeApplication
std::unique_ptr< WApplication > createWtHomeApplication(const WEnvironment &env, Dbo::SqlConnectionPool *blogDb)
Definition WtHome.C:172
Home
Definition Home.h:68
WtHome
Definition WtHome.h:17
WtHome::wrapView
std::unique_ptr< WWidget > wrapView(std::unique_ptr< WWidget >(WtHome::*createFunction)())
Definition WtHome.C:167
WtHome::createQuoteForm
virtual std::unique_ptr< WWidget > createQuoteForm() override
Definition WtHome.C:153
WtHome::composerExample
std::unique_ptr< WWidget > composerExample()
Definition WtHome.C:84
WtHome::widgetGalleryExample
std::unique_ptr< WWidget > widgetGalleryExample()
Definition WtHome.C:89
WtHome::treeviewExample
std::unique_ptr< WWidget > treeviewExample()
Definition WtHome.C:69
WtHome::chartExample
std::unique_ptr< WWidget > chartExample()
Definition WtHome.C:59
WtHome::chatExample
std::unique_ptr< WWidget > chatExample()
Definition WtHome.C:79
WtHome::examples
virtual std::unique_ptr< WWidget > examples() override
Definition WtHome.C:99
WtHome::example
std::unique_ptr< WWidget > example(const char *textKey, const std::string &sourceDir)
Definition WtHome.C:45
WtHome::homepageExample
std::unique_ptr< WWidget > homepageExample()
Definition WtHome.C:64
WtHome::gitExample
std::unique_ptr< WWidget > gitExample()
Definition WtHome.C:74
WtHome::filePrefix
virtual std::string filePrefix() const override
Definition WtHome.h:25
WtHome::WtHome
WtHome(const WEnvironment &env, Dbo::SqlConnectionPool &blogDb)
Definition WtHome.C:29
WtHome::hangmanExample
std::unique_ptr< WWidget > hangmanExample()
Definition WtHome.C:94
WtHome::helloWorldExample
std::unique_ptr< WWidget > helloWorldExample()
Definition WtHome.C:54
WtHome::wtExamplePath_
std::string wtExamplePath_
Definition WtHome.h:28
WtHome::sourceViewer
virtual std::unique_ptr< WWidget > sourceViewer(const std::string &internalPath) override
Definition WtHome.C:162
Wt
Definition AddresseeEdit.h:16