editor/editor_layout.hpp

Go to the documentation of this file.
00001 /* $Id: editor_layout.hpp 53445 2012-03-05 14:27:07Z fendrin $ */
00002 /*
00003   Copyright (C) 2003 - 2012 by David White <dave@whitevine.net>
00004   Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006   This program is free software; you can redistribute it and/or modify
00007   it under the terms of the GNU General Public License as published by
00008   the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010   This program is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY.
00012 
00013   See the COPYING file for more details.
00014 */
00015 
00016 /** @file */
00017 
00018 #ifndef EDITOR_LAYOUT_H_INCLUDED
00019 #define EDITOR_LAYOUT_H_INCLUDED
00020 
00021 #include "global.hpp"
00022 
00023 #include <cstddef>
00024 
00025 class display;
00026 
00027 namespace editor {
00028 
00029 /** Size specifications for the map editor. */
00030 struct size_specs {
00031     /**
00032      * Initialize the values to dummie-values that will avoid floating point
00033      * errors if calculations are made before the sizes are adjusted through
00034      * adjust_sizes().
00035      */
00036     size_specs();
00037     size_t terrain_size;
00038     size_t terrain_padding;
00039     size_t terrain_space;
00040     size_t terrain_width;
00041     size_t palette_x;
00042     size_t palette_y;
00043     size_t palette_h;
00044     size_t palette_w;
00045     size_t brush_x;
00046     size_t brush_y;
00047     size_t brush_padding;
00048     size_t brush_width;
00049 };
00050 
00051 /** Adjust the internal size specifications to fit the display. */
00052 void adjust_sizes(const display &disp, size_specs &sizes);
00053 
00054 }
00055 
00056 #endif // EDITOR_LAYOUT_H_INCLUDED
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Tue Mar 13 2012 01:02:39 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs