The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
unit_recruit.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2016 by the Battle for Wesnoth Project http://www.wesnoth.org/
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY.
10 
11  See the COPYING file for more details.
12 */
13 
14 #ifndef GUI_DIALOGS_UNIT_RECRUIT_HPP_INCLUDED
15 #define GUI_DIALOGS_UNIT_RECRUIT_HPP_INCLUDED
16 
17 #include "gui/dialogs/dialog.hpp"
18 
19 class unit_type;
20 class team;
21 
22 namespace gui2 {
23 
24 class tunit_recruit : public tdialog
25 {
26 public:
27  tunit_recruit(std::vector<const unit_type*>& recruit_list, team& team);
28 
29  int get_selected_index() const
30  {
31  return selected_index_;
32  }
33 
34 private:
35  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
36  virtual const std::string& window_id() const;
37 
38  /** Inherited from tdialog. */
39  void pre_show(twindow& window);
40  void post_show(twindow& window);
41 
42  void list_item_clicked(twindow& window);
43 
44  void show_help(twindow& window);
45 
46  std::vector<const unit_type*>& recruit_list_;
47 
48  team& team_;
49 
51 };
52 
53 } // namespace gui2
54 
55 #endif /* ! GUI_DIALOGS_UNIT_RECRUIT_HPP_INCLUDED */
void post_show(twindow &window)
Actions to be taken after the window has been shown.
std::vector< const unit_type * > & recruit_list_
tunit_recruit(std::vector< const unit_type * > &recruit_list, team &team)
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:62
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
This class stores all the data for a single 'side' (in game nomenclature).
Definition: team.hpp:50
Abstract base class for all dialogs.
Definition: dialog.hpp:121
void pre_show(twindow &window)
Inherited from tdialog.
void show_help(twindow &window)
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
int get_selected_index() const
void list_item_clicked(twindow &window)
GLsizei const GLcharARB ** string
Definition: glew.h:4503