Public Member Functions | Private Member Functions

editor::terrain_palette Class Reference

Palette where the terrain to be drawn can be selected. More...

#include <terrain_palettes.hpp>

Inheritance diagram for editor::terrain_palette:
Inheritance graph
[legend]
Collaboration diagram for editor::terrain_palette:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 terrain_palette (editor_display &gui, const size_specs &sizes, const config &cfg, mouse_action **active_mouse_action)
const gamemapmap () const
virtual void setup (const config &cfg)
 Setup the internal data structure.

Private Member Functions

virtual void select_bg_item (std::string item_id)
virtual const std::string & get_id (const t_translation::t_terrain &terrain)
virtual void draw_item (SDL_Rect &dstrect, const t_translation::t_terrain &terrain, std::stringstream &tooltip_text)
virtual void update_report ()
std::string get_terrain_string (const t_translation::t_terrain)
 Return a string representing the terrain and the underlying ones.

Detailed Description

Palette where the terrain to be drawn can be selected.

Definition at line 39 of file terrain_palettes.hpp.


Constructor & Destructor Documentation

editor::terrain_palette::terrain_palette ( editor_display gui,
const size_specs sizes,
const config cfg,
mouse_action **  active_mouse_action 
)

Definition at line 207 of file terrain_palettes.cpp.


Member Function Documentation

void editor::terrain_palette::draw_item ( SDL_Rect &  dstrect,
const t_translation::t_terrain terrain,
std::stringstream &  tooltip_text 
) [private, virtual]
const std::string & editor::terrain_palette::get_id ( const t_translation::t_terrain terrain  )  [private, virtual]

Implements editor::editor_palette< t_translation::t_terrain >.

Definition at line 215 of file terrain_palettes.cpp.

References gamemap::get_terrain_info(), terrain_type::id(), and map().

Referenced by setup().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string editor::terrain_palette::get_terrain_string ( const t_translation::t_terrain   )  [private]

Return a string representing the terrain and the underlying ones.

const gamemap& editor::terrain_palette::map (  )  const [inline]

Definition at line 45 of file terrain_palettes.hpp.

References display::get_map(), and editor::editor_palette< t_translation::t_terrain >::gui_.

Referenced by draw_item(), get_id(), setup(), and update_report().

Here is the call graph for this function:

Here is the caller graph for this function:

void editor::terrain_palette::select_bg_item ( std::string  item_id  )  [private, virtual]

Reimplemented from editor::editor_palette< t_translation::t_terrain >.

Definition at line 59 of file terrain_palettes.cpp.

References editor::editor_palette< t_translation::t_terrain >::selected_bg_item().

Referenced by setup().

Here is the call graph for this function:

Here is the caller graph for this function:

void editor::terrain_palette::setup ( const config cfg  )  [virtual]
void editor::terrain_palette::update_report (  )  [private, virtual]

Definition at line 51 of file terrain_palettes.cpp.

References _, gamemap::get_terrain_editor_string(), map(), and editor::editor_palette< t_translation::t_terrain >::selected_fg_item().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:20:03 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs