TheChess

widgets/GameCreateWidget.hpp

00001 /*
00002  * thechess, chess game web application written in C++ and based on Wt
00003  * Copyright (C) 2010 Boris Nagaev
00004  *
00005  * thechess is licensed under the GNU GPL Version 2.
00006  * Other versions of the GPL do not apply.
00007  * See the LICENSE file for terms of use.
00008  */
00009 
00010 #ifndef THECHESS_WIDGETS_GAMECREATEWIDGET_HPP_
00011 #define THECHESS_WIDGETS_GAMECREATEWIDGET_HPP_
00012 
00013 #include <Wt/WContainerWidget>
00014 #include <Wt/Dbo/ptr>
00015 namespace dbo = Wt::Dbo;
00016 
00017 #include "model/User.hpp"
00018 #include "chess/field.hpp"
00019 
00020 namespace Wt {
00021 class WComboBox;
00022 };
00023 
00024 namespace thechess {
00025 namespace widgets {
00026 
00027 using model::UserPtr;
00028 
00029 class GameParametersWidget;
00030 
00031 class GameCreateWidget : public Wt::WContainerWidget {
00032 public:
00033     GameCreateWidget(UserPtr user, Wt::WContainerWidget* p=0);
00034     GameCreateWidget(Wt::WContainerWidget* p=0);
00035 
00036 private:
00037     GameParametersWidget* gpw_;
00038     bool with_user_;
00039     UserPtr user_;
00040     Wt::WComboBox* color_;
00041 
00042     void print_();
00043     void button_handler_();
00044     chess::Color selected_color_() const;
00045 };
00046 
00047 }
00048 }
00049 
00050 #endif
 All Classes Functions Enumerations Enumerator