14 #define GETTEXT_DOMAIN "wesnoth-editor"
21 #include <boost/shared_ptr.hpp>
38 std::vector<std::string>
lbls;
46 virtual const std::vector<team> &
teams()
const {
return t; }
60 :
display(dc, video,
boost::shared_ptr<
wb::manager>(), reports_object, theme_cfg, level)
101 if (
map().in_selection(loc)) {
112 if (
map().on_board_with_border(loc)) {
114 if (
map().in_selection(loc)) {
125 if (
map().in_selection(loc)) {
TYPE
UNSCALED : image will be drawn "as is" without changing size, even in case of redraw SCALED_TO_ZOOM :...
void drawing_buffer_add(const tdrawing_layer layer, const map_location &loc, int x, int y, const surface &surf, const SDL_Rect &clip=SDL_Rect())
Add an item to the drawing buffer.
surface get_image(const image::locator &i_locator, TYPE type)
function to get the surface corresponding to an image.
virtual ~dummy_editor_display_context()
bool invalidate(const map_location &loc)
Function to invalidate a specific tile for redrawing.
std::string get_terrain_editor_string(const map_location &loc) const
editor_display(const display_context *dc, CVideo &video, reports &reports_object, const config &theme_cfg, const config &level)
image::TYPE get_image_type(const map_location &loc)
The editor uses different rules for terrain highlighting (e.g.
void set_brush_locs(const std::set< map_location > &hexes)
map_location mouseoverHex_
virtual const std::vector< std::string > & hidden_label_categories() const
void pre_draw()
Called near the beginning of each draw() call.
void draw_sidebar()
Called near the end of a draw operation, derived classes can use this to render a specific sidebar...
int get_location_x(const map_location &loc) const
Functions to get the on-screen positions of hexes.
To lexical_cast(From value)
Lexical cast converts one type to another.
std::vector< std::string > lbls
Variant for storing WML attributes.
Unit and team statistics.
int get_location_y(const map_location &loc) const
void draw_hex(const map_location &loc)
Redraws a single gamemap location.
void remove_brush_loc(const map_location &hex)
Encapsulates the map of the game.
config & add_child(const std::string &key)
The brush class represents a single brush – a set of relative locations around a "hotspot"...
Manage the empty-palette in the editor.
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
Encapsulates the map of the game.
boost::scoped_ptr< terrain_builder > builder_
This class adds extra editor-specific functionality to a normal gamemap.
virtual const std::vector< team > & teams() const =0
const display_context * get_dummy_display_context()
void rebuild_terrain(const map_location &loc)
virtual void draw_hex(const map_location &loc)
Redraws a single gamemap location.
const SDL_Rect & get_clip_rect()
Get the clipping rectangle for drawing.
std::set< map_location > brush_locations_
Definitions for the terrain builder.
dummy_editor_display_context()
virtual const std::vector< team > & teams() const
virtual const unit_map & units() const
const gamemap & get_map() const
void clear_screen()
Clear the screen contents.
Image on the selected unit.
const display_context * dc_
void add_brush_loc(const map_location &hex)
const SDL_Rect & map_outside_area() const
Returns the available area for a map, this may differ from the above.
Container associating units to locations.
virtual const gamemap & map() const
A config object defines a single node in a WML file, with access to child nodes.
void refresh_report(std::string const &report_name, const config *new_cfg=nullptr)
Redraws the specified report (if anything has changed).
GLsizei const GLcharARB ** string
const editor_map & map() const