Wt examples 3.1.10
/build/buildd/witty-3.1.10/examples/hangman/hangman.C
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2005 Wim Dumon
00003  *
00004  * See the LICENSE file for terms of use.
00005  */
00006 #include <Wt/WApplication>
00007 #include "HangmanGame.h"
00008 
00009 WApplication *createApplication(const WEnvironment& env)
00010 {
00011   WApplication *app = new WApplication(env);
00012   app->setTitle(L"Hangman");
00013   new HangmanGame(app->root());  
00014 
00015   /*
00016    * The application style sheet (only for the highscore widget)
00017    */
00018   WCssDecorationStyle cellStyle;
00019   WBorder cellBorder;
00020   cellBorder.setStyle(WBorder::Solid);
00021   cellBorder.setWidth(WBorder::Explicit, 1);
00022   cellBorder.setColor(WColor(Wt::lightGray));
00023   cellStyle.setBorder(cellBorder);
00024 
00025   app->styleSheet().addRule(".highscores * TD", cellStyle);
00026 
00027   cellStyle.font().setVariant(WFont::SmallCaps);
00028 
00029   app->styleSheet().addRule(".highscoresheader", cellStyle);
00030 
00031   cellStyle.font().setVariant(WFont::NormalVariant);
00032   cellStyle.font().setStyle(WFont::Italic);
00033   cellStyle.font().setWeight(WFont::Bold);
00034 
00035   app->styleSheet().addRule(".highscoresself", cellStyle);
00036 
00037   return app;
00038 }
00039 
00040 int main(int argc, char **argv)
00041 {
00042    return WRun(argc, argv, &createApplication);
00043 }

Generated on Sat Dec 24 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4