The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
item_palette.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 - 2016 by Fabian Mueller <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * Manage the item-palette in the editor.
17  */
18 
19 #ifndef ITEM_PALETTES_H_INCLUDED
20 #define ITEM_PALETTES_H_INCLUDED
21 
22 #include "editor_palettes.hpp"
23 #include "overlay.hpp"
24 
25 namespace editor {
26 
27 //std::string get_selected_terrain();
28 
29 /** Palette where the terrain to be drawn can be selected. */
30 class item_palette : public editor_palette<overlay> {
31 public:
32 
34  const config& cfg,
35  mouse_action** active_mouse_action);
36 
37  virtual void setup(const config& cfg);
38 
39  virtual std::string get_help_string();
40 
41 private:
42 
43  virtual const std::string& get_id(const overlay& item);
44 
45  virtual void draw_item(const overlay& item, surface& image, std::stringstream& tooltip_text);
46 
47 };
48 
49 }
50 #endif
virtual void draw_item(const overlay &item, surface &image, std::stringstream &tooltip_text)
item_palette(editor_display &gui, const config &cfg, mouse_action **active_mouse_action)
virtual const std::string & get_id(const overlay &item)
virtual void setup(const config &cfg)
Setup the internal data structure.
General purpose widgets.
Manage the empty-palette in the editor.
Definition: action.cpp:28
Palette where the terrain to be drawn can be selected.
virtual std::string get_help_string()
this module manages the cache of images.
Definition: image.cpp:75
A mouse action receives events from the controller, and responds to them by creating an appropriate e...
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
GLsizei const GLcharARB ** string
Definition: glew.h:4503