00001 // This may look like C code, but it's really -*- C++ -*- 00002 /* 00003 * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. 00004 * 00005 * See the LICENSE file for terms of use. 00006 */ 00007 #ifndef JWT_HOME_H_ 00008 #define JWT_HOME_H_ 00009 00010 #include <Wt/WApplication> 00011 00012 #include "Home.h" 00013 00014 using namespace Wt; 00015 00016 class JWtHome : public Home 00017 { 00018 public: 00019 JWtHome(const WEnvironment& env); 00020 00021 protected: 00022 virtual WWidget *examples(); 00023 virtual WWidget *download(); 00024 virtual WWidget *sourceViewer(const std::string& deployPath); 00025 virtual std::string filePrefix() const { return "jwt-"; } 00026 00027 WWidget *wrapView(WWidget *(JWtHome::*createFunction)()); 00028 00029 private: 00030 WWidget *example(const char *textKey, const std::string& sourceDir); 00031 00032 WWidget *helloWorldExample(); 00033 WWidget *chartExample(); 00034 WWidget *composerExample(); 00035 WWidget *treeviewExample(); 00036 00037 std::string jwtExamplePath_; 00038 }; 00039 00040 WApplication *createJWtHomeApplication(const WEnvironment& env); 00041 00042 #endif // JWT_HOME_H_