00001 /* $Id: campaign_selection.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2009 - 2012 by Mark de Wever <koraq@xs4all.nl> 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY. 00012 00013 See the COPYING file for more details. 00014 */ 00015 00016 #ifndef GUI_DIALOGS_CAMPAIGN_SELECTION_HPP_INCLUDED 00017 #define GUI_DIALOGS_CAMPAIGN_SELECTION_HPP_INCLUDED 00018 00019 #include "gui/dialogs/dialog.hpp" 00020 00021 #include "config.hpp" 00022 00023 namespace gui2 { 00024 00025 class tcampaign_selection 00026 : public tdialog 00027 { 00028 public: 00029 explicit tcampaign_selection(const std::vector<config>& campaigns) 00030 : campaigns_(campaigns) 00031 , choice_(-1) 00032 00033 { 00034 } 00035 00036 /***** ***** ***** setters / getters for members ***** ****** *****/ 00037 00038 int get_choice() const { return choice_; } 00039 00040 private: 00041 00042 /** Called when another campaign is selected. */ 00043 void campaign_selected(twindow& window); 00044 00045 /** Inherited from tdialog, implemented by REGISTER_DIALOG. */ 00046 virtual const std::string& window_id() const; 00047 00048 /** Inherited from tdialog. */ 00049 void pre_show(CVideo& video, twindow& window); 00050 00051 /** Inherited from tdialog. */ 00052 void post_show(twindow& window); 00053 00054 /** Contains the config objects for all campaigns. */ 00055 const std::vector<config> &campaigns_; 00056 00057 /** The chosen campaign. */ 00058 int choice_; 00059 }; 00060 00061 } // namespace gui2 00062 00063 #endif
| Generated by doxygen 1.7.1 on Wed May 23 2012 01:02:43 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |