Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/rev/18abe8f33d37
Дата изменения: Unknown
Дата индексирования: Mon Oct 1 23:58:59 2012
Кодировка:
allpy: 18abe8f33d37

allpy

changeset 17:18abe8f33d37

class prototype
author boris <bnagaev@gmail.com>
date Tue, 14 Sep 2010 22:32:55 +0400
parents 7b37aba2c7db
children 1edfb7e96cb4
files blocks3d-wt.C config.C config.h
diffstat 3 files changed, 44 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/blocks3d-wt.C	Tue Sep 14 22:24:26 2010 +0400
     1.2 +++ b/blocks3d-wt.C	Tue Sep 14 22:32:55 2010 +0400
     1.3 @@ -1,4 +1,43 @@
     1.4 -
     1.5  
     1.6  #include "config.h"
     1.7  
     1.8 +#include <Wt/WEnvironment>
     1.9 +#include <Wt/WApplication>
    1.10 +#include <Wt/WContainerWidget>
    1.11 +#include <Wt/WServer>
    1.12 +#include <Wt/WSelectionBox>
    1.13 +#include <Wt/WPanel>
    1.14 +#include <Wt/WText>
    1.15 +#include <Wt/WContainerWidget>
    1.16 +#include <Wt/WString>
    1.17 +#include <Wt/WHBoxLayout>
    1.18 +#include <Wt/WVBoxLayout>
    1.19 +#include <Wt/WImage>
    1.20 +#include <Wt/WPushButton>
    1.21 +
    1.22 +class Blocks3DApplication : public WApplication
    1.23 +{
    1.24 +public:
    1.25 +  Blocks3DApplication(const WEnvironment& env);
    1.26 +};
    1.27 +
    1.28 +
    1.29 +Blocks3DApplication* createApplication(const WEnvironment& env)
    1.30 +{
    1.31 +  return new Blocks3DApplication(env);
    1.32 +}
    1.33 +
    1.34 +int main(int argc, char **argv)
    1.35 +{
    1.36 +  WServer server(argv[0]);
    1.37 +  server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
    1.38 +  
    1.39 +  server.addEntryPoint(Application, createApplication, Malakite::main_url);
    1.40 +  
    1.41 +  if (server.start()) {
    1.42 +    WServer::waitForShutdown();
    1.43 +    server.stop();
    1.44 +  }
    1.45 +}
    1.46 +
    1.47 +
     2.1 --- a/config.C	Tue Sep 14 22:24:26 2010 +0400
     2.2 +++ b/config.C	Tue Sep 14 22:32:55 2010 +0400
     2.3 @@ -9,5 +9,7 @@
     2.4  const char* blocks3d_path = "/home/boris/my-code/Blocks3D/Blocks3D_v5/Blocks3D.py";
     2.5  const char* temp_path = "/tmp/";
     2.6  
     2.7 +const char* main_url = "/";
     2.8 +
     2.9  }
    2.10  
     3.1 --- a/config.h	Tue Sep 14 22:24:26 2010 +0400
     3.2 +++ b/config.h	Tue Sep 14 22:32:55 2010 +0400
     3.3 @@ -7,4 +7,6 @@
     3.4  extern const char* blocks3d_path;
     3.5  extern const char* temp_path;
     3.6  
     3.7 +extern const char* main_url;
     3.8 +
     3.9  }