10 #include <Wt/WApplication>
11 #include <Wt/WContainerWidget>
24 Lang(
const std::string& code,
const std::string& path,
25 const std::string& shortDescription,
26 const std::string& longDescription) :
29 shortDescription_(shortDescription),
30 longDescription_(longDescription) {
44 template <
typename Function>
53 WContainerWidget::load();
61 template <
typename Function>
67 class Home :
public WApplication
70 Home(
const WEnvironment& env, Wt::Dbo::SqlConnectionPool& blogDb,
71 const std::string& title,
72 const std::string& resourceBundle,
const std::string& cssPath);
76 void googleAnalyticsLogger();
79 virtual WWidget *examples() = 0;
80 virtual WWidget *createQuoteForm() = 0;
81 virtual WWidget *sourceViewer(
const std::string &deployPath) = 0;
82 virtual std::string filePrefix()
const = 0;
87 WWidget *linkSourceBrowser(
const std::string& examplePath);
91 WString tr(
const char *key);
92 std::string href(
const std::string& url,
const std::string& description);
95 void readReleases(WTable *releaseTable);
106 WWidget *introduction();
110 WWidget *documentation();
111 WWidget *community();
112 WWidget *otherLanguage();
114 WWidget *quoteForm();
120 void readNews(WTable *newsTable,
const std::string& newsfile);
122 WWidget *wrapView(WWidget *(
Home::*createFunction)());
125 void setLanguage(
int language);
126 void setLanguageFromPath();
128 void logInternalPath(
const std::string& path);
129 void chatSetUser(
const WString& name);