TheChess

widgets/TableForm.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_TABLE_FORM_HPP_
00011 #define THECHESS_WIDGETS_TABLE_FORM_HPP_
00012 
00013 #include <Wt/WContainerWidget>
00014 #include <Wt/WTable>
00015 #include <Wt/WTableRow>
00016 #include <Wt/WString>
00017 #include <Wt/WWidget>
00018 #include <Wt/WFormWidget>
00019 
00020 namespace thechess {
00021 namespace widgets {
00022 
00023 class TableForm : public Wt::WTable {
00024 public:
00025     TableForm(Wt::WContainerWidget* parent=0);
00026     void section(const Wt::WString& header);
00027     Wt::WContainerWidget* item(const Wt::WString& name,
00028                                const Wt::WString& description="",
00029                                Wt::WFormWidget* fw=0, Wt::WWidget* input=0, bool row=true);
00030     void show(Wt::WWidget* input);
00031     void hide(Wt::WWidget* input);
00032 
00033 private:
00034     Wt::WTableRow* parent_row_(Wt::WWidget* input);
00035 };
00036 
00037 }
00038 }
00039 
00040 
00041 #endif
00042 
 All Classes Functions Enumerations Enumerator