Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

editor::editor_display Class Reference

#include <editor_display.hpp>

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

List of all members.

Public Member Functions

 editor_display (unit_map *units, CVideo &video, const editor_map *map, const std::vector< team > *t, const config &theme_cfg, const config &level)
bool in_editor () const
void add_brush_loc (const map_location &hex)
void set_brush_locs (const std::set< map_location > &hexes)
void clear_brush_locs ()
void remove_brush_loc (const map_location &hex)
const editor_mapmap () const
void rebuild_terrain (const map_location &loc)
void set_toolbar_hint (const std::string &value)
void set_palette_report (const config &palette_report)

Protected Member Functions

void pre_draw ()
 Called near the beginning of each draw() call.
image::TYPE get_image_type (const map_location &loc)
 The editor uses different rules for terrain highlighting (e.g.
void draw_hex (const map_location &loc)
 Redraws a single gamemap location.
const SDL_Rect & get_clip_rect ()
 Get the clipping rectangle for drawing.
void draw_sidebar ()
 Called near the end of a draw operation, derived classes can use this to render a specific sidebar.

Protected Attributes

std::set< map_locationbrush_locations_
std::string toolbar_hint_

Private Attributes

config palette_report_

Detailed Description

Definition at line 24 of file editor_display.hpp.


Constructor & Destructor Documentation

editor::editor_display::editor_display ( unit_map units,
CVideo video,
const editor_map map,
const std::vector< team > *  t,
const config theme_cfg,
const config level 
)

Definition at line 22 of file editor_display.cpp.

References display::clear_screen().

Here is the call graph for this function:


Member Function Documentation

void editor::editor_display::add_brush_loc ( const map_location hex  ) 

Definition at line 32 of file editor_display.cpp.

References brush_locations_, and display::invalidate().

Here is the call graph for this function:

void editor::editor_display::clear_brush_locs (  ) 

Definition at line 45 of file editor_display.cpp.

References brush_locations_, and display::invalidate().

Here is the call graph for this function:

void editor::editor_display::draw_hex ( const map_location loc  )  [protected, virtual]
void editor::editor_display::draw_sidebar (  )  [protected, virtual]

Called near the end of a draw operation, derived classes can use this to render a specific sidebar.

Very similar to post_commit.

Reimplemented from display.

Definition at line 101 of file editor_display.cpp.

References config::add_child(), display::get_map(), gamemap::get_terrain_editor_string(), display::mouseoverHex_, palette_report_, display::refresh_report(), str_cast(), and toolbar_hint_.

Here is the call graph for this function:

const SDL_Rect & editor::editor_display::get_clip_rect (  )  [protected, virtual]

Get the clipping rectangle for drawing.

Virtual since the editor might use a slightly different approach.

Reimplemented from display.

Definition at line 96 of file editor_display.cpp.

References display::map_outside_area().

Here is the call graph for this function:

image::TYPE editor::editor_display::get_image_type ( const map_location loc  )  [protected, virtual]

The editor uses different rules for terrain highlighting (e.g.

selections)

Reimplemented from display.

Definition at line 65 of file editor_display.cpp.

References map().

Here is the call graph for this function:

bool editor::editor_display::in_editor (  )  const [inline, virtual]

Reimplemented from display.

Definition at line 30 of file editor_display.hpp.

const editor_map& editor::editor_display::map (  )  const [inline]
void editor::editor_display::pre_draw (  )  [protected, virtual]

Called near the beginning of each draw() call.

Derived classes can use this to add extra actions before redrawing invalidated hexes takes place. No action here by default.

Reimplemented from display.

Definition at line 61 of file editor_display.cpp.

void editor::editor_display::rebuild_terrain ( const map_location loc  ) 

Definition at line 57 of file editor_display.cpp.

References display::builder_.

Referenced by editor::context_manager::refresh_after_action().

Here is the caller graph for this function:

void editor::editor_display::remove_brush_loc ( const map_location hex  ) 

Definition at line 51 of file editor_display.cpp.

References brush_locations_, and display::invalidate().

Here is the call graph for this function:

void editor::editor_display::set_brush_locs ( const std::set< map_location > &  hexes  ) 

Definition at line 38 of file editor_display.cpp.

References brush_locations_, and display::invalidate().

Here is the call graph for this function:

void editor::editor_display::set_palette_report ( const config palette_report  )  [inline]

Definition at line 40 of file editor_display.hpp.

References palette_report_.

Referenced by editor::editor_toolkit::hotkey_set_mouse_action(), and editor::editor_palette< Item >::set_group().

Here is the caller graph for this function:

void editor::editor_display::set_toolbar_hint ( const std::string &  value  )  [inline]

Definition at line 38 of file editor_display.hpp.

References toolbar_hint_.


Member Data Documentation

Definition at line 58 of file editor_display.hpp.

Referenced by draw_sidebar(), and set_palette_report().

std::string editor::editor_display::toolbar_hint_ [protected]

Definition at line 55 of file editor_display.hpp.

Referenced by draw_sidebar(), and set_toolbar_hint().


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:19:39 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs