Wt examples  3.7.1
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>
11 
12 #include "Home.h"
13 
14 using namespace Wt;
15 
16 class WtHome : public Home
17 {
18 public:
19  WtHome(const WEnvironment& env, Wt::Dbo::SqlConnectionPool& blogDb);
20 
21 protected:
22  virtual WWidget *examples();
23  virtual WWidget *createQuoteForm();
24  virtual WWidget *sourceViewer(const std::string &internalPath);
25  virtual std::string filePrefix() const { return "wt-"; }
26 
27 private:
28  std::string wtExamplePath_;
29 
30  WWidget *example(const char *textKey, const std::string& sourceDir);
31 
32  WWidget *helloWorldExample();
33  WWidget *chartExample();
34  WWidget *homepageExample();
35  WWidget *treeviewExample();
36  WWidget *gitExample();
37  WWidget *chatExample();
38  WWidget *composerExample();
39  WWidget *widgetGalleryExample();
40  WWidget *hangmanExample();
41 
42  WWidget *wrapView(WWidget *(WtHome::*createFunction)());
43 };
44 
47 
48 #endif // WT_HOME_H_
WApplication * createWtHomeApplication(const WEnvironment &env, Wt::Dbo::SqlConnectionPool *blogDb)
Definition: WtHome.C:170
virtual std::string filePrefix() const
Definition: WtHome.h:25
Definition: Home.h:67
std::string wtExamplePath_
Definition: WtHome.h:28
Definition: WtHome.h:16

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13