00001 /* $Id: leader_list.hpp 25333 2008-03-30 13:49:03Z jhinrichs $ */ 00002 /* 00003 Copyright (C) 2007 - 2008 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 00008 or at your option any later version. 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY. 00011 00012 See the COPYING file for more details. 00013 */ 00014 00015 //! @file leader_list.hpp 00016 //! 00017 00018 #ifndef LEADER_LIST_HPP_INCLUDED 00019 #define LEADER_LIST_HPP_INCLUDED 00020 00021 class config; 00022 namespace gui { class combo; } 00023 00024 #include "unit_types.hpp" 00025 #include <string> 00026 00027 class leader_list_manager 00028 { 00029 public: 00030 static const std::string random_enemy_picture; 00031 00032 leader_list_manager(const config::child_list& side_list, 00033 gui::combo* leader_combo = NULL, gui::combo* gender_combo = NULL); 00034 00035 void set_leader_combo(gui::combo* combo); 00036 void set_gender_combo(gui::combo* combo); 00037 void update_leader_list(int side); 00038 void update_gender_list(const std::string& leader); 00039 std::string get_leader() const; 00040 std::string get_gender() const; 00041 void set_leader(const std::string& leader); 00042 void set_gender(const std::string& gender); 00043 00044 private: 00045 void populate_leader_combo(int selected_index); 00046 std::vector<std::string> leaders_; 00047 std::vector<std::string> genders_; 00048 std::vector<std::string> gender_ids_; 00049 config::child_list side_list_; 00050 gui::combo* leader_combo_; 00051 gui::combo* gender_combo_; 00052 }; 00053 00054 #endif 00055
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |