The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
floating_textbox.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2006 - 2016 by Joerg Hinrichs <[email protected]>
3  wesnoth playturn Copyright (C) 2003 by David White <[email protected]>
4  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 #ifndef FLOATING_TEXTBOX_H_INCLUDED
17 #define FLOATING_TEXTBOX_H_INCLUDED
18 
19 // Scoped_resource can't use a pointer to an incomplete pointer with MSVC.
20 #include "widgets/textbox.hpp"
21 #include "scoped_resource.hpp"
22 
23 #include <set>
24 
25 class game_display;
26 class team;
27 class unit_map;
28 
29 namespace gui{
30 
31  class button;
32 
35 
37  public:
39 
40  TEXTBOX_MODE mode() const { return mode_; }
41  const util::scoped_ptr<gui::button>& check() const { return check_; }
42  const util::scoped_ptr<gui::textbox>& box() const { return box_; }
43 
44  void close(game_display& gui);
47  const std::string& check_label, bool checked, game_display& gui);
48  void tab(const std::set<std::string>& dictionary);
49  bool active() const { return box_.get() != nullptr; }
50 
51  private:
54 
56 
58  int label_;
59  };
60 }
61 
62 #endif
const util::scoped_ptr< gui::button > & check() const
General purpose widgets.
GLenum mode
Definition: glew.h:2390
scoped_resource: class template, functions, helper policies etc. for resource management.
util::scoped_ptr< gui::textbox > box_
This class stores all the data for a single 'side' (in game nomenclature).
Definition: team.hpp:50
void update_location(game_display &gui)
A class which implements an approximation of template typedef scoped_resource scoped_ptr;.
const util::scoped_ptr< gui::textbox > & box() const
void tab(const std::set< std::string > &dictionary)
void show(gui::TEXTBOX_MODE mode, const std::string &label, const std::string &check_label, bool checked, game_display &gui)
util::scoped_ptr< gui::button > check_
Container associating units to locations.
Definition: map.hpp:90
void close(game_display &gui)
GLsizei const GLcharARB ** string
Definition: glew.h:4503
TEXTBOX_MODE mode() const